Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions evidence/hy4-flash-fp8-l20x-tp4/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Hy4-Flash-FP8 serial decode on four L20X GPUs

**PASS on the independent L4 replay.** At 130,048 input tokens and 1,024 generated tokens per request, the median TPOT fell from **5.779997 to 3.763408 ms/token**, a **34.89% reduction**. Serial AIME2026 was **29/30** against a **29/30** baseline. The allocation exposed four NVIDIA L20X devices. The operator confirmed this allocation after hardware preflight. [Acceptance and execution record](https://github.com/InferMatrixLab/InferRSI/issues/687)

| Service | P50 TPOT (ms/token) | AIME2026 correct |
| --- | ---: | ---: |
| Reference | 5.779997 | 29/30 |
| Selected candidate | 3.762996 | 29/30 |
| Fresh final | 3.763408 | 29/30 |

## Measurements and decisions

| Round | Change relative to its experimental parent | P50 TPOT (ms/token) | Reduction from reference |
| ---: | --- | ---: | ---: |
| 1 | DFly 15 | 5.733445 | 0.81% |
| 2 | Instrumented DFly 5 control | 6.643502 | -14.94% |
| 3 | Eager CUDA providers with decode graphs | 5.203872 | 9.97% |
| 4 | Instrumented eager-provider control | 5.228817 | 9.54% |
| 5 | Fused IndexPool rotation, Hadamard transform and FP8 conversion | 4.631993 | 19.86% |
| 6 | Fused sliding-window index generation | 4.287506 | 25.82% |
| 7 | Fused FP32 projections and gated pooling for small groups | 3.762996 | 34.90% |

The installed DeepInfer verification-budget record motivated measuring accepted positions alongside step cost. A wider DFly block increased delivered tokens per event and verification time together. The launch interval and the accepted-position distribution explained its small net gain. Warmup traces at DFly 5 showed thousands of small native PyTorch operations per step. The model did not opt into Inductor compilation, although compilation-aware defaults selected native operator implementations. Switching to eager CUDA providers while retaining full decode graphs reduced device kernels from 10,569 to 7,132 per step. The trace covered three iterations on each rank and finished before formal performance sampling. [Trace and component measurements](results/diagnosis.json) · [DeepInfer verification budget source](https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/worker/worker.py#L118-L219)

The remaining changes fused the sparse index feature transform, wrote packed causal window indices directly, and reduced the cost of the two FP32 projections used by small pooling groups. The feature and window tests compare the resulting bytes and indices exactly. The small-pool implementation retains FP32 arithmetic with a different reduction order. Some BF16 control values and full generated sequences changed. The two complete AIME passes on the selected revision establish the measured quality result. Each timing row represents a separate service launch. The evaluator skipped AIME on intermediate trials below the performance gate. [All attempts](results/trials.jsonl)

An earlier same-revision observation returned 6.617167 ms/token and 29/30, followed by a delayed process-group teardown. Its verdict remains INCONCLUSIVE. The accepted reference reproduced all twenty greedy output streams with a faster event cadence. The threshold uses the faster accepted reference. The independent final started a separate service with the same selected source and execution adapter. [Run identities and unrounded metrics](results/summary.json)

The evaluated workload is twenty serial LongBench v2 text completions and thirty serial AIME2026 problems on the local allocation. Retained public rows allow recomputation of the medians and correct counts. Private raw records contain the token events, generated responses, traces and lifecycle receipts. [Request boundaries](results/requests.jsonl) · [AIME judgments](results/aime.jsonl) · [Validator and input reconstruction](validator/README.md) · [Deployment and source](patch/README.md)
28 changes: 28 additions & 0 deletions evidence/hy4-flash-fp8-l20x-tp4/patch/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# vLLM deployment

The selected source was pushed and verified on [codex/hy4-flash-h200-opt](https://github.com/fake0fan/vllm/tree/codex/hy4-flash-h200-opt). The branch name was specified in the original task. All results in this bundle were measured on four NVIDIA L20X devices. Use the tested local vLLM environment with matching generated CUDA extensions and the pinned ModelScope weights.

The measured deployment uses the following flags in addition to the model path, service name and loopback endpoint. Apply the selected revision's `examples/deployment/hy4-flash-options.json` extra flags last. For the eager-kernel stack these enable non-compiling CUDA providers and full decode CUDA graphs.

```bash
vllm serve "$MODEL_PATH" \
--host 127.0.0.1 --served-model-name hy4-flash \
--tensor-parallel-size 4 --max-num-batched-tokens 32768 \
--max-num-seqs 1 --max-model-len 133120 \
--no-enable-prefix-caching --seed 1024 \
--attention-backend FLASHMLA_SPARSE --kv-cache-dtype auto \
--speculative-config '{"method":"dfly","num_speculative_tokens":5}' \
--reasoning-parser hy_v4 \
--compilation-config '{"mode":"NONE","cudagraph_mode":"FULL_DECODE_ONLY"}'
```

For exact attempt binding, use the retained service-reuse adapter. Supply the local checkpoint and environment at runtime. Configure `TRITON_CACHE_DIR`, `VLLM_CACHE_ROOT`, `DG_JIT_CACHE_DIR` and `TORCHINDUCTOR_CACHE_DIR` on node-local storage consistently across launches.

## Signed-off commits

- Eager CUDA providers and full decode graphs. [4a076ad2e283](https://github.com/fake0fan/vllm/commit/4a076ad2e283331f23e6ccddb7cea0e3942fbbce)
- IndexPool rotation, Hadamard transform and quantization. [2c2c5e57dde1](https://github.com/fake0fan/vllm/commit/2c2c5e57dde150557badc7731439b47e66a795dd)
- Sliding-window logical indices. [560c5fdfe684](https://github.com/fake0fan/vllm/commit/560c5fdfe684496c1f7fb70e06b4905179758368)
- Small-group projection and gated pooling. [8a37987b1134](https://github.com/fake0fan/vllm/commit/8a37987b1134f147366fa09ba5567c86b1d35cfa)

The combined selected source passed all 14 CUDA kernel and indexing regression cases. All seven temporary experiment branches were archived and removed after the remote revision was verified.
11 changes: 11 additions & 0 deletions evidence/hy4-flash-fp8-l20x-tp4/plan/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Baseline and acceptance

The acceptance issue records the operator's decision to use the four local GPUs reporting NVIDIA L20X. PyTorch and vLLM reported compute capability 9.0 on all four cards. The device-management CLI reported 8.9. Every device pair reported NV18, and the distributed service recorded NCCL P2P/CUMEM channels. Results apply to this allocation. [Device decision](https://github.com/InferMatrixLab/InferRSI/issues/687#issuecomment-7161222688)

The baseline uses the ModelScope Hy4-flash-FP8 checkpoint on one TP4 service. All 148 indexed weight shards matched the source manifest. The model runs with 32,768 batched tokens, one sequence, a 133,120-token maximum context, disabled prefix caching, FLASHMLA_SPARSE attention, DFly 5 and engine-default KV storage. The additional context space accommodates AIME prompts at the fixed generation limit. [Acceptance issue](https://github.com/InferMatrixLab/InferRSI/issues/687)

Each attempt starts its own service. Warm it with the first LongBench prompt and 64 generated tokens. Measure the twenty serial 130,048-input and 1,024-output streams, then score the thirty serial AIME items on the same service when the performance gate passes. A complete baseline establishes the reference score. The independent final starts a fresh service at the selected revision and repeats both workloads.

Two details mattered when porting the earlier workload. The local DFly constructor accepts the compressed MLA FP8 cache format, but the sliding-window layers in the same model reject it. The checkpoint-default KV type initialized both layer classes. Separately, Python resolved a legacy DeepGEMM CPython extension ahead of the ABI3 build's facade. Excluding the stale extension from the isolated import tree restored the installed paged MQA operator. [KV layout failure](https://github.com/InferMatrixLab/InferRSI/issues/687)

Triton compilation initially lost a shared-filesystem handle on one TP rank. Node-local compiler caches allowed all ranks to warm up. Cleanup also required waiting for the worker processes. The service adapter requests graceful API shutdown and reaps the descendants before acknowledging stop. This preserves the controller's process-group verification and keeps failures visible in the trial record.
20 changes: 20 additions & 0 deletions evidence/hy4-flash-fp8-l20x-tp4/plan/retained-sha256.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"README.md": "97c89941c4b6d8f2bd0c3a16608ffec49e4a846a2c771e071007df87ea6e8c85",
"patch/README.md": "e2154929811488ed98d5583946b8e1ff4f083e579b7f605be9669f1ffd59694d",
"plan/README.md": "5e45ddf49637875b7348e776e3b8bd2b1a4b0fc22090d3a955454567ce8d1bdc",
"plan/runspec.json": "5d89dea9188a0760770085ab3fabcf9f539a654db0a77e863392f626564c1528",
"results/aime.jsonl": "3c40c698ea3a23e5e70efd8a79f4e9c092305f2c117bc4e04f78e3ac38d9b87c",
"results/diagnosis.json": "516fd81568d058caad827b081a4c99536a4f25757f904292359fd74f1c4b71c3",
"results/local-archive.json": "f82209435368430023f4cf3d98a2770de477aeaab08fccc81785dd7105b7719e",
"results/requests.jsonl": "0d47f99a0e96dce4ef838e7d78832fdcbd5ce0978e9933b00819753c74736ab5",
"results/summary.json": "964af65f114cc236a4d0357a224487728a88376ef3c39986f3827274fe30f411",
"results/trials.jsonl": "6527f2adcc72a1cd9f7ef4cc1a4de4838e9e8590a8c02f1e3b38734bdb2e86da",
"validator/README.md": "6491fafddca9b78077668acabdae31e0ed7d8bd49c55c92ed57769b954b4bc0a",
"validator/build_requests.py": "efcf1c22528ffe6d110f55cf9e65d0145af79a2a33de70a0489859f223a0e92c",
"validator/check.py": "29e681fc2721dc792e072fe241154e18bf11c230c4a3c4cc841f179d95695038",
"validator/driver.py": "3e2ec687771e32b33e8d7c0a79506e16ab450938f4a083338593a1901bae216d",
"validator/inputs.json": "8c808c49f496f40dfb6b8af7e03ceb27a20fa8301cd867f87672e000c98bb608",
"validator/lifecycle.py": "7c85795ac15c1694aca164a2d8ec43e1575b972c7d07b882f0c511f2fd38e831",
"validator/protocol.json": "aac1107befc33442087ed22c22a60a631a1595e48dd9f6065991792e63479860",
"validator/quality.py": "d9230c772b691aad38b29df5b91a2c6cc76db7c8ffbfff1ee357ef6b084667f6"
}
123 changes: 123 additions & 0 deletions evidence/hy4-flash-fp8-l20x-tp4/plan/runspec.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
{
"issue": "https://github.com/InferMatrixLab/InferRSI/issues/687",
"repo": "vllm-project/vllm",
"revision": "438e9e8ac7e5e8ec3bedb84d28370ea7e2a1c0c0",
"backend": "CUDA/vLLM",
"device": "4 NVIDIA L20X NV18",
"model": "Tencent-Hunyuan/Hy4-flash-FP8@9eb5ebc339a6c153bc32627791e67d639d54e4a3",
"scenario": "LongBench v2 serial 130048/1024; AIME2026 serial 30",
"config": {
"baseline_flags": [
"--tensor-parallel-size",
"4",
"--max-num-batched-tokens",
"32768",
"--max-num-seqs",
"1",
"--max-model-len",
"133120",
"--no-enable-prefix-caching",
"--seed",
"1024",
"--attention-backend",
"FLASHMLA_SPARSE",
"--speculative-config",
"{\"method\":\"dfly\",\"num_speculative_tokens\":5}",
"--reasoning-parser",
"hy_v4",
"--kv-cache-dtype",
"auto"
]
},
"inputs": {
"requests.jsonl": "3bd0c87cab8f132cb64350b308a454f21f43c2c83daa6d9b6543660909bf94ac",
"aime2026.jsonl": "52822957957a3f577d1e9706c36a66a8108a3f99b6aff424cfb72dff0094a9ee"
},
"validators": {
"quality.py": "d9230c772b691aad38b29df5b91a2c6cc76db7c8ffbfff1ee357ef6b084667f6",
"lifecycle.py": "7c85795ac15c1694aca164a2d8ec43e1575b972c7d07b882f0c511f2fd38e831",
"protocol.json": "aac1107befc33442087ed22c22a60a631a1595e48dd9f6065991792e63479860",
"driver.py": "3e2ec687771e32b33e8d7c0a79506e16ab450938f4a083338593a1901bae216d"
},
"repair": "Use checkpoint-default KV dtype, compatible with the sparse and sliding-window layers",
"last_execution_adapter_repair": "Graceful API shutdown and Linux subreaper; no change to workload, metrics or model",
"validated_native_runtime": "DeepGEMM ABI3 Python facade, node-local JIT caches",
"workload_frozen_at_utc": "2026-11-25T12:00:45.939046+00:00",
"adapter_history": [
{
"launched_at": "2026-11-25T11:43:18.547693Z",
"attempt": "86f62c81f0b640ca8cdf973d04c146a4",
"condition": "local-l20x-tp4",
"validators": {
"driver.py": "622eb199561617af035cff14fa3d4dad3dfb986c6f6e461c77b0b06a345afe20",
"quality.py": "d9230c772b691aad38b29df5b91a2c6cc76db7c8ffbfff1ee357ef6b084667f6"
}
},
{
"launched_at": "2026-11-25T11:52:03.723283Z",
"attempt": "383f1f6e149d4e3ea2ad2a202ed09935",
"condition": "local-l20x-tp4-mla-kv",
"validators": {
"driver.py": "d0f1f96b760da8e109712f593c92f1eeafd6a9f781394ea38cc969d90036f375",
"quality.py": "d9230c772b691aad38b29df5b91a2c6cc76db7c8ffbfff1ee357ef6b084667f6"
}
},
{
"launched_at": "2026-11-25T11:57:51.782671Z",
"attempt": "90e7ac75b8a84373883952303d0ae65b",
"condition": "local-l20x-tp4-mla-kv",
"validators": {
"driver.py": "eee818e83cbbed1c138ca72de2df4c23917fba5a4657ec5d0e34b04120ed1a59",
"quality.py": "d9230c772b691aad38b29df5b91a2c6cc76db7c8ffbfff1ee357ef6b084667f6"
}
},
{
"launched_at": "2026-11-25T12:01:32.354369Z",
"attempt": "194489c7cf334a6eab884fa564da46d2",
"condition": "local-l20x-tp4-default-kv",
"validators": {
"driver.py": "a98729a335eb110f429288e5847631c34745b9b425f4b026a87fb604bea62384",
"quality.py": "d9230c772b691aad38b29df5b91a2c6cc76db7c8ffbfff1ee357ef6b084667f6"
}
},
{
"launched_at": "2026-11-25T12:17:56.328252Z",
"attempt": "ddecb2854fe14f048b936e08e330d61c",
"condition": "local-l20x-tp4-default-kv",
"validators": {
"driver.py": "a98729a335eb110f429288e5847631c34745b9b425f4b026a87fb604bea62384",
"quality.py": "d9230c772b691aad38b29df5b91a2c6cc76db7c8ffbfff1ee357ef6b084667f6"
}
},
{
"launched_at": "2026-11-25T13:15:56.575432Z",
"attempt": "f1d67b3e156f4ef09f4ebd504f5069eb",
"condition": "local-l20x-tp4-default-kv",
"validators": {
"driver.py": "3e2ec687771e32b33e8d7c0a79506e16ab450938f4a083338593a1901bae216d",
"lifecycle.py": "7c85795ac15c1694aca164a2d8ec43e1575b972c7d07b882f0c511f2fd38e831",
"quality.py": "d9230c772b691aad38b29df5b91a2c6cc76db7c8ffbfff1ee357ef6b084667f6"
}
}
],
"validators_label": "Files retained for the graceful-stop baseline repeat",
"software": {
"inferrsi_revision": "7bc51f2161f34b2f875e7937cfe07c380ca26d36",
"vllm_distribution": "0.34.0rc1.dev919+g438e9e8ac.precompiled",
"pytorch": "2.14.0+cu132",
"cuda_toolkit": "13.0.88",
"nccl_runtime": "2.30.7",
"nvidia_driver": "570.133.20",
"os_kernel": "Linux 5.10.134-16.103.al8.x86_64",
"evalscope": "1.15.0",
"git_for_source_reconstruction": "2.39.5"
},
"hardware_observation": {
"num_devices": 4,
"product": "NVIDIA L20X",
"driver_reported_compute_capability": "8.9",
"pytorch_and_vllm_compute_capability": "9.0",
"pairwise_topology": "NV18 on all six pairs",
"nccl_channels_observed": "P2P/CUMEM"
}
}
Loading
Loading