Reference
CLI reference
Thirty-six commands. llamay on its own lists them, and
llamay <command> -h prints a command's flags. The tables on
this page were recorded from the 0.4.3 binary's own help, so they are what
it accepts rather than what somebody remembered.
Which command for which job
| Job | Commands |
|---|---|
| Get and manage models | pull · models · cp · rm · info · inventory · quantize · imatrix |
| Generate | run · research |
| Serve and open the interface | serve · app |
| Work on code | code |
| Contexts | ctx build, fork, restore, move |
| Retrieval | embed · rerank · index build, query |
| Speech, images and text | transcribe · ocr · redact |
| Measure and check | verify · ppl · bench · benchfork · evaltranslate |
| Records | audit verify, show, who · capture keygen, read |
| This install | version · update · licence · plans |
| Your account | login · whoami · logout · keys list, create, revoke |
Conventions
-mtakes a model name fromllamay modelsor a path to a GGUF file. A file that exists always wins over a name.- Flags come before arguments:
llamay redact -json notes.txt, notllamay redact notes.txt -json.index,audit,rm,cpandresearchread flags wherever they are typed. - Nothing is ignored. A command that takes only flags refuses a stray argument, and a number out of range — a negative
-n, a-top-pabove 1 — is refused with what it may be, rather than run with a default. - Asking for help never acts.
llamay -h,llamay help,llamay help <command>andllamay <command> -h, for any command or subcommand, print its usage and exit 0. - Boolean flags are turned off with
=false:-gpu=false. -gpuis on by default forserve,benchforkandresearch, and off for the others.- A binary named
llamay-serverrunsservewith no subcommand, for tooling written forllama-server.
Environment
| Variable | Meaning |
|---|---|
LLAMAY_MODELS | The model store. Defaults to ~/.llamay/models. |
LLAMAY_API_KEY | The key serve requires, and the key ctx move sends. Better than -api-key, which shows in the process list. |
LLAMAY_NO_UPDATE_CHECK | Any value: no daily update check. |
HF_TOKEN | Sent to Hugging Face by pull, for gated repositories. |
OTEL_EXPORTER_OTLP_ENDPOINT | Same as serve -otlp. |
LLAMAY_LICENCE | Where the seat licence is kept. Defaults to ~/.llamay/licence. |
LLAMAY_ACCOUNT | Where a signed-in session is kept. Defaults to ~/.llamay/account.json. |
LLAMAY_NO_SERVICE | Read by the install scripts: install the command line and register no service. |
LLAMAY_GPU | Force a GPU backend on or off. |
LLAMAY_BACKEND=portable | Use the portable Go kernels instead of the assembly ones — the way to tell a SIMD bug from a model bug. |
LLAMAY_NO_BLAS | Make a build with Apple's Accelerate bit-exact again. |
The default shape of a run — stream the tokens, then say what it cost:
Transcript — the whole session as text
~/llamay $ llamay run -m qwen2.5:0.5b -n 140 -p "The three properties that make an inference engine auditable are" ______. A. Relevance, representativeness, and truthfulness B. Relevance, representativeness, and objectivity C. Relevance, representativeness, and objectivity D. Relevance, representativeness, and truthfulness Answer: C A company's financial data includes: total assets = 300 million yuan, total liabilities = 10 0 million yuan. The current ratio of the company is ____. A. 0.33 B. 1 C. 3 D. 3.33 Answer: B In the context of the construction project tendering and bidding process, which of the prompt 11 tokens in 321ms (34.3 tok/s) · generated 140 in 10.011s (14.0 tok/s) · stop: lengt h ~/llamay $ # prefill and decode are timed separately because they are different problems
llamay run
Generate text from a prompt.
| Flag | Default | Meaning |
|---|---|---|
-chat | render the prompt through the model's chat template rather than continuing it as raw text | |
-draft int | alias of -draft-max | |
-draft-adaptive | true | shrink the lookahead after rejected drafts and grow it after kept ones |
-draft-max int | tokens to draft per round; 0 uses the default of 8 | |
-draft-min int | floor the lookahead never shrinks below; 0 uses 2 | |
-gpu | run the layer stack on the GPU when one is available; -gpu=false forces the CPU | |
-grammar string | constrain output to this GBNF grammar, given inline | |
-grammar-file string | constrain output to the GBNF grammar in this file | |
-json | constrain output to valid JSON | |
-kv string | "f32" | KV cache precision: f32, vq8 (values quantised, keys exact), or q8 (both) |
-kv-page int | 64 | positions per KV page |
-lex | constrain output to the lexicon given by -lexicon | |
-lexicon string | newline-separated word list for lexicon-constrained decoding | |
-lookup | draft by prompt lookup: propose whatever followed this suffix earlier in the context, and verify it against the model | |
-m string | path to a GGUF model (required) | |
-md string | draft with a second, smaller GGUF, verified against -m (llama.cpp's -md) | |
-min-p float | 0.05 | keep tokens at least this fraction as likely as the best |
-model-draft string | long spelling of -md | |
-n int | 256 | maximum tokens to generate |
-n-draft int | alias of -draft-max | |
-ngl int | -1 | llama.cpp spelling of -gpu: 0 is CPU only, anything at or above the layer count is the whole model on the GPU |
-no-repack | keep weights in their file format instead of rewriting them for a faster kernel (on by default for the CPU and unified memory, off for a discrete GPU) | |
-p string | prompt text | |
-seed int | sampling seed | |
-stats | true | print timing to stderr when finished |
-system string | system message; when set the prompt is rendered as a chat | |
-t int | worker threads (0 picks a default that avoids efficiency cores) | |
-temp float | 0.8 | sampling temperature; 0 is greedy |
-top-k int | top-k cutoff; 0 disables | |
-top-p float | 0.95 | nucleus sampling threshold |
llamay serve
Serve OpenAI- and Anthropic-compatible endpoints.
| Flag | Default | Meaning |
|---|---|---|
-addr string | "localhost:11435" | listen address |
-allow-legacy-snapshots | restore and import contexts made before they recorded the sha256 of the weights, even under -profile enterprise or classification markings, where they are otherwise refused (they are checked by layout only, which a fine-tune shares with its base) | |
-api-key string | require this key on every route but /healthz; also read from LLAMAY_API_KEY | |
-api-keys id:key | file of id:key lines, one caller each; supersedes -api-key and names the caller in every audit record | |
-audit file | append a hash-chained record of every request to this file; check it with llamay audit verify | |
-audit-continue string | when -audit names a new file, continue the chain from this previous one, so a rotation keeps the join; llamay audit verify old new checks both | |
-audit-strict | stop serving if an audit record cannot be written, rather than logging and continuing | |
-audit-sync | sync each audit record to disk as it is written, when its request ends; a streamed response has been delivered by then | |
-audit-syslog | also send every -audit record to this machine's syslog daemon (authpriv, tag llamay-audit), for a SIEM to collect | |
-batch int | sequences to decode together; 0 runs each generation on its own | |
-capture string | keep an encrypted copy of every request and response in this directory, linked to its -audit record; needs -capture-key | |
-capture-key string | the records office's public key (llamay capture keygen); the server can write captures and cannot read them | |
-capture-retain string | delete capture files older than this, e.g. 7y or 90d; a LEGAL-HOLD file in the directory suspends deletion (default: keep everything) | |
-classification string | enforce classification markings from this file: levels, a default, and each caller's clearance and compartments (see the security docs) | |
-concurrency int | 2 | generations allowed to run at once |
-context-key string | encrypt every snapshot this server hands out with this key file (64 hex characters; openssl rand -hex 32), and restore snapshots sealed under it | |
-cors string | comma-separated origins allowed to call this server from a browser, e.g. https://llamay.com | |
-ctx-mem-budget string | KV memory to keep resident per model, e.g. 8G; past it idle contexts are written to disk and read back on their next use. Empty keeps every context in memory | |
-ctx-spill-dir string | where -ctx-mem-budget writes idle contexts (default $TMPDIR/llamay-spill); the files are encrypted, under -context-key or a key that lives only as long as the process | |
-embed string | encoder model to serve at /v1/embeddings beside the decoder | |
-gpu | true | run the layer stack on the GPU when one is available; -gpu=false forces the CPU |
-grammar string | constrain output to this GBNF grammar, given inline | |
-grammar-file string | constrain output to the GBNF grammar in this file | |
-graph-tokens int | 256 | prompt tokens per device prefill pass; wider tiles amortise the encode, and the buffers scale with it |
-index string | a document index (llamay index build) to answer POST /v1/retrieve from; needs -embed with the encoder it was built with, and -context-key if it is sealed | |
-index-access caller: label, ... | file of caller: label, ... lines granting callers the index labels they may see; unlabelled passages are visible to every caller | |
-keepalive duration | 5m0s | how long an idle model stays loaded; 0 keeps every loaded model forever |
-kv string | "f32" | KV cache precision: f32, vq8 (values quantised, keys exact), or q8 (both) |
-kv-page int | 64 | positions per KV page |
-lexicon string | newline-separated word list for lexicon-constrained decoding | |
-lora <base>+<name> | serve a LoRA adapter as the model <base>+<name>: name=adapter.gguf (repeatable) | |
-m string | path to a GGUF model (required) | |
-max-loaded int | 2 | models kept in memory at once beside the default; a request for another evicts an idle one, if it must, and then loads it |
-max-memory string | model weights kept in memory at once, the default's included, e.g. 10G; 0 is no limit. Unset, it is 70% of RAM on a Mac and the memory available at startup elsewhere | |
-mmproj string | the model's vision projector (an mmproj GGUF), so chat requests may carry images; images are read on the CPU path | |
-ngl int | -1 | llama.cpp spelling of -gpu: 0 is CPU only, anything at or above the layer count is the whole model on the GPU |
-no-repack | keep weights in their file format instead of rewriting them for a faster kernel (on by default for the CPU and unified memory, off for a discrete GPU) | |
-oidc-audience string | the audience tokens must be issued for (your app registration's id or api:// URI) | |
-oidc-azp string | comma-separated authorized parties a token's azp must be one of -- what Clerk session tokens carry instead of an audience | |
-oidc-claim string | preferred_username; sub for Clerk, email or upn elsewhere | the claim that names the caller |
-oidc-issuer string | accept sign-in tokens from this directory (Entra ID, Okta, Keycloak, Clerk...): its issuer URL, exactly as tokens carry it | |
-oidc-jwks string | the issuer's signing keys: a JWKS file (works offline), or a URL; default is discovery from -oidc-issuer | |
-otlp string | OTLP/HTTP collector base URL for traces, e.g. http://localhost:4318; also read from OTEL_EXPORTER_OTLP_ENDPOINT | |
-pool string | override the encoder's pooling: mean, cls or last | |
-prefill-chunk int | 256 | prompt tokens prefilled per scheduler step, so a long prompt does not stall decodes |
-prefix-entries int | 32 | how many shared prefixes to keep cached |
-profile string | "personal" | startup rules: personal (none), or enterprise (keys and TLS on a reachable address, and a strict, synced -audit record) |
-pull | true | let POST /api/pull, /api/copy and DELETE /api/delete write to the model store |
-rerank string | cross-encoder model to serve at /rerank beside the decoder | |
-session-ttl duration | 2h0m0s | how long a context nobody is using is kept; negative keeps every context until it is deleted |
-spec string | "off" | speculative decoding: off, or ngram to draft from the prompt and what has been generated |
-studio string | serve the Studio coding surface at /studio over this directory | |
-studio-exec | let Studio run commands in the -studio directory; needs -studio | |
-t int | worker threads (0 picks a default that avoids efficiency cores) | |
-tls-cert string | serve HTTPS with this PEM certificate (chain first, leaf at the top); needs -tls-key | |
-tls-client-ca string | require every client to present a certificate issued by an authority in this PEM file (mutual TLS) | |
-tls-client-id string | name each caller by its verified client certificate: cn (e.g. a CAC or PIV card) or email; needs -tls-client-ca | |
-tls-key string | the PEM private key for -tls-cert | |
-traces | record spans for queue wait, prefill and decode; implied by -otlp, and logged at debug level without one | |
-v | log every request | |
-whisper string | a Whisper speech-to-text model (whisper.cpp's ggml-*.bin) to serve at /v1/audio/transcriptions, and for Studio's microphone |
llamay info
Describe a GGUF model.
| Flag | Default | Meaning |
|---|---|---|
-m string | path to a GGUF model (required) | |
-meta | list every metadata key | |
-tensors | list every tensor | |
-tokenize string | encode this text file with the model's tokenizer and report the count and whether decoding it returns the bytes exactly |
llamay models
List the models that can be named instead of a path.
llamay models [path]
No flags.
llamay rm
Remove a model from llamay's store.
llamay rm <name> [name...]
No flags.
llamay cp
Give a stored model a second name, sharing one copy of the weights.
llamay cp <source> <destination>
No flags.
llamay bench
Measure prefill and decode throughput.
| Flag | Default | Meaning |
|---|---|---|
-cpuprofile string | write a CPU profile here | |
-draft int | alias of -draft-max | |
-draft-adaptive | true | shrink the lookahead after rejected drafts and grow it after kept ones |
-draft-max int | tokens to draft per round; 0 uses the default of 8 | |
-draft-min int | floor the lookahead never shrinks below; 0 uses 2 | |
-forks int | 8 | how many ways to fork when measuring the state engine |
-gen int | 128 | tokens to decode |
-gpu | run the layer stack on the GPU when one is available; -gpu=false forces the CPU | |
-graph | true | run the whole layer stack on the device in one command buffer rather than offloading single matrix multiplies |
-kv string | "f32" | KV cache precision: f32, vq8 (values quantised, keys exact), or q8 (both) |
-kv-page int | 64 | positions per KV page |
-lexicon string | newline-separated word list for lexicon-constrained decoding | |
-lookup | draft by prompt lookup: propose whatever followed this suffix earlier in the context, and verify it against the model | |
-m string | path to a GGUF model (required) | |
-md string | draft with a second, smaller GGUF, verified against -m (llama.cpp's -md) | |
-model-draft string | long spelling of -md | |
-n-draft int | alias of -draft-max | |
-ngl int | -1 | llama.cpp spelling of -gpu: 0 is CPU only, anything at or above the layer count is the whole model on the GPU |
-no-repack | keep weights in their file format instead of rewriting them for a faster kernel (on by default for the CPU and unified memory, off for a discrete GPU) | |
-prompt int | 512 | prompt length in tokens |
-reps int | 3 | repetitions; the best is reported |
-spec-gen int | 128 | tokens decoded in each arm of the speculative comparison |
-spec-pairs int | 4 | interleaved plain/speculative pairs; the arms alternate which runs first |
-spec-text string | "prose" | text the speculative comparison runs on: prose, repeat, or a path to a file |
-sweep | measure prefill across a range of tile widths | |
-t int | worker threads (0 picks a default that avoids efficiency cores) | |
-tile int | prefill tile width in tokens; 0 keeps the default |
llamay benchfork
Measure fork against a warm prefix tree on a shared-corpus workload.
| Flag | Default | Meaning |
|---|---|---|
-batch int | continuous-batching width; 0 means one slot per branch | |
-branches int | 8 | how many questions are asked of that prefix, concurrently |
-gen int | 64 | tokens each branch decodes |
-gpu | true | run the layer stack on the GPU when one is available; -gpu=false forces the CPU |
-kv string | "f32" | KV cache precision: f32, vq8 (values quantised, keys exact), or q8 (both) |
-kv-page int | 64 | positions per KV page |
-lexicon string | newline-separated word list for lexicon-constrained decoding | |
-m string | path to a GGUF model (required) | |
-ngl int | -1 | llama.cpp spelling of -gpu: 0 is CPU only, anything at or above the layer count is the whole model on the GPU |
-no-repack | keep weights in their file format instead of rewriting them for a faster kernel (on by default for the CPU and unified memory, off for a discrete GPU) | |
-prefix int | 1024 | shared prefix length in tokens — the corpus every branch reads |
-reps int | 1 | repetitions; the best wall clock per arm is reported |
-t int | worker threads (0 picks a default that avoids efficiency cores) |
llamay verify
Check the engine's invariants on a model.
| Flag | Default | Meaning |
|---|---|---|
-gpu | run the layer stack on the GPU when one is available; -gpu=false forces the CPU | |
-kv string | "f32" | KV cache precision: f32, vq8 (values quantised, keys exact), or q8 (both) |
-kv-page int | 64 | positions per KV page |
-lexicon string | newline-separated word list for lexicon-constrained decoding | |
-m string | path to a GGUF model (required) | |
-n int | 64 | prompt length used for the checks |
-ngl int | -1 | llama.cpp spelling of -gpu: 0 is CPU only, anything at or above the layer count is the whole model on the GPU |
-no-repack | keep weights in their file format instead of rewriting them for a faster kernel (on by default for the CPU and unified memory, off for a discrete GPU) | |
-t int | worker threads (0 picks a default that avoids efficiency cores) |
llamay ppl
Measure perplexity over a text file.
| Flag | Default | Meaning |
|---|---|---|
-chunks int | score at most this many windows; 0 is all of them | |
-ctx int | 512 | window size in tokens |
-f string | text file to score (required) | |
-gpu | run the layer stack on the GPU when one is available; -gpu=false forces the CPU | |
-kv string | "f32" | KV cache precision: f32, vq8 (values quantised, keys exact), or q8 (both) |
-kv-page int | 64 | positions per KV page |
-lexicon string | newline-separated word list for lexicon-constrained decoding | |
-m string | path to a GGUF model (required) | |
-ngl int | -1 | llama.cpp spelling of -gpu: 0 is CPU only, anything at or above the layer count is the whole model on the GPU |
-no-repack | keep weights in their file format instead of rewriting them for a faster kernel (on by default for the CPU and unified memory, off for a discrete GPU) | |
-t int | worker threads (0 picks a default that avoids efficiency cores) |
llamay evaltranslate
Score a model's translations with chrF++ and BLEU against references.
| Flag | Default | Meaning |
|---|---|---|
-chat | true | prompt through the model's chat template; -chat=false completes a raw "French: ...\nEnglish:" prompt, for base models |
-gpu | run the layer stack on the GPU when one is available; -gpu=false forces the CPU | |
-json | write the report as JSON | |
-kv string | "f32" | KV cache precision: f32, vq8 (values quantised, keys exact), or q8 (both) |
-kv-page int | 64 | positions per KV page |
-lexicon string | newline-separated word list for lexicon-constrained decoding | |
-m string | path to a GGUF model (required) | |
-max int | 256 | maximum tokens generated per sentence |
-n int | score only the first N sentences; 0 is all of them | |
-ngl int | -1 | llama.cpp spelling of -gpu: 0 is CPU only, anything at or above the layer count is the whole model on the GPU |
-no-repack | keep weights in their file format instead of rewriting them for a faster kernel (on by default for the CPU and unified memory, off for a discrete GPU) | |
-o string | write the report here as well as to standard output | |
-set string | test set: a .tsv of source<TAB>reference, or .jsonl with src/ref or language-code keys (default: the bundled set) | |
-src string | source language code, e.g. en (required) | |
-t int | worker threads (0 picks a default that avoids efficiency cores) | |
-tgt string | target language code, e.g. fr (required) |
llamay embed
Turn text into vectors with an encoder model.
| Flag | Default | Meaning |
|---|---|---|
-f string | file of texts, one per line | |
-json | print vectors as JSON | |
-m string | path to a GGUF encoder model (required) | |
-p value | text to embed; repeat for several, and add -f to read a file of one text per line as well | |
-pool string | override pooling: mean, cls or last | |
-sim | print the similarity matrix between the inputs instead of the vectors | |
-t int | worker threads (0 picks a default that avoids efficiency cores) |
llamay rerank
Score documents against a query with a cross-encoder.
| Flag | Default | Meaning |
|---|---|---|
-d value | a document to score; repeat for several | |
-f string | file of documents, one per line | |
-json | print results as JSON | |
-m string | path to a GGUF cross-encoder model (required) | |
-q string | the query to score documents against (required) | |
-raw | print the model's logit instead of a 0-to-1 relevance | |
-t int | worker threads (0 picks a default that avoids efficiency cores) | |
-top int | print only the best N (0 prints all) |
llamay ctx
Fork, snapshot and restore contexts.
llamay ctx build
Prefill a context from text and write it to a snapshot file.
| Flag | Default | Meaning |
|---|---|---|
-gpu | run the layer stack on the GPU when one is available; -gpu=false forces the CPU | |
-key string | encrypt snapshots written, and open encrypted ones read, with this key file (64 hex characters; openssl rand -hex 32) | |
-kv string | "f32" | KV cache precision: f32, vq8 (values quantised, keys exact), or q8 (both) |
-kv-page int | 64 | positions per KV page |
-lexicon string | newline-separated word list for lexicon-constrained decoding | |
-m string | path to a GGUF model (required) | |
-ngl int | -1 | llama.cpp spelling of -gpu: 0 is CPU only, anything at or above the layer count is the whole model on the GPU |
-no-repack | keep weights in their file format instead of rewriting them for a faster kernel (on by default for the CPU and unified memory, off for a discrete GPU) | |
-o string | "context.llamayctx" | where to write the snapshot |
-p string | text to prefill into the context | |
-t int | worker threads (0 picks a default that avoids efficiency cores) |
llamay ctx fork
Fork a snapshot N ways and report what the fork shared.
| Flag | Default | Meaning |
|---|---|---|
-gpu | run the layer stack on the GPU when one is available; -gpu=false forces the CPU | |
-i string | "context.llamayctx" | snapshot to fork |
-key string | encrypt snapshots written, and open encrypted ones read, with this key file (64 hex characters; openssl rand -hex 32) | |
-kv string | "f32" | KV cache precision: f32, vq8 (values quantised, keys exact), or q8 (both) |
-kv-page int | 64 | positions per KV page |
-lexicon string | newline-separated word list for lexicon-constrained decoding | |
-m string | path to a GGUF model (required) | |
-n int | 8 | how many branches |
-ngl int | -1 | llama.cpp spelling of -gpu: 0 is CPU only, anything at or above the layer count is the whole model on the GPU |
-no-repack | keep weights in their file format instead of rewriting them for a faster kernel (on by default for the CPU and unified memory, off for a discrete GPU) | |
-o string | directory to write the branches into; empty keeps them in memory | |
-t int | worker threads (0 picks a default that avoids efficiency cores) |
llamay ctx restore
Restore a snapshot and continue generating from it.
| Flag | Default | Meaning |
|---|---|---|
-gpu | run the layer stack on the GPU when one is available; -gpu=false forces the CPU | |
-i string | "context.llamayctx" | snapshot to restore |
-key string | encrypt snapshots written, and open encrypted ones read, with this key file (64 hex characters; openssl rand -hex 32) | |
-kv string | "f32" | KV cache precision: f32, vq8 (values quantised, keys exact), or q8 (both) |
-kv-page int | 64 | positions per KV page |
-lexicon string | newline-separated word list for lexicon-constrained decoding | |
-m string | path to a GGUF model (required) | |
-n int | 64 | tokens to generate |
-ngl int | -1 | llama.cpp spelling of -gpu: 0 is CPU only, anything at or above the layer count is the whole model on the GPU |
-no-repack | keep weights in their file format instead of rewriting them for a faster kernel (on by default for the CPU and unified memory, off for a discrete GPU) | |
-p string | continue the restored context with this text | |
-seed int | 1 | sampling seed |
-t int | worker threads (0 picks a default that avoids efficiency cores) | |
-temp float | 0.8 | sampling temperature; 0 is greedy |
llamay ctx move
Move (or copy, with -keep) a context from one running server to another.
llamay ctx move -from <url> -to <url> -id <context>
| Flag | Default | Meaning |
|---|---|---|
-cacert string | PEM authority to verify both servers' certificates with | |
-cert string | PEM client certificate, for servers that name callers by certificate | |
-cert-key string | PEM private key for -cert | |
-classification string | the X-Classification the context was made at, on servers that enforce markings | |
-from string | the server holding the context, e.g. https://desk:11435 (required) | |
-from-key string | API key for -from, when it differs | |
-id string | the context's id on -from (required) | |
-keep | leave the context on -from after the move, which makes it a copy | |
-key string | $LLAMAY_API_KEY | API key for both servers |
-model string | the model the context belongs to, when it is not the default; both servers must hold the same file | |
-precision string | payload precision on the wire: f32, vq8 or q8. Empty is the cache's own, the only one that arrives exact; q8 is lossy and one-third the size of f32 | |
-to string | the server to move it to (required) | |
-to-key string | API key for -to, when it differs |
llamay research
Answer a question against a corpus by forking one prefill N ways.
| Flag | Default | Meaning |
|---|---|---|
-answer int | 192 | maximum tokens in each branch's answer |
-batch int | decode this many branches in one step; 0 answers them one at a time | |
-corpus string | a file, or a directory of .txt and .md files, to research (required) | |
-gpu | true | run the layer stack on the GPU when one is available; -gpu=false forces the CPU |
-json | emit the whole run, cost accounting included, as JSON on stdout | |
-kv string | "f32" | KV cache precision: f32, vq8 (values quantised, keys exact), or q8 (both) |
-kv-page int | 64 | positions per KV page |
-lexicon string | newline-separated word list for lexicon-constrained decoding | |
-m string | path to a GGUF model (required) | |
-min-p float | 0.05 | keep tokens at least this fraction as likely as the best |
-n int | 8 | how many sub-questions to fan the corpus out into |
-ngl int | -1 | llama.cpp spelling of -gpu: 0 is CPU only, anything at or above the layer count is the whole model on the GPU |
-no-repack | keep weights in their file format instead of rewriting them for a faster kernel (on by default for the CPU and unified memory, off for a discrete GPU) | |
-plan int | 256 | maximum tokens the decomposition may spend |
-progress | true | stream the branch answers to stderr as they generate |
-report int | 384 | maximum tokens in the final report |
-seed int | 1 | sampling seed; each branch is seeded from it and its index |
-t int | worker threads (0 picks a default that avoids efficiency cores) | |
-temp float | 0.7 | sampling temperature; 0 is greedy |
-top-p float | 0.95 | nucleus sampling threshold |
llamay quantize
Rewrite a model in another quantisation.
| Flag | Default | Meaning |
|---|---|---|
-i string | input GGUF, as a path or a stored model name (required) | |
-imatrix file | importance matrix file from llamay imatrix, to weight the scale search | |
-o string | output GGUF (required) | |
-type string | "q8_0" | target format: q8_0, q6_k, q5_0, q4_k, q4_0, f16, f32 |
-v | name every tensor as it is converted |
llamay imatrix
Measure which columns a model drives, to guide quantisation.
| Flag | Default | Meaning |
|---|---|---|
-chunks int | stop after this many chunks; 0 reads the whole file | |
-ctx int | 512 | tokens per chunk |
-f string | calibration text (required) | |
-gpu | run the layer stack on the GPU when one is available; -gpu=false forces the CPU | |
-kv string | "f32" | KV cache precision: f32, vq8 (values quantised, keys exact), or q8 (both) |
-kv-page int | 64 | positions per KV page |
-lexicon string | newline-separated word list for lexicon-constrained decoding | |
-m string | path to a GGUF model (required) | |
-ngl int | -1 | llama.cpp spelling of -gpu: 0 is CPU only, anything at or above the layer count is the whole model on the GPU |
-no-repack | keep weights in their file format instead of rewriting them for a faster kernel (on by default for the CPU and unified memory, off for a discrete GPU) | |
-o string | "imatrix.dat" | where to write the importance matrix |
-t int | worker threads (0 picks a default that avoids efficiency cores) |
llamay ocr
Decode recogniser frames, optionally against a lexicon.
| Flag | Default | Meaning |
|---|---|---|
-alphabet string | newline-separated class list; line 1 is the CTC blank | |
-beam int | 16 | beam width; 1 is greedy |
-compare | print greedy and lexicon decodes side by side; with -image, print each lexicon substitution to stderr | |
-fps float | 1 | frames sampled per second of the clip |
-frames string | recogniser output: .npy-style raw f32 [T][C], or .json | |
-image string | read this image or scanned PDF with a vision model (needs -m and -mmproj) | |
-lex-weight float | 1.5 | log-units of credit for a lexicon-valid word |
-lexicon string | newline-separated word list; with -image, the text (or the schema's string values) is snapped to it | |
-m string | the vision model the projector belongs to | |
-max-frames int | 8 | the most frames kept; a longer clip is sampled more thinly, not cut short |
-mmproj string | the model's vision projector (an mmproj GGUF) | |
-n int | 1024 | the most tokens to generate |
-p string | ask this instead of the default transcription prompt | |
-page int | with a PDF, read only this page (from 1); 0 reads every page | |
-schema string | extract into this JSON Schema (a file, or the schema inline) instead of transcribing | |
-stats | print timing to stderr when finished | |
-t int | worker threads (0 picks a default) | |
-video string | read this clip as frames: a GIF natively, anything else through ffmpeg | |
-video-frames string | read these images, comma-separated, as the frames of a clip -fps apart |
llamay transcribe
Turn speech in a WAV file into text with a Whisper model.
llamay transcribe -m <model.bin> [-lang xx] [-translate] file.wav
| Flag | Default | Meaning |
|---|---|---|
-json | print the result as JSON, with each segment's text and times | |
-lang string | the spoken language's code (en, de, fr, ...); empty detects it on a multilingual model | |
-m string | a Whisper model in whisper.cpp's format (ggml-tiny.en.bin, ggml-base.bin, ...) | |
-t int | worker threads; 0 picks the performance cores | |
-translate | write English whatever language is spoken (multilingual models only) | |
-v | report the model, the audio and the time taken on stderr |
llamay audit
Verify and read back a server's hash-chained request record.
llamay audit verify
Check that an audit file's hash chain is intact; exit 1 if any record was altered or removed.
llamay audit verify [-q] <file>...
| Flag | Default | Meaning |
|---|---|---|
-q | print nothing; report the answer in the exit status |
llamay audit show
Print audit records as a table.
llamay audit show [-actor id] [-failed] [-n N] <file>...
| Flag | Default | Meaning |
|---|---|---|
-actor string | only records from this caller | |
-failed | only records whose status was 400 or worse | |
-n int | only the last N records |
llamay audit who
Summarise an audit file by caller: requests, refusals, tokens, last seen.
llamay audit who <file>...
No flags.
llamay capture
Make the records key for encrypted content capture, and read captures back.
llamay capture keygen
Write <name>.key and <name>.pub, the records office's key pair.
llamay capture keygen <name>
No flags.
llamay capture read
Decrypt capture files with the records office's private key.
llamay capture read -key <private.pem> [-audit <chain>] <capture files>...
| Flag | Default | Meaning |
|---|---|---|
-audit string | check each capture names a record that is in this audit chain | |
-key string | the records office's private key |
llamay redact
Remove personal identifiers from text, checked the way each kind is issued.
llamay redact [-types a,b] [-json] [file]
| Flag | Default | Meaning |
|---|---|---|
-json | print the redacted text and what was found, as JSON | |
-types string | only these kinds, comma-separated (card_number, iban, us_ssn, uk_nino, nhs_number, email, ipv4, phone); default all |
llamay inventory
List every model with its digest, source and licence, and validate each.
llamay inventory [-json] [-o file] [-validate]
| Flag | Default | Meaning |
|---|---|---|
-json | write JSON rather than a table | |
-o string | write the report here as well as to standard output | |
-validate | run llamay verify on every decoder and record the result (slow: it loads each model) |
llamay index
Build a searchable index of your documents, and query it.
llamay index build
Turn a folder of documents into a searchable index.
llamay index build -embed <encoder> -o <index> [-labels <file>] [-key <file>] <files or folders>...
| Flag | Default | Meaning |
|---|---|---|
-chunk int | tokens per passage (default: the encoder's limit, at most 256) | |
-embed string | the encoder model to embed with (the server must serve the same one) | |
-key string | encrypt the index with this key file: it holds the documents' text | |
-labels pattern: label | file of pattern: label lines; a caller sees a passage only if granted every label on it | |
-o string | "docs.idx" | where to write the index |
llamay index query
Search an index from the command line.
llamay index query -embed <encoder> -i <index> <question>
| Flag | Default | Meaning |
|---|---|---|
-access caller: label, ... | file of caller: label, ... lines | |
-as string | answer as this caller, applying -access | |
-embed string | the encoder the index was built with | |
-i string | "docs.idx" | the index |
-k int | 5 | passages to return |
-key string | the key an encrypted index was sealed with | |
-rerank string | a cross-encoder to order the passages with |
llamay router
Classify a message the way the Auto model choice does, and rank the models for it.
llamay router classify
Name a message's Auto category, how sure, and why; -pick ranks the installed models for it.
llamay router classify [-pick] [-images n] "message"
| Flag | Default | Meaning |
|---|---|---|
-centroids string | centroids file from scripts/router train; empty uses the ones built into llamay | |
-encoder string | "all-minilm" | encoder the centroids were trained with; empty uses the keyword rules alone |
-images int | images attached to the message | |
-pick | also rank the installed models for the category |
llamay licence
Read and store a commercial seat licence.
llamay licence [show|fetch|import|verify|seats|forget]
llamay licence show
Print the seat licence on this machine, if there is one.
llamay licence [show]
No flags.
llamay licence import
Store a seat licence from an argument, a file or standard input.
llamay licence import [<token> | <file> | -]
No flags.
llamay licence verify
Check a licence's signature without storing it.
llamay licence verify [<token> | <file> | -]
No flags.
llamay licence fetch
Ask for this account's seat licence and store it (needs a signed-in account).
llamay licence fetch [-email <address>] [-holder <name>] [-print]
| Flag | Default | Meaning |
|---|---|---|
-email string | the address the seat is for (defaults to the signed-in account) | |
-holder string | the name that goes on the licence (defaults to the account's) | |
-print | print the licence instead of storing it |
llamay licence seats
List the seats a licence covers.
llamay licence seats
No flags.
llamay licence forget
Remove the stored licence from this machine.
llamay licence forget
No flags.
llamay pull
Download a model into llamay's store.
llamay pull <source> [-as name:tag]
| Flag | Default | Meaning |
|---|---|---|
-as string | name to store it under, like qwen2.5:0.5b (default: derived from the source) | |
-force | download again even if the store already has this name | |
-layers string | fetch only these blocks, like 0-13, embed,0-13 or 14-27,output; the model installs once every part is here |
llamay plans
What llamay sells, which plan this account is on, and how to change it.
llamay plans [-buy <plan>] [-yearly]
| Flag | Default | Meaning |
|---|---|---|
-buy string | start a checkout for a plan or add-on (pro, plus, max, s500, s1t) | |
-open | true | with -buy, open the checkout in a browser as well as printing it |
-yearly | with -buy, pay for a year rather than a month |
llamay update
Install the latest llamay, the way this one was installed.
| Flag | Default | Meaning |
|---|---|---|
-check | only say whether a newer llamay exists; exit 10 if one does | |
-yes | on Linux packages, run the package manager instead of printing its command |
llamay login
Sign in to your llamay account, in a browser.
| Flag | Default | Meaning |
|---|---|---|
-new | open the page on creating an account rather than signing in | |
-no-open | print the page to open instead of opening a browser, for a machine with none |
llamay logout
Sign out of llamay on this machine, and end the session on the service.
llamay logout
No flags.
llamay whoami
Which llamay account this machine is signed in to, and its plan.
llamay whoami
No flags.
llamay keys
Create, list and revoke API keys for llamay's cloud, for tools that speak OpenAI's API.
llamay keys [list | create [-label name] | revoke <id or prefix>]
llamay keys list
List this account's API keys: id, label, prefix, created, last used -- never the secret.
llamay keys [list]
No flags.
llamay keys create
Make an API key for a tool that speaks OpenAI's API; the secret is shown once.
llamay keys create [-label name]
| Flag | Default | Meaning |
|---|---|---|
-label string | what the key is for, like "ci" or "laptop aider"; shown in the list, never secret |
llamay keys revoke
End one key, by its id or by the prefix a tool's settings show.
llamay keys revoke <id or prefix>
No flags.
llamay app
Open llamay: start the server if it is not running, and show the interface.
| Flag | Default | Meaning |
|---|---|---|
-addr string | "localhost:11435" | the llamay server to open, and to start if nothing answers |
-browser | open Studio in a browser even where the llamay app is installed | |
-no-open | start the server but do not open a browser | |
-no-start | only open a server that is already running | |
-page string | "studio" | which surface to open: studio or api |
llamay code
A coding agent in this terminal: reads, edits and runs in a directory, asking first.
llamay code [flags] [task]
| Flag | Default | Meaning |
|---|---|---|
-addr string | "localhost:11435" | the llamay server to use, and to start if nothing answers |
-approve string | "ask" | what runs without asking: ask (nothing), edits (file writes), all (writes and commands) |
-continue | resume the most recent session in this workspace | |
-dir string | "." | the workspace: the directory the agent may read, write and run in |
-key string | $LLAMAY_API_KEY | API key for a server that requires one |
-local | never send a request to llamay's cloud, even signed in | |
-max-steps int | 30 | the most model answers one request may take |
-model string | the model to use: a model here, cloud (llamay's cloud picks), or cloud:<id>; empty is Auto, which asks the router each request | |
-no-exec | do not let the agent run commands at all | |
-no-start | only use a server that is already running | |
-provider string | send every request to your own provider: one added in Studio's Settings → Providers, or cloudflare with $CLOUDFLARE_ACCOUNT_ID and $CLOUDFLARE_API_TOKEN | |
-resume string | resume the session with this id | |
-url string | a llamay server's base URL, instead of -addr; never started by this command |
llamay version
Print the version and what this build contains.
| Flag | Default | Meaning |
|---|---|---|
-json | print the whole build description as JSON | |
-short | print only the version string |