inference
detokenize
Detokenize token ids with a local model.
strata inference detokenizedb.ai.detokenize(ids: 'Sequence[int]', *, model: 'str') -> 'Any'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 --helphelp(db.ai.detokenize)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| ids | array | yes | Token ids. |
| model | string | yes | Model spec. |
Returns
DetokenizedText
- datastring
- typestring
Errors
Recover by code. Retry policy and commit outcome come from the shipped error registry.
| Code | Retry | Commit outcome |
|---|---|---|
| failed_precondition.engine.runtime_closed | never | not_started |
| not_found.engine.branch | never | not_applicable |
| inference.unsupported_operation | never | not_applicable |
| inference.missing_model | after_state_change | not_applicable |
| inference.model_load_failed | after_state_change | not_applicable |
| inference.local_runtime_failed | unknown | not_applicable |
| inference.registry_corrupt | never | not_applicable |