Skip to content

Fix MiniMax DSpark anchor predictions and enable native projection activations - #162

Merged
HawkBearPig merged 2 commits into
masterfrom
fix/minimax-dspark-native
Nov 5, 2026
Merged

HawkBearPig merged 2 commits into
masterfrom
fix/minimax-dspark-native

Conversation

@HawkBearPig

Copy link
Copy Markdown
Owner

Summary

MiniMax DSpark inherited Qwen DFlash2's mask-only prediction convention: eight draft queries, discarding the anchor row. The pinned upstream MiniMax contract uses seven queries [anchor, six masks] and predicts from rows 0–6. Every proposal was shifted, with an extra bidirectional attention query. Target rejection preserved final transcripts, so those checks alone missed the broken drafter.

Separate draft query count/proposal offset from the eight-row target verification feed. Apply the corrected offset to proposals, confidence and candidate publication; retain predicted-token positions for sampled proposal RNG. Qwen's existing convention remains covered by shared regression tests.

DSpark now honors native activations for all MXFP8 projections, including context K/V. Reuse context and gate/up quantization, fuse SwiGLU/native quantization, and include scratch in the memory plan. BF16 control and checkpoint BF16 auxiliary matrices remain available. Withdraw the invalid DSpark benchmark comparison and document a tested adaptive schedule. The shipped sixteen-slot plain template is unchanged.

Validation

Executable source: 5a3a5b7c034897338edae8d0a1e8d80317658a56; SHA-256: bd23e4b27371d757a2e50555b561eeee2d8fbeb3a0cd5a1849ecf99e40ed5227. Subsequent changes are documentation only. Checkpoint: 2f33a8b9ae49ce7b51c994df97166a7fd059bc2e.

  • Release/CUDA 13/SM121a warnings-as-errors rebuild of the selected serve, MiniMax, DFlash2 and unit targets. All ten selected CTest entries pass, including BF16/native NumPy draft oracles, eleven kernel/sampler cases and twenty-six Qwen/MiniMax integration cases. The new native eight-slot TP2 tests cover greedy/sampled graph replay and changing verification depths. Both DSpark configuration unit cases pass.
  • The corrected oracle rejects the saved old eight-query output. Native fixture context K/V and final hidden comparisons have zero relative RMS error. Existing numerical gates are unchanged.
  • Standalone native draft forward CUDA memcheck: zero errors. Instrumented TP2 graph tests hit their ten-second transport watchdog; these are not counted as sanitizer passes. The same uninstrumented graph tests pass.
  • Fresh TP4 plain, full-seven, reduced-depth and adaptive runs use the same executable, native activations and Q8KV4 target caches. All 135 speculative replies match the 45 fresh plain controls exactly in text, token count and finish reason. Full-seven first-proposal acceptance is 61–90% across the five prompt classes, versus the original broken path's 25–44%.

Short-context tuning diagnostics, one repetition of five classes, 256 tokens, eight configured slots; these are not replacement shipped-template campaign rows:

Mode C1 decode tokens/s C8 decode tokens/s
Fresh plain 21.6–21.8 78.2–84.9
Corrected native full-seven 23.0–42.0 64.9–103.9
Corrected native depth-three verification 28.4–44.4 78.9–110.9
Corrected native adaptive verification 29.7–49.8 84.7–115.9

Ranges span classes, not confidence intervals. Adaptive beats plain in every measured class at C1 and C8. Adaptive settings: depths 1/3/5/7, row cost 5.6 ms, base 51.6 ms, adaptive lambda with the reservation floor. Costs were fitted from the corrected native C1 passes.

Cold prefill, measured separately with zero cached tokens: plain 0.632 / 2.103 / 7.629 s, adaptive 0.659 / 2.146 / 7.778 s, at approximately 512/2K/8K tokens. Prior plain-template campaign rows retain their original source attribution; invalid DSpark rows are withdrawn rather than replaced with these single-repeat diagnostics.

Fresh native API checks pass 9/9, including sampled requests. All eight video cases match fresh plain controls; video cache reuse, future-frame invalidation and streaming continuation pass. Eight completed/cancelled conversation replay comparisons are exact, with two completed-answer reuse checks. All five successful diagnostic boots ran the recorded executable with zero swap on every rank, matching operation streams, and no other world/build/benchmark on the fabric during measurements.

Production and head swap were restored once after validation. All four production processes use the original frozen executable with zero swap; HTTP health and a chat smoke request pass.

The initial reduced-depth driver invocation passed the concurrency list incorrectly and stopped before measurement; it was corrected and rerun. Its failed attempt supplies no timing data.

Documentation

  • No new engine key or shipped-template default; the model card describes how native activations apply to DSpark and the tested optional schedule.
  • Current model/precision guides and the implementation record describe query/verification geometry and validation limits.
  • Invalid DSpark timing and conclusions are withdrawn from the benchmark guide.
  • No benchmark artifacts or run logs added to Git.

@HawkBearPig
HawkBearPig merged commit 5e436ea into master Nov 5, 2026
2 checks passed
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