ddalcu commited on
Commit
b139d39
·
verified ·
1 Parent(s): cb7fa05

Add the DFlash2 draft (incoai/Inkling-2-Mini-DFlash2, unchanged) as drafter/

Browse files
Files changed (3) hide show
  1. README.md +13 -2
  2. drafter/config.json +58 -0
  3. drafter/model.safetensors +3 -0
README.md CHANGED
@@ -17,8 +17,8 @@ text + images) in mlx-lm's layout.
17
  - **Experts:** the release's own bytes, untouched (NVFP4 on layers 0-19, MXFP8 on 20-23).
18
  - **Attention, embedding and head:** affine 8-bit, group 64. The release stores these in bf16.
19
  - **Vision tower:** bf16.
20
- - **Draft head:** the bundled block drafter, `mtp.safetensors` (0.64 GB).
21
- - **Size:** 18.7 GB.
22
 
23
  ## Quality
24
 
@@ -45,6 +45,17 @@ llmprobe 0.6.18, greedy, 192-token decode. Drafted rows use the bundled draft he
45
 
46
  Against the release served as is, it decodes ~15% faster at the same quality. The bf16 attention and head are read in full every token; 8-bit halves those bytes.
47
 
 
 
 
 
 
 
 
 
 
 
 
48
  ## Run
49
 
50
  ```
 
17
  - **Experts:** the release's own bytes, untouched (NVFP4 on layers 0-19, MXFP8 on 20-23).
18
  - **Attention, embedding and head:** affine 8-bit, group 64. The release stores these in bf16.
19
  - **Vision tower:** bf16.
20
+ - **Draft heads:** the bundled block drafter, `mtp.safetensors` (0.64 GB), and the DFlash2 draft in `drafter/` (0.99 GB, below).
21
+ - **Size:** 19.7 GB.
22
 
23
  ## Quality
24
 
 
45
 
46
  Against the release served as is, it decodes ~15% faster at the same quality. The bf16 attention and head are read in full every token; 8-bit halves those bytes.
47
 
48
+ ## The DFlash2 draft (`drafter/`)
49
+
50
+ `drafter/config.json` and `drafter/model.safetensors` are
51
+ [incoai/Inkling-2-Mini-DFlash2](https://huggingface.co/incoai/Inkling-2-Mini-DFlash2) as published: bf16, both files
52
+ unchanged, Apache-2.0. It is a draft model for speculative decoding, not a language model on its own: it proposes a
53
+ block of tokens a step and Inkling 2 Mini checks every one, so the text stays the model's own.
54
+
55
+ mlx-serve builds with DFlash2 support ([mlx-serve#1331](https://github.com/ddalcu/mlx-serve/pull/1331)) draft with it
56
+ in place of the bundled head, for one chat and for several at once. Earlier builds decline the folder by name and serve
57
+ the pack with the bundled head, as before.
58
+
59
  ## Run
60
 
61
  ```
drafter/config.json ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "DFlash2DraftModel"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": null,
8
+ "dflash_config": {
9
+ "block_size": 8,
10
+ "conv_group_size": 16,
11
+ "conv_kernel_size": 2,
12
+ "final_logit_softcapping": 30.0,
13
+ "mask_token_id": 200056,
14
+ "selector_rank": 256,
15
+ "selector_softcap_mode": "after_correction",
16
+ "selector_top_k": 16,
17
+ "target_layer_ids": [
18
+ 5,
19
+ 23,
20
+ 41,
21
+ 48
22
+ ]
23
+ },
24
+ "dtype": "bfloat16",
25
+ "eos_token_id": null,
26
+ "head_dim": 128,
27
+ "hidden_act": "silu",
28
+ "hidden_size": 2304,
29
+ "initializer_range": 0.02,
30
+ "intermediate_size": 6912,
31
+ "is_causal": false,
32
+ "layer_types": [
33
+ "sliding_attention",
34
+ "sliding_attention",
35
+ "sliding_attention",
36
+ "sliding_attention",
37
+ "sliding_attention"
38
+ ],
39
+ "max_position_embeddings": 1048576,
40
+ "max_window_layers": 5,
41
+ "model_type": "qwen3",
42
+ "num_attention_heads": 32,
43
+ "num_hidden_layers": 5,
44
+ "num_key_value_heads": 8,
45
+ "num_target_layers": 48,
46
+ "pad_token_id": null,
47
+ "rms_norm_eps": 1e-06,
48
+ "rope_parameters": {
49
+ "rope_theta": 10000.0,
50
+ "rope_type": "default"
51
+ },
52
+ "sliding_window": 2048,
53
+ "tie_word_embeddings": false,
54
+ "transformers_version": "5.12.1",
55
+ "use_cache": false,
56
+ "use_sliding_window": true,
57
+ "vocab_size": 201024
58
+ }
drafter/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:217980ab00d116693fa5946df7bbfd967caf5fac1f529afd541fbd470ddb54ee
3
+ size 989975616