Inference commands

12 commands. Each entry gives the invocation and an example, in the interface you pick; open the details for parameters, return shape and error codes.

cache_status

Report loaded model cache state.

strata inference cache-status

Reports the runtime model cache as three lists of specs: the generation, embedding, and ranking models currently loaded in memory. Use it to check what is resident before generating, or to confirm that `inference unload` freed the models you expected. The lists reflect only in-memory engines, not models available on disk.

To see the complete help for this command, run:

strata inference cache-status --help

Example

strata inference cache-statusgeneration_models  -embedding_models   -ranking_models     -
View details →

capability

Report capabilities for a model spec.

strata inference capability

Parses a model spec into a provider and model name and reports what that combination supports without running the model. The result states whether generation, tokenization, embedding, and ranking are available, whether the operation requires network access or an API key, whether this binary was compiled with the provider feature needed to execute, whether the runtime currently permits network calls, and the known embedding dimension. Model specs are catalog names (`tinyllama`), catalog `name:quant` pairs (`tinyllama:q8_0`), local GGUF paths, or provider specs (`anthropic:claude-...`).

To see the complete help for this command, run:

strata inference capability --help

Example

strata inference capability openai:gpt-4o-mini  # Pure metadata - no request is sent to the provider.provider                  openaimodel                     gpt-4o-miniavailability              readycan_generate              truecan_embed                 truecan_rank                  falsecan_tokenize              falseembedding_dim             0requires_api_key          truerequires_network          truenetwork_enabled           trueprovider_feature_enabled  truesupports_tools            truesupports_json_object      truesupports_json_schema      truesupports_logprobs         true
View details →

detokenize

Detokenize token ids with a local model.

strata inference detokenize

Decodes an ordered list of token ids back into text using a local model's vocabulary, returning the reconstructed string. Detokenization is a local-only operation: it requires a build with the local execution feature and returns `inference.unsupported_operation` for cloud provider specs.

To see the complete help for this command, run:

strata inference detokenize --help

View details →

embed

Embed one or more texts into vectors.

strata inference embed

Embeds text with an embedding-capable model and returns one vector per input, in order. The `input` field takes either a single string or an array of strings, so single and batch embedding share one command. The vector dimension is fixed by the model. Local embedding models require a build with the local execution feature; cloud embedding providers (OpenAI, Google) require the matching provider feature and an API key.

To see the complete help for this command, run:

strata inference embed --help

Example

No CLI example in this release.

View details →

generate

Generate text with an inference model.

strata inference generate

Runs a text-generation request against a local or cloud model and returns the completion, the reason generation stopped, and the provider-reported prompt and completion token counts. The request controls the maximum completion tokens, sampling temperature, top-k and top-p cutoffs, an optional deterministic seed, string and token-id stop sequences, and an optional GBNF grammar for constrained generation. Chat models expect their chat template already applied in the prompt. Local models require a build with the local execution feature; cloud providers require the matching provider feature and an API key.

To see the complete help for this command, run:

strata inference generate --help

Example

No CLI example in this release.

View details →

rank

Rank passages against a query.

strata inference rank

Scores each candidate passage against a query with a ranking model and returns one outcome per passage. Each item carries the passage's original index and either a relevance score or a per-item error with a stable code and a redacted message, so callers can reorder passages by score while keeping them tied to their inputs. Ranking is a local-only operation: it requires a build with the local execution feature and a ranking-capable model.

To see the complete help for this command, run:

strata inference rank --help

View details →

status

Report what this binary can do before anything is attempted.

strata inference status

Reports the inference facts that are knowable up front: whether this build can execute local models and download them, which providers are compiled in, which of those have an API key and where it was found, and how many catalogued models are already on disk.

To see the complete help for this command, run:

strata inference status --help

Example

strata inference status  # reports build, providers, keys, and on-disk models without attempting a callbuild	cloud providers only	local models: this build runs cloud models only, and a bare model name means a local model. Either name a cloud model instead - `openai:<model>`, `google:<model>` or `anthropic:<model>` - or run `strata inference install-local` to add local execution.providers  openai	no key -- `strata config set openai.api_key <key>`, or export OPENAI_API_KEY  anthropic	no key -- `strata config set anthropic.api_key <key>`, or export ANTHROPIC_API_KEY  google	no key -- `strata config set google.api_key <key>`, or export GOOGLE_API_KEY  local	not in this buildmodels	…
View details →

tokenize

Tokenize text with a local model.

strata inference tokenize

Encodes text into the token id sequence a local model would see and returns the ids in order. Set `add_special` to include the model's special tokens (such as beginning-of-sequence markers). Tokenization is a local-only operation: it requires a build with the local execution feature and returns `inference.unsupported_operation` for cloud provider specs.

To see the complete help for this command, run:

strata inference tokenize --help

View details →

unload

Unload cached inference models.

strata inference unload

Removes cached model engines from the runtime to free memory. Pass a model spec to unload one entry, or omit it to unload every cached generation, embedding, and ranking model. The result reports whether any cached entry was actually removed. This affects only the in-memory runtime cache; it never deletes downloaded model files from disk.

To see the complete help for this command, run:

strata inference unload --help

Example

strata inference unloadno cached entry
View details →

Models

models list

List catalog inference models.

strata inference models list

Lists every model in Strata's built-in catalog as a terminal page. Each entry reports the model's task (embed, generate, or rank), architecture, default quantization, embedding dimension, HuggingFace repository, approximate artifact size, and whether the model artifact is already present in the local model directory. Use `inference models local` to see only the downloaded models, or `inference models pull` to fetch one.

To see the complete help for this command, run:

strata inference models list --help

Example

strata inference models listminiLM	embed	bert	f16	unavailable	45 MBnomic-embed	embed	nomic-bert	q8_0	unavailable	260 MBbge-m3	embed	xlm-roberta	q8_0	unavailable	1.2 GBgemma-embed	embed	gemma3	q8_0	unavailable	320 MBgpt2	generate	gpt2	q8_0	unavailable	178 MBtinyllama	generate	llama	q4_k_m	unavailable	670 MBqwen3:1.7b	generate	qwen3	q8_0	unavailable	2 GBgemma3:1b	generate	gemma3	q4_k_m	unavailable	780 MBphi3.5	generate	phi3	q4_k_m	unavailable	2.4 GBllama3.1:8b	generate	llama	q4_k_m	unavailable	4.6 GBqwen3:8b	generate	qwen3	q4_k_m	unavailable	4.7 GB11 model(s) unavailable: this build cannot run local models -- a bare name like these means a local model. Add local execution with `strata inference install-local`, or name a cloud model instead (`openai:<model>`, `google:<model>`, `anthropic:<model>`).
View details →

models local

List locally downloaded inference models.

strata inference models local

Lists the catalog models that have at least one quantization variant present in the local model directory, as a terminal page. Entries carry the same facts as `inference models list` but are restricted to models that can run without a further download. The local model directory is resolved from `STRATA_MODELS_DIR`, falling back to `~/.strata/models`.

To see the complete help for this command, run:

strata inference models local --help

View details →

models pull

Download an inference model locally.

strata inference models pull

Resolves a catalog name or model spec and downloads the model artifact into the local model directory, returning the resolved local path. A model that is already present is not downloaded again: the command returns its path in every build, with or without network access. Honors `STRATA_MODELS_DIR` for the destination and `STRATA_HF_ENDPOINT` and `STRATA_HF_TOKEN` (or `HF_TOKEN`) for gated HuggingFace repositories. The spec is resolved before anything else is checked: a malformed spec returns `inference.invalid_request`, a cloud provider spec returns `inference.unsupported_operation` (there is nothing to download), and a name that is not in the catalog returns `inference.missing_model`. A missing model is downloaded only when the runtime has network access and the build can download; otherwise the command returns `inference.download_disabled`.

To see the complete help for this command, run:

strata inference models pull --help

View details →