Skip to content

cookbook: add Hunyuan 3 (Hy3) Day-0 page - #30201

Merged
JustinTong0323 merged 12 commits into
sgl-project:mainfrom
JustinTong0323:xinyuan/hy3-cookbook
Jul 6, 2026
Merged

JustinTong0323 merged 12 commits into
sgl-project:mainfrom
JustinTong0323:xinyuan/hy3-cookbook

Conversation

@JustinTong0323

@JustinTong0323 JustinTong0323 commented Jul 6, 2026 •

Copy link
Copy Markdown
Collaborator

What

Day-0 cookbook page for Hunyuan 3 (Hy3) on the config-driven template (per-model config + benchmarks JSX consumed by the shared _deployment.jsx / _playground.jsx engines).

  • Variants: BF16 (tencent/Hy3) + FP8 (tencent/Hy3-FP8), both ~276B/20B-active MoE (HYV3ForCausalLM, 192 experts, 80 layers, 256K context).
  • Hardware: H200 / B200 / B300 / GB200 / GB300, single-node. BF16 needs TP=8 (H200/B200) or TP=4 (B300/GB300); FP8 fits in TP=4 (H200/B200) or TP=2 (B300/GB300/GB200).
  • Strategies: low-latency (EAGLE MTP) / balanced / high-throughput (DP+DeepEP) per hardware.
  • Parsers: --reasoning-parser auto --tool-call-parser auto — auto resolves to hunyuan on the shipping Hy3 tokenizer (PR feat(parser): resolve special-token suffix at runtime for compatibility #29920 makes the hunyuan parser suffix-aware, so the same recipe serves both the preview and the shipping tokenizers).

Verified (8×H200, BF16, sgl-eval single-shot)

Cell GSM8K
low-latency (TP8 + EAGLE MTP 3-1-4) 95.75%
balanced (TP8, chunked-prefill 32768) 95.83%
high-throughput (DP8 + DeepEP) not yet — HunyuanV3 + DP-attention=8 hits a reshape error on H200; cell ships unverified

FP8 cells and the other Blackwell cells are unverified (Day-0).

Files

  • docs_new/src/snippets/configs/tencent/hy3.jsx — config
  • docs_new/src/snippets/configs/tencent/hy3-benchmarks.jsx — benchmark cells
  • docs_new/cookbook/autoregressive/Tencent/Hy3.mdx — page (Deploy + Playground + §1-4)
  • docs_new/docs.json — nav entry (Hunyuan 3 added under Tencent; stale tag: NEW dropped from Hunyuan3-Preview)

Notes


CI States

Latest PR Test (Base): ✅ Run #28769687579
Latest PR Test (Extra): ❌ Run #28769687465

JustinTong0323 and others added 3 commits July 5, 2026 16:31
Config-driven template (per-model config + benchmarks JSX consumed by the
shared _deployment.jsx / _playground.jsx engines). Covers H200 / B200 / B300 /
GB300 / GB200 with low-latency / balanced / high-throughput recipes, all BF16.
H200 low-latency is verified; the rest ship unverified. Docker image is
lmsysorg/sglang:dev (the suffix-aware hunyuan parser, PR sgl-project#29920, is on main
but not yet in a tagged release). Drops stale tag: NEW from Hunyuan3-Preview.
…atic, verify H200 cells

- Switch all cells to --reasoning-parser auto --tool-call-parser auto
  (auto resolves to hunyuan on the shipping Hy3-BF16-Testing tokenizer,
  per PR sgl-project#29920; the suffix-aware parser reads real tokens from the vocab).
- Drop --mem-fraction-static (let sglang pick).
- Fix DeepEP num_max 2048 -> 1024 on H200/B200 high-throughput cells
  (H200/B200 assert <=1024; B300/GB300 already 1024).
- Verify H200 low-latency (GSM8K 95.75%) and balanced (95.83%); high-throughput
  stays unverified (HunyuanV3 + DP-attention=8 reshape error on H200).
- Fill hy3-benchmarks.jsx GSM8K for the two verified cells.
- Install instructions: clone main (carries PR sgl-project#29920); Docker uses sglang:dev.
- Add FP8 quantization (tencent/Hy3-FP8, ~300GB). FP8 cells: TP=4 on
  H200/B200, TP=2 on B300/GB300/GB200 (smaller footprint than BF16).
- Switch modelNames from the private Hy3-BF16-Testing to the public
  tencent/Hy3 (BF16) + tencent/Hy3-FP8 (FP8).
- FP8 cells use --kv-cache-dtype fp8_e4m3; high-throughput uses DeepEP
  num_max=1024. FP8 cells not yet verified.
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Jul 6, 2026

@zijiexia zijiexia 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.

We might also need to change intro.mdx to point to this model.

Comment on lines +118 to +122
| Parameter | Value |
|---|---|
| `temperature` | 0.7 |
| `top_p` | 0.9 |
| `reasoning_effort` | `high` / `low` (thinking) or `no_think` (instant) |

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.

Can we use JSX table ? For better rendering

Comment on lines +130 to +135
| GPU | VRAM | TP | Notes |
|---|---|---|---|
| H200 | 141GB | 8 | minimum single-node for BF16 |
| B200 | 180GB | 8 | pass `--attention-backend trtllm_mha` |
| B300 / GB300 | 272GB | 4 | pass `--attention-backend trtllm_mha` |
| H100 / A100 (80GB) | 80GB | 16+ | multi-node only |

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.

Same, need to use jsx table. Also, are those value in the table correct?


</Accordion>

## 4. Benchmark

@zijiexia zijiexia Jul 6, 2026 •

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.

Might need to move benchmarks to the benchmark section in deployment. You can refer to MiniMax M3

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, seems the agent is not quite instruct followed lol

},

// ====================================================================
// GB200 (sm_100 + aarch64) — TP=4 (inferred from B200)

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.

GB200 TP looks mis-scaled, GB200 is 192GB but the GB200 cells use B300/GB300's TP values. Can it fit the model?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This model is 300B so I think that's OK

},

github: {
cookbookModel: "tencent/hy3",

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.

can we make sure this repo name is correct? it'a tencent/Hy3-preview, should it be tencent/Hy3?

@JustinTong0323

Copy link
Copy Markdown
Collaborator Author

Thanks @zijiexia — all five inline points are addressed in 105063d:

  • JSX tables (L122, L135): both markdown tables (Recommended Generation Params + Hardware requirements) converted to <table> JSX, matching MiniMax-M2. Dropped the speculative H100/A100 row from the hardware table (not validated).
  • §4 Benchmark (L331): removed entirely — the standalone Accuracy/Speed section duplicated the Deployment card. Per-cell numbers + the "⚡ Reproduce" modal are already driven by benchmarkCommands + accuracyLabels in hy3.jsx, same pattern as MiniMax-M3.
  • GB200 TP (L462): clarified the comment — GB200 is 192GB/GPU and the model is ~552GB BF16, so --tp 4 (single-node 4×192GB = 768GB) fits. Added a GB200 row to the hardware table making this explicit.
  • cookbookModel (L108): tencent/hy3 → tencent/Hy3 (correct HF casing).

Verified locally — mint dev renders the page cleanly, both JSX tables render, the GSM8K 95.75% number + Reproduce modal carry over from the Deployment card.

…for GQA MoE)

Hy3 is GQA (8 KV heads), not MLA like GLM-5.2 — dp-attention gives no
throughput win, and the DeepEP+dp-attention combo hangs/fails at cuda graph
capture (NVSHMEM heap alloc failure). Remove the 10 HT cells + benchmark
entries + HT docs; keep low-latency + balanced (both verified on H200).
@JustinTong0323
JustinTong0323 force-pushed the xinyuan/hy3-cookbook branch from 26068c1 to d40bc4c Compare July 6, 2026 05:04
…6GB + sampling 0.9/1.0

B200 BF16 fits TP4 (590GB/4=148GB/GPU, was TP8). Corrected model card
numbers from official HF: 295B total / 21B active (was 276B/20B), BF16
~590GB + FP8 ~296GB (was 552/276). Sampling temperature 0.9 / top_p 1.0
per official recommendation (was 0.7/0.9).
…d on Blackwell)

SGLang auto-selects trtllm_mha for MHA arch on SM100/SM103 (B200/B300/
GB200/GB300) per server_args._get_default_attn_backend — the flag was
redundant. Removed from all 16 Blackwell cells; updated §2 docs to
state auto-selection instead of the old mis-route warning.
…4m3 from FP8 cells

Brand name统一为 Hy3 (title/description/正文, parser 名 hunyuan 保留).
FP8 + --kv-cache-dtype fp8_e4m3 crashes at forward (RMSNorm tvm_ffi kernel
expects bf16, gets fp8) — especially with EAGLE MTP draft forward. Drop the
flag so FP8 cells use default bf16 KV cache (matches GLM-5.2/M3 cookbooks).
…0 comment, thinking flag clarity

- Hardware table VRAM unified to nominal (B200 180→192, B300/GB300 272→288)
  matching _deployment.jsx HARDWARE_CATALOG.
- §3 example serve commands: explicit hunyuan → auto, drop --mem-fraction-static
  (match actual hy3.jsx cells).
- hy3.jsx header comment: B200 was listed under both 8-GPU and 4-GPU clauses;
  rewrite to per-GPU weight breakdown.
- §2 reasoning_effort note: clarify sgl-eval --thinking translates to
  reasoning_effort=high for Hy3 (so AIME26 benchmark command is consistent).
@JustinTong0323
JustinTong0323 merged commit 6f22790 into sgl-project:main Jul 6, 2026
81 of 85 checks passed
Chronostasys pushed a commit to MindLab-Research/sglang that referenced this pull request Aug 24, 2026
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants