Skip to content

Revert "[Bugfix] Tie lm_head.weight for Nemotron Parse when checkpoint omits it" (#53020) - #59805

Merged
vllm-bot merged 1 commit into
vllm-project:mainfrom
Thangnguyenvn98:agent/revert-53020
Oct 2, 2026
Merged

vllm-bot merged 1 commit into
vllm-project:mainfrom
Thangnguyenvn98:agent/revert-53020

Conversation

@Thangnguyenvn98

@Thangnguyenvn98 Thangnguyenvn98 commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Overview

Reverts #53020, at @DarkLight1337's request. The nvidia/NVIDIA-Nemotron-Parse-2.0 case it added to test_nemotron_parse.py fails on every CI run, and the step has been red on main since it merged.

Claims

Validation

Build Commit Result
92354 before #53020 step passed
92561 after #53020 only failure: test_models[5-bfloat16-nvidia/NVIDIA-Nemotron-Parse-2.0]
92599 after #53020 same case fails

The revert is the exact inverse of 83cadd6 (git diff 83cadd65d9 83cadd65d9^ matches this diff). ruff check and ruff format --check pass on both files.

Details

The failure happens while the 2.0 checkpoint's tokenizer is loading, before any model code runs:

transformers/tokenization_utils_tokenizers.py:120 in convert_to_native_format
    local_kwargs["tokenizer_object"] = TokenizerFast.from_file(fast_tokenizer_file)
E   Exception: DuplicatePatternError: [225, 131, 156] at line 449472 column 1

So the new test case can't run with the tokenizer library in the CI image. Re-landing the tie_weights() fix should go together with a working way to load that tokenizer, or without the 2.0 test case. cc @aniskumar-nv


Pull Request Checklist
  • I used vLLM's /pr-checklist skill. (Mandatory for agents, optional for humans).

  • AI assistance was used during the creation of this PR.

  • Design Fit: Minimizes impact on core components, reuses existing functionality, and justifies added complexity.

  • Testing and Validation: Validates the change and ensures any added tests are meaningful and reliable, with CI coverage or documented CI resource constraints and validation performed outside CI.

  • Code Quality and Style: Keeps code and comments clear and concise, and updates relevant documentation and examples.

  • Pull Request Contents: Includes a brief summary and relevant links, supports claims with evidence, explains root causes and implementation trade-offs, and follows the contributing guide.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Qa3mjR8Niyg7WjvckpNRiu

…t omits it" (vllm-project#53020)

This reverts commit 83cadd6.

The new nvidia/NVIDIA-Nemotron-Parse-2.0 case in test_nemotron_parse.py
fails on every run: its tokenizer fails to load with
"DuplicatePatternError ... at line 449472 column 1" in
TokenizerFast.from_file. Reverting until it can be fixed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qa3mjR8Niyg7WjvckpNRiu
Signed-off-by: Thang Nguyen <thangnguyenvn647@gmail.com>

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@mergify mergify Bot added multi-modality Related to multi-modality (#4194) bug Something isn't working labels Oct 2, 2026
@vllm-bot
vllm-bot merged commit 7cfd233 into vllm-project:main Oct 2, 2026
15 checks passed
HangruiCao2000 pushed a commit to HangruiCao2000/vllm that referenced this pull request Oct 6, 2026
Re-lands vllm-project#53020 (commit 83cadd6), which was reverted in vllm-project#59805 because
the NVIDIA-Nemotron-Parse-2.0 test case it added failed in CI while loading
that checkpoint's tokenizer:

    transformers/tokenization_utils_tokenizers.py:120 in convert_to_native_format
        local_kwargs["tokenizer_object"] = TokenizerFast.from_file(fast_tokenizer_file)
    E   Exception: DuplicatePatternError: [225, 131, 156] at line 449472 column 1

The revert asked for the fix to be re-landed "together with a working way to
load that tokenizer". vllm-project#59796 provided it 74 minutes later by bumping
tokenizers to >= 0.23.2, which main now pins, so the blocker is gone.

The model change is byte-identical to the reverted commit: it restores the
tie between lm_head and the decoder's input embeddings for checkpoints that
set tie_word_embeddings and ship no lm_head.weight tensor. Without it the
output head keeps its random initialization and the server returns garbage
while reporting healthy.

Signed-off-by: Anish Kumar <aniskumar@nvidia.com>
Co-authored-by: Cyrus Leung <tlleungac@connect.ust.hk>
Signed-off-by: DiegoCao <DiegoCao@users.noreply.github.com>
aniskumar-nv added a commit to aniskumar-nv/vllm that referenced this pull request Oct 7, 2026
…arse when checkpoint omits it

Reverts vllm-project#59805 (7cfd233), restoring vllm-project#53020 (83cadd6) unchanged.

nvidia/NVIDIA-Nemotron-Parse-2.0 sets tie_word_embeddings=True and ships no
lm_head.weight; without the tie, NemotronParseForConditionalGeneration keeps a
randomly initialized output head and every response is garbage while the
server reports healthy.

vllm-project#53020 was reverted because the Parse-2.0 test case it added failed in the
nightly full CI run at tokenizer load (TokenizerFast.from_file ->
DuplicatePatternError), before any model code ran. The cause was the CI pin
tokenizers==0.23.1, which rejects added tokens that collide after NFKC
normalization (14 such pairs in this tokenizer). vllm-project#59796 bumped the pin to
0.23.2, which loads the file, so the test case can run as written.

Co-authored-by: Cyrus Leung <tlleungac@connect.ust.hk>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Anish Kumar <aniskumar@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working multi-modality Related to multi-modality (#4194)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants