Bottom Line
For this stack, the most promising path is not a new decoding family from scratch. It is: improve the EAGLE-3 draft model and make verification cheaper under mixed batch / long context. The next tier is adaptive speculation and n-gram/REST-style drafting for prompt-copy workloads. Medusa/Hydra are worth a controlled ablation, but less likely to beat the current EAGLE-3 path without invasive model/export changes.
What Matters
Speculative decoding only helps when:
- Draft cost is much smaller than target decode cost.
- Acceptance length is high enough.
- Verification is batched efficiently.
- Mixed batch scheduling does not erase the gain.
This is why papers that report 2-5x on batch-1 can disappoint in production. A recent vLLM study explicitly warns that speculative decoding results degrade or invert under realistic batch sizes and system overheads, across n-gram, EAGLE/EAGLE-3, draft-model, and MTP variants: Speculative Decoding: Performance or Illusion?. SGLang already exposes several relevant families: EAGLE-2/EAGLE-3, MTP, standalone draft models, NGRAM, and experimental Spec V2 overlap scheduling: SGLang speculative decoding docs.
Family Assessment
| Family | Core idea | Fit for MiniCPM-SALA stack | Priority |
|---|
| EAGLE-3 | Feature-based drafter using hidden states, dynamic tree, training-time test | Already integrated; best reuse of current hooks | Very high |
| EAGLE-2 dynamic tree | Context-aware draft tree using draft confidence | Directly relevant to topk/steps/draft_tokens tuning | High |
| Dynamic speculation | Stop drafting based on confidence / choose lookahead at runtime | Low-risk serving-side improvement | High |
| NGRAM / REST | Draft by retrieving repeated continuations from prompt/history/datastore | Good for long-context copy/code/RAG; no training | Medium-high |
| SpecInfer-style tree verify | Wider token tree with parallel target verification | Conceptually already overlaps with EAGLE tree verify | Medium |
| Medusa | Multiple future-token heads on target hidden state | Requires head training/export/runtime path | Medium |
| Hydra | Sequentially dependent Medusa heads | Better than Medusa, but more invasive | Medium-low |
| Lookahead | Jacobi/n-gram style no-draft parallel decoding | Interesting but likely hard with hybrid attention + SGLang path | Low-medium |
| Standalone draft model | Small LM drafts tokens | Tokenizer/model mismatch and memory overhead risk | Low-medium |
EAGLE / EAGLE-2 / EAGLE-3
EAGLE predicts in feature space rather than directly training a normal small LM draft model, using target hidden states to reduce uncertainty: EAGLE paper, official repo. EAGLE-2 adds dynamic draft trees, using draft confidence as a proxy for acceptance probability: EAGLE-2. EAGLE-3 improves training by simulating test-time autoregressive draft behavior during training and fusing hidden states from multiple target layers: EAGLE-3, SpecForge EAGLE3 explanation.
For this repo, the relevant question is not “use EAGLE-3?” because we already do. It is: is the current 415 MB draft undertrained, mis-layered, or mis-scheduled for MiniCPM-SALA long-context / hybrid-attention behavior?
Concrete experiments:
-
Train EAGLE-3 v3/v4 with aux layer sweeps:
layers=[4,9,24] current vs [3,12,25], [6,14,25], [8,16,24].
Measure accept length by prompt bucket: short, 8K, 32K, 90K.
-
Train with more “test-time training” unroll depth:
current likely around 2-3 serving steps; SpecForge references default multi-step TTT unrolls: SpecForge / EAGLE3.
Sweep train unroll 3/5/7 while serving num_steps=2/3/4.
-
Add long-context hard negatives to drafter training:
include answer spans far from the suffix, mixed Chinese/English, code-like repeated patterns, and MiniCPM-SALA public eval bad cases.
Acceptance should be reported by position bucket, not only aggregate.
-
Compare EAGLE3_COLLECT_DIR traces from no-spec target hidden states vs spec rollout hidden states.
Look for divergence after first rejected draft token, especially under TARGET_VERIFY.
Dynamic Speculation
Static --speculative-num-steps 2 --speculative-num-draft-tokens 3 is conservative. But a single static value is usually suboptimal. Hugging Face’s dynamic speculation work shows large variation in optimal lookahead and uses assistant confidence to stop early: dynamic speculation blog, DISCO paper. SGLang now has adaptive speculative decoding docs, but currently says only EAGLE is supported: SGLang adaptive speculative decoding.
Concrete experiments:
-
Implement offline replay first, not serving change:
log draft token probabilities, accepted depth, rejected depth, request length, batch size, context length.
-
Fit a simple policy:
if p1,p2,p3 high and recent accept depth high, increase draft tokens; if rejected at depth 1 twice, reduce to 1.
-
Production-safe sweep:
fixed configs: (steps,draft) = (1,1), (2,3), (3,5), (4,7).
Compare against simulated adaptive policy from logs before touching runtime.
Acceptance gate:
ori_accuracy unchanged, public eval no drop, speed improvement measured at S1/S8 and mixed batch. Do not trust S1 only.
Verification / Scheduling
This is probably the largest systems-side opportunity. Verification must stay tree-aware for MiniCPM hybrid attention and sparse metadata. SpecInfer’s core contribution was organizing candidates as a tree and verifying in parallel: SpecInfer. SGLang’s experimental Spec V2 enables overlap scheduling for EAGLE/EAGLE3/STANDALONE but only with topk=1: SGLang docs.
Concrete experiments:
-
Try Spec V2 with current topk=1:
SGLANG_ENABLE_SPEC_V2=True, keep --speculative-eagle-topk 1.
Measure whether overlap helps or conflicts with minicpm_flashinfer, plan cache, CUDA graph, and mixed chunk.
-
Instrument verify cost:
separate draft forward, target verify forward, tree attention metadata build, sampling, rollback, and KV write/rollback.
-
Bucket by batch composition:
all-decode, decode+prefill, decode+TARGET_VERIFY, long-context decode, mixed accepted depths.
-
Test “verify budget cap”:
refuse to build large verify trees when batch is already wide or when context length exceeds thresholds. This follows the direction of budgeted high-concurrency approaches like ECHO, which frames speculative execution as a scheduling problem: ECHO.
NGRAM / REST
N-gram speculation is attractive because it costs almost nothing to try and needs no draft training. SGLang supports NGRAM directly: SGLang docs. vLLM also documents prompt n-gram speculation: vLLM n-gram. REST retrieves draft continuations from a datastore instead of a draft LM: REST.
Fit to our stack:
Good for long-context benchmarks where the answer copies or transforms prompt text. Weak for reasoning tokens with low lexical repetition. It may be complementary to EAGLE-3 if used as a proposer fallback, but combining proposers increases scheduling complexity.
Concrete experiments:
-
Run pure NGRAM on public eval subsets:
classify samples by prompt self-overlap / repeated n-grams.
Track speed and accuracy per class.
-
Hybrid selector:
if prompt has high repeated 4-8 gram density, use NGRAM; otherwise EAGLE-3.
Start as two separate server runs plus offline routing, not runtime fusion.
-
REST-lite:
build datastore only from current prompt chunks and previous generated tokens. Avoid global datastore first.
Medusa / Hydra
Medusa adds multiple decoding heads and verifies candidates with tree attention: Medusa, repo. Hydra improves Medusa by making heads sequentially dependent rather than independent: Hydra.
Fit:
The upside is low draft overhead because heads piggyback on target hidden states. The downside is invasive integration: head training, export, runtime tree attention, and interaction with quantized modelopt_fp4. Since the current repo already has EAGLE-3 hidden-state plumbing, Hydra-like sequential heads are worth studying mainly as a drafter architecture ablation, not as a separate deployment path.
Concrete experiment:
Train a tiny Hydra-style head on the same collected hidden states used for EAGLE-3 and compare accepted tokens per millisecond, not accepted tokens per verify. If it cannot beat EAGLE-3 on accepted_tokens / (draft_ms + verify_ms), drop it.
Lookahead
Lookahead decoding avoids a separate draft model and uses parallel n-gram/Jacobi-style generation: Lookahead. It is elegant, but I would not prioritize it for this stack. MiniCPM-SALA has custom attention, sparse metadata, tree-aware verify, and long context; integrating a new verification semantics is likely more work than improving EAGLE-3 or NGRAM.
Draft Training
SpecForge is directly relevant because it targets EAGLE-3 training and SGLang deployment: SpecForge paper, LMSYS blog. The reported direction is important: train the draft for serving acceptance, not for generic LM quality. Another paper makes the same practical point: draft model LM quality does not strongly predict speculative speed; latency and acceptance behavior matter more: Decoding Speculative Decoding.
For MiniCPM-SALA, draft training should optimize:
- Long-context acceptance.
- Verify-chain stability.
- Mixed Chinese/English/code patterns.
- Robustness to quantized target hidden states.
- Acceptance under
TARGET_VERIFY, not just normal decode.
Recommended Experiment Queue
-
Baseline instrumentation:
collect accept_depth, draft_ms, verify_ms, rollback_count, batch_size, context_len, TARGET_VERIFY, tree_size, ori_accuracy.
-
Static EAGLE-3 sweep:
(steps,draft_tokens): (1,1), (2,3), (3,5), (4,7);
topk: keep 1 first because current submission uses chain verify and Spec V2 requires topk 1.
-
Spec V2 overlap smoke:
same draft model, same args, only SGLANG_ENABLE_SPEC_V2=True.
Verify accuracy and bad-case indices before speed claims.
-
EAGLE-3 retraining sweep:
current data vs long-context-heavy data;
aux layer variants;
TTT unroll depth variants.
-
NGRAM routing:
pure NGRAM vs EAGLE-3 on overlap-heavy samples.
If NGRAM wins only on copy-heavy tasks, use it as a conditional path, not default.
-
Verify kernel profiling:
target verify with accepted depth 1/2/3/4 and context 4K/32K/90K.
Find whether the bottleneck is attention planning, sparse metadata, target matmul, sampling, or KV rollback.
Most Likely Wins
Highest probability:
- Better EAGLE-3 draft trained on long-context MiniCPM-SALA traces.
- Adaptive
num_steps/draft_tokens based on confidence and recent acceptance.
- Spec V2 overlap if it does not break
minicpm_flashinfer/plan-cache assumptions.
- NGRAM for prompt-copy workloads.
Lower probability but worth one ablation:
- Hydra-style sequential heads.
- REST-lite datastore.
- Wider EAGLE tree /
topk>1, because it may hurt verify cost and Spec V2 compatibility.
Acceptance Criteria
A change is real only if it passes all of these:
ori_accuracy unchanged or improved.
- no-spec vs spec answer consistency checked on fixed bad-case set.
- speed reported for S1, S8, and mixed prefill/decode batch.
- long-context buckets reported separately.
TARGET_VERIFY path tested.
.so md5, server args, env vars, and model path recorded for reproducibility.