Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Server flags

Every flag also reads an environment variable; precedence is CLI flag > environment variable > default.

CLI flagEnvironment variableDefaultDescription
--hostHOST0.0.0.0Bind address
--portPORT8080Bind port
--model-idMODEL_IDQwen/Qwen2.5-1.5B-InstructHub id or local checkpoint path
--model-revisionMODEL_REVISIONmainHub revision
--weights-fileWEIGHTS_FILEauto-detectedExplicit weights file
--tokenizer-fileTOKENIZER_FILEnext to the weightsTokenizer override
--config-fileCONFIG_FILEnext to the weightsConfig override
--context-pathCONTEXT_PATHmissing = empty contextSystem context file
--served-model-nameSERVED_MODEL_NAMEtyped-lmName clients request
--model-dtypeMODEL_DTYPEautoauto (F32 CPU, F16 CUDA/Metal)
--session-cache-entriesSESSION_CACHE_ENTRIES16Max cached prefixes
--session-cache-tokensSESSION_CACHE_TOKENS32768Max cached tokens
--hf-tokenHF_TOKENmissingToken for gated models

Examples

# Environment only.
PORT=9090 MODEL_ID=recogna-nlp/bode-1b-instruct typed-lm-serve

# CPU with MKL and a memory context.
typed-lm-serve --features mkl -- \
  --model-id Qwen/Qwen2.5-1.5B-Instruct \
  --context-path resources/memory.md