inference

detokenize

Detokenize token ids with a local model.

strata inference detokenize

wire 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

Parameters

NameTypeRequiredDescription
idsarrayyesToken ids.
modelstringyesModel spec.

Returns

DetokenizedText

  • datastring
  • typestring

Errors

Recover by code. Retry policy and commit outcome come from the shipped error registry.

CodeRetryCommit outcome
failed_precondition.engine.runtime_closednevernot_started
not_found.engine.branchnevernot_applicable
inference.unsupported_operationnevernot_applicable
inference.missing_modelafter_state_changenot_applicable
inference.model_load_failedafter_state_changenot_applicable
inference.local_runtime_failedunknownnot_applicable
inference.registry_corruptnevernot_applicable
← All 11 Inference commands

agents: this page as markdown → /docs/reference/inference/detokenize.md