Repository navigation
Conversation
Nemotron 3.5 Lightning NVFP4 declares its shared-expert projections as ModelOpt W4A16_NVFP4. The SDK already queries them as the w4a16_nvfp4 GEMM mode, but the vLLM GEMM collector could not measure that mode. The collector now builds this lane through vLLM's own ModelOpt MIXED_PRECISION dispatcher. Activations stay BF16. kernel_source records the kernel that vLLM selects: Marlin at 0.24.0-0.27.1, and FlashInfer CuTe-DSL W4A16 or Marlin at 0.30.0/0.31.0. The run raises if vLLM builds an activation-quantized layer. - Add the six Lightning shared-expert (n, k) sites at TP1/4/8 to the NemotronH GEMM model cases. - Add the w4a16_nvfp4 SM80 capability floor and the two kernel-source backend entries. - Admit vLLM 0.30.0, the current query-slot version. - Seed the synthetic GEMM inputs and weights. Signed-off-by: Alexandre Milesi <milesial@users.noreply.github.com>
The GEMM collector now admits vLLM 0.30.0. Update the three tests that pin its exact admitted release set. collect_moe keeps its own range. Signed-off-by: Alexandre Milesi <milesial@users.noreply.github.com>
…00 and GB200 Add 444 measured w4a16_nvfp4 GEMM rows per table: the six Lightning shared-expert (n, k) sites at TP1/4/8, each over the 74 base token counts. - b200_sxm and gb200, vLLM 0.30.0: collect.py merged the rows into the shipped tables (148962 -> 149406 rows) and appended one collection event. The shipped rows, runtime and earlier events are unchanged. The text columns are now stored as large_string; their values are unchanged. - b200_sxm, vLLM 0.31.0: a new table with only the w4a16_nvfp4 rows. Other GEMM dtypes for this version are not measured here. vLLM selected FlashInferCuteDslNvFp4W4A16LinearKernel at both versions on both GPUs. Collector commit 9d81c45, collector_hash sha256:3e50fb87, case_plan_hash sha256:0da6da79, seed 0, 0 failed cases. The op-backend facts registry gets the three new slices. Signed-off-by: Alexandre Milesi <milesial@users.noreply.github.com>
The w4a16_nvfp4 lane runs from SM80, because Marlin FP4 supports GPUs from SM75. Its weight preparation called vLLM's scaled_fp4_quant, which needs an SM100+ quantization kernel (nvfp4_quant_sm_supported). So the lane failed on A100, L40S, H100 and H200 before vLLM ran the GEMM. Below SM100, the collector now builds the same checkpoint layout with vLLM's PyTorch reference quantizer, ref_nvfp4_quant. The body of that function is the same in every admitted release. The collector packs the E2M1 values low nibble first, in the layout of vLLM's break_fp4_bytes. On SM100+, the lane keeps scaled_fp4_quant with the same arguments as before. Tests use real torch tensors. They decode packed bytes with an independent E2M1 decoder, and they check that below SM100 the reference quantizer runs with the ModelOpt global scale and scaled_fp4_quant does not run. The tests are skipped when torch is not installed. Signed-off-by: Alexandre Milesi <milesial@users.noreply.github.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Comment |
Other collector test modules cache a MagicMock under sys.modules["torch"] at collection time. Under xdist, the w4a16_nvfp4 weight tests could then build their tensors with that mock and fail in CI. The tests now check the installed torch distribution instead of sys.modules. A fixture installs the real torch module for each test. It reuses an already initialized torch, because torch can be initialized only once per process. Signed-off-by: Alexandre Milesi <milesial@users.noreply.github.com>
The application test inventory accepts module-level collection skips only for listed modules. Without torch, the new test module skipped at collection time and failed the contracts job. The torch fixture now skips each test when the torch distribution is not installed, with the reason that the other torch-dependent collector tests use. The module is always collected. Signed-off-by: Alexandre Milesi <milesial@users.noreply.github.com>
milesial
added a commit
to milesial/aisimulate-public
that referenced
this pull request
Oct 30, 2026
… 3.5 Lightning Bring in ai-dynamo#645 at c9465fb (and main up to its base add6fca, which adds the vLLM 0.30.0 tables its rows extend). The collect_gemm w4a16_nvfp4 lane and its b200_sxm/gb200 vLLM 0.30.0 and b200_sxm 0.31.0 rows serve the dense W4A16_NVFP4 shared-expert GEMMs that ai-dynamo#617 prices per layer. Merged without conflicts. Signed-off-by: Alexandre Milesi <milesial@users.noreply.github.com> Signed-off-by: milesial <milesial@users.noreply.github.com>
12 tasks
This branch has not been deployed
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.
Nemotron 3.5 Lightning NVFP4 runs its shared-expert projections as ModelOpt W4A16_NVFP4: 4-bit NVFP4 weights with BF16 activations. The performance model already asks for these GEMMs in the
w4a16_nvfp4mode. Before this PR, the vLLM GEMM collector did not measure that mode. Strict SILICON queries for Lightning failed with "GEMM perf data missing for quant 'w4a16_nvfp4'". After this PR, the collector measures the mode through vLLM's own ModelOpt dispatcher. The PR also adds measured rows for B200 and GB200. On these two GPUs, the Lightning shared-expert GEMM lookups at vLLM 0.30.0 now return measured data.What changed
collector/vllm/collect_gemm.py: a neww4a16_nvfp4lane. It builds the layer withModelOptMixedPrecisionConfig, as a LightningMIXED_PRECISIONcheckpoint does, so vLLM selects the kernel.kernel_sourcerecords the kernel that vLLM ran. If vLLM builds a layer that quantizes activations, the run fails.scaled_fp4_quantmakes them. On older GPUs, vLLM's PyTorch reference quantizer makes them, becausescaled_fp4_quantneeds an SM100 kernel.collector/cases/models/NemotronHForCausalLM_cases.yaml: the six Lightning shared-expert (n, k) sites for TP1, TP4 and TP8.collector/cases/capabilities.yaml:w4a16_nvfp4: 80(BF16 activations).collector/kernel_source_backends.yamlandcollector/op_backend_facts.yaml: entries for the new kernel labels and data slices.Evidence
Each cell ran the unchanged
collect.pyentry point with 444 exact case filters (6 sites x 74 token counts). Each cell kept 444 cases and recorded 0 failures. All rows have the collector commit 9d81c45, collector hashsha256:3e50fb87, and case plan hashsha256:0da6da79.f9de5cd932445b365f5e53524864d466a4a4c0433f7dd5b7collect.pyappended one event. The text columns are now stored aslarge_string, and their values are unchanged.check_collector_data.pyandbackend_facts.py --checkpass.Prediction Regression Gate, run locally on vLLM 0.30.0 for b200_sxm, b300_sxm, gb200, gb300 and rtx_pro_6000_server, with #617's corrected candidate plus this PR:
w4a16_nvfp4lookup (TP1, EP8). On the other three systems, the GEMM lookup still fails.Known limits
large_string, and the collector merge replaces such a table instead of adding to it. A separate fix is needed first.w4a16_nvfp4, the MoE lookups also need measured W4A16 MoE rows. This PR does not add them.