Preserve attributed pinned files and exact-configuration evaluation
Browse files- README.md +22 -0
- SOURCE_MANIFEST.json +38 -0
- UPSTREAM_README.md +152 -0
- config.json +57 -0
- model.safetensors +3 -0
README.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
base_model: "z-lab/Qwen3.8-27B-DFlash2"
|
| 4 |
+
tags:
|
| 5 |
+
- preservation-mirror
|
| 6 |
+
- mango
|
| 7 |
+
---
|
| 8 |
+
# Preservation mirror: z-lab/Qwen3.8-27B-DFlash2
|
| 9 |
+
|
| 10 |
+
Mirrored by **isilicon** from [z-lab/Qwen3.8-27B-DFlash2](https://huggingface.co/z-lab/Qwen3.8-27B-DFlash2/tree/50307d4c4cde6860d4eee73e2547cd786fe8e8a4) at commit `50307d4c4cde6860d4eee73e2547cd786fe8e8a4`. Original training, edits and quantization belong to the upstream creators. This mirror does not claim new training or authorship.
|
| 11 |
+
|
| 12 |
+
Files retain their original selected paths and bytes. This repository contains the selected quantization/dependency, not every quantization from the source. See `SOURCE_MANIFEST.json` for every path, size and checksum, and `UPSTREAM_README.md` for original model information, attribution and caveats when supplied upstream. Original available license/notice files are retained. The source model card declares the license shown above; base-model conditions still apply.
|
| 13 |
+
|
| 14 |
+
Keep original subfolders when downloading (for example `4-bit/` for MLX). Tokenizers, projectors, draft models and offloaded tensor dependencies may live in separate mirrors. A weight-only mirror is not a claim of standalone runtime readiness.
|
| 15 |
+
|
| 16 |
+
## Evaluation status
|
| 17 |
+
|
| 18 |
+
No standalone full benchmark score is claimed for these exact files. This is an auxiliary dependency or a downloaded/queued candidate. Scores from another quantization or the main model do not transfer to this repository.
|
| 19 |
+
|
| 20 |
+
## Preservation status
|
| 21 |
+
|
| 22 |
+
`MIRROR_STATUS.json`, when present, records destination-file verification against the pinned source metadata. This is not a fresh independent-device full restore/load test. An HF mirror remains dependent on Hugging Face availability and policies.
|
SOURCE_MANIFEST.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"schema": 1,
|
| 3 |
+
"mirror_owner": "isilicon",
|
| 4 |
+
"source_repo": "z-lab/Qwen3.8-27B-DFlash2",
|
| 5 |
+
"source_revision": "50307d4c4cde6860d4eee73e2547cd786fe8e8a4",
|
| 6 |
+
"license_declared_by_source": "apache-2.0",
|
| 7 |
+
"source_base_model": [
|
| 8 |
+
"Qwen/Qwen3.8-27B"
|
| 9 |
+
],
|
| 10 |
+
"selected_files": [
|
| 11 |
+
{
|
| 12 |
+
"source_path": "config.json",
|
| 13 |
+
"path": "config.json",
|
| 14 |
+
"bytes": 1239,
|
| 15 |
+
"sha256": null,
|
| 16 |
+
"git_blob": "79279cc5665bced6f3cdaa2095a2ffe819497b2e"
|
| 17 |
+
},
|
| 18 |
+
{
|
| 19 |
+
"source_path": "model.safetensors",
|
| 20 |
+
"path": "model.safetensors",
|
| 21 |
+
"bytes": 3848817896,
|
| 22 |
+
"sha256": "67fc76d68dc5a9415511a4f394ef744d67510cd20e93b37cc2cc7d28e4bab65c",
|
| 23 |
+
"git_blob": "a988e2ea15d5cb6553f37a7f140304fb42fa8c10"
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"source_path": "README.md",
|
| 27 |
+
"path": "UPSTREAM_README.md",
|
| 28 |
+
"bytes": 5397,
|
| 29 |
+
"sha256": null,
|
| 30 |
+
"git_blob": "1ee0eb2b2f81767f40521b61245211e5400b81bc"
|
| 31 |
+
}
|
| 32 |
+
],
|
| 33 |
+
"scope": "Selected pinned files and original available notices; not all upstream quants.",
|
| 34 |
+
"dependency_for": [
|
| 35 |
+
"qwen-mlx"
|
| 36 |
+
],
|
| 37 |
+
"local_integrity_receipt_sha256": "708a7154f00fe34d2f5bf6e2dc51a948a4aae3af0b4425a942c60155bb2804f2"
|
| 38 |
+
}
|
UPSTREAM_README.md
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
library_name: transformers
|
| 4 |
+
pipeline_tag: text-generation
|
| 5 |
+
base_model:
|
| 6 |
+
- Qwen/Qwen3.8-27B
|
| 7 |
+
inference: false
|
| 8 |
+
tags:
|
| 9 |
+
- dflash2
|
| 10 |
+
- speculative-decoding
|
| 11 |
+
- block-diffusion
|
| 12 |
+
- draft-model
|
| 13 |
+
- sglang
|
| 14 |
+
- vllm
|
| 15 |
+
---
|
| 16 |
+
|
| 17 |
+
# Qwen3.8-27B-DFlash2
|
| 18 |
+
|
| 19 |
+
[Blog](https://inco.ai/blog/dflash2/) | [GitHub](https://github.com/z-lab/dflash)
|
| 20 |
+
|
| 21 |
+
This repository contains the DFlash 2 draft model for
|
| 22 |
+
[`Qwen/Qwen3.8-27B`](https://huggingface.co/Qwen/Qwen3.8-27B).
|
| 23 |
+
It is not a standalone language model: it runs inside a speculative
|
| 24 |
+
decoding server and drafts tokens for the target model to verify. This repository is a mirror
|
| 25 |
+
of [`incoai/Qwen3.8-27B-DFlash2`](https://huggingface.co/incoai/Qwen3.8-27B-DFlash2).
|
| 26 |
+
|
| 27 |
+
DFlash 2 is a block-diffusion drafter for speculative decoding. It predicts
|
| 28 |
+
a whole block of tokens in a single pass and keeps the top candidates at
|
| 29 |
+
every position. A lightweight selector then traces one coherent path through them.
|
| 30 |
+
Two-tap dynamic convolutions in the backbone keep the draft from decaying
|
| 31 |
+
toward the end of the block. Decoding is lossless: greedy output
|
| 32 |
+
matches the target model exactly, and sampling preserves its distribution.
|
| 33 |
+
|
| 34 |
+
<div align="center">
|
| 35 |
+
<img src="assets/dflash2-figure.png" alt="DFlash 2: parallel block drafting with a candidate path selector" width="100%">
|
| 36 |
+
</div>
|
| 37 |
+
|
| 38 |
+
## Quick Start
|
| 39 |
+
|
| 40 |
+
Serve with [SGLang](https://github.com/sgl-project/sglang):
|
| 41 |
+
|
| 42 |
+
```bash
|
| 43 |
+
pip install "sglang[all] @ git+https://github.com/sgl-project/sglang.git#subdirectory=python"
|
| 44 |
+
|
| 45 |
+
python -m sglang.launch_server \
|
| 46 |
+
--model-path Qwen/Qwen3.8-27B \
|
| 47 |
+
--speculative-algorithm DFLASH \
|
| 48 |
+
--speculative-draft-model-path incoai/Qwen3.8-27B-DFlash2 \
|
| 49 |
+
--speculative-num-draft-tokens 8
|
| 50 |
+
```
|
| 51 |
+
|
| 52 |
+
Or with [vLLM](https://github.com/vllm-project/vllm):
|
| 53 |
+
|
| 54 |
+
```bash
|
| 55 |
+
pip install -U "vllm @ git+https://github.com/vllm-project/vllm.git@refs/pull/52816/head"
|
| 56 |
+
|
| 57 |
+
vllm serve Qwen/Qwen3.8-27B \
|
| 58 |
+
--speculative-config '{
|
| 59 |
+
"method": "dflash",
|
| 60 |
+
"model": "incoai/Qwen3.8-27B-DFlash2",
|
| 61 |
+
"num_speculative_tokens": 7
|
| 62 |
+
}'
|
| 63 |
+
```
|
| 64 |
+
|
| 65 |
+
See the [blog post](https://inco.ai/blog/dflash2/) for other engines and more details.
|
| 66 |
+
|
| 67 |
+
## Evaluation
|
| 68 |
+
|
| 69 |
+
- Runtime: SGLang on one NVIDIA H200, with FlashAttention 3 for target and draft attention
|
| 70 |
+
- Speculation block size: 8 (7 draft tokens per verification step)
|
| 71 |
+
- Sampling: Qwen3.8's officially recommended parameters (temperature 1.0, top-p 0.95, top-k 20), with `xhigh` reasoning effort
|
| 72 |
+
- Maximum new tokens: 4096
|
| 73 |
+
- Prompts: benchmark formatting from [`z-lab/dflash`](https://github.com/z-lab/dflash)
|
| 74 |
+
|
| 75 |
+
We compare autoregressive decoding, Qwen3.8's built-in seven-token MTP,
|
| 76 |
+
a community DSpark drafter
|
| 77 |
+
([`RadixArk/Qwen3.8-27B-DSpark`](https://huggingface.co/RadixArk/Qwen3.8-27B-DSpark)),
|
| 78 |
+
and DFlash 2. All speculative methods propose seven draft tokens per
|
| 79 |
+
verification step.
|
| 80 |
+
|
| 81 |
+
### Acceptance Length
|
| 82 |
+
|
| 83 |
+
Acceptance length is the per-request mean of completion tokens divided by verification steps.
|
| 84 |
+
Higher is better.
|
| 85 |
+
|
| 86 |
+
| Task | MTP | DSpark | DFlash 2 |
|
| 87 |
+
| :--- | ---: | ---: | ---: |
|
| 88 |
+
| GSM8K | 5.02 | 4.36 | **5.46** |
|
| 89 |
+
| MATH-500 | 4.72 | 3.92 | **5.28** |
|
| 90 |
+
| HumanEval | 3.91 | 3.30 | **4.39** |
|
| 91 |
+
| MBPP | 3.99 | 3.51 | **4.79** |
|
| 92 |
+
| MT-Bench | 3.74 | 3.01 | **4.10** |
|
| 93 |
+
|
| 94 |
+
### Throughput
|
| 95 |
+
|
| 96 |
+
Throughput is total output tokens divided by end-to-end wall time.
|
| 97 |
+
Each cell shows `output tok/s (speedup vs. autoregressive)`.
|
| 98 |
+
|
| 99 |
+
#### Concurrency 1
|
| 100 |
+
|
| 101 |
+
| Task | Autoregressive | MTP | DSpark | DFlash 2 |
|
| 102 |
+
| :--- | ---: | ---: | ---: | ---: |
|
| 103 |
+
| GSM8K | 68.9 | 178.5 (2.59×) | 185.3 (2.69×) | **236.1 (3.43×)** |
|
| 104 |
+
| MATH-500 | 69.0 | 172.8 (2.51×) | 174.5 (2.53×) | **230.7 (3.34×)** |
|
| 105 |
+
| HumanEval | 69.0 | 151.9 (2.20×) | 159.9 (2.32×) | **214.6 (3.11×)** |
|
| 106 |
+
| MBPP | 69.0 | 153.1 (2.22×) | 163.3 (2.37×) | **226.9 (3.29×)** |
|
| 107 |
+
| MT-Bench | 68.9 | 134.9 (1.96×) | 137.6 (2.00×) | **184.0 (2.67×)** |
|
| 108 |
+
|
| 109 |
+
#### Concurrency 8
|
| 110 |
+
|
| 111 |
+
| Task | Autoregressive | MTP | DSpark | DFlash 2 |
|
| 112 |
+
| :--- | ---: | ---: | ---: | ---: |
|
| 113 |
+
| GSM8K | 467.2 | 1,022.1 (2.19×) | 1,040.8 (2.23×) | **1,328.7 (2.84×)** |
|
| 114 |
+
| MATH-500 | 480.0 | 1,023.5 (2.13×) | 1,025.8 (2.14×) | **1,368.3 (2.85×)** |
|
| 115 |
+
| HumanEval | 483.4 | 934.2 (1.93×) | 956.5 (1.98×) | **1,291.5 (2.67×)** |
|
| 116 |
+
| MBPP | 478.0 | 938.1 (1.96×) | 974.1 (2.04×) | **1,328.0 (2.78×)** |
|
| 117 |
+
| MT-Bench | 480.5 | 835.2 (1.74×) | 802.3 (1.67×) | **1,090.2 (2.27×)** |
|
| 118 |
+
|
| 119 |
+
#### Concurrency 32
|
| 120 |
+
|
| 121 |
+
| Task | Autoregressive | MTP | DSpark | DFlash 2 |
|
| 122 |
+
| :--- | ---: | ---: | ---: | ---: |
|
| 123 |
+
| GSM8K | 1,329.8 | 1,381.1 (1.04×) | 1,506.5 (1.13×) | **1,922.5 (1.45×)** |
|
| 124 |
+
| MATH-500 | 1,505.8 | 1,415.6 (0.94×) | 1,429.0 (0.95×) | **1,951.8 (1.30×)** |
|
| 125 |
+
| HumanEval | 1,546.5 | 1,296.8 (0.84×) | 1,330.1 (0.86×) | **1,799.0 (1.16×)** |
|
| 126 |
+
| MBPP | 1,507.7 | 1,314.9 (0.87×) | 1,361.3 (0.90×) | **1,886.8 (1.25×)** |
|
| 127 |
+
| MT-Bench | 1,507.4 | 1,159.7 (0.77×) | 1,115.5 (0.74×) | **1,525.3 (1.01×)** |
|
| 128 |
+
|
| 129 |
+
## Citation
|
| 130 |
+
|
| 131 |
+
If you find DFlash 2 useful, please cite:
|
| 132 |
+
|
| 133 |
+
```bibtex
|
| 134 |
+
@misc{inco2026dflash2,
|
| 135 |
+
title = {{DFlash 2: Keep Drafting Parallel}},
|
| 136 |
+
author = {{Inco AI}},
|
| 137 |
+
year = {2026},
|
| 138 |
+
month = {August},
|
| 139 |
+
url = {https://inco.ai/blog/dflash2/}
|
| 140 |
+
}
|
| 141 |
+
```
|
| 142 |
+
|
| 143 |
+
Please also cite the original DFlash paper:
|
| 144 |
+
|
| 145 |
+
```bibtex
|
| 146 |
+
@inproceedings{chen2026dflash,
|
| 147 |
+
title = {{DFlash: Block Diffusion for Flash Speculative Decoding}},
|
| 148 |
+
author = {Chen, Jian and Liang, Yesheng and Liu, Zhijian},
|
| 149 |
+
booktitle = {International Conference on Machine Learning (ICML)},
|
| 150 |
+
year = {2026}
|
| 151 |
+
}
|
| 152 |
+
```
|
config.json
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"DFlash2DraftModel"
|
| 4 |
+
],
|
| 5 |
+
"attention_bias": false,
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"bos_token_id": null,
|
| 8 |
+
"is_causal": false,
|
| 9 |
+
"dflash_config": {
|
| 10 |
+
"block_size": 8,
|
| 11 |
+
"conv_group_size": 16,
|
| 12 |
+
"conv_kernel_size": 2,
|
| 13 |
+
"mask_token_id": 248070,
|
| 14 |
+
"selector_rank": 256,
|
| 15 |
+
"selector_top_k": 16,
|
| 16 |
+
"target_layer_ids": [
|
| 17 |
+
5,
|
| 18 |
+
19,
|
| 19 |
+
33,
|
| 20 |
+
47,
|
| 21 |
+
61
|
| 22 |
+
]
|
| 23 |
+
},
|
| 24 |
+
"dtype": "bfloat16",
|
| 25 |
+
"eos_token_id": 248044,
|
| 26 |
+
"head_dim": 128,
|
| 27 |
+
"hidden_act": "silu",
|
| 28 |
+
"hidden_size": 5120,
|
| 29 |
+
"initializer_range": 0.02,
|
| 30 |
+
"intermediate_size": 17408,
|
| 31 |
+
"layer_types": [
|
| 32 |
+
"sliding_attention",
|
| 33 |
+
"sliding_attention",
|
| 34 |
+
"sliding_attention",
|
| 35 |
+
"sliding_attention",
|
| 36 |
+
"sliding_attention"
|
| 37 |
+
],
|
| 38 |
+
"max_position_embeddings": 262144,
|
| 39 |
+
"max_window_layers": 5,
|
| 40 |
+
"model_type": "qwen3",
|
| 41 |
+
"num_attention_heads": 32,
|
| 42 |
+
"num_hidden_layers": 5,
|
| 43 |
+
"num_key_value_heads": 8,
|
| 44 |
+
"num_target_layers": 64,
|
| 45 |
+
"pad_token_id": 248044,
|
| 46 |
+
"rms_norm_eps": 1e-06,
|
| 47 |
+
"rope_parameters": {
|
| 48 |
+
"rope_theta": 10000000,
|
| 49 |
+
"rope_type": "default"
|
| 50 |
+
},
|
| 51 |
+
"sliding_window": 2048,
|
| 52 |
+
"tie_word_embeddings": false,
|
| 53 |
+
"transformers_version": "5.15.0",
|
| 54 |
+
"use_cache": true,
|
| 55 |
+
"use_sliding_window": true,
|
| 56 |
+
"vocab_size": 248320
|
| 57 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:67fc76d68dc5a9415511a4f394ef744d67510cd20e93b37cc2cc7d28e4bab65c
|
| 3 |
+
size 3848817896
|