Files
diffuse-cpp/tools
Carmen EstebanandClaude Opus 4.6 e9d830652e Phase 3: Speculative decoding with draft model
Add speculative decoding engine that uses a small draft model (e.g.
Qwen2.5-0.5B) to propose K candidate tokens, verified in one batch
by the target model (e.g. Qwen2.5-32B). Greedy mode (temp=0) only.

Key features:
- Fast-reject: skip target batch when d1 mismatches (saves ~40% of batches)
- KV cache rollback after verification (accepted prefix kept)
- Separate threadpools: target=high priority, draft=normal
- ar_forward_batch: new API for multi-token forward without cache reset

New files: src/ar-speculative.{h,cpp}
CLI flags: --draft, --spec-k, --draft-threads

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-05 18:42:33 +02:00
..