Skip to content

Commit 82df7f9

Browse files
authored
Merge pull request #1 from HanClinto/bins-rename-nits
Nits found in binary renames
2 parents 0be5f39 + 70de0de commit 82df7f9

File tree

8 files changed

+21
-21
lines changed

8 files changed

+21
-21
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,7 @@ Here is an example of a few-shot interaction, invoked with the command
733733
./llama-cli -m ./models/13B/ggml-model-q4_0.gguf -n 256 --repeat_penalty 1.0 --color -i -r "User:" -f prompts/chat-with-bob.txt
734734
```
735735

736-
Note the use of `--color` to distinguish between user input and generated text. Other parameters are explained in more detail in the [README](examples/main/README.md) for the `main` example program.
736+
Note the use of `--color` to distinguish between user input and generated text. Other parameters are explained in more detail in the [README](examples/main/README.md) for the `llama-cli` example program.
737737

738738
![image](https://user-images.githubusercontent.com/1991296/224575029-2af3c7dc-5a65-4f64-a6bb-517a532aea38.png)
739739

@@ -958,7 +958,7 @@ docker run --gpus all -v /path/to/models:/models local/llama.cpp:server-cuda -m
958958

959959
### Docs
960960

961-
- [main](./examples/main/README.md)
961+
- [main (cli)](./examples/main/README.md)
962962
- [server](./examples/server/README.md)
963963
- [jeopardy](./examples/jeopardy/README.md)
964964
- [BLIS](./docs/BLIS.md)

docs/HOWTO-add-model.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ Have a look at existing implementation like `build_llama`, `build_dbrx` or `buil
100100

101101
When implementing a new graph, please note that the underlying `ggml` backends might not support them all, support for missing backend operations can be added in another PR.
102102

103-
Note: to debug the inference graph: you can use [eval-callback](../examples/eval-callback).
103+
Note: to debug the inference graph: you can use [llama-eval-callback](../examples/eval-callback).
104104

105105
## GGUF specification
106106

examples/eval-callback/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ It simply prints to the console all operations and tensor data.
66
Usage:
77

88
```shell
9-
eval-callback \
9+
llama-eval-callback \
1010
--hf-repo ggml-org/models \
1111
--hf-file phi-2/ggml-model-q4_0.gguf \
1212
--model phi-2-q4_0.gguf \

examples/export-lora/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Apply LORA adapters to base model and export the resulting model.
44

55
```
6-
usage: export-lora [options]
6+
usage: llama-export-lora [options]
77
88
options:
99
-h, --help show this help message and exit

examples/lookup/lookup-merge.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111
#include <unordered_map>
1212
#include <vector>
1313

