license: apache-2.0
library_name: transformers
pipeline_tag: text-generation
base_model:
- z-lab/Qwen3.8-27B-DFlash2
base_model_relation: finetune
datasets: - icharle/Huihui-Qwen3.8-27B-abliterated-selfdistill
language: - en
- zh
inference: false
tags: - dflash2
- speculative-decoding
- block-diffusion
- draft-model
- sglang
- abliterated
Huihui-Qwen3.8-27B-abliterated-DFlash2
A DFlash2 speculative-decoding draft model for
huihui-ai/Huihui-Qwen3.8-27B-abliterated,
fine-tuned from the official z-lab/Qwen3.8-27B-DFlash2 drafter on
the abliterated model's own outputs.
Honest summary: this drafter is NOT faster than the official one. In real decoding it matches
z-lab/Qwen3.8-27B-DFlash2 within run-to-run noise. If you just want speed on huihui, use the official drafter: it
already fits the abliterated model. This repo is published as a reproducible experiment: data, scripts, and the
negative result.
Results
SGLang 0.5.23, target = huihui BF16 on one RTX PRO 6000 Blackwell (96 GB), --speculative-num-draft-tokens 8,
greedy decoding, reasoning on, 1024 new tokens. Numbers are acceptance length (tokens per target verify step).
Prompts: GSM8K test, HumanEval, MT-Bench turn 1, 22 hand-written Chinese prompts.
| drafter | math c1 | code c1 | chat c1 | zh c1 | math c8 | code c8 | chat c8 | zh c8 |
|---|---|---|---|---|---|---|---|---|
| official z-lab | 6.36 | 6.40 | 3.78 | 3.67 | 6.36 | 6.54 | 3.17 | 3.28 |
| this repo (final, step 729) | 6.28 | 6.34 | 3.74 | 3.60 | 6.36 | 6.55 | 3.05 | 3.21 |
| this repo (step 400, not uploaded) | 6.33 | 6.29 | 3.83 | 3.58 | 6.34 | 6.53 | 3.11 | 3.23 |
Single-stream speed with either drafter: ~140 tok/s on math/code and ~80 tok/s on chat/Chinese, up from 27 tok/s
without speculative decoding.
Teacher-forced validation on 300 held-out self-distilled conversations (NeMo's metrics, same script for both):
| drafter | val loss | val accept_len | base accept_len | candidate recall |
|---|---|---|---|---|
| official z-lab | 2.815 | 3.880 | 3.780 | 0.804 |
| this repo | 2.456 | 3.940 | 3.797 | 0.819 |
What this means: training clearly learned the abliterated model's distribution (loss −13%), but the drafter's
top choices barely changed (accept_len +1.5%), and that does not show up in real decoding. The official drafter
already predicts huihui well: abliteration hardly moves the output distribution on ordinary prompts. The lower
acceptance on chat and Chinese comes from that text being less predictable, not from a drafter mismatch.
Usage (SGLang)
sglang serve --model-path huihui-ai/Huihui-Qwen3.8-27B-abliterated \
--speculative-algorithm DFLASH \
--speculative-draft-model-path icharle/Huihui-Qwen3.8-27B-abliterated-DFlash2 \
--speculative-num-draft-tokens 8 \
--reasoning-parser qwen3
Same architecture, tensor names, and config.json as the official drafter (81 tensors, 1.92 B parameters, BF16), so it
works anywhere the official one works.
How it was trained
- Data: icharle/Huihui-Qwen3.8-27B-abliterated-selfdistill.
~12k prompts (UltraChat, alpaca-gpt4-zh, COIG-CQIA, open-perfectblend, GSM8K train, Magicoder), answered by huihui
BF16 itself (temperature 1.0, top_p 0.95, top_k 20, up to 2560 tokens, reasoning kept). 11,659 conversations
for training, the last 300 by id for validation. - Recipe: NVIDIA NeMo Automodel
TrainDFlash2Recipe(commit d433bc8), online target hidden states (target
layers 5/19/33/47/61), block size 8, 64 anchors, seq length 3072, loss decay gamma 4.0, selector loss weight 0.5.
The official DFlash2 training objective is unpublished; NeMo's block CE + top-K selector CE is a reconstruction. - Warm start from all 81 official tensors; the two selector codebooks were frozen (1.797 B trainable).
- Optimizer: flashoptim FlashAdamW with 24-bit master weights, lr 1e-4 (3% warmup, cosine to 1e-5),
betas (0.9, 0.95), effective batch 16 conversations, 1 epoch = 729 steps. - Hardware: one 96 GB GPU, target and drafter in the same process, 2 h 05 min, peak 66 GiB.
Scripts are in training/: prompt building (11_build_prompts.py), self-distillation
(11b_regen.py), data prep (13_prep_data.py), training (14_train.py + 14_dflash2_huihui.yaml), export check
(14b_export.py), teacher-forced validation (15_val_only.py), SGLang serve + benchmark (02_serve.py,10_spec_bench.py). Paths assume a /content layout.
Credits & license
Apache-2.0, as the original drafter. Based on z-lab/Qwen3.8-27B-DFlash2
(DFlash2 blog, GitHub); modified by fine-tuning
on the data above. Target model: huihui-ai/Huihui-Qwen3.8-27B-abliterated, built on Qwen/Qwen3.8-27B.
Training code: NVIDIA NeMo Automodel.