fix(recipes): pin transformers==4.57.6 in deepseek-v32-fp4 perf jobs - #8690
Conversation
WalkthroughUpdated tokenizer references in performance configuration files for DeepSeek model recipes, changing the tokenizer identifier from the NVIDIA-namespaced version to the DeepSeek-AI namespaced version in two separate benchmark configurations. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This is not true, the repo has the tokenizer files:
Are we sure this fixes the raised issue |
c1458ca to
0620414
Compare
0620414 to
5a41d3e
Compare
|
You were right — the original premise was wrong, and the original tokenizer-rename did not fix the raised issue. I dug in and reproduced the actual failure. The PR has been replaced with the real fix; force-pushed to What was actually happening:
Reproduced end-to-end locally:
New fix: pin Diff is now +14/-2: install line plus a 6-line explanatory comment in each of the two perf.yaml files. PR title and body updated to match. |
5a41d3e to
ec1b780
Compare
Exact-pin transformers to the version verified to load the model_type=deepseek_v32 tokenizer (per @nealvaidya's review). Fixes DYN-2878. Root cause: - nvcr.io/.../tensorrtllm-runtime:1.1.0-rc4 ships transformers==4.55.0. - The perf.yaml install line `pip install aiperf==0.6.0` upgrades transformers to satisfy aiperf 0.6.0's `transformers>=4.56.0` floor; with default pip resolution this picks the latest release, currently 5.7.0. - transformers 5.x has no native support for model_type=deepseek_v32 (still pending in huggingface/transformers#41251 and #42767), so AutoTokenizer.from_pretrained() raises AttributeError: 'PreTrainedConfig' object has no attribute 'max_position_embeddings' before reading tokenizer.json. - aiperf wraps the exception as TokenizerError: Failed to load tokenizer 'nvidia/DeepSeek-V3.2-NVFP4'. Both nvidia/DeepSeek-V3.2-NVFP4 and deepseek-ai/DeepSeek-V3.2 carry model_type=deepseek_v32 and fail identically on transformers >= 5.x; this regressed silently when transformers 5.0 shipped, with no change in this repo. Fix: pin `transformers==4.57.6` in the pip install in both perf.yaml files. 4.57.6 is the latest 4.x release and is verified to load the deepseek_v32 tokenizer end-to-end via aiperf's Tokenizer wrapper. Files: - recipes/deepseek-v32-fp4/trtllm/disagg-kv-router/perf.yaml - recipes/deepseek-v32-fp4/trtllm/agg-round-robin/perf.yaml Signed-off-by: Dan Gil <dagil@nvidia.com>
ec1b780 to
0997dbc
Compare
…8690) Signed-off-by: Dan Gil <dagil@nvidia.com>
Summary
recipes/deepseek-v32-fp4/trtllm/disagg-kv-router/perf.yamlexiting withTokenizerError: Failed to load tokenizer 'nvidia/DeepSeek-V3.2-NVFP4'againstnvcr.io/nvstaging/ai-dynamo/tensorrtllm-runtime:1.1.0-rc4.tokenizer.json+tokenizer_config.jsonsince 2026-01-02). It's a silent transformers upgrade past nativemodel_type=deepseek_v32support.transformers==4.57.6(the version verified to load the deepseek_v32 tokenizer) on thepip install aiperf==0.6.0line in both perf.yaml files. Same change indisagg-kv-routerandagg-round-robin.Root cause
nvcr.io/.../tensorrtllm-runtime:1.1.0-rc4shipstransformers==4.55.0(per NVIDIA/TensorRT-LLM v1.1.0rc4 requirements.txt).pip install aiperf==0.6.0upgrades transformers to satisfy aiperf 0.6.0'stransformers>=4.56.0floor. With default pip resolution and no upper bound, this picks the latest matching release — currently 5.7.0.model_type=deepseek_v32(still pending in huggingface/transformers#41251 and #42767).AutoTokenizer.from_pretrained()readsconfig.jsonfirst and raisesAttributeError: 'PreTrainedConfig' object has no attribute 'max_position_embeddings'before it ever openstokenizer.json.aiperf/common/tokenizer.pyand re-raises asTokenizerError: Failed to load tokenizer '<name>'— exactly the QA error.This regressed silently when transformers 5.0 shipped, with no change in this repo.
Fix
Exact-pin to a transformers version verified to load the
deepseek_v32tokenizer:pip install "aiperf==0.6.0" "transformers==4.57.6"4.57.6 is the latest 4.x release. The exact pin is deterministic across job re-runs and removes any dependency on what
<5happens to resolve to in the future.Verification (reproduced locally)
pip install aiperf==0.6.0Failed to load tokenizer 'nvidia/DeepSeek-V3.2-NVFP4'(caused byAttributeError: 'PreTrainedConfig' object has no attribute 'max_position_embeddings')pip install "aiperf==0.6.0" "transformers==4.57.6"LlamaTokenizerFast, vocab=128000,'Hello world'->[19923, 2058]Note: the original version of this PR (changing
--tokenizertodeepseek-ai/DeepSeek-V3.2) did not fix the failure — both repos carrymodel_type=deepseek_v32and fail identically on transformers 5.x. That commit has been replaced.Where Should the Reviewer Start?
recipes/deepseek-v32-fp4/trtllm/disagg-kv-router/perf.yaml(line 52)recipes/deepseek-v32-fp4/trtllm/agg-round-robin/perf.yaml(line 52)Diff is +14/-2 across the two files: the install line plus a 6-line explanatory comment.
Related Issues
Fixes DYN-2878
Test Plan
kubectl apply -f recipes/deepseek-v32-fp4/trtllm/disagg-kv-router/perf.yaml -n <ns>againstdynamo-nscale-dev-clusterand confirms the perf job exits with code 0recipes/deepseek-v32-fp4/trtllm/agg-round-robin/perf.yamlsince it had the same bugFollow-ups (out of scope here)
The same
pip install aiperf==0.6.0pattern (without a transformers pin) appears inrecipes/qwen3-vl-30b/vllm/agg-embedding-cache/perf.yaml. That recipe doesn't hit the bug today (qwen3 is supported in transformers >= 4.56) but would benefit from the same defensive pin. Worth a follow-up PR.