sdougbrown commited on
Commit
4ced104
·
verified ·
1 Parent(s): 547785d

Upload folder using huggingface_hub

Browse files
Files changed (9) hide show
  1. .gitattributes +1 -33
  2. LICENSE +202 -0
  3. README.md +146 -0
  4. SHA256SUMS +8 -0
  5. config.json +77 -0
  6. config.py +105 -0
  7. model.safetensors +3 -0
  8. tensor_info.json +741 -0
  9. training_metadata.json +23 -0
.gitattributes CHANGED
@@ -1,35 +1,3 @@
1
- *.7z filter=lfs diff=lfs merge=lfs -text
2
- *.arrow filter=lfs diff=lfs merge=lfs -text
3
  *.bin filter=lfs diff=lfs merge=lfs -text
4
- *.bz2 filter=lfs diff=lfs merge=lfs -text
5
- *.ckpt filter=lfs diff=lfs merge=lfs -text
6
- *.ftz filter=lfs diff=lfs merge=lfs -text
7
- *.gz filter=lfs diff=lfs merge=lfs -text
8
- *.h5 filter=lfs diff=lfs merge=lfs -text
9
- *.joblib filter=lfs diff=lfs merge=lfs -text
10
- *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
- *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
- *.model filter=lfs diff=lfs merge=lfs -text
13
- *.msgpack filter=lfs diff=lfs merge=lfs -text
14
- *.npy filter=lfs diff=lfs merge=lfs -text
15
- *.npz filter=lfs diff=lfs merge=lfs -text
16
- *.onnx filter=lfs diff=lfs merge=lfs -text
17
- *.ot filter=lfs diff=lfs merge=lfs -text
18
- *.parquet filter=lfs diff=lfs merge=lfs -text
19
- *.pb filter=lfs diff=lfs merge=lfs -text
20
- *.pickle filter=lfs diff=lfs merge=lfs -text
21
- *.pkl filter=lfs diff=lfs merge=lfs -text
22
  *.pt filter=lfs diff=lfs merge=lfs -text
23
- *.pth filter=lfs diff=lfs merge=lfs -text
24
- *.rar filter=lfs diff=lfs merge=lfs -text
25
- *.safetensors filter=lfs diff=lfs merge=lfs -text
26
- saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
- *.tar.* filter=lfs diff=lfs merge=lfs -text
28
- *.tar filter=lfs diff=lfs merge=lfs -text
29
- *.tflite filter=lfs diff=lfs merge=lfs -text
30
- *.tgz filter=lfs diff=lfs merge=lfs -text
31
- *.wasm filter=lfs diff=lfs merge=lfs -text
32
- *.xz 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
 
1
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
 
2
  *.bin filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  *.pt filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
LICENSE ADDED
@@ -0,0 +1,202 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
README.md ADDED
@@ -0,0 +1,146 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ library_name: vllm
4
+ inference: false
5
+ base_model: CohereLabs/North-Mini-Code-1.0-w4a16
6
+ tags:
7
+ - north-mini-code
8
+ - speculative-decoding
9
+ - draft-model
10
+ - dflash
11
+ - code
12
+ ---
13
+
14
+ # North Mini Code 1.0 DFlash
15
+
16
+ This is a research-preview **auxiliary draft checkpoint** for speculative decoding with `CohereLabs/North-Mini-Code-1.0-w4a16`.
17
+ It is **not** a standalone language model and it cannot generate text without the North verifier/target model.
18
+ It will likely also work with `CohereLabs/North-Mini-Code-1.0-fp8` with slightly lower acceptance rates.
19
+
20
+ ## Training
21
+
22
+ This DFlash draft model was trained on 10,000 Magicoder prompts with on-policy supervision from North Mini Code.
23
+
24
+ ## Important Notes
25
+
26
+ - not a base model
27
+ - not a fine-tuning target for standalone inference
28
+ - not a correctness guarantee
29
+ - not byte-parity with target-only greedy decoding
30
+
31
+ ## Architecture
32
+
33
+ - speculator type: `DFlashDraftModel`
34
+ - draft layers: 5 Qwen3 sliding-window layers
35
+ - hidden size: 2048
36
+ - attention heads: 32
37
+ - key/value heads: 4
38
+ - head dim: 128
39
+ - MLP intermediate size: 768
40
+ - sliding window: 2048
41
+ - draft vocabulary: 32,000
42
+ - target vocabulary: 262,144
43
+ - block size: 8
44
+ - `sample_from_anchor`: `false`
45
+ - auxiliary target hidden-state taps: layers `[2, 24, 46]`
46
+ - tensors: 62
47
+ - serialized tensor elements: 733,274,624
48
+ - BF16 parameters: 732,980,480
49
+ - selected weight hash: `0ac5964c48003f2eab08c4691357dedc11227d88302ea7c76fc47aaddab6d5b9`
50
+
51
+ Largest tensors include the target embedding matrix, `lm_head.weight`, and the draft `fc.weight` projection.
52
+ The tensor inventory is recorded in `tensor_info.json`.
53
+
54
+ ## Training data and supervision
55
+
56
+ - prompt dataset: `ise-uiuc/Magicoder-Evol-Instruct-110K`
57
+ - license: Apache-2.0
58
+ - training rows: 10,000
59
+ - selected rows: 0-499, 600-5099, and 6100-11099
60
+ - locked holdout: rows 500-599, never trained
61
+ - supervision: on-policy responses and target hidden states generated once from `CohereLabs/North-Mini-Code-1.0-w4a16`
62
+ - response cap: 2,048 tokens
63
+ - target layers used for supervision: `[2, 24, 46]`
64
+ - later acceptance-mined continuation data: not included in this release checkpoint
65
+
66
+ Training metadata is recorded in `training_metadata.json`.
67
+
68
+ ## Matched GB10 benchmarks
69
+
70
+ These numbers come from the same matched serving contract on a GB10 (DGX Spark) machine running Marlin (which is suboptimal but predictable).
71
+ Compare the rows **within the same host and contract only**.
72
+ These absolute token/s values are not representative of maximum performance, simply a demonstration that the draft model works. :)
73
+
74
+ | Contract | Target-only | DFlash K3 | DFlash / target | DSpark K4 | DSpark / target |
75
+ | --- | ---: | ---: | ---: | ---: | ---: |
76
+ | C1 | 39.9129 tok/s | 75.5106 tok/s | 1.8919x | 79.7341 tok/s | 1.9977x |
77
+ | C2 | 78.9486 tok/s | 121.5232 tok/s | 1.5393x | 127.6174 tok/s | 1.6165x |
78
+
79
+ | Model | C1 EAL | C1 draft acceptance | C2 EAL | C2 draft acceptance |
80
+ | --- | ---: | ---: | ---: | ---: |
81
+ | DFlash K3 | 2.2947 | 43.16% | 2.2856 | 42.85% |
82
+ | DSpark K4 | 2.4800 | 37.00% | 2.4779 | 36.95% |
83
+
84
+ Expected acceptance length (EAL) is the mean emitted tokens per speculative verification step, including the target bonus token.
85
+
86
+ ## Additional result: NVIDIA RTX 3090
87
+
88
+ DFlash was also tested on an NVIDIA RTX 3090 under the same family of matched conditions.
89
+ That result is specific to DFlash; do not infer DSpark RTX 3090 portability from it.
90
+
91
+ - target-only: 110.2714 tok/s
92
+ - DFlash K3: 153.7188 tok/s
93
+ - official Eagle K3: 77.9583 tok/s
94
+
95
+ Also being realistic, you wouldn't try to serve this on a single 3090 anyway the model weights leave no room for context.
96
+
97
+ ## Default proposal depth
98
+
99
+ Default proposal depth is **K3**.
100
+ That is the selected deployment setting in `config.json` and the configuration used for the release evidence.
101
+ More speculative tokens hit diminishing returns past position 3 for this DFlash drafter. You're likely to see the best speed here.
102
+
103
+ ## Runtime boundary
104
+
105
+ This checkpoint is served as the **top-level model** because `config.json` already embeds the verifier reference.
106
+ Use it only with the companion North runtime, published at https://github.com/sdougbrown/north-mini-code-draft-runtime; this card does not describe a separate target-model `--speculative_config` deployment. The companion is a thin overlay on official vLLM 0.27.1 carrying PRs #49819 and #50937 (Cohere2MoE auxiliary hidden states, and an expert-bias loading fix), published as `ghcr.io/sdougbrown/north-mini-code-runtime:v0.27.1-49819-50937`.
107
+
108
+ ```bash
109
+ export DRAFT_MODEL="${DRAFT_MODEL:?set this to the downloaded DFlash directory or Hub model ID}"
110
+ export VLLM_USE_V2_MODEL_RUNNER=1
111
+ vllm serve "${DRAFT_MODEL}" \
112
+ --tensor-parallel-size 1 \
113
+ --max-model-len 320000 \
114
+ --tool-call-parser cohere_command4 \
115
+ --reasoning-parser cohere_command4 \
116
+ --enable-auto-tool-choice
117
+ ```
118
+
119
+ ## Limitations
120
+
121
+ - 32K draft vocabulary, not the 262,144-token target vocabulary
122
+ - target-dependent: cannot run standalone
123
+ - quantized greedy outputs are not guaranteed to match target-only greedy byte-for-byte
124
+ - throughput and acceptance do not establish correctness or response quality
125
+ - absolute throughput is host-specific
126
+
127
+ ## References
128
+
129
+ - North base model: https://huggingface.co/CohereLabs/North-Mini-Code-1.0-w4a16
130
+ - Magicoder dataset: https://huggingface.co/datasets/ise-uiuc/Magicoder-Evol-Instruct-110K
131
+ - Companion North runtime: https://github.com/sdougbrown/north-mini-code-draft-runtime
132
+ - Companion image: `ghcr.io/sdougbrown/north-mini-code-runtime:v0.27.1-49819-50937`
133
+ - Official Eagle card: https://huggingface.co/CohereLabs/North-Mini-Code-1.0-eagle
134
+ - Speculators: pinned commit `f7ec34182826bc89934ce710283421778022b74d`, version `0.6.0`
135
+
136
+ ## Files in this repo
137
+
138
+ - `README.md`
139
+ - `config.json`
140
+ - `config.py`
141
+ - `model.safetensors`
142
+ - `tensor_info.json`
143
+ - `training_metadata.json`
144
+ - `SHA256SUMS`
145
+ - `LICENSE`
146
+ - `.gitattributes`
SHA256SUMS ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ 078e723fbb0c75ae4271d24636729e6cea73c59781b0ca8a041a7303f2451513 config.json
2
+ 4fcc12b665f4cb711021b9ec8a490f30bc05201366dda8af90c4ff2dd0c31572 config.py
3
+ f5759376846057560e61ec2111f74f4f4d5904820c100541b935c244ea0c1396 .gitattributes
4
+ cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 LICENSE
5
+ 0ac5964c48003f2eab08c4691357dedc11227d88302ea7c76fc47aaddab6d5b9 model.safetensors
6
+ e90afc38ed2fe3b8966eab4cd201bc2e41de120fbdb8b735dd45808e360ab969 README.md
7
+ 307d55e820b8d1b61a031ec8c9d31b42c7612a53f1b9898cc290c72d91ab6366 tensor_info.json
8
+ 38be2119ec57a3871b1c706645a9deafa1be4b354157e71c6f4df2832ed71488 training_metadata.json
config.json ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "DFlashDraftModel"
4
+ ],
5
+ "auto_map": {
6
+ "": "config.DFlashSpeculatorConfig"
7
+ },
8
+ "aux_hidden_state_layer_ids": [
9
+ 2,
10
+ 24,
11
+ 46
12
+ ],
13
+ "block_size": 8,
14
+ "draft_vocab_size": 32000,
15
+ "dtype": "bfloat16",
16
+ "mask_token_id": 1,
17
+ "sample_from_anchor": false,
18
+ "sliding_window_non_causal": false,
19
+ "speculators_config": {
20
+ "algorithm": "dflash",
21
+ "default_proposal_method": "greedy",
22
+ "proposal_methods": [
23
+ {
24
+ "accept_tolerance": 0.0,
25
+ "proposal_type": "greedy",
26
+ "speculative_tokens": 3,
27
+ "verifier_accept_k": 1
28
+ }
29
+ ],
30
+ "verifier": {
31
+ "architectures": [
32
+ "Cohere2MoeForCausalLM"
33
+ ],
34
+ "name_or_path": "CohereLabs/North-Mini-Code-1.0-w4a16"
35
+ }
36
+ },
37
+ "speculators_model_type": "dflash",
38
+ "speculators_version": "0.6.0",
39
+ "target_hidden_size": null,
40
+ "tie_word_embeddings": false,
41
+ "transformer_layer_config": {
42
+ "attention_bias": false,
43
+ "attention_dropout": 0.0,
44
+ "bos_token_id": null,
45
+ "eos_token_id": null,
46
+ "head_dim": 128,
47
+ "hidden_act": "silu",
48
+ "hidden_size": 2048,
49
+ "initializer_range": 0.02,
50
+ "intermediate_size": 768,
51
+ "layer_types": [
52
+ "sliding_attention",
53
+ "sliding_attention",
54
+ "sliding_attention",
55
+ "sliding_attention",
56
+ "sliding_attention"
57
+ ],
58
+ "max_position_embeddings": 500000,
59
+ "max_window_layers": 28,
60
+ "model_type": "qwen3",
61
+ "num_attention_heads": 32,
62
+ "num_hidden_layers": 5,
63
+ "num_key_value_heads": 4,
64
+ "pad_token_id": null,
65
+ "rms_norm_eps": 1e-06,
66
+ "rope_parameters": {
67
+ "rope_theta": 50000,
68
+ "rope_type": "default"
69
+ },
70
+ "sliding_window": 2048,
71
+ "tie_word_embeddings": false,
72
+ "use_cache": true,
73
+ "use_sliding_window": true,
74
+ "vocab_size": 262144
75
+ },
76
+ "transformers_version": "5.13.1"
77
+ }
config.py ADDED
@@ -0,0 +1,105 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from typing import Any, Literal
2
+
3
+ from pydantic import Field, field_serializer, field_validator
4
+ from transformers import AutoConfig, PretrainedConfig
5
+ from transformers.models.qwen3.modeling_qwen3 import (
6
+ Qwen3Config,
7
+ )
8
+
9
+ from speculators import SpeculatorModelConfig
10
+
11
+ __all__ = [
12
+ "DFlashSpeculatorConfig",
13
+ ]
14
+
15
+
16
+ @SpeculatorModelConfig.register("dflash")
17
+ class DFlashSpeculatorConfig(SpeculatorModelConfig):
18
+ """
19
+ Configuration for DFlash speculator with vocabulary mapping.
20
+
21
+ DFlash features vocabulary mapping between the 32K draft vocabulary and
22
+ the 262,144-token target vocabulary, enabling reduced-vocabulary speculation.
23
+
24
+ :param transformer_layer_config: Configuration for the transformer decoder layer
25
+ :param draft_vocab_size: Size of draft model vocabulary for speculation
26
+ """
27
+
28
+ speculators_model_type: Literal["dflash"] = "dflash"
29
+ architectures: list[str] = Field(
30
+ default_factory=lambda: ["DFlashSpeculator"],
31
+ description="Model architectures that can load these weights",
32
+ )
33
+
34
+ transformer_layer_config: PretrainedConfig = Field(
35
+ default_factory=Qwen3Config,
36
+ description="Configuration for the transformer decoder layer",
37
+ )
38
+
39
+ draft_vocab_size: int = Field(
40
+ default=32000,
41
+ description="Size of draft model vocabulary for speculation",
42
+ )
43
+
44
+ block_size: int = Field(
45
+ default=8,
46
+ description=(
47
+ "Default size of the draft block predicted with a forward pass of the model"
48
+ ),
49
+ )
50
+
51
+ target_hidden_size: int | None = Field(
52
+ default=None,
53
+ description="Hidden size of the target model (if different from draft model)",
54
+ )
55
+
56
+ aux_hidden_state_layer_ids: list[int] | None = Field(
57
+ default=None,
58
+ description="Layer IDs of the DFlash auxiliary hidden state layers",
59
+ )
60
+
61
+ mask_token_id: int | None = Field(
62
+ default=None,
63
+ description="Token ID used for masking",
64
+ )
65
+
66
+ sliding_window_non_causal: bool = Field(
67
+ default=False,
68
+ description="Use non-causal (bidirectional) masking within draft blocks for "
69
+ "sliding window attention layers. Full attention layers are always "
70
+ "bidirectional.",
71
+ )
72
+
73
+ sample_from_anchor: bool = Field(
74
+ default=False,
75
+ description=(
76
+ "Whether to sample from the anchor position. "
77
+ "False: anchor is the bonus token, only mask tokens predict "
78
+ "(block_size-1 speculative tokens). "
79
+ "True: sample from anchor and all mask positions "
80
+ "(block_size speculative tokens). "
81
+ ),
82
+ )
83
+
84
+ @field_serializer("transformer_layer_config")
85
+ def serialize_transformer_config(self, value: PretrainedConfig) -> dict:
86
+ """Serialize transformer config to dict."""
87
+ return value.to_diff_dict()
88
+
89
+ @field_validator("transformer_layer_config", mode="before")
90
+ @classmethod
91
+ def validate_transformer_config(cls, value: Any) -> PretrainedConfig:
92
+ """Validate and convert transformer config."""
93
+ if isinstance(value, dict):
94
+ config_class: type[PretrainedConfig] = Qwen3Config
95
+ if "model_type" in value:
96
+ config_class = AutoConfig.for_model(
97
+ model_type=value["model_type"]
98
+ ).__class__
99
+ return config_class(**value)
100
+ return value
101
+
102
+ @property
103
+ def target_vocab_size(self) -> int:
104
+ """Get target vocabulary size from transformer config."""
105
+ return self.transformer_layer_config.vocab_size
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0ac5964c48003f2eab08c4691357dedc11227d88302ea7c76fc47aaddab6d5b9
3
+ size 1466485696
tensor_info.json ADDED
@@ -0,0 +1,741 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "algorithm": "dflash",
3
+ "base_model": "CohereLabs/North-Mini-Code-1.0-w4a16",
4
+ "checkpoint_epoch": 4,
5
+ "default_speculative_tokens": 3,
6
+ "largest_tensors": [
7
+ {
8
+ "dtype": "BF16",
9
+ "name": "embed_tokens.weight",
10
+ "parameters": 536870912,
11
+ "shape": [
12
+ 262144,
13
+ 2048
14
+ ]
15
+ },
16
+ {
17
+ "dtype": "BF16",
18
+ "name": "lm_head.weight",
19
+ "parameters": 65536000,
20
+ "shape": [
21
+ 32000,
22
+ 2048
23
+ ]
24
+ },
25
+ {
26
+ "dtype": "BF16",
27
+ "name": "fc.weight",
28
+ "parameters": 12582912,
29
+ "shape": [
30
+ 2048,
31
+ 6144
32
+ ]
33
+ },
34
+ {
35
+ "dtype": "BF16",
36
+ "name": "layers.0.self_attn.o_proj.weight",
37
+ "parameters": 8388608,
38
+ "shape": [
39
+ 2048,
40
+ 4096
41
+ ]
42
+ },
43
+ {
44
+ "dtype": "BF16",
45
+ "name": "layers.0.self_attn.q_proj.weight",
46
+ "parameters": 8388608,
47
+ "shape": [
48
+ 4096,
49
+ 2048
50
+ ]
51
+ },
52
+ {
53
+ "dtype": "BF16",
54
+ "name": "layers.1.self_attn.o_proj.weight",
55
+ "parameters": 8388608,
56
+ "shape": [
57
+ 2048,
58
+ 4096
59
+ ]
60
+ },
61
+ {
62
+ "dtype": "BF16",
63
+ "name": "layers.1.self_attn.q_proj.weight",
64
+ "parameters": 8388608,
65
+ "shape": [
66
+ 4096,
67
+ 2048
68
+ ]
69
+ },
70
+ {
71
+ "dtype": "BF16",
72
+ "name": "layers.2.self_attn.o_proj.weight",
73
+ "parameters": 8388608,
74
+ "shape": [
75
+ 2048,
76
+ 4096
77
+ ]
78
+ },
79
+ {
80
+ "dtype": "BF16",
81
+ "name": "layers.2.self_attn.q_proj.weight",
82
+ "parameters": 8388608,
83
+ "shape": [
84
+ 4096,
85
+ 2048
86
+ ]
87
+ },
88
+ {
89
+ "dtype": "BF16",
90
+ "name": "layers.3.self_attn.o_proj.weight",
91
+ "parameters": 8388608,
92
+ "shape": [
93
+ 2048,
94
+ 4096
95
+ ]
96
+ },
97
+ {
98
+ "dtype": "BF16",
99
+ "name": "layers.3.self_attn.q_proj.weight",
100
+ "parameters": 8388608,
101
+ "shape": [
102
+ 4096,
103
+ 2048
104
+ ]
105
+ },
106
+ {
107
+ "dtype": "BF16",
108
+ "name": "layers.4.self_attn.o_proj.weight",
109
+ "parameters": 8388608,
110
+ "shape": [
111
+ 2048,
112
+ 4096
113
+ ]
114
+ },
115
+ {
116
+ "dtype": "BF16",
117
+ "name": "layers.4.self_attn.q_proj.weight",
118
+ "parameters": 8388608,
119
+ "shape": [
120
+ 4096,
121
+ 2048
122
+ ]
123
+ },
124
+ {
125
+ "dtype": "BF16",
126
+ "name": "layers.0.mlp.down_proj.weight",
127
+ "parameters": 1572864,
128
+ "shape": [
129
+ 2048,
130
+ 768
131
+ ]
132
+ },
133
+ {
134
+ "dtype": "BF16",
135
+ "name": "layers.0.mlp.gate_proj.weight",
136
+ "parameters": 1572864,
137
+ "shape": [
138
+ 768,
139
+ 2048
140
+ ]
141
+ },
142
+ {
143
+ "dtype": "BF16",
144
+ "name": "layers.0.mlp.up_proj.weight",
145
+ "parameters": 1572864,
146
+ "shape": [
147
+ 768,
148
+ 2048
149
+ ]
150
+ },
151
+ {
152
+ "dtype": "BF16",
153
+ "name": "layers.1.mlp.down_proj.weight",
154
+ "parameters": 1572864,
155
+ "shape": [
156
+ 2048,
157
+ 768
158
+ ]
159
+ },
160
+ {
161
+ "dtype": "BF16",
162
+ "name": "layers.1.mlp.gate_proj.weight",
163
+ "parameters": 1572864,
164
+ "shape": [
165
+ 768,
166
+ 2048
167
+ ]
168
+ },
169
+ {
170
+ "dtype": "BF16",
171
+ "name": "layers.1.mlp.up_proj.weight",
172
+ "parameters": 1572864,
173
+ "shape": [
174
+ 768,
175
+ 2048
176
+ ]
177
+ },
178
+ {
179
+ "dtype": "BF16",
180
+ "name": "layers.2.mlp.down_proj.weight",
181
+ "parameters": 1572864,
182
+ "shape": [
183
+ 2048,
184
+ 768
185
+ ]
186
+ }
187
+ ],
188
+ "model_family": "North Mini Code speculative draft",
189
+ "model_file": {
190
+ "name": "model.safetensors",
191
+ "safetensors_metadata": {
192
+ "format": "pt"
193
+ },
194
+ "sha256": "0ac5964c48003f2eab08c4691357dedc11227d88302ea7c76fc47aaddab6d5b9",
195
+ "size_bytes": 1466485696
196
+ },
197
+ "parameter_count": 733274624,
198
+ "parameters_by_dtype": {
199
+ "BF16": 732980480,
200
+ "BOOL": 262144,
201
+ "I64": 32000
202
+ },
203
+ "schema_version": 1,
204
+ "tensor_count": 62,
205
+ "tensors": [
206
+ {
207
+ "dtype": "I64",
208
+ "name": "d2t",
209
+ "parameters": 32000,
210
+ "shape": [
211
+ 32000
212
+ ]
213
+ },
214
+ {
215
+ "dtype": "BF16",
216
+ "name": "embed_tokens.weight",
217
+ "parameters": 536870912,
218
+ "shape": [
219
+ 262144,
220
+ 2048
221
+ ]
222
+ },
223
+ {
224
+ "dtype": "BF16",
225
+ "name": "fc.weight",
226
+ "parameters": 12582912,
227
+ "shape": [
228
+ 2048,
229
+ 6144
230
+ ]
231
+ },
232
+ {
233
+ "dtype": "BF16",
234
+ "name": "hidden_norm.weight",
235
+ "parameters": 2048,
236
+ "shape": [
237
+ 2048
238
+ ]
239
+ },
240
+ {
241
+ "dtype": "BF16",
242
+ "name": "layers.0.input_layernorm.weight",
243
+ "parameters": 2048,
244
+ "shape": [
245
+ 2048
246
+ ]
247
+ },
248
+ {
249
+ "dtype": "BF16",
250
+ "name": "layers.0.mlp.down_proj.weight",
251
+ "parameters": 1572864,
252
+ "shape": [
253
+ 2048,
254
+ 768
255
+ ]
256
+ },
257
+ {
258
+ "dtype": "BF16",
259
+ "name": "layers.0.mlp.gate_proj.weight",
260
+ "parameters": 1572864,
261
+ "shape": [
262
+ 768,
263
+ 2048
264
+ ]
265
+ },
266
+ {
267
+ "dtype": "BF16",
268
+ "name": "layers.0.mlp.up_proj.weight",
269
+ "parameters": 1572864,
270
+ "shape": [
271
+ 768,
272
+ 2048
273
+ ]
274
+ },
275
+ {
276
+ "dtype": "BF16",
277
+ "name": "layers.0.post_attention_layernorm.weight",
278
+ "parameters": 2048,
279
+ "shape": [
280
+ 2048
281
+ ]
282
+ },
283
+ {
284
+ "dtype": "BF16",
285
+ "name": "layers.0.self_attn.k_norm.weight",
286
+ "parameters": 128,
287
+ "shape": [
288
+ 128
289
+ ]
290
+ },
291
+ {
292
+ "dtype": "BF16",
293
+ "name": "layers.0.self_attn.k_proj.weight",
294
+ "parameters": 1048576,
295
+ "shape": [
296
+ 512,
297
+ 2048
298
+ ]
299
+ },
300
+ {
301
+ "dtype": "BF16",
302
+ "name": "layers.0.self_attn.o_proj.weight",
303
+ "parameters": 8388608,
304
+ "shape": [
305
+ 2048,
306
+ 4096
307
+ ]
308
+ },
309
+ {
310
+ "dtype": "BF16",
311
+ "name": "layers.0.self_attn.q_norm.weight",
312
+ "parameters": 128,
313
+ "shape": [
314
+ 128
315
+ ]
316
+ },
317
+ {
318
+ "dtype": "BF16",
319
+ "name": "layers.0.self_attn.q_proj.weight",
320
+ "parameters": 8388608,
321
+ "shape": [
322
+ 4096,
323
+ 2048
324
+ ]
325
+ },
326
+ {
327
+ "dtype": "BF16",
328
+ "name": "layers.0.self_attn.v_proj.weight",
329
+ "parameters": 1048576,
330
+ "shape": [
331
+ 512,
332
+ 2048
333
+ ]
334
+ },
335
+ {
336
+ "dtype": "BF16",
337
+ "name": "layers.1.input_layernorm.weight",
338
+ "parameters": 2048,
339
+ "shape": [
340
+ 2048
341
+ ]
342
+ },
343
+ {
344
+ "dtype": "BF16",
345
+ "name": "layers.1.mlp.down_proj.weight",
346
+ "parameters": 1572864,
347
+ "shape": [
348
+ 2048,
349
+ 768
350
+ ]
351
+ },
352
+ {
353
+ "dtype": "BF16",
354
+ "name": "layers.1.mlp.gate_proj.weight",
355
+ "parameters": 1572864,
356
+ "shape": [
357
+ 768,
358
+ 2048
359
+ ]
360
+ },
361
+ {
362
+ "dtype": "BF16",
363
+ "name": "layers.1.mlp.up_proj.weight",
364
+ "parameters": 1572864,
365
+ "shape": [
366
+ 768,
367
+ 2048
368
+ ]
369
+ },
370
+ {
371
+ "dtype": "BF16",
372
+ "name": "layers.1.post_attention_layernorm.weight",
373
+ "parameters": 2048,
374
+ "shape": [
375
+ 2048
376
+ ]
377
+ },
378
+ {
379
+ "dtype": "BF16",
380
+ "name": "layers.1.self_attn.k_norm.weight",
381
+ "parameters": 128,
382
+ "shape": [
383
+ 128
384
+ ]
385
+ },
386
+ {
387
+ "dtype": "BF16",
388
+ "name": "layers.1.self_attn.k_proj.weight",
389
+ "parameters": 1048576,
390
+ "shape": [
391
+ 512,
392
+ 2048
393
+ ]
394
+ },
395
+ {
396
+ "dtype": "BF16",
397
+ "name": "layers.1.self_attn.o_proj.weight",
398
+ "parameters": 8388608,
399
+ "shape": [
400
+ 2048,
401
+ 4096
402
+ ]
403
+ },
404
+ {
405
+ "dtype": "BF16",
406
+ "name": "layers.1.self_attn.q_norm.weight",
407
+ "parameters": 128,
408
+ "shape": [
409
+ 128
410
+ ]
411
+ },
412
+ {
413
+ "dtype": "BF16",
414
+ "name": "layers.1.self_attn.q_proj.weight",
415
+ "parameters": 8388608,
416
+ "shape": [
417
+ 4096,
418
+ 2048
419
+ ]
420
+ },
421
+ {
422
+ "dtype": "BF16",
423
+ "name": "layers.1.self_attn.v_proj.weight",
424
+ "parameters": 1048576,
425
+ "shape": [
426
+ 512,
427
+ 2048
428
+ ]
429
+ },
430
+ {
431
+ "dtype": "BF16",
432
+ "name": "layers.2.input_layernorm.weight",
433
+ "parameters": 2048,
434
+ "shape": [
435
+ 2048
436
+ ]
437
+ },
438
+ {
439
+ "dtype": "BF16",
440
+ "name": "layers.2.mlp.down_proj.weight",
441
+ "parameters": 1572864,
442
+ "shape": [
443
+ 2048,
444
+ 768
445
+ ]
446
+ },
447
+ {
448
+ "dtype": "BF16",
449
+ "name": "layers.2.mlp.gate_proj.weight",
450
+ "parameters": 1572864,
451
+ "shape": [
452
+ 768,
453
+ 2048
454
+ ]
455
+ },
456
+ {
457
+ "dtype": "BF16",
458
+ "name": "layers.2.mlp.up_proj.weight",
459
+ "parameters": 1572864,
460
+ "shape": [
461
+ 768,
462
+ 2048
463
+ ]
464
+ },
465
+ {
466
+ "dtype": "BF16",
467
+ "name": "layers.2.post_attention_layernorm.weight",
468
+ "parameters": 2048,
469
+ "shape": [
470
+ 2048
471
+ ]
472
+ },
473
+ {
474
+ "dtype": "BF16",
475
+ "name": "layers.2.self_attn.k_norm.weight",
476
+ "parameters": 128,
477
+ "shape": [
478
+ 128
479
+ ]
480
+ },
481
+ {
482
+ "dtype": "BF16",
483
+ "name": "layers.2.self_attn.k_proj.weight",
484
+ "parameters": 1048576,
485
+ "shape": [
486
+ 512,
487
+ 2048
488
+ ]
489
+ },
490
+ {
491
+ "dtype": "BF16",
492
+ "name": "layers.2.self_attn.o_proj.weight",
493
+ "parameters": 8388608,
494
+ "shape": [
495
+ 2048,
496
+ 4096
497
+ ]
498
+ },
499
+ {
500
+ "dtype": "BF16",
501
+ "name": "layers.2.self_attn.q_norm.weight",
502
+ "parameters": 128,
503
+ "shape": [
504
+ 128
505
+ ]
506
+ },
507
+ {
508
+ "dtype": "BF16",
509
+ "name": "layers.2.self_attn.q_proj.weight",
510
+ "parameters": 8388608,
511
+ "shape": [
512
+ 4096,
513
+ 2048
514
+ ]
515
+ },
516
+ {
517
+ "dtype": "BF16",
518
+ "name": "layers.2.self_attn.v_proj.weight",
519
+ "parameters": 1048576,
520
+ "shape": [
521
+ 512,
522
+ 2048
523
+ ]
524
+ },
525
+ {
526
+ "dtype": "BF16",
527
+ "name": "layers.3.input_layernorm.weight",
528
+ "parameters": 2048,
529
+ "shape": [
530
+ 2048
531
+ ]
532
+ },
533
+ {
534
+ "dtype": "BF16",
535
+ "name": "layers.3.mlp.down_proj.weight",
536
+ "parameters": 1572864,
537
+ "shape": [
538
+ 2048,
539
+ 768
540
+ ]
541
+ },
542
+ {
543
+ "dtype": "BF16",
544
+ "name": "layers.3.mlp.gate_proj.weight",
545
+ "parameters": 1572864,
546
+ "shape": [
547
+ 768,
548
+ 2048
549
+ ]
550
+ },
551
+ {
552
+ "dtype": "BF16",
553
+ "name": "layers.3.mlp.up_proj.weight",
554
+ "parameters": 1572864,
555
+ "shape": [
556
+ 768,
557
+ 2048
558
+ ]
559
+ },
560
+ {
561
+ "dtype": "BF16",
562
+ "name": "layers.3.post_attention_layernorm.weight",
563
+ "parameters": 2048,
564
+ "shape": [
565
+ 2048
566
+ ]
567
+ },
568
+ {
569
+ "dtype": "BF16",
570
+ "name": "layers.3.self_attn.k_norm.weight",
571
+ "parameters": 128,
572
+ "shape": [
573
+ 128
574
+ ]
575
+ },
576
+ {
577
+ "dtype": "BF16",
578
+ "name": "layers.3.self_attn.k_proj.weight",
579
+ "parameters": 1048576,
580
+ "shape": [
581
+ 512,
582
+ 2048
583
+ ]
584
+ },
585
+ {
586
+ "dtype": "BF16",
587
+ "name": "layers.3.self_attn.o_proj.weight",
588
+ "parameters": 8388608,
589
+ "shape": [
590
+ 2048,
591
+ 4096
592
+ ]
593
+ },
594
+ {
595
+ "dtype": "BF16",
596
+ "name": "layers.3.self_attn.q_norm.weight",
597
+ "parameters": 128,
598
+ "shape": [
599
+ 128
600
+ ]
601
+ },
602
+ {
603
+ "dtype": "BF16",
604
+ "name": "layers.3.self_attn.q_proj.weight",
605
+ "parameters": 8388608,
606
+ "shape": [
607
+ 4096,
608
+ 2048
609
+ ]
610
+ },
611
+ {
612
+ "dtype": "BF16",
613
+ "name": "layers.3.self_attn.v_proj.weight",
614
+ "parameters": 1048576,
615
+ "shape": [
616
+ 512,
617
+ 2048
618
+ ]
619
+ },
620
+ {
621
+ "dtype": "BF16",
622
+ "name": "layers.4.input_layernorm.weight",
623
+ "parameters": 2048,
624
+ "shape": [
625
+ 2048
626
+ ]
627
+ },
628
+ {
629
+ "dtype": "BF16",
630
+ "name": "layers.4.mlp.down_proj.weight",
631
+ "parameters": 1572864,
632
+ "shape": [
633
+ 2048,
634
+ 768
635
+ ]
636
+ },
637
+ {
638
+ "dtype": "BF16",
639
+ "name": "layers.4.mlp.gate_proj.weight",
640
+ "parameters": 1572864,
641
+ "shape": [
642
+ 768,
643
+ 2048
644
+ ]
645
+ },
646
+ {
647
+ "dtype": "BF16",
648
+ "name": "layers.4.mlp.up_proj.weight",
649
+ "parameters": 1572864,
650
+ "shape": [
651
+ 768,
652
+ 2048
653
+ ]
654
+ },
655
+ {
656
+ "dtype": "BF16",
657
+ "name": "layers.4.post_attention_layernorm.weight",
658
+ "parameters": 2048,
659
+ "shape": [
660
+ 2048
661
+ ]
662
+ },
663
+ {
664
+ "dtype": "BF16",
665
+ "name": "layers.4.self_attn.k_norm.weight",
666
+ "parameters": 128,
667
+ "shape": [
668
+ 128
669
+ ]
670
+ },
671
+ {
672
+ "dtype": "BF16",
673
+ "name": "layers.4.self_attn.k_proj.weight",
674
+ "parameters": 1048576,
675
+ "shape": [
676
+ 512,
677
+ 2048
678
+ ]
679
+ },
680
+ {
681
+ "dtype": "BF16",
682
+ "name": "layers.4.self_attn.o_proj.weight",
683
+ "parameters": 8388608,
684
+ "shape": [
685
+ 2048,
686
+ 4096
687
+ ]
688
+ },
689
+ {
690
+ "dtype": "BF16",
691
+ "name": "layers.4.self_attn.q_norm.weight",
692
+ "parameters": 128,
693
+ "shape": [
694
+ 128
695
+ ]
696
+ },
697
+ {
698
+ "dtype": "BF16",
699
+ "name": "layers.4.self_attn.q_proj.weight",
700
+ "parameters": 8388608,
701
+ "shape": [
702
+ 4096,
703
+ 2048
704
+ ]
705
+ },
706
+ {
707
+ "dtype": "BF16",
708
+ "name": "layers.4.self_attn.v_proj.weight",
709
+ "parameters": 1048576,
710
+ "shape": [
711
+ 512,
712
+ 2048
713
+ ]
714
+ },
715
+ {
716
+ "dtype": "BF16",
717
+ "name": "lm_head.weight",
718
+ "parameters": 65536000,
719
+ "shape": [
720
+ 32000,
721
+ 2048
722
+ ]
723
+ },
724
+ {
725
+ "dtype": "BF16",
726
+ "name": "norm.weight",
727
+ "parameters": 2048,
728
+ "shape": [
729
+ 2048
730
+ ]
731
+ },
732
+ {
733
+ "dtype": "BOOL",
734
+ "name": "t2d",
735
+ "parameters": 262144,
736
+ "shape": [
737
+ 262144
738
+ ]
739
+ }
740
+ ]
741
+ }
training_metadata.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "algorithm": "dflash",
3
+ "base_model": "CohereLabs/North-Mini-Code-1.0-w4a16",
4
+ "block_size": 8,
5
+ "checkpoint_epoch": 4,
6
+ "default_speculative_tokens": 3,
7
+ "draft_vocabulary_size": 32000,
8
+ "model_sha256": "0ac5964c48003f2eab08c4691357dedc11227d88302ea7c76fc47aaddab6d5b9",
9
+ "schema_version": 1,
10
+ "seed": 0,
11
+ "selected_continuations_included": false,
12
+ "source_checkpoint": "/home/douglasbrown/Serve/hosts/bitey/training/north-dflash/runs/20260807T022043Z-w4a16-native-code10000-longdecode2048/checkpoints/4",
13
+ "status": "selected_10k_checkpoint",
14
+ "target_hidden_state_layer_ids": [
15
+ 2,
16
+ 24,
17
+ 46
18
+ ],
19
+ "target_supervision": "on-policy generations from CohereLabs/North-Mini-Code-1.0-w4a16",
20
+ "training_prompt_dataset": "ise-uiuc/Magicoder-Evol-Instruct-110K",
21
+ "training_prompt_dataset_license": "apache-2.0",
22
+ "training_rows": 10000
23
+ }