shujunyi commited on
Commit
343142d
·
verified ·
1 Parent(s): 074c1e5

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +67 -0
README.md ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: z-lab/Qwen3.5-4B-DFlash
3
+ tags:
4
+ - gguf
5
+ - dflash
6
+ - speculative-decoding
7
+ - draft-model
8
+ - qwen3.5
9
+ library_name: gguf
10
+ ---
11
+
12
+ # Qwen3.5-4B-DFlash — Q4_0 GGUF (draft model)
13
+
14
+ A **Q4_0 GGUF** of the [`z-lab/Qwen3.5-4B-DFlash`](https://huggingface.co/z-lab/Qwen3.5-4B-DFlash)
15
+ block-diffusion **draft model** for [DFlash](https://github.com/z-lab/dflash) speculative
16
+ decoding with the **Qwen3.5-4B** target. This is not a standalone language model — it must be
17
+ paired with the Qwen3.5-4B target in a DFlash-capable llama.cpp server.
18
+
19
+ ## Files
20
+
21
+ | File | Size (bytes) | SHA256 |
22
+ | --- | ---: | --- |
23
+ | `qwen35-4b-dflash-Q4_0.gguf` | 367,939,840 | `2772878B6B2B4E607C42BFCEE5A429B54BE27F7A57E86A3108E9E437CB5C79FF` |
24
+
25
+ 69 tensors total: 43 2-D weight tensors are Q4_0, the remaining 26 (norms, etc.) are F32.
26
+
27
+ ## Provenance
28
+
29
+ - **Source:** `z-lab/Qwen3.5-4B-DFlash`, HF revision `9a1996ccf887b79ab3af4fcbf8c1d1f4b5658bcf`
30
+ (`model.safetensors` SHA256 `1EB221D36ABB13A5F1B972F8D031A9723FAD8CBB7D275ABE548B60E77577EB42`).
31
+ - **Conversion:** upstream `llama.cpp` `convert_hf_to_gguf.py` with the DFlash support merged in
32
+ [ggml-org/llama.cpp#22105](https://github.com/ggml-org/llama.cpp/pull/22105), sourcing the
33
+ tokenizer from the Qwen3.5-4B target via `--target-model-dir`. safetensors → BF16 GGUF →
34
+ `llama-quantize Q4_0`.
35
+ - The BF16 intermediate is 1,279,873,280 bytes.
36
+
37
+ ## Architecture / GGUF metadata
38
+
39
+ - `general.architecture = dflash`
40
+ - 6 layers: **5 `sliding_attention` + 1 `full_attention`** (`sliding_window = 4096`)
41
+ - hidden 2560, FFN 9216, 32 Q heads / 8 KV heads, head dim 128
42
+ - `dflash.block_size = 16`
43
+ - `dflash.target_layers = [2, 6, 10, 14, 18, 22, 26, 30]` (llama.cpp layer-input semantics;
44
+ the source `dflash_config.target_layer_ids` are `[1, 5, 9, 13, 17, 21, 25, 29]`)
45
+ - `tokenizer.ggml.mask_token_id = 248077`, vocab size 248320 (shares the Qwen3.5-4B vocab)
46
+
47
+ The draft is only the DFlash core; at runtime it borrows the target's token embedding and
48
+ tied output projection.
49
+
50
+ ## Usage (sketch)
51
+
52
+ Run against the Qwen3.5-4B target in a DFlash-capable `llama.cpp` server, e.g.:
53
+
54
+ ```
55
+ llama-server \
56
+ -m Qwen3.5-4B-Q4_0.gguf \
57
+ --spec-draft-model qwen35-4b-dflash-Q4_0.gguf \
58
+ --spec-type draft-dflash --spec-draft-n-max 7
59
+ ```
60
+
61
+ DFlash speculative decoding is not part of stock upstream `llama.cpp` runtime; use a build
62
+ with DFlash runtime support.
63
+
64
+ ## License
65
+
66
+ Inherits the terms of the base model — see
67
+ [`z-lab/Qwen3.5-4B-DFlash`](https://huggingface.co/z-lab/Qwen3.5-4B-DFlash).