Skip to content

[AMD][Quantization] Online MXFP4 quantization 2/N - FP8 to MXFP4 requantization on AMD GPUs - #18182

Merged
HaiShaw merged 63 commits into
sgl-project:mainfrom
fxmarty-amd:fp8-to-mxfp4
Jun 13, 2026
Merged

HaiShaw merged 63 commits into
sgl-project:mainfrom
fxmarty-amd:fp8-to-mxfp4

Conversation

@fxmarty-amd

@fxmarty-amd fxmarty-amd commented Feb 3, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

Popular recent language models have been released directly as FP8 checkpoints (e.g. https://huggingface.co/moonshotai/Kimi-K2-Instruct-0905 or https://huggingface.co/Qwen/Qwen3-32B-FP8). As part of proposed improvements (#18005) to MXFP4 quantization targeting Instinct MI350X and MI355X GPUs, this PR implements online quantization from FP8 checkpoint to MXFP4 layers.

This PR is a follow up to #18005 , which implemented online BF16 -> MXFP4 quantization.

Example usage:

python3 -m sglang.launch_server --model-path Qwen/Qwen3-30B-A3B-Instruct-2507-FP8 \
    --tensor-parallel-size 1 \
    --context-length 3000 \
    --quantization quark_mxfp4

This PR has been tested against MiniMaxAI/MiniMax-M2.1, deepseek-ai/DeepSeek-V3.2 and moonshotai/Kimi-K2-Instruct-0905 as seen in the unit test.

Modifications

Allow a different args.quantization compared to the serialized quant_method in config.json.

Accuracy Tests

See the unit test.

Left to do

  • Implement and test similar logic for QuarkW4A4MXFp4MoEMethod
  • Validate all quark linears work well with weight_loader_v2
  • Test MOE with TP>1
  • Validate deepseek-ai/DeepSeek-V3.2 and moonshotai/Kimi-K2-Instruct-0905
  • Investigate OOM issue in case --context-length is not specified
  • cleanup default mxfp4 exclude

CI States

Latest PR Test (Base): ❌ Run #27459884924
Latest PR Test (Extra): ❌ Run #27459884825

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @fxmarty-amd, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the quantization capabilities by introducing online requantization from FP8 checkpoints to MXFP4 layers, primarily for AMD GPUs. The changes allow for greater flexibility in deploying models by converting them to a more memory-efficient format on-the-fly, addressing the growing need for efficient large language model inference on specialized hardware. The implementation involves a series of modifications across the quantization configuration, weight loading mechanisms, and the introduction of new dequantization and memory tracking utilities.

Highlights

  • Online Requantization Support: Introduced the capability to perform online requantization from FP8 checkpoints to MXFP4 layers, particularly optimized for AMD GPUs. This allows loading models saved in FP8 format and converting them to MXFP4 during the loading process.
  • Configuration Enhancements: Modified the ModelConfig to support a distinct args.quantization value compared to the quant_method serialized in config.json, enabling flexible online quantization schemes. quark_mxfp4 has been added to the list of supported quantization methods.
  • New Dequantization Utilities: Added a new module dequantization.py which provides a utility function dequantize_fp8 to convert FP8 weights to bfloat16, a crucial step in the FP8 to MXFP4 requantization pipeline.
  • Refactored Weight Loading Logic: The Fp8LinearMethod has been refactored to support online quantization, and new weight loader wrappers (get_online_mxfp4_weight_loader, get_online_fp8_to_mxfp4_weight_loader) were implemented in quark_w4a4_mxfp4.py to handle the dynamic conversion of weights.
  • Memory Tracking for Online Quantization: A CopyNumelCounter utility was added in online_quantization.py to accurately track the number of elements copied during weight loading, which is essential for managing memory during online quantization processes.
  • MoE Layer Support: Extended the QuarkW4A4MXFp4MoEMethod to support online MXFP4 quantization for Mixture-of-Experts (MoE) layers, including specific logic for handling w13 and w2 weights.
  • Updated Quantization Choices: The server_args.py file was updated to explicitly categorize quark_mxfp4 as an ONLINE_QUANTIZATION_CHOICES method, distinguishing it from methods that load pre-serialized checkpoints.
  • Comprehensive Unit Tests: New unit tests were introduced in test_quark_mxfp4.py to validate the memory footprint and accuracy of online quantization for both dense and MoE models, including scenarios for FP8 to MXFP4 requantization and tensor parallelism.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • python/sglang/srt/configs/model_config.py
    • Added QUANT_METHOD_SUPPORTS_DEQUANTIZATION list to identify methods supporting dequantization.
    • Included quark_mxfp4 in the lists of supported, optimized, and compatible quantization methods.
    • Introduced a logger warning for potential accuracy loss during requantization.
  • python/sglang/srt/layers/linear.py
    • Added QuarkLinearMethod to the list of LINEAR_METHODS.
  • python/sglang/srt/layers/quantization/init.py
    • Mapped quark_mxfp4 to QuarkConfig in the QUANTIZATION_CONFIGS dictionary.
  • python/sglang/srt/layers/quantization/dequantization.py
    • New file: Implemented dequantize_fp8 function to convert FP8 weights to bfloat16.
  • python/sglang/srt/layers/quantization/fp8.py
    • Refactored create_weights into a static helper method create_fp8_weight_.
    • Moved validate_block_quant_shapes to be a static method.
    • Adjusted parameters for weight creation and scale handling to support online quantization.
  • python/sglang/srt/layers/quantization/online_quantization.py
    • New file: Introduced CopyNumelCounter class to track copy_ operations during weight loading.
  • python/sglang/srt/layers/quantization/quark/quark.py
    • Modified QuarkConfig constructor to accept online_scheme, is_prequantized, and dequantization_config.
    • Updated from_config to handle online requantization from FP8 to quark_mxfp4 by creating a synthetic quant_config and dequantization_config.
    • Added _create_online_mxfp4_config static method to define the configuration for online MXFP4 quantization.
    • Modified _get_scheme_from_config to pass is_checkpoint_mxfp4_serialized and dequantization_config to QuarkW4A4MXFP4.
  • python/sglang/srt/layers/quantization/quark/quark_moe.py
    • Imported CopyNumelCounter and dynamic_mxfp4_quant (conditional on HIP).
    • Modified get_moe_method to pass is_checkpoint_mxfp4_serialized to QuarkW4A4MXFp4MoEMethod.
    • Updated QuarkW4A4MXFp4MoEMethod constructor to accept is_checkpoint_mxfp4_serialized.
    • Implemented get_online_weight_loader to wrap the original weight loader for online MXFP4 quantization of MoE layers.
    • Added _quantize_w13_online and _quantize_w2_online methods for performing online MXFP4 quantization of MoE weights.
    • Adjusted process_weights_after_loading to account for weights already quantized online.
  • python/sglang/srt/layers/quantization/quark/schemes/quark_w4a4_mxfp4.py
    • Imported logging, dequantize_fp8, Fp8LinearMethod, CopyNumelCounter, and set_weight_attrs.
    • Modified QuarkW4A4MXFP4 constructor to accept is_checkpoint_mxfp4_serialized and dequantization_config.
    • Implemented get_online_mxfp4_weight_loader for direct online MXFP4 quantization.
    • Implemented get_online_fp8_to_mxfp4_weight_loader to handle FP8 to MXFP4 requantization, including tracking loaded data, dequantization, and requantization.
    • Added support for bias in apply_weights.
  • python/sglang/srt/model_loader/loader.py
    • Imported is_cuda_alike for conditional logging.
    • Added logging for peak GPU memory after loading weights to aid in memory analysis.
  • python/sglang/srt/model_loader/weight_utils.py
    • Added requantization_method to hf_quant_config when available.
    • Updated get_quant_config to correctly initialize QuarkConfig for quark_mxfp4 online scheme.
  • python/sglang/srt/server_args.py
    • Renamed QUANTIZATION_CHOICES to ONLINE_QUANTIZATION_CHOICES and refined its content to list only online quantization methods.
    • Added quark_mxfp4 to the ONLINE_QUANTIZATION_CHOICES list.
  • test/registered/quant/test_quark_mxfp4.py
    • New file: Added TestOnlineQuantizationMemoryLoad base class and derived test cases for dense and MoE models.
    • Implemented tests for peak memory usage and GSM8K accuracy for online quark_mxfp4 quantization.
    • Included specific tests for FP8 to MXFP4 requantization, covering both TP=1 and TP=2 configurations.
Activity
  • The pull request introduces a new feature for online quantization, allowing models to be converted to a different quantization format during loading.
  • It includes significant refactoring of existing quantization methods and weight loading logic to accommodate this new functionality.
  • New test cases have been added to ensure the correctness and efficiency (memory usage) of the online quantization and requantization processes.
  • The author has noted that implementation and testing for QuarkW4A4MXFp4MoEMethod and validation of all quark linears with weight_loader_v2 are still pending.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

@gemini-code-assist gemini-code-assist Bot left a comment

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.

Code Review

This pull request introduces support for online requantization from FP8 to MXFP4 on AMD GPUs, which is a valuable feature for deploying models with FP8 checkpoints. The changes are well-structured, including a significant and logical refactoring of Fp8LinearMethod to improve modularity and enable code reuse for online quantization scenarios. New utilities for dequantization and online quantization tracking have been added, and the configuration handling has been updated to support these new quantization paths. The addition of comprehensive tests covering memory usage and accuracy for both dense and MoE models is also a great inclusion. I have a couple of suggestions for improvement, one related to a potential typo in the server arguments and another regarding a possible inefficiency in the weight loading logic.

Comment thread python/sglang/srt/server_args.py Resolved

return online_mxfp4_weight_loader

def get_online_fp8_to_mxfp4_weight_loader(

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.

I'm thinking about scalability, the design for this part needs discussion.

@fxmarty-amd fxmarty-amd Feb 4, 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.

I agree. The flow I thought about is:

  1. The weight initialization is abstracted in static methods in LinearBaseMethod subclasses, like Fp8LinearMethod.create_fp8_weight_ and re-usable elsewhere as e.g. here in create_weights in order to load FP8 weights
            with torch.device("meta"):
                Fp8LinearMethod.create_fp8_weight_(
                    layer=layer,
                    ...
                )
  1. The weight loader is in charge of progressively materializing weights on device, loading the weights in the given checkpoint precision, and requantizing them. At the moment, this all happens in online_fp8_to_mxfp4_weight_loader, but it could be further broken down in re-usable blocks.

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.

late response, but since main complexity here resides within quark, I think it's okay for a first version.

We will have a better understanding of what to abstract more when we add more support beyond fp8.

@fxmarty-amd

Copy link
Copy Markdown
Contributor Author

@amd-bot ci-status

@amd-bot

amd-bot commented Jun 12, 2026

Copy link
Copy Markdown

@fxmarty-amd

CI Status for PR #18182

Merge verdict: ❌ Not ready. The two real failures (test_fwd_occupancy on AMD, test_server_args on CPU) are unrelated to this PR — both exercise code paths the diff doesn't touch, and pr-test-amd is red on main too. But do not read this as "merge it": the PR's core feature (FP8→MXFP4 requantization) was not exercised by any job in this run, and many NVIDIA/XPU/NPU jobs are still running. Green is not yet established and would not verify the feature even if reached.

Caution

The new test that validates this PR's feature did not run. test/registered/quant/test_quark_mxfp4.py is registered to the AMD suite stage-b-test-1-gpu-small-amd-mi35x, which was skipped because stage-a-test-1-gpu-small-amd failed and fast-fail gated stage-b. Its CUDA registration (base-b, 1-gpu-small) self-skips on NVIDIA (setUpClass requires AMD gfx95x / MI355x FP4 hardware via mxfp_supported()). So even when the pending NVIDIA base-b jobs go green, the feature stays unverified. Before merge, get the mi35x AMD suite to actually run (requires stage-a-amd green), or run test_quark_mxfp4.py manually on an MI355x.

Changed files: 15 (fp8.py +130/-49, quark_w4a4_mxfp4_moe.py +374/-28, quark_w4a4_mxfp4.py +214/-33, quark.py, online_quantization.py +new, dequantization.py +new, linear.py +1, model_runner.py +8/-5, test_quark_mxfp4.py +new, …)

AMD: 1 real failure (0 related) + 2 cascades · Others: 1 real failure (0 related) + 2 cascades · Many NVIDIA/XPU/NPU jobs still pending (run NOT complete)

AMD CI Failures

Job Test File Test Function Error Related? Why
stage-a-test-1-gpu-small-amd (mi325) test/registered/core/test_basic_sanity.py test_fwd_occupancy AssertionError: median=98.20 not > 99.0 (log) 🟢 Marginal perf-occupancy threshold on a base-a (non-quantized) model; PR's changes are gated behind quantization is not None / Quark methods, not exercised here. pr-test-amd is also failing on main.
wait-for-stage-a-amd N/A N/A cascade (wait-for-stage-a-amd: failure) 🟢 Gate job, fails because stage-a failed.
pr-test-amd-finish N/A N/A cascade ("The above jobs failed") 🟢 Aggregation/finish job.

Other CI Failures

Job Test File Test Function Error Related? Why
build-test (xeon-gnr, base-b-test-cpu) test/registered/unit/server_args/test_server_args.py test_tc_piecewise_build_config_reads_phase_config_dataclass AttributeError: module 'sglang.srt.model_executor' has no attribute 'runner_backend' (log) 🟢 Mocking failure in the TC-piecewise CUDA-graph backend test; PR does not touch runner_backend. Independent of MXFP4.
pr-test-extra-finish N/A N/A cascade 🟢 Finish job.
call-gate / pr-gate N/A N/A cascade (exit 1) 🟢 Gate aggregation.

Details / what to do before merge

  • Coverage gap (the blocker): the feature's only real test path is stage-b-test-1-gpu-small-amd-mi35x. It was skipped by the stage-a fast-fail. To actually verify this PR: (1) get stage-a-test-1-gpu-small-amd green so stage-b/mi35x runs, or (2) run test_quark_mxfp4.py locally on MI355x (gfx95x). Confirm the mi35x suite reports the MXFP4 tests as run, not skipped.
  • test_fwd_occupancy (AMD): median 98.20 vs threshold 99.0 across n=19 — a pre-existing marginal AMD threshold failure, not from this PR. It nonetheless blocks the AMD pipeline (and your mi35x coverage) until it goes green, so it must be resolved/retried for this PR to get real signal.
  • test_server_args (CPU): unrelated runner_backend attribute/mocking error; safe to ignore for this PR's correctness, but it's a red required check.
  • Run not complete: NVIDIA base-b shards, stage-b-test-1-gpu-xpu, and NPU jobs are still in_progress/queued — do not treat the run as green until they finish.

Generated by amd-bot using Claude Code CLI

@fxmarty-amd
fxmarty-amd requested a review from HaiShaw June 12, 2026 13:57
@fxmarty-amd

Copy link
Copy Markdown
Contributor Author

@amd-bot ci-status

@amd-bot

amd-bot commented Jun 12, 2026

Copy link
Copy Markdown

@fxmarty-amd

CI Status for PR #18182

Warning

A code path changed by this PR was not tested on AMD — re-run AMD CI before merging. A green / "Unlikely related" status below does not mean it's verified.

  • test/registered/quant/test_quark_mxfp4.py → stage-b-test-1-gpu-small-amd-mi35x, stage B: did not run (not reached)

AMD: 0 failures · Others: 3 failures (0 likely related)

AMD: 0 passed, 3 pending | Others: 7 passed

Other CI Failures

Workflow Job Error Related? Log
PR Test (NPU) stage-b-test-1-npu-a2 (0) Error: failed to run script step: Error: command terminated with non-zero exit code: command terminated with exit code 255 (pending) View
PR Test (Xeon) build-test (xeon-gnr, base-b-test-cpu) AttributeError: module 'sglang.srt.model_executor' has no attribute 'runner_backend'. Did you mean: 'runner_backend_utils'? (pending) View
PR Test Extra call-gate / pr-gate Cleaning up orphan processes (pending) View

Generated by amd-bot using Claude Code CLI

@fxmarty-amd

Copy link
Copy Markdown
Contributor Author

Not sure why we get: stage-b-test-1-gpu-small-amd-mi35x-rocm720 (pull_request) Skipped 1 hour ago

@HaiShaw

HaiShaw commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator

@amd-bot ci-status

@amd-bot

amd-bot commented Jun 13, 2026

Copy link
Copy Markdown

@HaiShaw

CI Status for PR #18182

Merge verdict: Not yet safe to merge. Zero failures are caused by this PR's code — every red job is repo-wide infra (AMD startup_failure), an opt-in label gate, or a pre-existing NVIDIA/NPU/CPU flake. But the PR's entire functional value — FP8→MXFP4 online requantization — was not exercised by any CI on this PR (CUDA skips it on hardware grounds; AMD CI never started). Green here proves nothing about the feature.

Caution

This PR's core path (--quantization quark_mxfp4 FP8→MXFP4 requantization) is untested by PR CI. Its only real test, test/registered/quant/test_quark_mxfp4.py, calls setUpClass → if not mxfp_supported(): raise SkipTest("requires gfx95x, e.g. MI355x"), so it skips on NVIDIA base-b. Its AMD home suite stage-b-test-1-gpu-small-amd-mi35x lives in pr-test-amd.yml, which finished as startup_failure with 0 jobs (run) — confirmed repo-wide (every recent pr-test-amd.yml run is startup_failure, not PR-specific). Before merge, run test_quark_mxfp4.py on MI355X hardware (the requant, MoE-TP, and peak-memory assertions only execute there).

Changed files: fp8.py (+130/-49, refactors create_weights→ static create_fp8_weight_), quark_w4a4_mxfp4{,_moe}.py, model_config.py (+8/-1), model_runner.py, linear.py, weight_utils.py, model_loader/utils.py, new dequantization.py/online_quantization.py, +test (15 files total).

AMD: did not run (2 workflows startup_failure) + 1 label-gate · Others: 4 failures (0 related)

AMD CI Failures

Job Test File Test Function Error Related? Why
PR Test (AMD) N/A N/A startup_failure — 0 jobs created 🟢 Repo-wide infra: every recent pr-test-amd.yml run is startup_failure across all PRs
PR Test ROCm 7.2 (AMD) N/A N/A startup_failure — 0 jobs created 🟢 Same repo-wide infra (rocm720 also all startup_failure)
call-gate / pr-gate (AMD Extra) N/A N/A Missing required label 'run-ci-extra' → exit 1 🟢 Opt-in gate by design, not a code failure

Other CI Failures

Job Test File Test Function Error Related? Why
base-b-test-1-gpu-small (1) test/registered/sampling/test_original_logprobs.py (file-level) exit code -9 (SIGKILL/OOM) 🟢 Uses BF16 Llama-3.2-1B-Instruct, loads model twice (HF fp32 + sglang); PR's FP8/MXFP4 code only activates for fp8-serialized ckpts / MI355X — not this path
15× base-b shards + wait-for-base-b — — Fast-fail: skipping — root cause … (1) 🟢 Cascade from the shard (1) OOM above; same root
stage-b-test-1-npu-a2 (0) NPU perf suite — AssertionError: throughput 650 < 700 (Qwen2.5-0.5B w8a8) 🟢 NPU throughput-threshold flake on w8a8; PR touches no NPU/w8a8 code
build-test (xeon-gnr) test/registered/unit/server_args/test_server_args.py — AttributeError: module 'sglang.srt.model_executor' has no attribute 'runner_backend' 🟢 CPU build can't import runner_backend.tc_piecewise_cuda_graph_backend (CUDA-specific); PR does not touch runner_backend

(Also: call-gate / pr-gate (Extra base) — same run-ci-extra opt-in gate, benign.)

Details / what to do before merge

  • Verify the feature on real hardware (blocking). Run test/registered/quant/test_quark_mxfp4.py on an MI355X (gfx95x) node — only there do mxfp_supported(), the FP8→MXFP4 requant, TestOnlineQuantizationMemoryLoadMOE, and peak-memory thresholds actually execute. The PR description's manual Qwen3-30B-A3B-FP8 / DeepSeek-V3.2 / Kimi-K2 runs are the de-facto verification; CI did not reproduce them.
  • AMD startup_failure is not yours to fix, but it blocks your signal. Once pr-test-amd.yml is repaired repo-wide, re-trigger CI so the mi35x suite runs. Until then, AMD CI green/red tells you nothing.
  • Low-risk regression check on NVIDIA: the fp8.py refactor (extracting create_fp8_weight_) is on the default FP8 load path. It's behavior-preserving by inspection, but the NVIDIA base-b run never got past the OOM/cascade to exercise FP8 models meaningfully — worth a re-run to get a clean base-b signal (the failure itself is unrelated OOM, so a rerun should clear it).
  • The four "Other" failures and both label gates need no code change from you.

Generated by amd-bot using Claude Code CLI

@HaiShaw

HaiShaw commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator

@fxmarty-amd please add CI test case in follow-up PR.

@HaiShaw
HaiShaw merged commit 3f4a338 into sgl-project:main Jun 13, 2026
81 of 105 checks passed
Comment on lines -1510 to +1512
self.server_args.quantization is not None
and isinstance(quantized_layers, tuple)
and len(quantized_layers) == 2
hasattr(self.model, "quant_config")
and hasattr(self.model.quant_config, "quantized_layers")
and self.server_args.quantization is not None

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.

This removed the tuple check, so modelopt’s quantized_layers dict gets unpacked here and crashes

@fxmarty-amd fxmarty-amd left a comment •

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.

/

@fxmarty-amd

fxmarty-amd commented Jun 16, 2026 •

Copy link
Copy Markdown
Contributor Author

After inspection, all stage="base-b", runner_config="1-gpu-small" and stage="base-b", runner_config="1-gpu-large" test cases passed on 9c933a0 (see https://github.com/sgl-project/sglang/actions/runs/27317035584/job/80699794025), including test/registered/quant/test_modelopt_fp8.py and test/registered/unit/model_loader/test_modelopt_loader.py. These tests pass on this branch as well.

The failing test/registered/4-gpu-models/test_nvidia_nemotron_3_super_nvfp4.py is registered on suite="nightly-4-gpu-b200", nightly=True:

register_cuda_ci(est_time=540, suite="nightly-4-gpu-b200", nightly=True)

@b8zhong @mmangkad @HaiShaw @BowenBao We should consider adding a unit smoke test for modelopt mixed precision models.

#28291 relands this PR removing online quantization logging logic from model_runner.py at all.

Beyond the code quality, I believe the CI could be improved in two ways:

  • Adding tiny smoke test for modelopt mixed precision code path that would have captured this issue.
  • Once a PR is deemed to be ready for merge, avoid pre-emption of tests as Error: Fast-fail: skipping — root cause job(s): wait-for-base-b, base-b-test-1-gpu-small / base-b-test-1-gpu-small (1) that may hide truly failing tests due to previous 404 error, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deepseek documentation Improvements or additions to documentation quant LLM Quantization run-ci CI: run the baseline test suite on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants