b70-optimization-lab

Plan (research-based): Qwen3.6-35B-A3B — parity fix + path to >150 tok/s

Date: 2026-06-20. Model: nameistoken/Qwen3.6-35B-A3B-Quark-W8A8-INT8, 4× Arc Pro B70. Goal: >150 tok/s single-session decode, no quality loss. Baseline: 93.55 tok/s.

This plan replaces the from-scratch GDN-spec-parity attempts (4+ failures: prior author m18-m26, GPT-5.5, codex v1/v2) with a port of proven upstream code, after researching how the open-source community already solved this.


What the research found (the reframe)

The bug we spent days on is already solved upstream. vLLM ships ReplaySSM (commit 3c85112, files fused_recurrent_replayssm.py + gdn_replayssm_spec_decode.py; ref impl Johnny-Liou/ReplaySSM; Dao AI Lab 2026). SGLang just ported it (PR sgl-project/sglang#28695 + RFC #28511). It replaces the exact broken abstraction we kept twisting — per-draft-token full [V,K] recurrent-state snapshots (our intermediate_ssm / slot-copy) — with an output-only ring reconstruction via the chunked delta-rule (I+A)^{-1} UT-transform, flushing the full state only every L tokens. Lossless (GSM8K parity on Qwen3.5-35B-A3B).

Our fork doesn’t have it (confirmed: no *replayssm* files). That single gap is the parity bug. Port it; stop reinventing.

Honest caveat on speed (from the SGLang RFC’s own numbers): ReplaySSM is a bandwidth/memory optimization for high-batch serving — at batch ≥64 the GDN verify is 70-79% peak HBM. At batch 1 (single-request) the GDN decode is only ~2% HBM (latency/launch-bound), and ReplaySSM is slightly slower there. End-to-end on this exact model (Qwen3.5-35B-A3B, 128 concurrent): only +2.3% TPOT. Why so small: the model is MoE-heavy — GDN linear layers are a small fraction of decode cost, diluted by MoE + full-attention.

Implication: ReplaySSM unblocks correctness (so spec decode can finally be quality-clean), but it does not by itself reach >150 single-request. The single-request bottleneck is MoE + per-step overhead, which is why 93.55 is poor for a ~3B-active model.


Two distinct problems

  1. Correctness (the parity bug): spec-decode verifier diverges from no-spec. → Fixed by porting ReplaySSM. This is now a port, not research.
  2. Speed (93.55 is poor / >150 goal): single-request decode is overhead + MoE-kernel bound, not GDN-bound. Needs a different lever.

Why >150 is still reachable (the mechanism)

Spec decode on a MoE model amortizes the memory-bound weight load: a forward over [target, drafts...] costs ~the same HBM as a 1-token forward (weight traffic dominates; activations are tiny) → near-(accepted+1)× forward speedup. The only per-token-expensive part was the GDN recurrent state per spec position — which is exactly what ReplaySSM makes cheap (output-only). So the combination ReplaySSM-correct-verify + lightweight high-acceptance draft is the real >150 lever. A draft is already validated at 60-74% acceptance here (MTP/EAGLE). Acceptance-length ~2.5-3 → plausible 2-3× single-request speedup.


The plan

Phase 1 — Port ReplaySSM spec-verify (fixes parity, the proven path)

Phase 2 — Measure spec decode at single-request (does ReplaySSM + draft clear 150?)

Phase 3 — If still <150: attack the MoE + overhead bottleneck

Two sub-levers, both via porting upstream community perf, not new kernels:

Phase 4 — Reduce risk of re-wedging device 3


Hard rules (the failure modes of the last 4+ attempts)

Honest >150 feasibility read

References (community solutions to lean on)