Guest User

llama-cli --help

a guest
Jun 19th, 2024
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.15 KB | Help | 0 0
  1. -h, --help, --usage print usage and exit
  2. --version show version and build info
  3. -v, --verbose print verbose information
  4. --verbosity N set specific verbosity level (default: 0)
  5. --verbose-prompt print a verbose prompt before generation (default: false)
  6. --no-display-prompt don't print prompt at generation (default: false)
  7. -co, --color colorise output to distinguish prompt and user input from generations (default: false)
  8. -s, --seed SEED RNG seed (default: -1, use random seed for < 0)
  9. -t, --threads N number of threads to use during generation (default: 6)
  10. -tb, --threads-batch N number of threads to use during batch and prompt processing (default: same as --threads)
  11. -td, --threads-draft N number of threads to use during generation (default: same as --threads)
  12. -tbd, --threads-batch-draft N number of threads to use during batch and prompt processing (default: same as --threads-draft)
  13. --draft N number of tokens to draft for speculative decoding (default: 5)
  14. -ps, --p-split N speculative decoding split probability (default: 0.1)
  15. -lcs, --lookup-cache-static FNAME
  16. path to static lookup cache to use for lookup decoding (not updated by generation)
  17. -lcd, --lookup-cache-dynamic FNAME
  18. path to dynamic lookup cache to use for lookup decoding (updated by generation)
  19. -c, --ctx-size N size of the prompt context (default: 0, 0 = loaded from model)
  20. -n, --predict N number of tokens to predict (default: -1, -1 = infinity, -2 = until context filled)
  21. -b, --batch-size N logical maximum batch size (default: 2048)
  22. -ub, --ubatch-size N physical maximum batch size (default: 512)
  23. --keep N number of tokens to keep from the initial prompt (default: 0, -1 = all)
  24. --chunks N max number of chunks to process (default: -1, -1 = all)
  25. -fa, --flash-attn enable Flash Attention (default: disabled)
  26. -p, --prompt PROMPT prompt to start generation with (default: '')
  27. -f, --file FNAME a file containing the prompt (default: none)
  28. --in-file FNAME an input file (repeat to specify multiple files)
  29. -bf, --binary-file FNAME binary file containing the prompt (default: none)
  30. -e, --escape process escapes sequences (\n, \r, \t, \', \", \\) (default: true)
  31. --no-escape do not process escape sequences
  32. -ptc, --print-token-count N print token count every N tokens (default: -1)
  33. --prompt-cache FNAME file to cache prompt state for faster startup (default: none)
  34. --prompt-cache-all if specified, saves user input and generations to cache as well
  35. not supported with --interactive or other interactive options
  36. --prompt-cache-ro if specified, uses the prompt cache but does not update it
  37. -r, --reverse-prompt PROMPT halt generation at PROMPT, return control in interactive mode
  38. can be specified more than once for multiple prompts
  39. -sp, --special special tokens output enabled (default: false)
  40. -cnv, --conversation run in conversation mode (does not print special tokens and suffix/prefix) (default: false)
  41. -i, --interactive run in interactive mode (default: false)
  42. -if, --interactive-first run in interactive mode and wait for input right away (default: false)
  43. -mli, --multiline-input allows you to write or paste multiple lines without ending each in '\'
  44. --in-prefix-bos prefix BOS to user inputs, preceding the `--in-prefix` string
  45. --in-prefix STRING string to prefix user inputs with (default: empty)
  46. --in-suffix STRING string to suffix after user inputs with (default: empty)
  47.  
  48. sampling:
  49.  
  50. --samplers SAMPLERS samplers that will be used for generation in the order, separated by ';'
  51. (default: top_k;tfs_z;typical_p;top_p;min_p;temperature)
  52. --sampling-seq SEQUENCE simplified sequence for samplers that will be used (default: kfypmt)
  53. --ignore-eos ignore end of stream token and continue generating (implies --logit-bias EOS-inf)
  54. --penalize-nl penalize newline tokens (default: false)
  55. --temp N temperature (default: 0.8)
  56. --top-k N top-k sampling (default: 40, 0 = disabled)
  57. --top-p N top-p sampling (default: 0.9, 1.0 = disabled)
  58. --min-p N min-p sampling (default: 0.1, 0.0 = disabled)
  59. --tfs N tail free sampling, parameter z (default: 1.0, 1.0 = disabled)
  60. --typical N locally typical sampling, parameter p (default: 1.0, 1.0 = disabled)
  61. --repeat-last-n N last n tokens to consider for penalize (default: 64, 0 = disabled, -1 = ctx_size)
  62. --repeat-penalty N penalize repeat sequence of tokens (default: 1.0, 1.0 = disabled)
  63. --presence-penalty N repeat alpha presence penalty (default: 0.0, 0.0 = disabled)
  64. --frequency-penalty N repeat alpha frequency penalty (default: 0.0, 0.0 = disabled)
  65. --dynatemp-range N dynamic temperature range (default: 0.0, 0.0 = disabled)
  66. --dynatemp-exp N dynamic temperature exponent (default: 1.0)
  67. --mirostat N use Mirostat sampling.
  68. Top K, Nucleus, Tail Free and Locally Typical samplers are ignored if used.
  69. (default: 0, 0 = disabled, 1 = Mirostat, 2 = Mirostat 2.0)
  70. --mirostat-lr N Mirostat learning rate, parameter eta (default: 0.1)
  71. --mirostat-ent N Mirostat target entropy, parameter tau (default: 5.0)
  72. -l TOKEN_ID(+/-)BIAS modifies the likelihood of token appearing in the completion,
  73. i.e. `--logit-bias 15043+1` to increase likelihood of token ' Hello',
  74. or `--logit-bias 15043-1` to decrease likelihood of token ' Hello'
  75. --cfg-negative-prompt PROMPT
  76. negative prompt to use for guidance (default: '')
  77. --cfg-negative-prompt-file FNAME
  78. negative prompt file to use for guidance
  79. --cfg-scale N strength of guidance (default: 1.0, 1.0 = disable)
  80.  
  81. grammar:
  82.  
  83. --grammar GRAMMAR BNF-like grammar to constrain generations (see samples in grammars/ dir) (default: '')
  84. --grammar-file FNAME file to read grammar from
  85. -j, --json-schema SCHEMA JSON schema to constrain generations (https://json-schema.org/), e.g. `{}` for any JSON object
  86. For schemas w/ external $refs, use --grammar + example/json_schema_to_grammar.py instead
  87.  
  88. embedding:
  89.  
  90. --pooling {none,mean,cls}
  91. pooling type for embeddings, use model default if unspecified
  92.  
  93. context hacking:
  94.  
  95. --rope-scaling {none,linear,yarn}
  96. RoPE frequency scaling method, defaults to linear unless specified by the model
  97. --rope-scale N RoPE context scaling factor, expands context by a factor of N
  98. --rope-freq-base N RoPE base frequency, used by NTK-aware scaling (default: loaded from model)
  99. --rope-freq-scale N RoPE frequency scaling factor, expands context by a factor of 1/N
  100. --yarn-orig-ctx N YaRN: original context size of model (default: 0 = model training context size)
  101. --yarn-ext-factor N YaRN: extrapolation mix factor (default: -1.0, 0.0 = full interpolation)
  102. --yarn-attn-factor N YaRN: scale sqrt(t) or attention magnitude (default: 1.0)
  103. --yarn-beta-slow N YaRN: high correction dim or alpha (default: 1.0)
  104. --yarn-beta-fast N YaRN: low correction dim or beta (default: 32.0)
  105. -gan, --grp-attn-n N group-attention factor (default: 1)
  106. -gaw, --grp-attn-w N group-attention width (default: 512.0)
  107. -dkvc, --dump-kv-cache verbose print of the KV cache
  108. -nkvo, --no-kv-offload disable KV offload
  109. -ctk, --cache-type-k TYPE KV cache data type for K (default: f16)
  110. -ctv, --cache-type-v TYPE KV cache data type for V (default: f16)
  111.  
  112. perplexity:
  113.  
  114. --all-logits return logits for all tokens in the batch (default: false)
  115. --hellaswag compute HellaSwag score over random tasks from datafile supplied with -f
  116. --hellaswag-tasks N number of tasks to use when computing the HellaSwag score (default: 400)
  117. --winogrande compute Winogrande score over random tasks from datafile supplied with -f
  118. --winogrande-tasks N number of tasks to use when computing the Winogrande score (default: 0)
  119. --multiple-choice compute multiple choice score over random tasks from datafile supplied with -f
  120. --multiple-choice-tasks N
  121. number of tasks to use when computing the multiple choice score (default: 0)
  122. --kl-divergence computes KL-divergence to logits provided via --kl-divergence-base
  123. --ppl-stride N stride for perplexity calculation (default: 0)
  124. --ppl-output-type {0,1} output type for perplexity calculation (default: 0)
  125.  
  126. parallel:
  127.  
  128. -dt, --defrag-thold N KV cache defragmentation threshold (default: -1.0, < 0 - disabled)
  129. -np, --parallel N number of parallel sequences to decode (default: 1)
  130. -ns, --sequences N number of sequences to decode (default: 1)
  131. -cb, --cont-batching enable continuous batching (a.k.a dynamic batching) (default: enabled)
  132.  
  133. multi-modality:
  134.  
  135. --mmproj FILE path to a multimodal projector file for LLaVA. see examples/llava/README.md
  136. --image FILE path to an image file. use with multimodal models. Specify multiple times for batching
  137.  
  138. backend:
  139.  
  140. --rpc SERVERS comma separated list of RPC servers
  141. --mlock force system to keep model in RAM rather than swapping or compressing
  142. --no-mmap do not memory-map model (slower load but may reduce pageouts if not using mlock)
  143. --numa TYPE attempt optimizations that help on some NUMA systems
  144. - distribute: spread execution evenly over all nodes
  145. - isolate: only spawn threads on CPUs on the node that execution started on
  146. - numactl: use the CPU map provided by numactl
  147. if run without this previously, it is recommended to drop the system page cache before using this
  148. see https://github.com/ggerganov/llama.cpp/issues/1437
  149. -ngl, --gpu-layers N number of layers to store in VRAM
  150. -ngld, --gpu-layers-draft N number of layers to store in VRAM for the draft model
  151. -sm, --split-mode SPLIT_MODE how to split the model across multiple GPUs, one of:
  152. - none: use one GPU only
  153. - layer (default): split layers and KV across GPUs
  154. - row: split rows across GPUs
  155. -ts, --tensor-split SPLIT fraction of the model to offload to each GPU, comma-separated list of proportions, e.g. 3,1
  156. -mg, --main-gpu i the GPU to use for the model (with split-mode = none),
  157. or for intermediate results and KV (with split-mode = row) (default: 0)
  158.  
  159. model:
  160.  
  161. --check-tensors check model tensor data for invalid values (default: false)
  162. --override-kv KEY=TYPE:VALUE
  163. advanced option to override model metadata by key. may be specified multiple times.
  164. types: int, float, bool, str. example: --override-kv tokenizer.ggml.add_bos_token=bool:false
  165. --lora FNAME apply LoRA adapter (implies --no-mmap)
  166. --lora-scaled FNAME S apply LoRA adapter with user defined scaling S (implies --no-mmap)
  167. --lora-base FNAME optional model to use as a base for the layers modified by the LoRA adapter
  168. --control-vector FNAME add a control vector
  169. --control-vector-scaled FNAME SCALE
  170. add a control vector with user defined scaling SCALE
  171. --control-vector-layer-range START END
  172. layer range to apply the control vector(s) to, start and end inclusive
  173. -m, --model FNAME model path (default: models/$filename with filename from --hf-file
  174. or --model-url if set, otherwise models/7B/ggml-model-f16.gguf)
  175. -md, --model-draft FNAME draft model for speculative decoding (default: unused)
  176. -mu, --model-url MODEL_URL model download url (default: unused)
  177. -hfr, --hf-repo REPO Hugging Face model repository (default: unused)
  178. -hff, --hf-file FILE Hugging Face model file (default: unused)
  179.  
  180. retrieval:
  181.  
  182. --context-file FNAME file to load context from (repeat to specify multiple files)
  183. --chunk-size N minimum length of embedded text chunks (default: 64)
  184. --chunk-separator STRING
  185. separator between chunks (default: '
  186. ')
  187.  
  188. passkey:
  189.  
  190. --junk N number of times to repeat the junk text (default: 250)
  191. --pos N position of the passkey in the junk text (default: -1)
  192.  
  193. imatrix:
  194.  
  195. -o, --output FNAME output file (default: 'imatrix.dat')
  196. --output-frequency N output the imatrix every N iterations (default: 10)
  197. --save-frequency N save an imatrix copy every N iterations (default: 0)
  198. --process-output collect data for the output tensor (default: false)
  199. --no-ppl do not compute perplexity (default: true)
  200. --chunk N start processing the input from chunk N (default: 0)
  201.  
  202. bench:
  203.  
  204. -pps is the prompt shared across parallel sequences (default: false)
  205. -npp n0,n1,... number of prompt tokens
  206. -ntg n0,n1,... number of text generation tokens
  207. -npl n0,n1,... number of parallel prompts
  208.  
  209. server:
  210.  
  211. --host HOST ip address to listen (default: 127.0.0.1)
  212. --port PORT port to listen (default: 8080)
  213. --path PATH path to serve static files from (default: )
  214. --embedding(s) enable embedding endpoint (default: disabled)
  215. --api-key KEY API key to use for authentication (default: none)
  216. --api-key-file FNAME path to file containing API keys (default: none)
  217. --ssl-key-file FNAME path to file a PEM-encoded SSL private key
  218. --ssl-cert-file FNAME path to file a PEM-encoded SSL certificate
  219. --timeout N server read/write timeout in seconds (default: 600)
  220. --threads-http N number of threads used to process HTTP requests (default: -1)
  221. --system-prompt-file FNAME
  222. set a file to load a system prompt (initial prompt of all slots), this is useful for chat applications
  223. --log-format {text,json}
  224. log output format: json or text (default: json)
  225. --metrics enable prometheus compatible metrics endpoint (default: disabled)
  226. --no-slots disables slots monitoring endpoint (default: enabled)
  227. --slot-save-path PATH path to save slot kv cache (default: disabled)
  228. --chat-template JINJA_TEMPLATE
  229. set custom jinja chat template (default: template taken from model's metadata)
  230. only commonly used templates are accepted:
  231. https://github.com/ggerganov/llama.cpp/wiki/Templates-supported-by-llama_chat_apply_template
  232. -sps, --slot-prompt-similarity SIMILARITY
  233. how much the prompt of a request must match the prompt of a slot in order to use that slot (default: 0.50, 0.0 = disabled)
  234.  
  235.  
  236. logging:
  237.  
  238. --simple-io use basic IO for better compatibility in subprocesses and limited consoles
  239. -ld, --logdir LOGDIR path under which to save YAML logs (no logging if unset)
  240. --log-test Run simple logging test
  241. --log-disable Disable trace logs
  242. --log-enable Enable trace logs
  243. --log-file FNAME Specify a log filename (without extension)
  244. --log-new Create a separate new log file on start. Each log file will have unique name: "<name>.<ID>.log"
  245. --log-append Don't truncate the old log file.
  246.  
  247. cvector:
  248.  
  249. -o, --output FNAME output file (default: 'control_vector.gguf')
  250. --positive-file FNAME positive prompts file, one prompt per line (default: 'examples/cvector-generator/positive.txt')
  251. --negative-file FNAME negative prompts file, one prompt per line (default: 'examples/cvector-generator/negative.txt')
  252. --completions-file FNAME
  253. completions file (default: 'examples/cvector-generator/completions.txt')
  254. --completions N number of lines of completions file to use (default: 64)
  255. --batch-pca N batch size used for PCA. Larger batch runs faster, but uses more memory (default: 20)
  256. --iter-pca N number of iterations used for PCA (default: 1000)
  257.  
  258.  
Tags: llama.cpp
Add Comment
Please, Sign In to add comment