MLX
Safetensors
qwen3
dflash2
draft-only
speculative-decoding
block-diffusion
draft-model
qwen3.8-27b-target
Instructions to use RESMP-DEV/DFlash2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use RESMP-DEV/DFlash2 with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download RESMP-DEV/DFlash2 --local-dir DFlash2
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
Publish promoted generation-3 DFlash2 head
Browse filesPrivate promoted checkpoint with paired acceptance and parity metrics; trace data intentionally excluded.
- .gitattributes +1 -0
- README.md +92 -0
- blend.json +1 -0
- config.json +57 -0
- metrics.json +65 -0
- model.safetensors +3 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
assets/dflash2-figure.png filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
- mlx
|
| 14 |
+
---
|
| 15 |
+
|
| 16 |
+
# Qwen3.8-27B DFlash2 generation-3 combined head
|
| 17 |
+
|
| 18 |
+
This repository contains the promoted DFlash2 draft head for
|
| 19 |
+
[`Qwen/Qwen3.8-27B`](https://huggingface.co/Qwen/Qwen3.8-27B). It is not a
|
| 20 |
+
standalone language model and has no tokenizer: a compatible DFlash2 runtime
|
| 21 |
+
must load it alongside the target verifier.
|
| 22 |
+
|
| 23 |
+
The head descends from the public Qwen3.8-27B DFlash2 draft model. It was
|
| 24 |
+
adapted with target-verified cycles from the incumbent legacy corpus and a
|
| 25 |
+
session-grouped Fable agentic corpus. The final checkpoint combines a
|
| 26 |
+
generation-2 Fable adaptation at strength `0.0625` with a generation-3
|
| 27 |
+
combined-domain adaptation at strength `0.1875`.
|
| 28 |
+
|
| 29 |
+
No trace dataset, prompt file, capture cycle, selector tensor, or W&B log is
|
| 30 |
+
included in this repository. Only the final draft checkpoint, configuration,
|
| 31 |
+
blend metadata, and evaluation summary are published.
|
| 32 |
+
|
| 33 |
+
## Acceptance results
|
| 34 |
+
|
| 35 |
+
All acceptance runs used greedy target-controlled generation on one Apple M4
|
| 36 |
+
Max through DFlash MLX. The target was the calibrated Qwen3.8-27B MXFP4
|
| 37 |
+
runtime. `Draft quantization` was disabled for this head.
|
| 38 |
+
|
| 39 |
+
| Paired gate | Incumbent | This head | Mean delta | Wins / ties / losses |
|
| 40 |
+
| --- | ---: | ---: | ---: | ---: |
|
| 41 |
+
| Legacy 24-prompt corpus | `0.6712239583` | `0.6718750000` | `+0.0006510417` | 5 / 14 / 5 |
|
| 42 |
+
| Fable 25-prompt held-out | `0.6471875000` | `0.6492187500` | `+0.0020312500` | 11 / 5 / 9 |
|
| 43 |
+
|
| 44 |
+
The Fable live-gate prompts were excluded from the generation-2 and combined
|
| 45 |
+
training splits. The legacy corpus had already been used to train the
|
| 46 |
+
incumbent, so it remained in the combined training capture for a paired
|
| 47 |
+
comparison.
|
| 48 |
+
|
| 49 |
+
## Exact parity
|
| 50 |
+
|
| 51 |
+
The exact 256-token baseline-versus-DFlash smoke gate passed:
|
| 52 |
+
|
| 53 |
+
- `token_match`: `true`
|
| 54 |
+
- smoke acceptance: `0.7109375`
|
| 55 |
+
- diagnostic baseline throughput: `21.9615` tok/s
|
| 56 |
+
- diagnostic DFlash throughput: `33.5111` tok/s
|
| 57 |
+
|
| 58 |
+
Throughput is diagnostic only. Thermal pressure and co-tenant machine load
|
| 59 |
+
were not controlled.
|
| 60 |
+
|
| 61 |
+
## Training summary
|
| 62 |
+
|
| 63 |
+
- combined capture: 11,273 target-verified cycles
|
| 64 |
+
- prompt groups: 127
|
| 65 |
+
- legacy contribution: 1,981 cycles from 24 prompts
|
| 66 |
+
- Fable contribution: 9,292 cycles from 103 training prompts
|
| 67 |
+
- excluded Fable live gate: 25 prompts
|
| 68 |
+
- teacher signal: target top-64 logits and greedy target tokens
|
| 69 |
+
- final full-run held-out prefix accuracy: `0.7932212528`
|
| 70 |
+
- final full-run held-out top-1 accuracy: `0.8714877986`
|
| 71 |
+
|
| 72 |
+
The capture teacher was the calibrated MXFP4 Qwen3.8-27B target runtime, not
|
| 73 |
+
the pinned BF16 Qwen3.8-27B checkpoint. This precision choice is part of the
|
| 74 |
+
training provenance.
|
| 75 |
+
|
| 76 |
+
## Checkpoint integrity
|
| 77 |
+
|
| 78 |
+
- `model.safetensors` SHA-256:
|
| 79 |
+
`c90e0fc65dddbe4107b1b417d771c3be188c87197e89cf4b14415f56abc866f0`
|
| 80 |
+
- `config.json` SHA-256:
|
| 81 |
+
`873e3556509b0da06e29654ba00d4944888d4b5e8a33afde25f7eb27d321e980`
|
| 82 |
+
- `blend.json` SHA-256:
|
| 83 |
+
`e53a6bb5e890d7e3368053302189766c3ef68d2eb7887152ece1ea9eac4f64d5`
|
| 84 |
+
|
| 85 |
+
## Intended use and limits
|
| 86 |
+
|
| 87 |
+
This artifact is for lossless speculative decoding research with a compatible
|
| 88 |
+
DFlash2 implementation. Acceptance metrics do not establish broad task quality,
|
| 89 |
+
natural-EOS behavior, multilingual performance, long-context performance, or a
|
| 90 |
+
controlled thermal throughput win. The Fable held-out prompts come from the
|
| 91 |
+
same eval shard as the Fable training prompts, so that gate does not prove
|
| 92 |
+
out-of-domain generalization.
|
blend.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"g2_strength": 0.0625, "g3_strength": 0.1875}
|
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 |
+
}
|
metrics.json
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"schema_version": 1,
|
| 3 |
+
"decision": "promoted",
|
| 4 |
+
"model_sha256": "c90e0fc65dddbe4107b1b417d771c3be188c87197e89cf4b14415f56abc866f0",
|
| 5 |
+
"config_sha256": "873e3556509b0da06e29654ba00d4944888d4b5e8a33afde25f7eb27d321e980",
|
| 6 |
+
"blend_sha256": "e53a6bb5e890d7e3368053302189766c3ef68d2eb7887152ece1ea9eac4f64d5",
|
| 7 |
+
"blend": {
|
| 8 |
+
"generation_2_strength": 0.0625,
|
| 9 |
+
"generation_3_strength": 0.1875
|
| 10 |
+
},
|
| 11 |
+
"runtime": {
|
| 12 |
+
"implementation": "DFlash MLX",
|
| 13 |
+
"revision": "dcf93d3d07aadc5a2e74fab7e44c63209d9f37a3",
|
| 14 |
+
"hardware": "Apple M4 Max",
|
| 15 |
+
"target": "calibrated Qwen3.8-27B MXFP4 runtime",
|
| 16 |
+
"draft_quantization": "none"
|
| 17 |
+
},
|
| 18 |
+
"exact_parity": {
|
| 19 |
+
"token_match": true,
|
| 20 |
+
"acceptance_ratio": 0.7109375,
|
| 21 |
+
"baseline_tps_diagnostic": 21.961506855085254,
|
| 22 |
+
"dflash_tps_diagnostic": 33.51110051912492
|
| 23 |
+
},
|
| 24 |
+
"paired_acceptance": [
|
| 25 |
+
{
|
| 26 |
+
"gate": "legacy24",
|
| 27 |
+
"control_mean_acceptance": 0.6712239583333334,
|
| 28 |
+
"candidate_mean_acceptance": 0.671875,
|
| 29 |
+
"mean_delta": 0.0006510416666666297,
|
| 30 |
+
"candidate_wins": 5,
|
| 31 |
+
"ties": 14,
|
| 32 |
+
"losses": 5
|
| 33 |
+
},
|
| 34 |
+
{
|
| 35 |
+
"gate": "fable-heldout25",
|
| 36 |
+
"control_mean_acceptance": 0.6471875,
|
| 37 |
+
"candidate_mean_acceptance": 0.64921875,
|
| 38 |
+
"mean_delta": 0.002031249999999929,
|
| 39 |
+
"candidate_wins": 11,
|
| 40 |
+
"ties": 5,
|
| 41 |
+
"losses": 9
|
| 42 |
+
}
|
| 43 |
+
],
|
| 44 |
+
"training_capture": {
|
| 45 |
+
"cycle_count": 11273,
|
| 46 |
+
"prompt_group_count": 127,
|
| 47 |
+
"legacy_cycles": 1981,
|
| 48 |
+
"legacy_prompts": 24,
|
| 49 |
+
"fable_training_cycles": 9292,
|
| 50 |
+
"fable_training_prompts": 103,
|
| 51 |
+
"fable_heldout_prompts_excluded": 25,
|
| 52 |
+
"teacher_target_topk": 64,
|
| 53 |
+
"teacher_precision": "calibrated MXFP4 target runtime"
|
| 54 |
+
},
|
| 55 |
+
"training_metrics": {
|
| 56 |
+
"best_validation_prefix_accuracy": 0.793221252777784,
|
| 57 |
+
"best_validation_top1_accuracy": 0.871487798557914
|
| 58 |
+
},
|
| 59 |
+
"non_claims": [
|
| 60 |
+
"Acceptance metrics do not prove broad task quality or natural-EOS behavior.",
|
| 61 |
+
"Throughput and memory are diagnostic because thermal pressure was not controlled.",
|
| 62 |
+
"The Fable held-out prompts come from the same eval shard as Fable training prompts.",
|
| 63 |
+
"No trace data or capture cycles are included in this model repository."
|
| 64 |
+
]
|
| 65 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c90e0fc65dddbe4107b1b417d771c3be188c87197e89cf4b14415f56abc866f0
|
| 3 |
+
size 3848817885
|