Myric commited on
Commit
1724c7d
·
verified ·
1 Parent(s): b99f138

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +65 -0
README.md ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: Kwaipilot/KAT-Coder-V2.5-Dev
4
+ tags:
5
+ - mtp
6
+ - speculative-decoding
7
+ - qwen3_5_moe
8
+ - experiment
9
+ ---
10
+
11
+ # KAT-Coder-V2.5-Dev — MTP head (experimental, un-fine-tuned baseline)
12
+
13
+ [Kwaipilot/KAT-Coder-V2.5-Dev](https://huggingface.co/Kwaipilot/KAT-Coder-V2.5-Dev) ships with
14
+ `mtp_num_hidden_layers: 0` — no MTP/NextN head at all, so no speculative-decoding speedup is
15
+ possible out of the box. This repo adds one back by transplanting
16
+ [Qwen/Qwen3.6-35B-A3B](https://huggingface.co/Qwen/Qwen3.6-35B-A3B)'s own trained MTP head onto
17
+ KAT-Coder. This is architecturally clean, not a hack: every relevant dimension (hidden_size,
18
+ expert count, attention/MoE shapes) matches exactly between the two models, since KAT-Coder is
19
+ itself built on the Qwen3.6-35B-A3B backbone.
20
+
21
+ **This is the naive, un-fine-tuned transplant** — the MTP head's weights are copied directly from
22
+ stock Qwen3.6 with zero training on KAT-Coder's own hidden-state distribution. A fine-tuning pass
23
+ (freezing KAT-Coder's own 40 layers entirely, training only this ~850M-parameter head) is a
24
+ planned follow-up; this repo documents the honest baseline before that.
25
+
26
+ ## What's actually in this repo
27
+
28
+ Just **one new shard** (`model-00014-of-mtp.safetensors`, 1.69GB) containing the 19 MTP-related
29
+ tensors, plus a `config.json`/`model.safetensors.index.json` already merged to reference it
30
+ alongside KAT-Coder's own 13 original shards. Nothing else was touched — KAT-Coder's own 13
31
+ shards are byte-identical to the original release; this is a drop-in addition, not a full
32
+ re-upload of the 65GB checkpoint.
33
+
34
+ **To use**: put this repo's 3 files into a local copy of
35
+ [Kwaipilot/KAT-Coder-V2.5-Dev](https://huggingface.co/Kwaipilot/KAT-Coder-V2.5-Dev) alongside its
36
+ own 13 `model-*-of-00013.safetensors` shards (the `config.json`/index here already reference all
37
+ 14 shards together).
38
+
39
+ ## Baseline: draft-acceptance rate (before fine-tuning)
40
+
41
+ Measured via `llama-server --spec-type draft-mtp --spec-draft-n-max 2` on an APEX i-quality quant
42
+ (4.67 bpw) built from this checkpoint, 5 real from-scratch coding prompts, `n_predict=400` each:
43
+
44
+ | prompt | draft tokens | accepted | rate | tok/s |
45
+ |---|---:|---:|---:|---:|
46
+ | binary search tree (insert/delete/traverse) | 286 | 255 | 89.2% | 105.5 |
47
+ | CSV parser (stdlib only) | 114 | 84 | 73.7% | 94.6 |
48
+ | retry decorator w/ exponential backoff | 188 | 152 | 80.9% | 100.6 |
49
+ | merge two sorted linked lists | 74 | 58 | 78.4% | 97.6 |
50
+ | thread-safe LRU cache | 360 | 218 | 60.6% | 85.9 |
51
+ | **overall** | **1022** | **767** | **75.1%** | — |
52
+
53
+ For reference, the same KAT-Coder quant tier **without** any MTP head runs at ~70.8 tok/s solo
54
+ decode speed (measured separately, no speculative decoding available at all). So even this
55
+ un-fine-tuned transplant is already a real ~20-40% speedup, not a wash — acceptance rate varies
56
+ by task in a way that tracks predictability (the BST task, mostly standard tree-traversal
57
+ boilerplate, hits 89%; the LRU cache, with genuine locking/eviction logic, is the hardest at 61%).
58
+
59
+ ## Attribution
60
+
61
+ - KAT-Coder base model: **Kwaipilot** — [Kwaipilot/KAT-Coder-V2.5-Dev](https://huggingface.co/Kwaipilot/KAT-Coder-V2.5-Dev) (Apache-2.0).
62
+ - MTP head weights: **Qwen** — [Qwen/Qwen3.6-35B-A3B](https://huggingface.co/Qwen/Qwen3.6-35B-A3B) (Apache-2.0), transplanted unmodified.
63
+ - Quantization/serving: **llama.cpp** ([ggml-org](https://github.com/ggml-org/llama.cpp)).
64
+
65
+ Unofficial community experiment; not affiliated with or endorsed by Kwaipilot or Qwen.