Skip to content

[AMD] Add Kimi-K2.7-Code-MXFP4 to cookbook - #36246

Merged
1am9trash merged 7 commits into
sgl-project:mainfrom
Emmanuel0612:add-kimi-k27-code-mxfp4-cookbook
Aug 25, 2026
Merged

1am9trash merged 7 commits into
sgl-project:mainfrom
Emmanuel0612:add-kimi-k27-code-mxfp4-cookbook

Conversation

@Emmanuel0612

@Emmanuel0612 Emmanuel0612 commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

We enabled the Kimi-K2.7-Code-MXFP4 checkpoint in SGLang and tested it on AMD MI350X/MI355X GPUs. The cookbook page for Kimi-K2.7-Code only showed the INT4 checkpoint, so users had no easy way to find or launch the MXFP4 version. This PR adds the MXFP4 checkpoint to the cookbook so people can deploy it with a ready-to-use command.

Modifications

This is a documentation-only change. Two files are updated:

  • docs/src/snippets/autoregressive/kimi-k27-code-deployment.jsx (the interactive command generator)

    • Added a new Quantization control with two choices: INT4 (base checkpoint) and MXFP4.
    • MXFP4 is only selectable on MI350X/MI355X; on other GPUs it is greyed out with a short reason. This matches how the Kimi-K2.6 page handles its NVFP4 option.
    • When MXFP4 is selected, the generated command uses --model-path amd/Kimi-K2.7-Code-MXFP4 and --mem-fraction-static 0.765. The INT4 command is unchanged.
  • docs/cookbook/autoregressive/Moonshotai/Kimi-K2.7-Code.mdx (the page text)

    • Added the MXFP4 checkpoint to the Available Models list: amd/Kimi-K2.7-Code-MXFP4.
    • Added a short Configuration Tips note explaining that MXFP4 runs on MI350X/MI355X, uses TP=4, is auto-detected (no --quantization flag needed), uses FP8 KV cache, and validated with the rocm/sgl-dev:v0.5.16-rocm720-mi35x-20260804 image.
    • Added an MXFP4 deployment command example for AMD.

The launch settings come from a real, validated MI355X server run: --tp 4, --kv-cache-dtype fp8_e4m3, --mem-fraction-static 0.765, ROCm aiter backend, with the MXFP4 format auto-detected from the checkpoint.

Note on --kv-cache-dtype fp8_e4m3: this flag is carried over from the actual validated MI355X run and matches the existing AMD (INT4) path on this page, which already uses FP8 KV cache and documents the accuracy trade-off in Configuration Tips. It is not a new default introduced for all cells — it applies only to the AMD MXFP4 command.

Verifications

image image image

Checklist


CI States

Latest PR Test (Base): ✅ Run #32820019880
Latest PR Test (Extra): ❌ Run #32831875738
Latest PR Test (AMD ROCm 7.2): ➖ No AMD PR run found for this commit.

Emmanuel0612 and others added 2 commits August 25, 2026 09:59
Document the MXFP4 checkpoint (moonshotai/Kimi-K2.7-Code-MXFP4) validated on
AMD MI350X/MI355X: add an INT4/MXFP4 Quantization axis to the deployment
generator (MXFP4 gated to MI350X/MI355X), an Available Models entry, a
configuration tip, and an MXFP4 deployment command example.

Co-Authored-By: Claude <noreply@anthropic.com>
The MXFP4 checkpoint is published under the amd org, not moonshotai.

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Aug 25, 2026
Emmanuel0612 and others added 5 commits August 25, 2026 12:39
Document the rocm/sgl-dev:v0.5.16-rocm720-mi35x-20260804 image used to
validate the MXFP4 checkpoint on MI350X/MI355X.

Co-Authored-By: Claude <noreply@anthropic.com>
Match launch_cookbook.sh: full AITER/ROCm env block, --attention-backend
aiter, --mem-fraction-static 0.90, --disable-radix-cache,
--enable-aiter-allreduce-fusion. Parser/DP-attention controls hide for
MXFP4 (parsers auto-detect). Update the MDX example and config tip to the
v0.5.17-rocm720-mi35x-20260812 image and matching command.

Co-Authored-By: Claude <noreply@anthropic.com>
Add GSM8K accuracy (parallel 100/300/600/1200) and bench_serving latency
results (concurrency 4-64) measured on 4x MI355X, mirroring the
Kimi-K2.6 benchmark section layout. Keep the official model-card table as
a reference.

Co-Authored-By: Claude <noreply@anthropic.com>
5.1 Model Card (Official), then 5.2 MXFP4 Benchmark with 5.2.1 Accuracy
and 5.2.2 Latency under a shared test environment.

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
@Emmanuel0612 Emmanuel0612 changed the title Add kimi k27 code mxfp4 cookbook [AMD] Add Kimi-K2.7-Code-MXFP4 to cookbook Aug 25, 2026
@sogalin sogalin added the run-ci CI: run the baseline test suite on this PR label Aug 25, 2026

@sogalin sogalin 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

@1am9trash 1am9trash 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

@1am9trash
1am9trash merged commit a618d4c into sgl-project:main Aug 25, 2026
114 of 122 checks passed
@Emmanuel0612
Emmanuel0612 deleted the add-kimi-k27-code-mxfp4-cookbook branch August 25, 2026 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants