Conversation
|
Since I do not have a Turing card with sufficient VRAM, I have not tested it on Turing; however, it should work correctly on Turing. |
There was a problem hiding this comment.
Code Review
This pull request implements padding for Marlin FP8 kernels to support unaligned dimensions, updates CUDA tile size logic, and lowers the minimum compute capability for ModelOpt quantization. Key feedback points out potential runtime errors from uninitialized variables in the padding logic. Additionally, the current implementation fails to pad the K dimension and lacks support for misaligned channel-wise quantized layers, both of which will lead to kernel failures.
cd53d99 to
9df4725
Compare
|
I ran some tests using Based on vLLM v0.19.0. |
9df4725 to
ad30e0b
Compare
|
Based on the mainline version ( The test methods and results are as follows: vLLM start command: vllm serve nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-NVFP4 --served-model-name Nemotron-3-Super --tensor-parallel-size 4 --enable-expert-parallel --trust-remote-code --enable-auto-tool-choice --tool-call-parser qwen3_coder --reasoning-parser nemotron_v3 --kv-cache-memory-bytes 2g --max-model-len auto --async-scheduling --enable-prefix-caching --enable-chunked-prefill --max-num-seqs 4 --mamba_ssm_cache_dtype float32 --seed 42Test result of # command
lm_eval --model local-completions --model_args base_url=http://127.0.0.1:8000/v1/completions,model=Nemotron-3-Super,tokenizer=nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-NVFP4 --trust_remote_code --tasks lambada_openai --batch_size auto --seed 42
# results
local-completions ({'base_url': 'http://127.0.0.1:8000/v1/completions', 'model': 'Nemotron-3-Super', 'tokenizer': 'nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-NVFP4'}), gen_kwargs: ({}), limit: None, num_fewshot: None, batch_size: auto
| Tasks |Version|Filter|n-shot| Metric | |Value | |Stderr|
|--------------|------:|------|-----:|----------|---|-----:|---|-----:|
|lambada_openai| 1|none | 0|acc |↑ |0.7623|± |0.0059|
| | |none | 0|perplexity|↓ |3.0024|± |0.0603| |
|
@robertgshaw2-redhat Hello, this PR is ready for review. |
ad30e0b to
7932bd7
Compare
7932bd7 to
819577a
Compare
f2feb56 to
8250862
Compare
There was a problem hiding this comment.
Do gptq / awq / nvfp4 / mxfp4 have similar issues as well?
There was a problem hiding this comment.
It appears that AWQ is not affected by this issue; the model I tested was cyankiwi/NVIDIA-Nemotron-3-Super-120B-A12B-AWQ-4bit.
The problem may stem from differences in weight sharding logic or the specific quantization method used (modelopt_mixed).
I am currently unable to test the GPTQ, NVFP4, and MXFP4 methods, as I do not have access to corresponding models for them.
NVFP4 should theoretically be affected as well; however, I did not encounter this issue during my testing, so I will not be making any modifications regarding it for the time being. The model nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-NVFP4 is a mixed-precision model utilizing NVFP4, FP8, and BF16; while this theoretically included a test of NVFP4, it did not trigger the issue.
This problem originates from gptq_marlin_repack, which requires that the N and K dimensions be aligned. This operator is invoked by the following files: vllm/model_executor/layers/quantization/utils/marlin_utils_fp4.py, vllm/model_executor/layers/quantization/utils/marlin_utils_fp8.py, and vllm/model_executor/kernels/linear/mixed_precision/marlin.py. However, marlin_gemm does not appear to perform any checks for this alignment; I am currently unsure whether the marlin_gemm operator itself imposes this same requirement.
8250862 to
6f3a8e9
Compare
1d1f60f to
bbe8471
Compare
bbe8471 to
23138b1
Compare
23138b1 to
154f6b8
Compare
|
The scope of this PR might be too broad; should I split it into two separate PRs?
|
154f6b8 to
6b27a06
Compare
6b27a06 to
755f8a4
Compare
|
This pull request has merge conflicts that must be resolved before it can be |
755f8a4 to
dd29ee6
Compare
Validated implementation using `nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-NVFP4`, ensuring functional correctness and performance stability on Ampere. Signed-off-by: IriKa Qiu <qiujie.jq@gmail.com>
dd29ee6 to
93846b3
Compare
|
This pull request has merge conflicts that must be resolved before it can be |
Signed-off-by: IriKa <qiujie.jq@gmail.com>
|
This pull request has merge conflicts that must be resolved before it can be |
Leverages Marlin kernels to enable
modelopt_mixedquantization support, extending compatibility to NVIDIA Turing and Ampere architectures.Due to limitations in Marlin, tensor dimensions must be aligned; however, the output dimensions of certain layers in the
nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-NVFP4model were misaligned. Consequently, zero-padding was applied.As a precautionary measure, zero-padding was restricted exclusively to layers utilizing FP8 per-tensor quantization.
@jinzhen-lin Could you please take a look at this PR when you have a moment?
#38776
PR #45295 has already implemented padding for marlin n/k, so only
modelopt_mixedsupport for turing and ampere needs to be enabled.Purpose
Support model
nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-NVFP4for Turing or Ampere.Test Plan
Test model
nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-NVFP4.Validated implementation using
nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-NVFP4, ensuring functional correctness and performance stability on 4x RTX3090.Command:
vllm serve nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-NVFP4 --served-model-name Nemotron-3-Super --tensor-parallel-size 4 --enable-expert-parallel --trust-remote-code --enable-auto-tool-choice --tool-call-parser qwen3_coder --reasoning-parser nemotron_v3 --kv-cache-memory-bytes 3G --max-model-len auto --async-scheduling --enable-prefix-caching --enable-chunked-prefill --max-num-seqs 4Test Result
The
vllm servecommand launched successfully, and performance tests appear normal.Previously, the model
nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-NVFP4failed to launch because themodelopt_mixedconstraint restricted deployment to SM89 or newer architectures only.Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.