Support kimi k3 nvfp4 checkpoint - #53132
Merged
Merged
Conversation
wzhao18
marked this pull request as ready for review
August 20, 2026 16:17
wzhao18
requested review from
AndreasKaratzas,
LucasWilkinson,
MatthewBonanni,
WoosukKwon,
mgoin,
pavanimajety,
robertgshaw2-redhat,
tlrmchlsmth,
yewentao256 and
zyongye
as code owners
August 20, 2026 16:17
Co-authored-by: OpenAI Codex <codex@openai.com> Signed-off-by: wzhao18 <wzhao18.sz@gmail.com>
wzhao18
force-pushed
the
wzhao/k3-nvfp4
branch
from
August 20, 2026 16:18
2eced09 to
20d2f65
Compare
Signed-off-by: wzhao18 <wzhao18.sz@gmail.com>
wzhao18
requested review from
DarkLight1337,
ProExpertProg,
houseroad,
njhill,
youkaichao and
ywang96
as code owners
August 21, 2026 03:36
wzhao18
force-pushed
the
wzhao/k3-nvfp4
branch
from
August 21, 2026 03:37
6e8ad3b to
9811b6d
Compare
zyongye
approved these changes
Aug 21, 2026
Member
|
/ci run |
zyongye
enabled auto-merge (squash)
August 21, 2026 04:07
|
✅ Triggered Buildkite CI #84955 for commit |
4 tasks
wyettzeng
pushed a commit
to wyettzeng/vllm
that referenced
this pull request
Aug 21, 2026
Signed-off-by: wzhao18 <wzhao18.sz@gmail.com> Co-authored-by: OpenAI Codex <codex@openai.com> Signed-off-by: Wyett <wyettzeng@gmail.com>
juhi10071998
added a commit
to juhi10071998/vllm
that referenced
this pull request
Aug 21, 2026
…trim FormatScheme A FP8_PB_WO output width that is not a multiple of 128 (a partial trailing block; e.g. GLM's replicated fused_qkv_a_proj = 2048 + 576 = 2624) is padded up to a block boundary with zeros before the kernel post-load, the GEMM runs on the padded weight, and the output is trimmed back to the logical width with bias added after. This is wei-zhao vllm-project#53132's approach, expressed as a FormatScheme (_Fp8PbWoPartialBlock) on the generic method rather than a per-format class -- post_process pads the weight, apply wraps the kernel to trim the output. A new FormatScheme.apply hook makes this compute-time residue expressible without touching ModelOptLinearMethod. KFp8Block128 sizes the weight_scale by cdiv to match the (padded) block count. No-op for the common block-aligned case. Chosen over a no-pad variant because it handles any width and does not depend on DeepGEMM's undocumented N-alignment tolerance -- it is the logic upstream already merged. Test is a faithful port of vllm-project#53132's test_modelopt_fp8_pb_wo_hides_output_padding for the generic method. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Juhi Mittal <juhim@nvidia.com>
zufangzhu
pushed a commit
to zufangzhu/vllm
that referenced
this pull request
Aug 24, 2026
Signed-off-by: wzhao18 <wzhao18.sz@gmail.com> Co-authored-by: OpenAI Codex <codex@openai.com> Signed-off-by: Zhu, Zufang <zufang.zhu@intel.com>
juhi10071998
added a commit
to juhi10071998/vllm
that referenced
this pull request
Aug 24, 2026
…trim FormatScheme A FP8_PB_WO output width that is not a multiple of 128 (a partial trailing block; e.g. GLM's replicated fused_qkv_a_proj = 2048 + 576 = 2624) is padded up to a block boundary with zeros before the kernel post-load, the GEMM runs on the padded weight, and the output is trimmed back to the logical width with bias added after. This is wei-zhao vllm-project#53132's approach, expressed as a FormatScheme (_Fp8PbWoPartialBlock) on the generic method rather than a per-format class -- post_process pads the weight, apply wraps the kernel to trim the output. A new FormatScheme.apply hook makes this compute-time residue expressible without touching ModelOptLinearMethod. KFp8Block128 sizes the weight_scale by cdiv to match the (padded) block count. No-op for the common block-aligned case. Chosen over a no-pad variant because it handles any width and does not depend on DeepGEMM's undocumented N-alignment tolerance -- it is the logic upstream already merged. Test is a faithful port of vllm-project#53132's test_modelopt_fp8_pb_wo_hides_output_padding for the generic method. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Juhi Mittal <juhim@nvidia.com>
1 task
khushali9
pushed a commit
to khushali9/vllm
that referenced
this pull request
Aug 29, 2026
Signed-off-by: wzhao18 <wzhao18.sz@gmail.com> Co-authored-by: OpenAI Codex <codex@openai.com> Signed-off-by: khushali9 <khushali.desai9@gmail.com>
juhi10071998
added a commit
to juhi10071998/vllm
that referenced
this pull request
Aug 31, 2026
…trim FormatScheme A FP8_PB_WO output width that is not a multiple of 128 (a partial trailing block; e.g. GLM's replicated fused_qkv_a_proj = 2048 + 576 = 2624) is padded up to a block boundary with zeros before the kernel post-load, the GEMM runs on the padded weight, and the output is trimmed back to the logical width with bias added after. This is wei-zhao vllm-project#53132's approach, expressed as a FormatScheme (_Fp8PbWoPartialBlock) on the generic method rather than a per-format class -- post_process pads the weight, apply wraps the kernel to trim the output. A new FormatScheme.apply hook makes this compute-time residue expressible without touching ModelOptLinearMethod. KFp8Block128 sizes the weight_scale by cdiv to match the (padded) block count. No-op for the common block-aligned case. Chosen over a no-pad variant because it handles any width and does not depend on DeepGEMM's undocumented N-alignment tolerance -- it is the logic upstream already merged. Test is a faithful port of vllm-project#53132's test_modelopt_fp8_pb_wo_hides_output_padding for the generic method. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Juhi Mittal <juhim@nvidia.com>
juhi10071998
added a commit
to juhi10071998/vllm
that referenced
this pull request
Aug 31, 2026
The rebase onto vllm-project#53132/Kimi K3 brought in mla_attention.py's _get_kv_b_proj_input_dtype, which imported and isinstance-checked the deleted ModelOptFp8PbWoLinearMethod (a runtime ImportError for MLA + block-FP8 models, caught by mypy). Map it to the generic ModelOptLinearMethod + the block-FP8 weight key (kFp8Static128BlockSym), same absorption as deep_gemm_warmup. Also reword a test docstring (mis-scaled -> wrong scales) to satisfy the typos hook. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Juhi Mittal <juhim@nvidia.com>
am-cohere
pushed a commit
to am-cohere/vllm
that referenced
this pull request
Sep 1, 2026
Signed-off-by: wzhao18 <wzhao18.sz@gmail.com> Co-authored-by: OpenAI Codex <codex@openai.com>
juhi10071998
added a commit
to juhi10071998/vllm
that referenced
this pull request
Sep 1, 2026
…trim FormatScheme A FP8_PB_WO output width that is not a multiple of 128 (a partial trailing block; e.g. GLM's replicated fused_qkv_a_proj = 2048 + 576 = 2624) is padded up to a block boundary with zeros before the kernel post-load, the GEMM runs on the padded weight, and the output is trimmed back to the logical width with bias added after. This is wei-zhao vllm-project#53132's approach, expressed as a FormatScheme (_Fp8PbWoPartialBlock) on the generic method rather than a per-format class -- post_process pads the weight, apply wraps the kernel to trim the output. A new FormatScheme.apply hook makes this compute-time residue expressible without touching ModelOptLinearMethod. KFp8Block128 sizes the weight_scale by cdiv to match the (padded) block count. No-op for the common block-aligned case. Chosen over a no-pad variant because it handles any width and does not depend on DeepGEMM's undocumented N-alignment tolerance -- it is the logic upstream already merged. Test is a faithful port of vllm-project#53132's test_modelopt_fp8_pb_wo_hides_output_padding for the generic method. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Juhi Mittal <juhim@nvidia.com>
juhi10071998
added a commit
to juhi10071998/vllm
that referenced
this pull request
Sep 1, 2026
The rebase onto vllm-project#53132/Kimi K3 brought in mla_attention.py's _get_kv_b_proj_input_dtype, which imported and isinstance-checked the deleted ModelOptFp8PbWoLinearMethod (a runtime ImportError for MLA + block-FP8 models, caught by mypy). Map it to the generic ModelOptLinearMethod + the block-FP8 weight key (kFp8Static128BlockSym), same absorption as deep_gemm_warmup. Also reword a test docstring (mis-scaled -> wrong scales) to satisfy the typos hook. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Juhi Mittal <juhim@nvidia.com>
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.
Purpose
This PR supports running kimi k3 nvfp4 checkpoint
nvidia/Kimi-K3-NVFP4Test Plan
Test Result
TP8:
TEP8:
DCP8:
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.