Skip to content

[Feat] HiCache: Support fused DFLASH KV in unified hybrid SWA pools - #45700

Merged
Fridge003 merged 6 commits into
mainfrom
codex/muse-unified-hicache-fused-draft
Oct 23, 2026
Merged

Fridge003 merged 6 commits into
mainfrom
codex/muse-unified-hicache-fused-draft

Conversation

@Fridge003

@Fridge003 Fridge003 commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Motivation

Muse Spark fell back to a private DFLASH KV pool when unified memory and HiCache were enabled together. This change lets target and draft share the same GPU backing pool per TP rank.

Modifications

Keep the FA4 draft's BF16 rows inside the target's FULL page envelopes alongside its FP8 KV rows, and reuse the existing HiCache page translation to transfer both together. Wait for envelope restoration before DFLASH prefill, including CUDA graph replay, and skip the separate draft host sidecar.

This enables L2 HiCache for a full-attention DFLASH draft on a unified hybrid-SWA target. Other host-pool paths, including L3 storage, retain their existing private draft fallback. No CUDA kernel is added.

Accuracy Tests

  • All pre-commit checks passed.
  • Actual CUDA direct and kernel HiCache roundtrips preserved complete mixed-dtype envelopes and neighboring pages at different physical page locations.
  • 1,464 fixed-input FA4/TRT-LLM output and LSE comparisons were bit-exact.
  • A bounded real-model cache test restored 2,304 tokens from host with zero device-cache hits and correctly recalled a reference number stored in that prefix. Full-model logprob equality is not claimed; resident controls were also non-repeatable under this serving configuration.
  • Startup validation on all four TP ranks confirmed target and draft share the same underlying unified buffer, without a draft host sidecar.

Complete evaluations on 4 x B300, TP4/EP4, target trtllm_mha, draft RadixArk/Muse-Spark-Open-DFlash2 with fa4, unified memory, and HiCache size 200:

Dataset Correct / total Score
AIME26, 8 repeats 228 / 240 95.00%
GPQA Diamond 177 / 198 89.39%
Video-MME short, 96 frames 798 / 900 88.67%
GSM8K 1284 / 1319 97.35%

All evaluations had zero request errors. AIME26 and GPQA each had one output-length truncation; Video-MME and GSM8K had none. The prior accepted run used B200 and scored 94.17% / 89.90% / 87.44% on the first three datasets. Against the original GPQA reference of 179/198, this run is lower by 1.0101 percentage points.

Speed Tests and Profiling

No controlled throughput comparison was performed. The existing synchronous host-arena compaction caused pauses during the continuous evaluation sequence. This change does not modify that allocator.

Checklist

  • Format code with pre-commit.
  • Extend the Muse Spark unified-memory GSM8K test with HiCache.
  • Follow the SGLang code style guidance.
  • Provide accuracy results.
  • Provide a controlled speed benchmark.
  • Update documentation (no new user-facing flag).

CI States

Latest PR Test (Base): 🚫 Run #39873939647
Latest PR Test (Extra): ❌ Run #39873939455
Latest PR Test (AMD ROCm 10): ⏳ Run #39873939427

@Fridge003 Fridge003 added the run-ci CI: run the baseline test suite on this PR label Oct 22, 2026
@Fridge003

Copy link
Copy Markdown
Collaborator Author

/rerun-test test/registered/e2e/models/test_muse_spark_unified_memory.py

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

🚀 8-gpu-b300 (1 test): ✅ View workflow run

cd test/ && python3 registered/e2e/models/test_muse_spark_unified_memory.py

@Fridge003

Copy link
Copy Markdown
Collaborator Author

/rerun-test test/registered/e2e/models/test_muse_spark_12_b300_pd.py

@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

🚀 8-gpu-b300 (1 test): ✅ View workflow run

cd test/ && python3 registered/e2e/models/test_muse_spark_12_b300_pd.py

@Fridge003
Fridge003 merged commit 698651a into main Oct 23, 2026
161 of 194 checks passed
@Fridge003
Fridge003 deleted the codex/muse-unified-hicache-fused-draft branch October 23, 2026 03:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hicache Hierarchical Caching for SGLang run-ci CI: run the baseline test suite on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant