perf(ds4): optimize q5 fused verifier on AMD

Merged
DA
2mo ago
+2377-89

Summary

  • add the AMD q=5 fused DSpark verifier path
  • support exact partial-rejection rollback across both compressor boundaries
  • keep five-row dense projections on MMVQ and use the qualified gfx1201 x4+1 ROCmFP4 path
  • add deterministic context-sweep tooling and unit coverage
  • pin the JSON fallback to an immutable source archive so builds avoid the flaky release-asset route

This is the first PR in the heterogeneous DeepSeek 4 performance stack.

Validation

Tested on an R9700 target with Strix Halo expert offload, four routed experts, q=5, and deterministic 128-token completions.

ContextPrevious medianFused q=5 median
2K64.212 tok/s67.957 tok/s
4K62.428 tok/s65.927 tok/s
8K59.267 tok/s62.544 tok/s
16K53.750 tok/s56.335 tok/s
2K after 16K63.804 tok/s67.458 tok/s

All 25 measured responses matched the expected SHA-256. The DeepSeek 4 GPU unit suite passed.

Reproduction

Run harness/qualification/deepseek4/qualify_ds4_q5_amd.sh with TARGET_MODEL, DRAFT_MODEL, and HOTNESS_CSV. The qualifier records configuration, response hashes, timings, ROCm state, and memory use.