fix(checkpoint): ship nemotron_h remote-code in converted HF dirs for vLLM#11
Draft
Kyle1668 wants to merge 1 commit into
Draft
fix(checkpoint): ship nemotron_h remote-code in converted HF dirs for vLLM#11Kyle1668 wants to merge 1 commit into
Kyle1668 wants to merge 1 commit into
Conversation
… vLLM
fixup_hf_output previously REMOVED auto_map + the configuration/modeling_nemotron_h.py
files, assuming transformers >= 5.3.0 has native NemotronH support. That holds for the
megatron env (transformers 5.10.x) but breaks every vLLM consumer: vLLM 0.18.x is
hard-pinned to transformers<5 (4.57.x), which has NO native NemotronH -- so its config
parse fails ("Transformers does not recognize this architecture") and the model never
loads. This silently broke the MQ capability evals.
Flip remove -> ensure-present: copy the upstream model's remote-code modeling files +
auto_map (from the HF cache snapshot the export already downloaded) into the converted
dir. transformers >= 5.3.0 ignores the remote code (uses native), so it's safe for both.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
fixup_hf_outputdeliberately removesauto_map+ theconfiguration/modeling_nemotron_h.pyfiles after conversion, assuming "transformers >= 5.3.0 has native NemotronH support." That holds for the megatron env (transformers 5.10.x) but breaks every vLLM-based eval/inference consumer: vLLM 0.18.x is hard-pinned totransformers<5,>=4.56.0(4.57.x), which has no native NemotronH. So vLLM's config parse fails withTransformers does not recognize this architectureand the model never loads.This silently broke the GEOD-147 MQ capability evals (few-shot tasks load via vLLM). The manual workaround was copying the modeling files + setting
auto_mapinto each converted dir.Fix
Flip the step remove → ensure-present: fetch the upstream model's remote code (
configuration_nemotron_h.py,modeling_nemotron_h.py) +auto_mapviahf_hub_downloadand write them into the converted dir. transformers >= 5.3.0 ignores the remote code (uses native), so it's safe for both consumers. One file, +41/−16.Note: the export's HF snapshot has
config.json(withauto_map) but not the.pyremote code —from_hf_pretraineddoesn'ttrust_remote_code, so the files are never pulled locally — hencehf_hub_downloadrather than a snapshot copy.Validation
hf_hub_downloadconfirmed to fetch both files fromnvidia/...Super-120B-A12B-BF16(config 19.8 KB, modeling 82.3 KB).py_compileclean;ruffadds no new lint (only 2 pre-existing repo-debt errors remain).🤖 Generated with Claude Code