14-
static void print_usage() {
14+
static void print_usage(char* argv0) {
1515
fprintf(stderr, "Merges multiple lookup cache files into a single one.\n");
16-
fprintf(stderr, "Usage: lookup-merge [--help] lookup_part_1.bin lookup_part_2.bin ... lookup_merged.bin\n");
16+
fprintf(stderr, "Usage: %s [--help] lookup_part_1.bin lookup_part_2.bin ... lookup_merged.bin\n", argv0);
1717
}
1818

1919
int main(int argc, char ** argv){
2020
if (argc < 3) {
21-
print_usage();
21+
print_usage(argv[0]);
2222
exit(1);
2323
}
2424

@@ -27,7 +27,7 @@ int main(int argc, char ** argv){
2727
for (int i = 0; i < argc-1; ++i) {
2828
args[i] = argv[i+1];
2929
if (args[i] == "-h" || args[i] == "--help") {
30-
print_usage();
30+
print_usage(argv[0]);
3131
exit(0);
3232
}
3333
}

examples/main/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ llama-cli.exe -m models\7B\ggml-model.bin --ignore-eos -n -1
6464

6565
## Common Options
6666

67-
In this section, we cover the most commonly used options for running the `main` program with the LLaMA models:
67+
In this section, we cover the most commonly used options for running the `llama-cli` program with the LLaMA models:
6868

6969
- `-m FNAME, --model FNAME`: Specify the path to the LLaMA model file (e.g., `models/7B/ggml-model.gguf`; inferred from `--model-url` if set).
7070
- `-mu MODEL_URL --model-url MODEL_URL`: Specify a remote http url to download the file (e.g https://huggingface.co/ggml-org/models/resolve/main/phi-2/ggml-model-q4_0.gguf).
@@ -74,15 +74,15 @@ In this section, we cover the most commonly used options for running the `main`
7474

7575
## Input Prompts
7676

77-
The `main` program provides several ways to interact with the LLaMA models using input prompts:
77+
The `llama-cli` program provides several ways to interact with the LLaMA models using input prompts:
7878

7979
- `--prompt PROMPT`: Provide a prompt directly as a command-line option.
8080
- `--file FNAME`: Provide a file containing a prompt or multiple prompts.
8181
- `--interactive-first`: Run the program in interactive mode and wait for input right away. (More on this below.)
8282

8383
## Interaction
8484

85-
The `main` program offers a seamless way to interact with LLaMA models, allowing users to engage in real-time conversations or provide instructions for specific tasks. The interactive mode can be triggered using various options, including `--interactive` and `--interactive-first`.
85+
The `llama-cli` program offers a seamless way to interact with LLaMA models, allowing users to engage in real-time conversations or provide instructions for specific tasks. The interactive mode can be triggered using various options, including `--interactive` and `--interactive-first`.
8686

8787
In interactive mode, users can participate in text generation by injecting their input during the process. Users can press `Ctrl+C` at any time to interject and type their input, followed by pressing `Return` to submit it to the LLaMA model. To submit additional lines without finalizing input, users can end the current line with a backslash (`\`) and continue typing.
8888

examples/perplexity/perplexity.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ static results_perplexity perplexity(llama_context * ctx, const gpt_params & par
476476
}
477477

478478
// Download: https://huggingface.co/datasets/ggml-org/ci/resolve/main/wikitext-2-raw-v1.zip
479-
// Run `./perplexity -m models/7B/ggml-model-q4_0.bin -f wiki.test.raw`
479+
// Run `./llama-perplexity -m models/7B/ggml-model-q4_0.bin -f wiki.test.raw`
480480
// Output: `perplexity: 13.5106 [114/114]`
481481
// BOS tokens will be added for each chunk before eval
482482

scripts/run-with-preset.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
logger = logging.getLogger("run-with-preset")
1212

13-
CLI_ARGS_MAIN_PERPLEXITY = [
13+
CLI_ARGS_LLAMA_CLI_PERPLEXITY = [
1414
"batch-size", "cfg-negative-prompt", "cfg-scale", "chunks", "color", "ctx-size", "escape",
1515
"export", "file", "frequency-penalty", "grammar", "grammar-file", "hellaswag",
1616
"hellaswag-tasks", "ignore-eos", "in-prefix", "in-prefix-bos", "in-suffix",
@@ -29,15 +29,15 @@
2929
"n-prompt", "output", "repetitions", "tensor-split", "threads", "verbose"
3030
]
3131

32-
CLI_ARGS_SERVER = [
32+
CLI_ARGS_LLAMA_SERVER = [
3333
"alias", "batch-size", "ctx-size", "embedding", "host", "memory-f32", "lora", "lora-base",
3434
"low-vram", "main-gpu", "mlock", "model", "n-gpu-layers", "n-probs", "no-mmap", "no-mul-mat-q",
3535
"numa", "path", "port", "rope-freq-base", "timeout", "rope-freq-scale", "tensor-split",
3636
"threads", "verbose"
3737
]
3838

3939
description = """Run llama.cpp binaries with presets from YAML file(s).
40-
To specify which binary should be run, specify the "binary" property (main, perplexity, llama-bench, and server are supported).
40+
To specify which binary should be run, specify the "binary" property (llama-cli, llama-perplexity, llama-bench, and llama-server are supported).
4141
To get a preset file template, run a llama.cpp binary with the "--logdir" CLI argument.
4242
4343
Formatting considerations:
@@ -77,19 +77,19 @@
7777

7878
props = {prop.replace("_", "-"): val for prop, val in props.items()}
7979

80-
binary = props.pop("binary", "main")
80+
binary = props.pop("binary", "llama-cli")
8181
if known_args.binary:
8282
binary = known_args.binary
8383

8484
if os.path.exists(f"./{binary}"):
8585
binary = f"./{binary}"
8686

87-
if binary.lower().endswith("main") or binary.lower().endswith("perplexity"):
88-
cli_args = CLI_ARGS_MAIN_PERPLEXITY
87+
if binary.lower().endswith("llama-cli") or binary.lower().endswith("llama-perplexity"):
88+
cli_args = CLI_ARGS_LLAMA_CLI_PERPLEXITY
8989
elif binary.lower().endswith("llama-bench"):
9090
cli_args = CLI_ARGS_LLAMA_BENCH
91-
elif binary.lower().endswith("server"):
92-
cli_args = CLI_ARGS_SERVER
91+
elif binary.lower().endswith("llama-server"):
92+
cli_args = CLI_ARGS_LLAMA_SERVER
9393
else:
9494
logger.error(f"Unknown binary: {binary}")
9595
sys.exit(1)

0 commit comments

Comments
 (0)