File size: 1,698 Bytes
ac90379
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
---
license: apache-2.0
base_model:
- DCTR/ours-BF16
tags:
- speculative-decoding
- dflash
- PEAR
- Qwen3.8
---

# ours-draft-DFlash

A [DFlash2](https://github.com/z-lab/dflash) block-diffusion draft model for speculative decoding of [DCTR/ours-BF16](https://huggingface.co/DCTR/ours-BF16) and [DCTR/ours-NVFP4](https://huggingface.co/DCTR/ours-NVFP4).

- **Architecture:** 5 draft layers, block size 8; it reads the target's hidden states from layers 5 / 19 / 33 / 47 / 61 and borrows the target's embedding and `lm_head`, so it only works with the target above.
- **Training:** initialized from a DFlash2 draft of Qwen3.8-27B-PEAR (block size 8) and fine-tuned on 224 trajectories of ours-BF16 on the four LIBERO suites (70 trajectories on unseen tasks held out), learning rate 3e-5 (swept 3e-5 to 1e-3).
- **Result:** the speculative output distribution is identical to the target's. With this draft family, decoding is about 3.5x faster than without a draft (BF16, 2 x H100: 233 vs. 66 tok/s, 4.2 accepted tokens per verification). The fine-tune matches its initialization (offline acceptance +0.2%, 479 vs. 481 tok/s in serving).

## Usage
`--speculative-num-draft-tokens` must equal the block size (8); a mismatch runs silently wrong.

```sh
python -m sglang.launch_server \
  --model-path DCTR/ours-BF16 \
  --tp-size 2 \
  --attention-backend fa3 \
  --mamba-ssm-dtype float32 \
  --speculative-algorithm DFLASH \
  --speculative-draft-model-path DCTR/ours-draft-DFlash \
  --speculative-num-draft-tokens 8 \
  --speculative-draft-attention-backend fa3
```

Tested with SGLang 0.5.23 (DFlash2 support).

### License/Terms of Use:
[Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0).