Skip to content

refactor(model)!: remove retired model support - #6370

Merged
cuichenx merged 7 commits into
NVIDIA-NeMo:mainfrom
cuichenx:chcui/talia/remove-retired-models
Oct 12, 2026
Merged

cuichenx merged 7 commits into
NVIDIA-NeMo:mainfrom
cuichenx:chcui/talia/remove-retired-models

Conversation

@cuichenx

@cuichenx cuichenx commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do ?

Remove retired model implementations, registrations, recipes, examples, and current support documentation while preserving shared infrastructure used by supported successors. Delete the deprecation module and its path/name/shape blacklist, so compatible checkpoints are not rejected because of a directory name or fine-tune suffix.

Primary area: area:model. This is a breaking change for the removed model APIs and recipes.

Changelog

  • Remove DeepSeek V2/V2 Lite, Gemma 1/2, Llama 2, Mistral 7B and Small 3 24B, Nemotron-4 340B, Llama Nemotron, Nemotron Nano v2 text/VL, and Nemotron H v1 (4B/8B/47B/56B) dedicated support.
  • Remove H-v1 library/H100 recipes, nine performance factories across H100/B200/B300/GB200/GB300, public exports, and benchmark selectors. Retain all successor recipe settings.
  • Preserve DeepSeek V3/V4 attention and MLA code, Gemma 3/4 helpers, Llama mappings, Mistral NeMo/Ministral infrastructure, and Nemotron 3/3.5/Omni components. Shared architecture-compatible derivatives remain loadable; removed dedicated architectures fail normal registration lookup.
  • Keep the historical V2 architecture alias for MoE Nano Omni checkpoints with canonical provider metadata. Its local compatibility provider continues to reject dense V2 configurations.
  • Delete models/_deprecation.py and every caller. Add regressions for supported checkpoints under misleading local directory names and a Nemotron 3 fine-tune with a v2 suffix.
  • Update current model tables, navigation, examples, and skills. Preserve historical release snapshots and media fixture URLs used by supported VLMs. Eight unlisted Fern pages contain removal notices so previews using trusted-main navigation still resolve.

GitHub Actions CI

Local validation uses the existing NeMo development container, repository-pinned MCore, and isolated lockfile versions of Transformers 5.17.0, tokenizers 0.23.2, and huggingface-hub 1.31.0. No dependency or CI workflow changes.

  • Focused Llama/Ministral/Nemotron/Omni conversion, registration, recipe, performance-environment, and runner checks validated. Final removal/docs rerun: 73 passed; successor performance construction/export discovery: 58 passed; AutoBridge entry-point checks: 13 passed.
  • Earlier validation covered DeepSeek V3/V4, Gemma 3/4, shared VL utilities/logit propagation, collator lazy imports, Energon, training setup, and tiny local Omni GPU forward/optimizer cases.
  • uv run pre-commit run --all-files and git diff --check: passed.
  • Supported catalog generator/check: passed with unchanged generated outputs. All 132 current navigation targets exist; no current Markdown links resolve to the 46 deleted paths.
  • Fern 5.40.0 checks pass for both PR navigation and the preview's trusted-main-navigation/PR-content composition. Local redirect-history checking requires Fern authentication.

The Fern preview for the updated head passed. Other CI checks are not yet verified complete.

Before your PR is "Ready for review"

Pre checks:

  • Read and followed the contributor guidelines.
  • Added necessary missing-registration/recipe and misleading-path regressions.
  • Updated current documentation and navigation.
  • Checked optional model imports through the public AutoBridge registration matrix, including import without FLA.
    • Reviewer: Confirm optional import guards remain correct.

Additional Information

Independent complete-diff review and follow-up review found no outstanding issues. The follow-up verified that all 77 retained definitions in the modified mixed performance modules are unchanged and that no stale imports of deleted modules remain.

The repository-wide inventory found no target-only verification cards, goldens, or active functional launchers, and no existing Mixtral implementation/registration to remove or change. No cluster jobs were launched.

Signed-off-by: Chen Cui <chcui@nvidia.com>
@cuichenx
cuichenx requested a review from a team as a code owner October 9, 2026 06:38
@cuichenx cuichenx added feature New capabilities, enhancements, or enablement work breaking-change Public behavior or API compatibility changes high-complexity Harder to merge: prone to conflicts and needs additional test coverage area:model Model implementations and HF bridge logic needs-review PR is ready for code review and waiting on a reviewer labels Oct 9, 2026
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Automatic Claude reviews have been retired. To request a pull-request review, post a comment containing:

/review

Add model=claude to use a Claude reviewer (the default is model=codex). mode=light|strict selects the review depth; for example, /review model=claude mode=strict. Comment /review help for all options.

Signed-off-by: Chen Cui <chcui@nvidia.com>
@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

@cuichenx
cuichenx requested a review from kamran-nvidia October 9, 2026 17:17
getattr(config, "num_hidden_layers", None),
getattr(config, "intermediate_size", None),
)
if "mistral-7b" in identifier or "mistral-small-24b" in identifier or mistral_shape in _MISTRAL_SHAPES:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm a bit worried about these name checks now that they raise instead of warn. They match substrings anywhere in the load path, and a name hit here wins before the shape check, so a supported checkpoint can get rejected just because of a folder name. Tried a few with the real HF configs (transformers 5.17):

  • Mistral-Nemo-Base-2407 in /models/mistral-7b-comparison/nemo -> ValueError: Support for Mistral 7B and Mistral Small 3 24B has been removed...
  • Llama-3.1-8B-Instruct in /data/nemotron-sft/Llama-3.1-8B-Instruct -> rejected as Llama Nemotron
  • a Nemotron 3 Nano fine-tune named my-org/nemotron-nano-30b-a3b-sft-v2 -> rejected as Nano v2

supports() / can_handle() also return False for these.

It doesn't really work the other way either. The comment on L45 assumes the serialized _name_or_path survives, but AutoConfig.from_pretrained overwrites it with the local path, so Llama-3.1-Nemotron-Nano-8B-v1 copied to e.g. /ckpts/reasoning-8b goes straight through. Not a big deal since it's plain Llama 3.1 underneath, but the joined identifier isn't buying us much.

Could we only raise on what's actually in the config (archs + shape signatures) and keep the name matching as a warning, ideally against the repo id / basename rather than the whole path? A couple of tests with supported models under misleading paths would be nice too.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

i think the right thing to do is remove deprecation.py since these models are already deleted, what do you think

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yeah agreed, deleting it is cleaner than trying to fix the heuristics, and the new tests cover the cases I was worried about. Thanks!

Two small optional things:

  • Removed archs now hit the generic "Model architecture 'Gemma2ForCausalLM' is not yet supported ... create a new bridge" error (auto_bridge.py L2486), which kind of reads like support is coming. Maybe a small map of removed arch names just for the message, e.g. "removed in 0.7.0, use 0.6.x"? Exact names only, no path matching.
  • Dense Nano v2 VL: can_handle() still returns True since the V2 label is registered for the Omni alias, then to_megatron_provider() fails with "Only Nemotron Omni MoE checkpoints use this compatibility bridge." Could that message just say dense Nano v2 VL was removed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

thanks these are good points

Signed-off-by: Chen Cui <chcui@nvidia.com>
kamran-nvidia
kamran-nvidia previously approved these changes Oct 9, 2026
malay-nagda
malay-nagda previously approved these changes Oct 10, 2026
Report removal in 0.7.0 and direct users to 0.6.x for exact retired architecture names after bridge lookup fails. Keep shared successor dispatch and legacy Omni MoE compatibility unchanged, and identify dense Nano v2 VL explicitly in its rejection message.

Validation: 200 targeted unit tests passed; pre-commit --all-files passed; independent follow-up diff review found no issues.
Signed-off-by: Chen Cui <chcui@nvidia.com>
The outer 30-second subprocess timeout includes Bridge model registration imports. A fresh local run spent 33.66 seconds importing and completed forked tokenization by 33.78 seconds. Use the existing 180-second import-test budget while preserving the 10-second result.get timeout that detects tokenizer deadlocks.

Validation: all 41 GPT SFT dataset tests passed with the pinned MCore dataset helper built in a temporary container copy; pre-commit --all-files passed; independent diff review found no issues.
Signed-off-by: Chen Cui <chcui@nvidia.com>
@cuichenx
cuichenx merged commit 618c6c8 into NVIDIA-NeMo:main Oct 12, 2026
97 checks passed
@ZhiyuLi-Nvidia

ZhiyuLi-Nvidia commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

@cuichenx this PR deleted the retired-model sources, but docs/fern/versions/0.4.2/pages/index.mdx still links to them on main (llama2, gemma2, deepseek_v2, nemotron_nano_v2(_vl), llama_nemotron). Link check now 404s on main and every open PR (run). Fix in #6416: pins those links to v0.4.2, where all six still exist.

kamran-nvidia added a commit that referenced this pull request Oct 12, 2026
Resolve the conflict in recipes/nemotronh/h100/__init__.py: keep main's
removal of the retired Nemotron Nano v2 and NemotronH entries (#6370) and
this branch's rename of the Ultra SFT recipe to
nemotron_3_ultra_sft_384gpu_h100_bf16_openmathinstruct2_packed_config.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Kamran Jafari <kjafarisadeg@nvidia.com>

This branch was successfully deployed

1 active deployment
test — 95a3bd79 Deployed Oct 11, 2026 by copy-pr-bot[bot] via cicd-wait-in-queue #22756
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:model Model implementations and HF bridge logic breaking-change Public behavior or API compatibility changes feature New capabilities, enhancements, or enablement work high-complexity Harder to merge: prone to conflicts and needs additional test coverage needs-review PR is ready for code review and waiting on a reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants