Skip to content

GLM-5.3-Flash-FP8 on gfx942: disaggregated 1P/1D serving - #274

Closed
MIR-AMD wants to merge 10 commits into
ROCm:developfrom
MIR-AMD:glm53flash-gfx942
Closed

MIR-AMD wants to merge 10 commits into
ROCm:developfrom
MIR-AMD:glm53flash-gfx942

Conversation

@MIR-AMD

@MIR-AMD MIR-AMD commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

GLM-5.3-Flash-FP8 (Glm5NextForConditionalGeneration) disaggregated 1P/1D serving on gfx942 (MI300X / MI325X) over MoRIIO, registered in the vllm_dissag harness.

It is based on @raviguptaamd's commit f9f4a5b, kept unchanged (including the Dockerfile), plus three small fixes needed to run it out of the box:

  1. distributed.nnodes: 2 on the 5 GLM-5.3-Flash cards. Without it, madengine main emits #SBATCH --nodes=1; the card's -N 2 -n 2 only reaches the script's argv.
  2. Opt-in MODEL_WEIGHTS_NAME (defaults to MODEL_NAME, same name and semantics as Kimik3 madengine integration #242's cluster.sh) in the run_xPyD_models.slurm weights probe, set to GLM-5.3-Flash-FP8 on the 5 cards, plus 6 argv_assert checks. The recipe key GLM-5.3-Flash-FP8-gfx942 is not the checkpoint directory, so without it no NVMe/shared-FS probe finds the weights.
  3. The same export added to the two SKILL.md sbatch examples.

Other models are unaffected: every change is card-local or opt-in, with the unset defaults asserted.

Validation

  • Offline: tests/run_all.sh gate_check 28/28, argv_assert 48/48 (on the branch and merged onto current develop). bash -n and json/yaml loads clean.
  • madengine main (6a03289): discovers all 5 cards; generated sbatch scripts have --nodes=2, --ntasks=2 and MODEL_WEIGHTS_NAME=GLM-5.3-Flash-FP8.
  • Live on OCI, MI300X 1P/1D EP8/EP8, image built from this PR's Dockerfile (sha256:db672d55034c…, all 20 build-time fix checks pass), job 457627, with no symlink workaround:
    • Final MODEL_PATH: /mnt/m2m_nobackup/models_blog/GLM-5.3-Flash-FP8 on both nodes
    • MoRIIO READ mode + MTP active on both legs
    • token gate routed prefill -> decode; chat prompts correct
    • NIAH 2K / 8K words: 10/10 each

Please squash with:

Co-authored-by: ravgupta <ravgupta@amd.com>

Copilot AI balanced review requested due to automatic review settings October 6, 2026 16:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Router overrides are not forwarded, NIAH discovery is incomplete, and several deployment documents contradict the implemented configuration.

Review effort: Balanced
Findings: 2 Medium severity · 5 Low severity

Open (7)
What changed in this PR

Registers GLM-5.3-Flash-FP8 for 1P/1D disaggregated serving on gfx942.

Changes:

  • Adds model cards, runtime configuration, and pinned image.
  • Adds weight-directory aliasing, MoRIIO READ mode, and routing policies.
  • Adds tests, NIC guidance, and validation results.
File Description
scripts/​vllm_dissag/​tests/​gate_check.sh Tests model allowlists.
scripts/​vllm_dissag/​tests/​argv_assert.sh Tests runtime arguments and weight probing.
scripts/​vllm_dissag/​skills/​moriio-nics-thor2/​SKILL.md Documents Thor2 NIC setup.
scripts/​vllm_dissag/​skills/​moriio-nics-cx7/​SKILL.md Documents ConnectX-7 NIC setup.
scripts/​vllm_dissag/​run_xPyD_models.slurm Adds model gating and weight alias support.
scripts/​vllm_dissag/​results/​GLM-5.3-Flash-FP8-gfx942_20260927.html Records validation results.
scripts/​vllm_dissag/​README.MD Documents the new deployment.
scripts/​vllm_dissag/​models.yaml Defines the serving recipe.
scripts/​vllm_dissag/​models.json Registers five workload cards.
scripts/​vllm_dissag/​connectors/​moriio.sh Adds READ mode and router policies.
docker/​vllm_disagg_inference.glmv53flash.gfx942.ubuntu.amd.Dockerfile Builds the pinned runtime image.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +379 to +380
--prefill-policy "${ROUTER_PREFILL_POLICY:-round_robin}" \
--decode-policy "${ROUTER_DECODE_POLICY:-round_robin}" \

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done: after the rebase onto develop, develop's run_xPyD_models.slurm already forwards ROUTER_PREFILL_POLICY, ROUTER_DECODE_POLICY and MORIIO_READ_MODE, so this PR adds none of its own (2052166). argv_assert.sh checks the forwards.

Comment thread scripts/vllm_dissag/models.json Outdated
Comment on lines +554 to +556
"gfx942",
"mi300x",
"mi325x"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added the niah tag in 2c7c6c0.

Comment on lines +21 to +23
# Self-contained (no COPY), so it builds from any directory:
# docker build --ulimit nofile=1048576:1048576 \
# -f vllm_disagg_inference.glmv53flash.gfx942.ubuntu.amd.Dockerfile -t <image> .

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in the stacked #316 (31208d4): the example now uses the repository-root path -f docker/vllm_disagg_inference.glmv53flash.gfx942.ubuntu.amd.Dockerfile and says to build from the repo root.

`vllm_disagg_inference.<model>.ubuntu.amd.Dockerfile` per future model that needs its
own pins rather than repinning the shared one.

`GLM-5.3-Flash-FP8-gfx942` (MI300X / MI325X, gfx942) also has its own image. Its vLLM, AITER and

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done: the shared-image exception list now names GLM-5.1-FP8 and GLM-5.3-Flash-FP8-gfx942 (#316 widens it to both GLM-5.3 cards).

<h3>Pinned stack</h3>
<table>
<tr><th>Component</th><th>Pin</th><th>Contents</th></tr>
<tr><td>vLLM</td><td><code>raviguptaamd/vllm@98b24865</code></td><td>glm5next + MoRIIO; upstream #57192, #56734, #57317; GLM-5.3 gfx942 fixes; <b>new:</b> MoRIIO READ barrier before every decode forward</td></tr>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The results report is no longer part of this PR (removed in d60d26d). The README pins the shipping image; validation for the current pins is in #316's description.


The harness defaults (`connectors/moriio.sh`) are the CX-7 layout of the MI300X cluster:
`MORI_RDMA_DEVICES` / `NCCL_IB_HCA` = `mlx5_0,mlx5_2,mlx5_3,mlx5_4,mlx5_5,mlx5_7,mlx5_8,mlx5_9`,
`MORI_SOCKET_IFNAME=eth0`, GID index 3. On that layout there is nothing to set. Confirm it matches.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The NIC skill docs are no longer part of this PR (removed in d60d26d).

```

- `NCCL_SOCKET_IFNAME` and `GLOO_SOCKET_IFNAME` follow `MORI_SOCKET_IFNAME`; do not set them separately.
- Keep the GID index default (3) for both MoRI and NCCL.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The NIC skill docs are no longer part of this PR (removed in d60d26d).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

"yD": "1",
"RUN_MORI": "1",
"RUN_DEEPEP": "0",
"BENCHMARK_SCRIPT": "long_context",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in the stacked #316: benchmark_long_context.sh writes perf.csv through parse_to_csv.py with the parser's [RUNNING] prompts N isl X osl Y con C header (31208d4), and the parser files each result under its own cell header (215bfe9).

MIR-AMD added a commit to MIR-AMD/MAD that referenced this pull request Nov 18, 2026
…long-context CSV)

- run_xPyD_models.slurm: forward PREFILL_EXTRA_ENV / DECODE_EXTRA_ENV into the
  container with ${VAR+...} so a set-but-empty submit-time override wins over
  models.yaml; argv_assert covers both forwards.
- benchmark_long_context.sh: [RUNNING] header uses the parser's
  'prompts N isl I osl O con C' form and the runner writes CSV + perf.csv via
  parse_to_csv.py (same as benchmark_xPyD.sh). Affects both long_context cards.
- Dockerfile header: build example runs from the repo root with docker/ -f path.
Copilot AI balanced review requested due to automatic review settings November 18, 2026 04:35
MIR-AMD added a commit to MIR-AMD/MAD that referenced this pull request Nov 18, 2026
…long-context CSV)

- run_xPyD_models.slurm: forward PREFILL_EXTRA_ENV / DECODE_EXTRA_ENV into the
  container with ${VAR+...} so a set-but-empty submit-time override wins over
  models.yaml; argv_assert covers both forwards.
- benchmark_long_context.sh: [RUNNING] header uses the parser's
  'prompts N isl I osl O con C' form and the runner writes CSV + perf.csv via
  parse_to_csv.py (same as benchmark_xPyD.sh). Affects both long_context cards.
- Dockerfile header: build example runs from the repo root with docker/ -f path.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The long-context and agentic cards lack MAD-compatible result export, so successful benchmark runs still produce no collectable performance results.

8 open issues
1 previously missed issue

In code that hasn't changed since last review

High severity Agentic suite cards do not export MAD-format performance results

scripts/​vllm_dissag/​models.json:648

The shared agentic suite writes aggregate JSON and suite_summary.json, but no MAD-format perf.csv or performance: line, so these cards produce no madengine performance result even when replay succeeds. Add a shared suite-to-MAD CSV exporter and publish its output through both cards' result contract. Same issue in scripts/vllm_dissag/models.json:685–686.

Review effort: Balanced

ravgupta and others added 7 commits November 23, 2026 13:17
…/EP8)

Adds GLM-5.3-Flash-FP8 (Glm5NextForConditionalGeneration) disaggregated serving on
MI300X / MI325X to the vllm_dissag harness: EP8 prefill (eager) + EP8 decode with MTP on
both legs and a FULL_AND_PIECEWISE decode CUDA graph, max-model-len 760000, MoRIIO READ.

- docker/vllm_disagg_inference.glmv53flash.gfx942.ubuntu.amd.Dockerfile: self-contained,
  builds vLLM (raviguptaamd/vllm@98b24865), AITER (raviguptaamd/aiter@6f65fba0, incl.
  ROCm/aiter#3913), MoRI (ROCm/mori@78b7a5f3) and vllm-router
  (raviguptaamd/router@9b2146ec, incl. vllm-project/router#313) from pinned commits on a
  digest-pinned base; no patch overlay; 18 build-time fix checks.
- models.yaml / models.json: GLM-5.3-Flash-FP8-gfx942 (sweep, niah, long_context,
  agentic conformance_256k / conformance_512k).
- connectors/moriio.sh: opt-in MORIIO_READ_MODE and ROUTER_PREFILL_POLICY /
  ROUTER_DECODE_POLICY (no-ops for other models); run_xPyD_models.slurm gate lists.
- skills/: MoRIIO NIC setup for Broadcom Thor2 and ConnectX-7.
- results/: validation report (NIAH 256K/512K/750K, concurrent NIAH, perf, AgentX on
  MI325X and MI300X).
- README.MD, tests/gate_check.sh, tests/argv_assert.sh.

Co-authored-by: Cursor <cursoragent@cursor.com>
madengine slurm_multi sizes #SBATCH --nodes from slurm.nodes or
distributed.nnodes (default 1); the card's args "-N 2 -n 2" is only
passed to the script. Declare distributed.nnodes=2 on the five
GLM-5.3-Flash-FP8-gfx942 cards so a 1P/1D job gets both nodes.
The slurm probed <root>/$MODEL_NAME, but the models.yaml key
GLM-5.3-Flash-FP8-gfx942 is not the checkpoint directory (GLM-5.3-Flash-FP8
on NVMe and shared FS), so a run found no weights without a hand-made
symlink. Add MODEL_WEIGHTS_NAME (default MODEL_NAME, same name and
semantics as cluster.sh in ROCm#242) to the probe, set it on the five
GLM-5.3 gfx942 cards, and cover the probe in argv_assert.
madengine selects cards by name or tag, so without the tag `--tags niah`
skipped this card.
…o the container

A submit-time override was silently dropped and the models.yaml value always
won, unlike every other per-model knob. Unset keeps the YAML value.
…; fix README image note

The README now lists GLM-5.3-Flash among the models the shared image does not
serve, says the router policies can be overridden at submit time, and marks
the MI325X Broadcom submit line as the recipe author's.
MIR-AMD added a commit to MIR-AMD/MAD that referenced this pull request Nov 23, 2026
…long-context CSV)

- run_xPyD_models.slurm: forward PREFILL_EXTRA_ENV / DECODE_EXTRA_ENV into the
  container with ${VAR+...} so a set-but-empty submit-time override wins over
  models.yaml; argv_assert covers both forwards.
- benchmark_long_context.sh: [RUNNING] header uses the parser's
  'prompts N isl I osl O con C' form and the runner writes CSV + perf.csv via
  parse_to_csv.py (same as benchmark_xPyD.sh). Affects both long_context cards.
- Dockerfile header: build example runs from the repo root with docker/ -f path.
Copilot AI balanced review requested due to automatic review settings November 23, 2026 19:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@MIR-AMD

MIR-AMD commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

Closing in favour of #316, which now carries this PR's FP8 card together with the MXFP4 card on one image (the same 10 commits plus 5). Merging #316 lands everything here, with the newer image pins (GSM8K 0.914–0.920 vs 0.843 on this PR's pins) and the long-context CSV export; all 10 cards were run on #316's head.

@MIR-AMD MIR-AMD closed this Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants