Skip to content

Move Mistral Medium recipe under canonical base model - #2150

Merged
chadvoegele merged 1 commit into
NVIDIA:mainfrom
chadvoegele:cvoegele/move-mistral-medium-recipe
Aug 12, 2026
Merged

Move Mistral Medium recipe under canonical base model#2150
chadvoegele merged 1 commit into
NVIDIA:mainfrom
chadvoegele:cvoegele/move-mistral-medium-recipe

Conversation

@chadvoegele

@chadvoegele chadvoegele commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Type of change: Bug fix

Moves the Mistral Medium 3.5 checkpoint-mirror PTQ recipe under the canonical Hugging Face base model, mistralai/Mistral-Medium-3.5-128B. Updates the recipe catalog, loader smoke-test path, and changelog.

Usage

python examples/hf_ptq/hf_ptq.py \
    --model mistralai/Mistral-Medium-3.5-128B \
    --recipe huggingface/models/mistralai/Mistral-Medium-3.5-128B/ptq/nvfp4-max-calib

Testing

  • uvx --from pre-commit pre-commit run --files CHANGELOG.rst modelopt_recipes/huggingface/models/mistralai/Mistral-Medium-3.5-128B/ptq/nvfp4-max-calib.yaml modelopt_recipes/ptq.md tests/unit/recipe/test_loader.py
  • Recipe documentation consistency checks (all passed)
  • Focused pytest was unavailable locally because the checkout environment lacks pytest/Torch; the dedicated pre-commit recipe validator passed.

Before your PR is "Ready for review"

  • Is this change backward compatible?: ❌ The built-in recipe path changes; the changelog documents the replacement path.
  • If you copied code from any other sources or added a new PIP dependency, did you follow guidance in CONTRIBUTING.md: N/A
  • Did you write any new necessary tests?: ✅ Updated the built-in recipe loader smoke test.
  • Did you update Changelog?: ✅
  • Did you get Claude approval on this PR?: N/A

Additional Information

The recipe targets the vendor's canonical base checkpoint, mistralai/Mistral-Medium-3.5-128B, and reproduces NVIDIA's Mistral-Medium-3.5-128B-NVFP4 quantization map.

Summary by CodeRabbit

  • New Features

    • Added a Mistral Medium 3.5 128B post-training quantization recipe supporting NVFP4 and FP8 configurations with max calibration.
  • Documentation

    • Updated checkpoint-mirror guidance to reflect the new model-based recipe location.
  • Breaking Changes

    • Saved references to the previous recipe path must be updated to the new Mistral Medium 3.5 recipe path.

@chadvoegele
chadvoegele requested review from a team as code owners August 11, 2026 15:22
@chadvoegele
chadvoegele requested a review from realAsma August 11, 2026 15:22
@copy-pr-bot

copy-pr-bot Bot commented Aug 11, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 310a1c3c-981f-48ca-a3e8-ba9d83fe9bb0

📥 Commits

Reviewing files that changed from the base of the PR and between e014704 and 9a4d417.

📒 Files selected for processing (2)
  • CHANGELOG.rst
  • modelopt_recipes/ptq.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • CHANGELOG.rst
  • modelopt_recipes/ptq.md

📝 Walkthrough

Walkthrough

The PR adds a Mistral Medium 3.5 PTQ recipe at the canonical Hugging Face model path. It updates the changelog, checkpoint-mirror documentation, and built-in recipe coverage to use the new path.

Changes

Mistral Medium PTQ recipe

Layer / File(s) Summary
Define the Ministral3 PTQ recipe
modelopt_recipes/huggingface/models/mistralai/Mistral-Medium-3.5-128B/ptq/nvfp4-max-calib.yaml
Adds max-calibration settings, NVFP4 and FP8 quantizer assignments, KV-cache quantization, and default-disabled quantizers.
Update recipe references
CHANGELOG.rst, modelopt_recipes/ptq.md, tests/unit/recipe/test_loader.py
Updates the changelog, documentation, and built-in recipe coverage to the canonical Mistral AI path.

Estimated code review effort: 2 (Simple) | ~15 minutes

Mergeability Score: ⚪ Minimal · up to 9a4d4

This change moves the recipe to the canonical model path and updates its references and documentation; no actionable merge-blocking risk remains after normal checks and review.

Suggested reviewers: realasma

🚥 Pre-merge checks | ✅ 6
✅ Passed checks (6 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes moving the Mistral Medium recipe to its canonical base model path.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Security Anti-Patterns ✅ Passed The PR only renames an identical YAML recipe and updates docs, changelog, and a test path; it adds no modelopt/examples Python or dependency changes and no prohibited security pattern.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@chadvoegele
chadvoegele force-pushed the cvoegele/move-mistral-medium-recipe branch from 4ff9cd7 to b135cd1 Compare August 11, 2026 15:26
@codecov

codecov Bot commented Aug 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.14%. Comparing base (6261f85) to head (9a4d417).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2150      +/-   ##
==========================================
- Coverage   78.66%   78.14%   -0.53%     
==========================================
  Files         522      522              
  Lines       60420    60420              
==========================================
- Hits        47532    47214     -318     
- Misses      12888    13206     +318     
Flag Coverage Δ
examples-diffusers 20.78% <ø> (-0.02%) ⬇️
examples-gpt-oss 13.27% <ø> (-0.01%) ⬇️
examples-hf_ptq 21.47% <ø> (-0.06%) ⬇️
examples-llm_distill 13.33% <ø> (-0.02%) ⬇️
examples-llm_eval 17.09% <ø> (-0.02%) ⬇️
examples-llm_qat 17.59% <ø> (-0.02%) ⬇️
examples-llm_sparsity 15.92% <ø> (-0.02%) ⬇️
examples-megatron_bridge 25.75% <ø> (-0.05%) ⬇️
examples-specdec_bench 13.01% <ø> (-0.01%) ⬇️
examples-speculative_decoding 17.53% <ø> (-0.07%) ⬇️
examples-torch_onnx 21.87% <ø> (-0.02%) ⬇️
examples-torch_trt 15.09% <ø> (-0.02%) ⬇️
gpu 58.62% <ø> (-0.69%) ⬇️
unit 55.27% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@chadvoegele
chadvoegele requested a review from jenchen13 August 11, 2026 15:50
Comment thread modelopt_recipes/ptq.md
The `huggingface/models/` tier reproduces a **single published (or planned)
checkpoint's** quant config verbatim:

- **`Mistral-Medium-3.5-128B-NVFP4/ptq/nvfp4-max-calib`** mirrors

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.

if this is a quant config for a checkpoint, it could go under models/mistralai/Mistral-Medium-3.5-128B so that users can easily find it via the HF model name. what do you think?

@chadvoegele chadvoegele Aug 11, 2026

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.

Sure, makes sense. We can use the canonical HF base model name.

NV's quantized: https://huggingface.co/nvidia/Mistral-Medium-3.5-128B-NVFP4
-> Vendor's base model: https://huggingface.co/mistralai/Mistral-Medium-3.5-128B
-> modelopt_recipes/huggingface/models/mistralai/Mistral-Medium-3.5-128B/ptq/

@chadvoegele chadvoegele Aug 11, 2026

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.

[agent comment]

Updated in e014704: the recipe now lives under modelopt_recipes/huggingface/models/mistralai/Mistral-Medium-3.5-128B/ptq/; the catalog, changelog, and loader smoke test use the same path.

@chadvoegele
chadvoegele force-pushed the cvoegele/move-mistral-medium-recipe branch from b135cd1 to e014704 Compare August 11, 2026 16:46
@chadvoegele chadvoegele changed the title Move Mistral Medium recipe under Ministral model type Move Mistral Medium recipe under canonical base model Aug 11, 2026
@chadvoegele
chadvoegele force-pushed the cvoegele/move-mistral-medium-recipe branch from e014704 to 14a7bfe Compare August 11, 2026 16:48

@shengliangxu shengliangxu left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM, thx

@chadvoegele
chadvoegele enabled auto-merge (squash) August 12, 2026 21:39
Signed-off-by: Chad Voegele <cvoegele@nvidia.com>
@chadvoegele
chadvoegele force-pushed the cvoegele/move-mistral-medium-recipe branch from 14a7bfe to 9a4d417 Compare August 12, 2026 21:43
@chadvoegele
chadvoegele disabled auto-merge August 12, 2026 22:02
@chadvoegele

Copy link
Copy Markdown
Contributor Author

/ok to test 9a4d417

— Chad's Agent

@chadvoegele

Copy link
Copy Markdown
Contributor Author

/ok to test 9a4d417

@chadvoegele
chadvoegele enabled auto-merge (squash) August 12, 2026 22:09
@chadvoegele
chadvoegele merged commit f3e88df into NVIDIA:main Aug 12, 2026
53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants