How to use from
Unsloth Studio
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh
# Run unsloth studio
unsloth studio -H 0.0.0.0 -p 8888
# Then open http://localhost:8888 in your browser
# Search for starskyzheng/Qwen3.6-35B-DFlash-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex
# Run unsloth studio
unsloth studio -H 0.0.0.0 -p 8888
# Then open http://localhost:8888 in your browser
# Search for starskyzheng/Qwen3.6-35B-DFlash-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required
# Open https://huggingface.co/spaces/unsloth/studio in your browser
# Search for starskyzheng/Qwen3.6-35B-DFlash-GGUF to start chatting
Quick Links

Qwen3.6-35B-DFlash — GGUF (Q8_0)

llama.cpp quantizations of z-lab/Qwen3.6-35B-A3B-DFlash, the block-diffusion drafter for DFlash speculative decoding. Pair it with Qwen/Qwen3.6-35B (or a quant of it).

Simalar to spiritbuun/Qwen3.6-27B-DFlash-GGUF, but for Qwen3.6-35B-A3B.

Requirements

DFlash speculative decoding is not yet in upstream llama.cpp. You need the fork:

  • Fork: spiritbuun/buun-llama-cpp (branch master)
  • SWA support for the DFlash drafter landed in commit b9d01582b (SD-073). Older checkpoints will load the drafter but produce garbage.
  • Built with: cmake -B build -DGGML_CUDA=ON -DGGML_NATIVE=ON -DGGML_CUDA_FA=ON -DGGML_CUDA_FA_ALL_QUANTS=ON

Usage

llama-server

./build/bin/llama-server \
    -m   /path/to/Qwen3.6-35B-target.Q4_K_M.gguf \
    -md  /path/to/dflash-draft-3.6-q8_0.gguf \
    --spec-type dflash \
    -ngl 99 -ngld 99 \
    -np 1 -c 6048 -cd 256 \
    -fa on -b 256 -ub 64 \
    --host 0.0.0.0 --port 8080 --jinja \
    --chat-template-kwargs '{"enable_thinking": false}'

Thinking footgun: the Qwen3.6 chat template enables <think>…</think> by default. That collapses DFlash acceptance because the drafter wasn't trained on the think-wrapped distribution. Pass --chat-template-kwargs '{"enable_thinking": false}' to disable it (≈1.8× throughput uplift).

llama-speculative-simple

./build/bin/llama-speculative-simple \
    -m   /path/to/Qwen3.6-35B-target.Q4_K_M.gguf \
    -md  /path/to/dflash-draft-3.6-q8_0.gguf \
    --spec-type dflash \
    -ngl 99 -ngld 99 \
    -c 4096 --draft-max 16 --draft-min 1 \
    -p "Write a Python mergesort."

Note on comparison with the 3.5 drafter

Short-context code prompts do not exercise the sliding-window attention (most queries fall inside the 2048-token window anyway), so the 3.6 drafter's architectural change doesn't produce a dramatic win on this benchmark. The SWA infrastructure is expected to matter on longer-context workloads (> 2 k generated tokens). On short code, Q8_0 on 3.6 is ≈1.3× the throughput of Q4_K_M on 3.5 because the 3.6 target pairs slightly better with the retrained drafter.

Quantization details

  • Source: z-lab/Qwen3.6-35B-A3B-DFlash (BF16 safetensors, 0.5 B parameters)
  • Converter: convert_hf_to_gguf.py from spiritbuun/buun-llama-cpp — emits qwen35.attention.sliding_window + qwen35.attention.sliding_window_pattern so the runtime builds per-layer SWA masks

Reproducing the conversion

Tokenizer heads-up: the upstream z-lab/Qwen3.6-35B-A3B-DFlash repo ships only config.json, model.safetensors, and a README — no tokenizer files. The drafter shares the target model's tokenizer. Copy the Qwen3.6 tokenizer files into the drafter directory first.

# 1. Pull the DFlash drafter weights
hf download z-lab/Qwen3.6-35B-A3B-DFlash --local-dir ./dflash-drafter-3.6

# 2. Pull tokenizer files from the target model into the same directory
hf download Qwen/Qwen3.6-35B-A3B-DFlash \
    tokenizer.json tokenizer_config.json vocab.json merges.txt \
    special_tokens_map.json \
    --local-dir ./dflash-drafter-3.6

# 3. Convert to GGUF (F16 first, then quantize)
python convert_hf_to_gguf.py ./dflash-drafter-3.6 \
    --outtype f16 \
    --outfile dflash-draft-3.6-f16.gguf

# 4. Quantize
./build/bin/llama-quantize dflash-draft-3.6-f16.gguf dflash-draft-3.6-q8_0.gguf Q8_0
./build/bin/llama-quantize dflash-draft-3.6-f16.gguf dflash-draft-3.6-q4_k_m.gguf Q4_K_M

Required files in ./dflash-drafter-3.6/ before step 3:

File Source
config.json z-lab/Qwen3.6-35B-A3B-DFlash (has architectures: ["DFlashDraftModel"], use_sliding_window: true, layer_types: [...])
model.safetensors z-lab/Qwen3.6-35B-A3B-DFlash
tokenizer.json, tokenizer_config.json, vocab.json, merges.txt Qwen/Qwen3.6-35B

The converter auto-detects DFlashDraftModel from config.json and emits the SWA metadata when use_sliding_window is set.


Original model card — z-lab/Qwen3.6-35B-A3B-DFlash


license: mit library_name: transformers pipeline_tag: text-generation tags: - dflash - speculative-decoding - block-diffusion - draft-model - efficiency - qwen - diffusion-language-model

Qwen3.6-35B-A3B-DFlash

Paper | GitHub | Blog

DFlash is a speculative decoding method that uses a lightweight block diffusion model to draft multiple tokens in parallel. This is the drafter model, which must be paired with Qwen/Qwen3.6-35B-A3B.

DFlash Architecture

Quick Start

Installation

vLLM (We temporarily modify the installation through this PR to support interleaved SWA and ensure correct handling of target hidden states for optimal performance):

uv pip install vllm
uv pip install -U --torch-backend=auto "vllm @ git+https://github.com/vllm-project/vllm.git@refs/pull/40898/head"

SGLang:

uv pip install "git+https://github.com/sgl-project/sglang.git@refs/pull/20547/head#subdirectory=python"

Launch Server

vLLM:

vllm serve Qwen/Qwen3.6-35B-A3B \
  --speculative-config '{"method": "dflash", "model": "z-lab/Qwen3.6-35B-A3B-DFlash", "num_speculative_tokens": 15}' \
  --attention-backend flash_attn \
  --max-num-batched-tokens 32768

SGLang:

# Optional: enable schedule overlapping (experimental, may not be stable)
# export SGLANG_ENABLE_SPEC_V2=1
# export SGLANG_ENABLE_DFLASH_SPEC_V2=1
# export SGLANG_ENABLE_OVERLAP_PLAN_STREAM=1

python -m sglang.launch_server \
    --model-path Qwen/Qwen3.6-35B-A3B \
    --speculative-algorithm DFLASH \
    --speculative-draft-model-path z-lab/Qwen3.6-35B-A3B-DFlash \
    --speculative-num-draft-tokens 16 \
    --tp-size 1 \
    --attention-backend fa3 \
    --mem-fraction-static 0.75 \
    --mamba-scheduler-strategy extra_buffer \
    --trust-remote-code

Tip: For long-context or agentic workloads, add --speculative-dflash-draft-window-size WINDOW_SIZE to enable sliding-window attention for the drafter.

Usage

from openai import OpenAI

client = OpenAI(base_url="http://localhost:30000/v1", api_key="EMPTY")

response = client.chat.completions.create(
    model="Qwen/Qwen3.6-35B-A3B",
    messages=[{"role": "user", "content": "Write a quicksort in Python."}],
    max_tokens=4096,
    temperature=0.0
)
print(response.choices[0].message.content)

Benchmark Results

Setup: Single NVIDIA B200, SGLang, thinking enabled, max output length 4096. We report end-to-end throughput, including prefill time. See our GitHub repository for reproduction scripts.

Throughput and Speedup

DFlash achieves up to 2.9x speedup at concurrency 1.

Tokens/sec (speedup vs. autoregressive baseline)

Block Size = 16

Task Concurrency AR DFlash
Math500 1 234 682 (2.9x)
8 1266 3138 (2.5x)
16 1954 4813 (2.5x)
32 2755 6520 (2.4x)
GSM8K 1 235 556 (2.4x)
8 1236 2564 (2.1x)
16 1886 3821 (2.0x)
32 2699 5239 (1.9x)
HumanEval 1 238 603 (2.5x)
8 1255 2800 (2.2x)
16 1944 4208 (2.2x)
32 2767 5782 (2.1x)
MBPP 1 235 559 (2.4x)
8 1224 2538 (2.1x)
16 1948 3816 (2.0x)
32 2780 5378 (1.9x)
MT-Bench 1 233 442 (1.9x)
8 1238 2028 (1.6x)
16 1885 2997 (1.6x)
32 2633 4034 (1.5x)
Alpaca 1 235 393 (1.7x)
8 1221 1782 (1.5x)
16 1844 2567 (1.4x)
32 2579 3689 (1.4x)

Block Size = 8

Task Concurrency AR DFlash
Math500 1 234 617 (2.6x)
8 1266 2839 (2.2x)
16 1954 4465 (2.3x)
32 2755 6614 (2.4x)
GSM8K 1 235 540 (2.3x)
8 1236 2466 (2.0x)
16 1886 3899 (2.1x)
32 2699 5713 (2.1x)
HumanEval 1 238 561 (2.4x)
8 1255 2655 (2.1x)
16 1944 4135 (2.1x)
32 2767 6059 (2.2x)
MBPP 1 235 497 (2.1x)
8 1224 2324 (1.9x)
16 1948 3636 (1.9x)
32 2780 4884 (1.8x)
MT-Bench 1 233 438 (1.9x)
8 1238 2060 (1.7x)
16 1885 3182 (1.7x)
32 2633 4720 (1.8x)
Alpaca 1 235 407 (1.7x)
8 1221 1880 (1.5x)
16 1844 2903 (1.6x)
32 2579 4115 (1.6x)

Acceptance Length

Task B8 B16
Math500 5.56 7.35
GSM8K 5.21 6.73
HumanEval 5.09 6.44
MBPP 4.78 5.83
MT-Bench 4.20 5.14
Alpaca 3.94 4.62

Acknowledgements

Special thanks to David Wang for his outstanding engineering support on this project. We are also grateful to Modal, InnoMatrix, and Yotta Labs for providing the compute resources used to train this draft model.

Citation

If you find DFlash useful, please cite our work. To share feedback on DFlash or request new model support, please fill out this form: DFlash Feedback.

@article{chen2026dflash,
  title   = {{DFlash: Block Diffusion for Flash Speculative Decoding}},
  author  = {Chen, Jian and Liang, Yesheng and Liu, Zhijian},
  journal = {arXiv preprint arXiv:2602.06036},
  year    = {2026}
}
Downloads last month
339
GGUF
Model size
0.5B params
Architecture
dflash-draft
Hardware compatibility
Log In to add your hardware

4-bit

8-bit

16-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for starskyzheng/Qwen3.6-35B-DFlash-GGUF

Quantized
(10)
this model

Paper for starskyzheng/Qwen3.6-35B-DFlash-GGUF