eousphoros commited on
Commit
4948b7d
·
verified ·
1 Parent(s): 63b2700

Add a DSpark draft head calibrated to this model (FP8) and its FP32 masters

Browse files
README.md CHANGED
@@ -21,3 +21,7 @@ python to_fp8.py . ../turnstone-lambda-671-fp8 --check
21
  ```
22
 
23
  `--check` compares the output with `SHA256SUMS.bf16` or `SHA256SUMS.fp8`. `mtp.safetensors` holds the MTP draft head; `--no-mtp` leaves it out. To merge a LoRA first: `python merge_lora.py . ADAPTER_DIR ../merged-fp32`.
 
 
 
 
 
21
  ```
22
 
23
  `--check` compares the output with `SHA256SUMS.bf16` or `SHA256SUMS.fp8`. `mtp.safetensors` holds the MTP draft head; `--no-mtp` leaves it out. To merge a LoRA first: `python merge_lora.py . ADAPTER_DIR ../merged-fp32`.
24
+
25
+ ## Speculative decoding
26
+
27
+ `dspark/` holds a DSpark draft head calibrated to this model (FP8; its FP32 masters are in `dspark-masters/`, details in `dspark.json`). With vLLM: `--speculative-config '{"model": "path/to/turnstone-lambda-671/dspark", "method": "dspark", "num_speculative_tokens": 5, "draft_sample_method": "probabilistic"}'`.
dspark-masters/README.md ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ # DSpark draft head: FP32 master weights
2
+
3
+ The FP32 master weights of the draft head in `../dspark/`, from the same training state (its FP8 file was trained with
4
+ the rounded weights in the forward). Not a servable folder: serve `../dspark/`. Checksums and details: `../dspark.json`.
dspark-masters/SHA256SUMS ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ 11003734d04969683941e92fa9ec4c501585452a9a357ebe0ee61c701cc27ecf model.safetensors
2
+ e38e7318d2a6c45a16c75f47513ecff3b7f4147982a3309ae0f6e8dc7b5fb4f9 README.md
dspark-masters/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:11003734d04969683941e92fa9ec4c501585452a9a357ebe0ee61c701cc27ecf
3
+ size 7953733076
dspark.json ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "what": "a DSpark draft head for speculative decoding, calibrated to this model",
3
+ "serve": {
4
+ "folder": "dspark",
5
+ "method": "dspark",
6
+ "num_speculative_tokens": 5,
7
+ "draft_sample_method": "probabilistic",
8
+ "vllm": ">= 0.34"
9
+ },
10
+ "base": {
11
+ "repo": "RedHatAI/Qwen3.8-27B-speculator.dspark",
12
+ "revision": "87ca2fdc",
13
+ "license": "apache-2.0",
14
+ "model_sha256": "6cf6f33fbb2dfd7e74f8009132f0a2a2b4c71cd6cce9360a7d4145c9218f1781"
15
+ },
16
+ "files": {
17
+ "dspark/model.safetensors": {
18
+ "sha256": "1a439c748135b7b352a36c5168147d18e70356135e244c09553dbd9d64fcbe67",
19
+ "bytes": 2115878466,
20
+ "format": "FP8 e4m3 with 128 x 128 block scales for the projection matrices, BF16 elsewhere; trained with these rounded weights in the forward (the file to serve)"
21
+ },
22
+ "dspark-masters/model.safetensors": {
23
+ "sha256": "11003734d04969683941e92fa9ec4c501585452a9a357ebe0ee61c701cc27ecf",
24
+ "bytes": 7953733076,
25
+ "format": "FP32 master weights of the same training state"
26
+ }
27
+ },
28
+ "training": {
29
+ "updates": 322,
30
+ "selected_update": 275,
31
+ "selected_by": "tokens per step on held-out replies, k=5",
32
+ "selected_value": 3.983,
33
+ "details": "dspark/calibration.json"
34
+ },
35
+ "measured": {
36
+ "setup": "this model's FP8 export, vLLM 0.34, one RTX PRO 6000, the same 200 prompts, k=5, probabilistic drafts",
37
+ "base_head_converted_to_fp8": {
38
+ "one_request": {
39
+ "tok_per_s": 138.5,
40
+ "tokens_per_step": 3.208
41
+ },
42
+ "sixteen_requests": {
43
+ "tok_per_s": 1219.2,
44
+ "tokens_per_step": 3.108
45
+ }
46
+ },
47
+ "this_head": {
48
+ "one_request": {
49
+ "tok_per_s": 142.3,
50
+ "tokens_per_step": 3.301
51
+ },
52
+ "sixteen_requests": {
53
+ "tok_per_s": 1234.2,
54
+ "tokens_per_step": 3.137
55
+ }
56
+ }
57
+ }
58
+ }
dspark/README.md ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # DSpark draft head for Turnstone Lambda 671
2
+
3
+ A block draft head (semi-autoregressive, with Markov and confidence heads) for speculative decoding, fine-tuned from
4
+ [RedHatAI/Qwen3.8-27B-speculator.dspark](https://huggingface.co/RedHatAI/Qwen3.8-27B-speculator.dspark) (Apache-2.0)
5
+ to match Turnstone Lambda 671's sampling distribution.
6
+
7
+ - `model.safetensors`: projection matrices in FP8 (e4m3, 128 x 128 block scales), BF16 elsewhere. The head was trained
8
+ with these rounded weights in the forward, so this is the file to serve.
9
+ - `calibration.json`: how the head was made.
10
+ - The FP32 master weights of the same training state are in `../dspark-masters/`, outside this folder, because vLLM
11
+ loads every safetensors file in a draft folder.
12
+
13
+ Serve with vLLM 0.34 or later, drafting 5 tokens with probabilistic draft sampling:
14
+
15
+ --speculative-config '{"model": "path/to/turnstone-lambda-671/dspark", "method": "dspark", "num_speculative_tokens": 5, "draft_sample_method": "probabilistic"}'
16
+
17
+ License: Apache-2.0, as the base head.
dspark/SHA256SUMS ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ 42c6f5b3f9fa1ce42da60fb801753bfd4e5c6197f7d464e1df5c1f9d3bee17f4 config.json
2
+ 2f4381ff2eb9de506c6ba09bc17f83d0aee871f75651f6303b2e4b581e9b4ca1 config.py
3
+ 2e00c11d3ff99f1d6696319b17c58d62b6f5d4d1a5cb933852e361590286803d calibration.json
4
+ 1a439c748135b7b352a36c5168147d18e70356135e244c09553dbd9d64fcbe67 model.safetensors
5
+ d7627ab99ea4d2cbdf639768ce1802e39551a8a916d6a7a8118faef404941bdc README.md
dspark/calibration.json ADDED
@@ -0,0 +1,281 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "written": "2026-11-26T14:50:42Z",
3
+ "format": "fp8 (e4m3, 128 x 128 block scales) projection matrices, BF16 elsewhere",
4
+ "base": {
5
+ "folder": "/heads/RedHatAI--Qwen3.8-27B-speculator.dspark",
6
+ "model_sha256": "6cf6f33fbb2dfd7e74f8009132f0a2a2b4c71cd6cce9360a7d4145c9218f1781",
7
+ "config_sha256": "6b2b39729c0afcac855b4b9808a85d8d323f2e4ca754749861c922dcc3c50a40"
8
+ },
9
+ "state": {
10
+ "file": "/data/step0011/train/best.pt",
11
+ "update": 275,
12
+ "metric": "tokens_per_step_uniform_k5",
13
+ "value": 3.982853643681106,
14
+ "fp8_aware": true
15
+ },
16
+ "target": "persona_lambda_27b_v10_eot_l61-63r4_mtp3_grpo-mixed-2",
17
+ "tensors": 62,
18
+ "quantized_matrices": 36,
19
+ "tensors_changed": 57,
20
+ "largest_mean_relative_change": 0.03049054906589716,
21
+ "model_sha256": "1a439c748135b7b352a36c5168147d18e70356135e244c09553dbd9d64fcbe67",
22
+ "masters_fp32": {
23
+ "folder": "/data/step0011/head.dspark.masters-fp32",
24
+ "model_sha256": "11003734d04969683941e92fa9ec4c501585452a9a357ebe0ee61c701cc27ecf"
25
+ },
26
+ "notes": {
27
+ "plan.json": {
28
+ "args": {
29
+ "model": "/model",
30
+ "head": "/heads/RedHatAI--Qwen3.8-27B-speculator.dspark",
31
+ "init": null,
32
+ "out": "/data/step0011/train",
33
+ "mode": "train",
34
+ "replies": [
35
+ "/data/step0011/replies.jsonl"
36
+ ],
37
+ "episodes": [
38
+ "/data/step0011/episodes.jsonl"
39
+ ],
40
+ "eval_replies": [
41
+ "/data/step0011/replies.jsonl"
42
+ ],
43
+ "heldout_fraction": 0.05,
44
+ "max_seq_tokens": 32768,
45
+ "block": 8,
46
+ "stride": 8,
47
+ "episode_stride": 0,
48
+ "max_anchors": 4096,
49
+ "anchors_per_update": 8192,
50
+ "epochs": 2.0,
51
+ "max_updates": 0,
52
+ "lr": 1e-05,
53
+ "min_lr": 1e-06,
54
+ "warmup": 10,
55
+ "clip": 1.0,
56
+ "weight_decay": 0.0,
57
+ "freeze": [],
58
+ "head_fp8": true,
59
+ "optimizer_device": "cpu",
60
+ "ce": 0.1,
61
+ "tv": 0.9,
62
+ "conf": 1.0,
63
+ "tv_target": "nucleus",
64
+ "gamma": 4.0,
65
+ "eval_every": 25,
66
+ "eval_stride": 16,
67
+ "eval_max_sequences": 60,
68
+ "patience": 3,
69
+ "min_gain": 0.002,
70
+ "save_every": 50,
71
+ "keep": 1,
72
+ "seed": 20261125,
73
+ "resume": false,
74
+ "device": "cuda",
75
+ "row_chunk": 256,
76
+ "anchor_chunk": 64,
77
+ "allow_kernel_packages": false,
78
+ "target_fp8": "/fp8",
79
+ "segment": 8192,
80
+ "target_dtype": "bfloat16"
81
+ },
82
+ "versions": {
83
+ "torch": "2.14.0+cu130",
84
+ "transformers": "5.22.2",
85
+ "safetensors": "0.8.0",
86
+ "kernel_packages": [],
87
+ "a_log": {
88
+ "loaded_as": {
89
+ "torch.bfloat16": 48
90
+ },
91
+ "restored": 48,
92
+ "bit_equal_to_file": true
93
+ },
94
+ "fp8_weights": {
95
+ "replaced": 400,
96
+ "skipped": 7,
97
+ "mean_relative_change": 0.022503346246667208,
98
+ "largest_relative_change": 0.02251635491847992
99
+ }
100
+ },
101
+ "head": {
102
+ "parameters": 1988431617,
103
+ "trainable": 1988431617,
104
+ "taps": [
105
+ 4,
106
+ 12,
107
+ 20,
108
+ 28,
109
+ 36,
110
+ 44,
111
+ 52,
112
+ 60
113
+ ],
114
+ "window": 2048,
115
+ "fp8_aware": true,
116
+ "base_is_fp8": false
117
+ },
118
+ "data": {
119
+ "train": {
120
+ "own:lambda": {
121
+ "sequences": 1683,
122
+ "tokens": 10375899,
123
+ "generated": 7751811,
124
+ "anchors": 7750128,
125
+ "cut_media": 0,
126
+ "cut_length": 51
127
+ },
128
+ "own:swe": {
129
+ "sequences": 281,
130
+ "tokens": 835982,
131
+ "generated": 32052,
132
+ "anchors": 31771,
133
+ "cut_media": 0,
134
+ "cut_length": 0
135
+ },
136
+ "own:math": {
137
+ "sequences": 99,
138
+ "tokens": 1071888,
139
+ "generated": 967689,
140
+ "anchors": 967590,
141
+ "cut_media": 0,
142
+ "cut_length": 3
143
+ },
144
+ "gym:music": {
145
+ "sequences": 30,
146
+ "tokens": 753320,
147
+ "generated": 747565,
148
+ "anchors": 747535,
149
+ "cut_media": 0,
150
+ "cut_length": 3
151
+ },
152
+ "gym:general": {
153
+ "sequences": 114,
154
+ "tokens": 3626424,
155
+ "generated": 446279,
156
+ "anchors": 445234,
157
+ "cut_media": 0,
158
+ "cut_length": 97
159
+ },
160
+ "gym:code": {
161
+ "sequences": 58,
162
+ "tokens": 1851379,
163
+ "generated": 703312,
164
+ "anchors": 702076,
165
+ "cut_media": 0,
166
+ "cut_length": 54
167
+ },
168
+ "gym:webdev": {
169
+ "sequences": 29,
170
+ "tokens": 929781,
171
+ "generated": 732259,
172
+ "anchors": 731681,
173
+ "cut_media": 9,
174
+ "cut_length": 20
175
+ },
176
+ "gym:righttorepair": {
177
+ "sequences": 56,
178
+ "tokens": 1676735,
179
+ "generated": 492642,
180
+ "anchors": 491529,
181
+ "cut_media": 0,
182
+ "cut_length": 38
183
+ }
184
+ },
185
+ "heldout": {
186
+ "own:lambda": {
187
+ "sequences": 48,
188
+ "tokens": 230053,
189
+ "generated": 156042,
190
+ "anchors": 155994,
191
+ "cut_media": 0,
192
+ "cut_length": 0
193
+ },
194
+ "own:swe": {
195
+ "sequences": 7,
196
+ "tokens": 22602,
197
+ "generated": 892,
198
+ "anchors": 885,
199
+ "cut_media": 0,
200
+ "cut_length": 0
201
+ },
202
+ "gym:general": {
203
+ "sequences": 2,
204
+ "tokens": 63462,
205
+ "generated": 12993,
206
+ "anchors": 12971,
207
+ "cut_media": 0,
208
+ "cut_length": 1
209
+ },
210
+ "gym:righttorepair": {
211
+ "sequences": 2,
212
+ "tokens": 60343,
213
+ "generated": 13443,
214
+ "anchors": 13411,
215
+ "cut_media": 0,
216
+ "cut_length": 1
217
+ },
218
+ "gym:code": {
219
+ "sequences": 1,
220
+ "tokens": 32768,
221
+ "generated": 3718,
222
+ "anchors": 3710,
223
+ "cut_media": 0,
224
+ "cut_length": 1
225
+ }
226
+ },
227
+ "eval": {
228
+ "own:lcb": {
229
+ "sequences": 14,
230
+ "tokens": 180752,
231
+ "generated": 170907,
232
+ "anchors": 170893,
233
+ "cut_media": 0,
234
+ "cut_length": 4
235
+ },
236
+ "own:xstest": {
237
+ "sequences": 14,
238
+ "tokens": 11142,
239
+ "generated": 10283,
240
+ "anchors": 10269,
241
+ "cut_media": 0,
242
+ "cut_length": 0
243
+ },
244
+ "own:ifbench": {
245
+ "sequences": 15,
246
+ "tokens": 92178,
247
+ "generated": 90415,
248
+ "anchors": 90400,
249
+ "cut_media": 0,
250
+ "cut_length": 0
251
+ },
252
+ "own:gpqa": {
253
+ "sequences": 17,
254
+ "tokens": 202181,
255
+ "generated": 194659,
256
+ "anchors": 194642,
257
+ "cut_media": 0,
258
+ "cut_length": 2
259
+ }
260
+ },
261
+ "counts": {
262
+ "cut_length": 334,
263
+ "dropped_no_generated_tokens": 25,
264
+ "cut_media": 9
265
+ }
266
+ },
267
+ "updates": {
268
+ "per_epoch": 161,
269
+ "total": 322
270
+ }
271
+ },
272
+ "done.json": {
273
+ "updates": 322,
274
+ "of": 322,
275
+ "stop_reason": "all updates done",
276
+ "best_update": 275,
277
+ "best": 3.982853643681106,
278
+ "tokens": 41867007
279
+ }
280
+ }
281
+ }
dspark/config.json ADDED
@@ -0,0 +1,118 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "DSparkDraftModel"
4
+ ],
5
+ "auto_map": {
6
+ "": "config.DSparkSpeculatorConfig"
7
+ },
8
+ "aux_hidden_state_layer_ids": [
9
+ 4,
10
+ 12,
11
+ 20,
12
+ 28,
13
+ 36,
14
+ 44,
15
+ 52,
16
+ 60
17
+ ],
18
+ "block_size": 8,
19
+ "confidence_head_with_markov": true,
20
+ "draft_vocab_size": 248320,
21
+ "dtype": "bfloat16",
22
+ "enable_confidence_head": true,
23
+ "markov_head_type": "vanilla",
24
+ "markov_rank": 256,
25
+ "mask_token_id": 248077,
26
+ "sample_from_anchor": true,
27
+ "sliding_window_non_causal": false,
28
+ "speculators_config": {
29
+ "algorithm": "dspark",
30
+ "default_proposal_method": "greedy",
31
+ "proposal_methods": [
32
+ {
33
+ "accept_tolerance": 0.0,
34
+ "proposal_type": "greedy",
35
+ "speculative_tokens": 8,
36
+ "verifier_accept_k": 1
37
+ }
38
+ ],
39
+ "verifier": {
40
+ "architectures": [
41
+ "Qwen3_5ForConditionalGeneration"
42
+ ],
43
+ "name_or_path": "Qwen/Qwen3.8-27B"
44
+ }
45
+ },
46
+ "speculators_model_type": "dspark",
47
+ "speculators_version": "0.9.0.dev28",
48
+ "target_hidden_size": null,
49
+ "tie_word_embeddings": false,
50
+ "transformer_layer_config": {
51
+ "attention_bias": false,
52
+ "attention_dropout": 0.0,
53
+ "bos_token_id": null,
54
+ "eos_token_id": null,
55
+ "head_dim": 256,
56
+ "hidden_act": "silu",
57
+ "hidden_size": 5120,
58
+ "initializer_range": 0.02,
59
+ "intermediate_size": 17408,
60
+ "layer_types": [
61
+ "sliding_attention",
62
+ "sliding_attention",
63
+ "sliding_attention",
64
+ "sliding_attention",
65
+ "sliding_attention"
66
+ ],
67
+ "max_position_embeddings": 262144,
68
+ "max_window_layers": 28,
69
+ "model_type": "qwen3",
70
+ "num_attention_heads": 20,
71
+ "num_hidden_layers": 5,
72
+ "num_key_value_heads": 4,
73
+ "pad_token_id": null,
74
+ "rms_norm_eps": 1e-06,
75
+ "rope_parameters": {
76
+ "mrope_section": [
77
+ 44,
78
+ 44,
79
+ 40
80
+ ],
81
+ "partial_rotary_factor": 1.0,
82
+ "rope_theta": 10000000,
83
+ "rope_type": "default"
84
+ },
85
+ "sliding_window": 2048,
86
+ "tie_word_embeddings": false,
87
+ "use_cache": true,
88
+ "use_sliding_window": true,
89
+ "vocab_size": 248320,
90
+ "quantization_config": {
91
+ "activation_scheme": "dynamic",
92
+ "fmt": "e4m3",
93
+ "quant_method": "fp8",
94
+ "weight_block_size": [
95
+ 128,
96
+ 128
97
+ ],
98
+ "modules_to_not_convert": [
99
+ "model.markov_head.markov_w2",
100
+ "markov_head.markov_w2"
101
+ ]
102
+ }
103
+ },
104
+ "transformers_version": "5.16.1",
105
+ "quantization_config": {
106
+ "activation_scheme": "dynamic",
107
+ "fmt": "e4m3",
108
+ "quant_method": "fp8",
109
+ "weight_block_size": [
110
+ 128,
111
+ 128
112
+ ],
113
+ "modules_to_not_convert": [
114
+ "model.markov_head.markov_w2",
115
+ "markov_head.markov_w2"
116
+ ]
117
+ }
118
+ }
dspark/config.py ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from typing import Literal
2
+
3
+ from pydantic import Field
4
+
5
+ from speculators import SpeculatorModelConfig
6
+ from speculators.models.dflash.config import DFlashSpeculatorConfig
7
+
8
+ __all__ = [
9
+ "DSparkSpeculatorConfig",
10
+ ]
11
+
12
+
13
+ @SpeculatorModelConfig.register("dspark")
14
+ class DSparkSpeculatorConfig(DFlashSpeculatorConfig):
15
+ """DFlash config plus a Markov logit-bias head and a confidence head.
16
+
17
+ The Markov head lets each draft position condition on previously sampled
18
+ tokens within the block; the confidence head predicts the per-position
19
+ acceptance probability. All DFlash fields are inherited unchanged.
20
+ """
21
+
22
+ speculators_model_type: Literal["dspark"] = "dspark" # type: ignore[assignment]
23
+ architectures: list[str] = Field(
24
+ default_factory=lambda: ["DSparkSpeculator"],
25
+ description="Model architectures that can load these weights",
26
+ )
27
+
28
+ sample_from_anchor: bool = Field(
29
+ default=True,
30
+ description=(
31
+ "Whether to sample from the anchor position. "
32
+ "False: anchor is the bonus token, only mask tokens predict "
33
+ "(block_size-1 speculative tokens). "
34
+ "True: sample from anchor and all mask positions "
35
+ "(block_size speculative tokens). "
36
+ "Default True matches DeepSeek/DeepSpec convention."
37
+ ),
38
+ )
39
+
40
+ # Sequential (Markov) head.
41
+ markov_rank: int = Field(
42
+ default=256,
43
+ description=(
44
+ "Low-rank dimension of the Markov logit-bias factorization B = W1 @ W2. "
45
+ "Set to 0 to disable the sequential head (pure DFlash drafting)."
46
+ ),
47
+ )
48
+ markov_head_type: Literal["vanilla", "gated", "rnn"] = Field(
49
+ default="vanilla",
50
+ description=(
51
+ "Sequential head variant: 'vanilla' (first-order Markov bias), 'gated' "
52
+ "(hidden-gated bias), or 'rnn' (recurrent state over the block)."
53
+ ),
54
+ )
55
+
56
+ # Confidence head.
57
+ enable_confidence_head: bool = Field(
58
+ default=True,
59
+ description="Whether to attach the per-position acceptance-probability head.",
60
+ )
61
+ confidence_head_with_markov: bool = Field(
62
+ default=True,
63
+ description=(
64
+ "Concatenate the Markov previous-token embedding with the backbone "
65
+ "hidden state as the confidence-head input."
66
+ ),
67
+ )
dspark/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1a439c748135b7b352a36c5168147d18e70356135e244c09553dbd9d64fcbe67
3
+ size 2115878466