You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nemotron 3.5 Lightning BF16 variant sets VLLM_USE_FASTOKENS=1, but the pinned vllm/vllm-openai:v0.27.1 image has no fastokens — crash loop on startup #844
The BF16 variant of the NVIDIA Nemotron 3.5 Lightning recipe sets VLLM_USE_FASTOKENS=1, but the image the same recipe pins — vllm/vllm-openai:v0.27.1 — does not contain the fastokens package, and vLLM raises rather than falling back. Following the recipe as written produces a hard startup crash loop, not a warning.
Recipe BF16 flags as published — --mamba-backend flashinfer --mamba-cache-mode align --moe-backend flashinfer_cutlass --max-num-batched-tokens 16384 --enable-prefix-caching — plus --max-model-len 32768 --gpu-memory-utilization 0.9
What happened
The server crash-looped 4 times and never reached /health. Removing VLLM_USE_FASTOKENS=1 — with no other change to flags, image or checkpoint — brought the engine up on the next restart (4 min 13 s from container start to ready), and it has served continuously since. Output is unchanged: fastokens is a host-side tokenizer accelerator and touches no model numerics.
Exact error
File ".../vllm/tokenizers/registry.py", line 201, in get_tokenizer
apply_fastokens_patch()
File ".../vllm/tokenizers/fastokens.py", line 24, in apply_fastokens_patch
raise ImportError(
ImportError: The 'fastokens' package (>= 0.2.0) is required when VLLM_USE_FASTOKENS=1.
Reproduction
No GPU and no model download needed — the failure is in tokenizer setup. Inside the image the recipe pins:
$ python3 -c "import vllm; print(vllm.__version__)"0.27.1
$ python3 -c "import fastokens"Traceback (most recent call last): File "<string>", line 1, in <module>ModuleNotFoundError: No module named 'fastokens'
$ python3 -c "from vllm.tokenizers.fastokens import apply_fastokens_patch; apply_fastokens_patch()"Traceback (most recent call last): File "/usr/local/lib/python3.12/dist-packages/vllm/tokenizers/fastokens.py", line 22, in apply_fastokens_patch import fastokensModuleNotFoundError: No module named 'fastokens'The above exception was the direct cause of the following exception:Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/local/lib/python3.12/dist-packages/vllm/tokenizers/fastokens.py", line 24, in apply_fastokens_patch raise ImportError(ImportError: The 'fastokens' package (>= 0.2.0) is required when VLLM_USE_FASTOKENS=1.
vllm serve reaches this through renderers/registry.py → tokenizers/registry.py → tokenizers/fastokens.py, so it happens on every start attempt, before the weights are touched.
Suggested fix
Any one of these would resolve it; (2) matches precedent already in this repo:
Dropextra_env: VLLM_USE_FASTOKENS from the bf16 variant. It is a tokenization-latency optimisation, not a requirement — the variant serves correctly without it.
Make it opt-in and document the dependency.LiquidAI/LFM2.5.md in this repo already lists VLLM_USE_FASTOKENS=1 as an optional tuning knob and spells out pip install fastokens. Moving it into features: (listed in opt_in_features) with a dependencies: entry such as uv pip install "fastokens>=0.2.0" would keep the perf note without breaking the default path.
The general class is worth guarding against in the schema: extra_env in a recipe can enable a code path that requires a package the pinned docker_image does not contain, and the resulting failure is a crash loop rather than a degraded-but-running server.
Summary
The BF16 variant of the NVIDIA Nemotron 3.5 Lightning recipe sets
VLLM_USE_FASTOKENS=1, but the image the same recipe pins —vllm/vllm-openai:v0.27.1— does not contain thefastokenspackage, and vLLM raises rather than falling back. Following the recipe as written produces a hard startup crash loop, not a warning.models/nvidia/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-BF16.yaml:Environment
vllm/vllm-openai:v0.27.1(vllm.__version__ == 0.27.1)nvidia/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-BF16@a9904d24bcc1d289a1950fa9d2b978c47cf903b9--mamba-backend flashinfer --mamba-cache-mode align --moe-backend flashinfer_cutlass --max-num-batched-tokens 16384 --enable-prefix-caching— plus--max-model-len 32768 --gpu-memory-utilization 0.9What happened
The server crash-looped 4 times and never reached
/health. RemovingVLLM_USE_FASTOKENS=1— with no other change to flags, image or checkpoint — brought the engine up on the next restart (4 min 13 s from container start to ready), and it has served continuously since. Output is unchanged:fastokensis a host-side tokenizer accelerator and touches no model numerics.Exact error
Reproduction
No GPU and no model download needed — the failure is in tokenizer setup. Inside the image the recipe pins:
vllm servereaches this throughrenderers/registry.py→tokenizers/registry.py→tokenizers/fastokens.py, so it happens on every start attempt, before the weights are touched.Suggested fix
Any one of these would resolve it; (2) matches precedent already in this repo:
extra_env: VLLM_USE_FASTOKENSfrom thebf16variant. It is a tokenization-latency optimisation, not a requirement — the variant serves correctly without it.LiquidAI/LFM2.5.mdin this repo already listsVLLM_USE_FASTOKENS=1as an optional tuning knob and spells outpip install fastokens. Moving it intofeatures:(listed inopt_in_features) with adependencies:entry such asuv pip install "fastokens>=0.2.0"would keep the perf note without breaking the default path.vllm[fastokens]extra and no Docker build arg ([Bug]: VLLM_USE_FASTOKENS=1 raises ImportError - fastokens package missing from Docker image and not listed as pip extra vllm#47855), so today there is no such published tag.The general class is worth guarding against in the schema:
extra_envin a recipe can enable a code path that requires a package the pinneddocker_imagedoes not contain, and the resulting failure is a crash loop rather than a degraded-but-running server.Related
VLLM_USE_FASTOKENS=1raisesImportError;fastokensmissing from the Docker image and not available as a pip extra (open; the engine-side half of this)fastokensavailabilityHappy to open a PR for whichever option maintainers prefer.
Findings measured on my own hardware; issue text drafted with AI assistance and reviewed by me.