---
title: Qwen4-35B-A3B-Dflash2
canonical_url: "https://www.modelscope.cn/models/RadixArk/Qwen4-35B-A3B-Dflash2"
md_url: "https://www.modelscope.cn/models/RadixArk/Qwen4-35B-A3B-Dflash2.md"
repository: RadixArk/Qwen4-35B-A3B-Dflash2
last_updated: 2026-12-04
pipeline_tag: text-generation
tasks:
  - text-generation
model_type:
  - qwen3
architectures:
  - DFlash2DraftModel
base_model:
  - Qwen/Qwen4-35B-A3B
base_model_relation: finetune
parameters: 395.2M
tensor_type:
  - BF16
library_name:
  - safetensors
  - pytorch
frameworks:
  - pytorch
downloads: 7431
stars: 2
tags:
  - speculative-decoding
  - dflash2
  - qwen4
---

# Qwen4-35B-A3B-Dflash2

> Qwen4-35B-A3B-Dflash2 - RadixArk 在 ModelScope 开源的模型。Qwen4-35B-A3B-Dflash2

RadixArk/Qwen4-35B-A3B-Dflash2 是 ModelScope 魔搭社区上的 395.2M 参数text-generation模型，基于 Qwen/Qwen4-35B-A3B 构建。

- **Repository**: RadixArk/Qwen4-35B-A3B-Dflash2
- **Tasks**: text-generation
- **Parameters**: 395.2M
- **Base model**: Qwen/Qwen4-35B-A3B
- **Tags**: speculative-decoding, dflash2, qwen4
- **Downloads**: 7431
- **Stars**: 2
- **Last updated**: 2026-12-04

Source: https://www.modelscope.cn/models/RadixArk/Qwen4-35B-A3B-Dflash2

---

# Qwen4-35B-A3B-Dflash2

## Overview

A DFlash2 draft for Qwen4-35B-A3B that proposes tokens in parallel for verification by the target model in [SGLang](https://github.com/sgl-project/sglang).

This repository provides the BF16 checkpoint and its configuration. Serving also requires the target model, which provides the embedding, output head, tokenizer, and chat template.

## Model Specifications

- Target: Qwen4-35B-A3B, served as the NVFP4 build `RadixArk/Qwen4-35B-A3B-NVFP4`
- Architecture: `DFlash2DraftModel`, 5 causal GQA layers
- Parameters: 395,158,784 across 81 BF16 tensors
- Format: One BF16 Safetensors file
- Hidden size: 2,048; 16 query heads and 2 KV heads
- Attention: Sliding window of 2,048 tokens
- Verification width: 8 tokens, comprising an anchor and 7 proposals
- Selector: Rank 256, top-k 16
- Auxiliary target layers: `[19, 23, 27, 31, 35]`
- Draft KV cache: 5,120 bytes per token at BF16
- Configured maximum positions: 1,048,576, the same as the target

The evaluations below used a 40,960-token serving context. They do not establish acceptance quality at the full configured context length.

## Evaluation Results

`AL` is the number of output tokens divided by the number of verification steps, summed over all calls of a dataset. The pooled row applies the same ratio to all 2,430 calls.

| Dataset | Calls | AL, T=1.0 | AL, greedy |
| --- | ---: | ---: | ---: |
| GSM8K | 1,319 | 5.535 | 5.800 |
| MATH-500 | 500 | 5.017 | 5.385 |
| AIME 2026 | 30 | 3.982 | 4.329 |
| HumanEval | 164 | 4.519 | 4.933 |
| MBPP | 257 | 4.521 | 4.817 |
| MT-Bench | 160 turns (80 conversations) | 2.785 | 3.008 |
| All 6 pooled | 2,430 | 4.354 | 4.664 |

Measured with thinking on and the default chat template. The T=1.0 column used `temperature=1.0`, `top_p=0.95`, and `top_k=20`. The evaluation used TP1 on GB300, the NVFP4 target `RadixArk/Qwen4-35B-A3B-NVFP4` at revision `7d83fac3`, block verification (`--speculative-use-block-verification`), a BF16 draft with BF16 KV cache, a 40,960-token serving context, and concurrency 64. DFLASH verified 8 tokens per step. No request failed.

The table was produced with the `benchmark` harness of [SpecForge](https://github.com/sgl-project/SpecForge) (commit `9d585d67`). Each dataset uses the prompt of the corresponding SpecForge benchmark task, rendered on the client with the chat template and sent to `/generate`; the harness's AIME task was pointed at the 30 AIME 2026 problems of `math-ai/aime26`. Other harnesses use other prompt wordings and sampling settings, which give different AL for the same checkpoint.

On 80 SPEED-Bench coding prompts (`temperature=1.0`, `top_p=0.95`, 4,096-token output cap, concurrency 64, same target and block verification), the AL was 3.91 on average over 5 runs, ranging from 3.88 to 3.94.

Acceptance length measures decoding behavior, rather than answer quality or throughput.

## Serving with SGLang

The evaluation servers were launched as follows, with local paths replaced by repository names:

```bash
python -m sglang.launch_server \
  --model-path RadixArk/Qwen4-35B-A3B-NVFP4 \
  --trust-remote-code \
  --tp-size 1 \
  --mem-fraction-static 0.6 \
  --disable-radix-cache \
  --max-running-requests 64 \
  --context-length 40960 \
  --random-seed 42 \
  --speculative-algorithm DFLASH \
  --speculative-draft-model-path RadixArk/Qwen4-35B-A3B-Dflash2 \
  --speculative-dflash-block-size 8 \
  --speculative-draft-kv-cache-dtype bf16 \
  --speculative-use-block-verification \
  --host 127.0.0.1 \
  --port 30000
```

Keep `--speculative-draft-kv-cache-dtype bf16`: with the target's default FP4 KV cache, the draft fails during CUDA graph capture. The SGLang build must capture the Qwen4 DFlash taps (`radixark/sglang-day0-qwen4` at `e5465283`).
