doppler-gpu 0.4.10 → 0.4.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +34 -0
- package/README.md +27 -0
- package/models/catalog.json +612 -7
- package/package.json +13 -1
- package/src/client/doppler-registry.js +6 -0
- package/src/client/doppler-registry.json +126 -4
- package/src/client/runtime/lora.d.ts +10 -0
- package/src/client/runtime/lora.js +64 -0
- package/src/client/runtime/model-manager.js +6 -167
- package/src/client/runtime/model-session.d.ts +3 -1
- package/src/client/runtime/model-session.js +6 -0
- package/src/client/wrap-pipeline-handle.js +7 -0
- package/src/config/conversion/amplify/amplify-120m-f16-af32.json +516 -0
- package/src/config/conversion/esm/esm2-t12-35m-ur50d-f32-af32.json +571 -0
- package/src/config/conversion/esmc/esmc-300m-f32-af32.json +342 -0
- package/src/config/conversion/nucleotide-transformer/nucleotide-transformer-v2-50m-f32-af32.json +388 -0
- package/src/config/kernels/registry.json +52 -9
- package/src/config/merge.js +24 -0
- package/src/config/required-inference-fields-contract-check.js +2 -0
- package/src/config/schema/converter.schema.d.ts +7 -0
- package/src/config/schema/converter.schema.js +15 -0
- package/src/config/schema/inference.schema.d.ts +8 -0
- package/src/config/schema/manifest.schema.d.ts +32 -1
- package/src/config/schema/manifest.schema.js +26 -0
- package/src/converter/conversion-plan.js +15 -1
- package/src/converter/core.js +5 -4
- package/src/converter/source-tensor-rules.d.ts +50 -0
- package/src/converter/source-tensor-rules.js +180 -0
- package/src/converter/source-tokenizer.d.ts +45 -0
- package/src/converter/source-tokenizer.js +155 -0
- package/src/experimental/adapters/lora-loader.js +15 -0
- package/src/experimental/bridge/trainer-artifact-bridge.d.ts +2 -1
- package/src/experimental/bridge/trainer-artifact-bridge.js +35 -13
- package/src/inference/pipelines/text/attention/attn-config.js +2 -0
- package/src/inference/pipelines/text/attention/projections.js +161 -24
- package/src/inference/pipelines/text/attention/record.js +67 -9
- package/src/inference/pipelines/text/attention/run.js +60 -7
- package/src/inference/pipelines/text/attention/types.js +18 -9
- package/src/inference/pipelines/text/config.d.ts +5 -0
- package/src/inference/pipelines/text/config.js +91 -0
- package/src/inference/pipelines/text/ffn/dense.js +189 -2
- package/src/inference/pipelines/text/ffn/standard.js +50 -3
- package/src/inference/pipelines/text/generator-helpers.js +11 -1
- package/src/inference/pipelines/text/generator-runtime.js +63 -15
- package/src/inference/pipelines/text/generator-steps.js +3 -1
- package/src/inference/pipelines/text/generator.js +90 -3
- package/src/inference/pipelines/text/init-qkv-fusion.js +85 -1
- package/src/inference/pipelines/text/init.d.ts +2 -0
- package/src/inference/pipelines/text/init.js +2 -0
- package/src/inference/pipelines/text/layer.js +6 -0
- package/src/inference/pipelines/text/logits/cpu.d.ts +6 -0
- package/src/inference/pipelines/text/logits/cpu.js +22 -0
- package/src/inference/pipelines/text/logits/index.d.ts +1 -1
- package/src/inference/pipelines/text/logits/index.js +85 -11
- package/src/inference/pipelines/text/logits/types.d.ts +4 -0
- package/src/inference/pipelines/text/ops.js +32 -0
- package/src/inference/pipelines/text/types.d.ts +38 -0
- package/src/inference/pipelines/text/weights.d.ts +10 -0
- package/src/inference/pipelines/text/weights.js +33 -1
- package/src/inference/pipelines/text.d.ts +4 -2
- package/src/inference/pipelines/text.js +112 -0
- package/src/inference/tokenizers/behavior-flags.js +5 -1
- package/src/inference/tokenizers/bundled.js +99 -8
- package/src/loader/doppler-loader.d.ts +2 -0
- package/src/loader/doppler-loader.js +9 -0
- package/src/loader/final-weights-loader.d.ts +8 -0
- package/src/loader/final-weights-loader.js +42 -0
- package/src/loader/layer-loader.d.ts +6 -0
- package/src/loader/layer-loader.js +102 -3
- package/src/loader/loader-types.d.ts +15 -2
- package/src/tooling/node-converter.js +33 -1
- package/src/tooling/node-webgpu.js +85 -2
- package/src/version.js +1 -1
package/src/config/conversion/nucleotide-transformer/nucleotide-transformer-v2-50m-f32-af32.json
ADDED
|
@@ -0,0 +1,388 @@
|
|
|
1
|
+
{
|
|
2
|
+
"modelType": "embedding",
|
|
3
|
+
"output": {
|
|
4
|
+
"baseDir": "models/local",
|
|
5
|
+
"modelBaseId": "nucleotide-transformer-v2-50m-f32-af32",
|
|
6
|
+
"textOnly": true,
|
|
7
|
+
"fast": false
|
|
8
|
+
},
|
|
9
|
+
"architecture": {
|
|
10
|
+
"numLayers": 12,
|
|
11
|
+
"hiddenSize": 512,
|
|
12
|
+
"intermediateSize": 2048,
|
|
13
|
+
"numAttentionHeads": 16,
|
|
14
|
+
"numKeyValueHeads": 16,
|
|
15
|
+
"headDim": 32,
|
|
16
|
+
"vocabSize": 4107,
|
|
17
|
+
"maxSeqLen": 2050,
|
|
18
|
+
"ropeTheta": 10000
|
|
19
|
+
},
|
|
20
|
+
"quantization": {
|
|
21
|
+
"weights": "f32",
|
|
22
|
+
"embeddings": "f32",
|
|
23
|
+
"lmHead": "f32",
|
|
24
|
+
"q4kLayout": "row",
|
|
25
|
+
"computePrecision": "f32"
|
|
26
|
+
},
|
|
27
|
+
"sourceTokenizer": {
|
|
28
|
+
"kind": "greedy_vocab",
|
|
29
|
+
"vocabFile": "vocab.txt",
|
|
30
|
+
"specialTokens": {
|
|
31
|
+
"pad": "<pad>",
|
|
32
|
+
"bos": "<cls>",
|
|
33
|
+
"eos": null,
|
|
34
|
+
"unk": "<unk>",
|
|
35
|
+
"mask": "<mask>"
|
|
36
|
+
},
|
|
37
|
+
"addBosToken": true,
|
|
38
|
+
"addEosToken": false
|
|
39
|
+
},
|
|
40
|
+
"sourceTensors": {
|
|
41
|
+
"requireAll": true,
|
|
42
|
+
"rules": [
|
|
43
|
+
{
|
|
44
|
+
"kind": "rename",
|
|
45
|
+
"match": "^esm\\.embeddings\\.word_embeddings\\.weight$",
|
|
46
|
+
"replace": "model.embed_tokens.weight",
|
|
47
|
+
"expectedMatches": 1,
|
|
48
|
+
"role": "embedding",
|
|
49
|
+
"group": "embed"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"kind": "ignore",
|
|
53
|
+
"match": "^esm\\.embeddings\\.position_embeddings\\.weight$",
|
|
54
|
+
"expectedMatches": 1,
|
|
55
|
+
"reason": "The checkpoint declares rotary positions; the serialized absolute-position table is not read by the encoder."
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"kind": "rename",
|
|
59
|
+
"match": "^esm\\.encoder\\.emb_layer_norm_after\\.weight$",
|
|
60
|
+
"replace": "model.norm.weight",
|
|
61
|
+
"expectedMatches": 1,
|
|
62
|
+
"role": "norm",
|
|
63
|
+
"group": "head"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"kind": "rename",
|
|
67
|
+
"match": "^esm\\.encoder\\.emb_layer_norm_after\\.bias$",
|
|
68
|
+
"replace": "model.norm.bias",
|
|
69
|
+
"expectedMatches": 1,
|
|
70
|
+
"role": "other",
|
|
71
|
+
"group": "head"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"kind": "rename",
|
|
75
|
+
"match": "^esm\\.encoder\\.layer\\.(\\d+)\\.attention\\.LayerNorm\\.weight$",
|
|
76
|
+
"replace": "model.layers.$1.input_layernorm.weight",
|
|
77
|
+
"expectedMatches": 12
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"kind": "rename",
|
|
81
|
+
"match": "^esm\\.encoder\\.layer\\.(\\d+)\\.attention\\.LayerNorm\\.bias$",
|
|
82
|
+
"replace": "model.layers.$1.input_layernorm.bias",
|
|
83
|
+
"expectedMatches": 12
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"kind": "rename",
|
|
87
|
+
"match": "^esm\\.encoder\\.layer\\.(\\d+)\\.attention\\.self\\.query\\.weight$",
|
|
88
|
+
"replace": "model.layers.$1.self_attn.q_proj.weight",
|
|
89
|
+
"expectedMatches": 12
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"kind": "rename",
|
|
93
|
+
"match": "^esm\\.encoder\\.layer\\.(\\d+)\\.attention\\.self\\.query\\.bias$",
|
|
94
|
+
"replace": "model.layers.$1.self_attn.q_proj.bias",
|
|
95
|
+
"expectedMatches": 12
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"kind": "rename",
|
|
99
|
+
"match": "^esm\\.encoder\\.layer\\.(\\d+)\\.attention\\.self\\.key\\.weight$",
|
|
100
|
+
"replace": "model.layers.$1.self_attn.k_proj.weight",
|
|
101
|
+
"expectedMatches": 12
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"kind": "rename",
|
|
105
|
+
"match": "^esm\\.encoder\\.layer\\.(\\d+)\\.attention\\.self\\.key\\.bias$",
|
|
106
|
+
"replace": "model.layers.$1.self_attn.k_proj.bias",
|
|
107
|
+
"expectedMatches": 12
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"kind": "rename",
|
|
111
|
+
"match": "^esm\\.encoder\\.layer\\.(\\d+)\\.attention\\.self\\.value\\.weight$",
|
|
112
|
+
"replace": "model.layers.$1.self_attn.v_proj.weight",
|
|
113
|
+
"expectedMatches": 12
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"kind": "rename",
|
|
117
|
+
"match": "^esm\\.encoder\\.layer\\.(\\d+)\\.attention\\.self\\.value\\.bias$",
|
|
118
|
+
"replace": "model.layers.$1.self_attn.v_proj.bias",
|
|
119
|
+
"expectedMatches": 12
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"kind": "ignore",
|
|
123
|
+
"match": "^esm\\.encoder\\.layer\\.\\d+\\.attention\\.self\\.rotary_embeddings\\.inv_freq$",
|
|
124
|
+
"expectedMatches": 12,
|
|
125
|
+
"reason": "RoPE frequencies are deterministically generated from theta=10000 and headDim=32."
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"kind": "rename",
|
|
129
|
+
"match": "^esm\\.encoder\\.layer\\.(\\d+)\\.attention\\.output\\.dense\\.weight$",
|
|
130
|
+
"replace": "model.layers.$1.self_attn.o_proj.weight",
|
|
131
|
+
"expectedMatches": 12
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"kind": "rename",
|
|
135
|
+
"match": "^esm\\.encoder\\.layer\\.(\\d+)\\.attention\\.output\\.dense\\.bias$",
|
|
136
|
+
"replace": "model.layers.$1.self_attn.o_proj.bias",
|
|
137
|
+
"expectedMatches": 12
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"kind": "rename",
|
|
141
|
+
"match": "^esm\\.encoder\\.layer\\.(\\d+)\\.LayerNorm\\.weight$",
|
|
142
|
+
"replace": "model.layers.$1.post_attention_layernorm.weight",
|
|
143
|
+
"expectedMatches": 12
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"kind": "rename",
|
|
147
|
+
"match": "^esm\\.encoder\\.layer\\.(\\d+)\\.LayerNorm\\.bias$",
|
|
148
|
+
"replace": "model.layers.$1.post_attention_layernorm.bias",
|
|
149
|
+
"expectedMatches": 12
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"kind": "split",
|
|
153
|
+
"match": "^esm\\.encoder\\.layer\\.(\\d+)\\.intermediate\\.dense\\.weight$",
|
|
154
|
+
"axis": 0,
|
|
155
|
+
"expectedMatches": 12,
|
|
156
|
+
"parts": [
|
|
157
|
+
{ "replace": "model.layers.$1.mlp.gate_proj.weight", "size": 2048 },
|
|
158
|
+
{ "replace": "model.layers.$1.mlp.up_proj.weight", "size": 2048 }
|
|
159
|
+
]
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"kind": "rename",
|
|
163
|
+
"match": "^esm\\.encoder\\.layer\\.(\\d+)\\.output\\.dense\\.weight$",
|
|
164
|
+
"replace": "model.layers.$1.mlp.down_proj.weight",
|
|
165
|
+
"expectedMatches": 12
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"kind": "ignore",
|
|
169
|
+
"match": "^esm\\.contact_head\\.",
|
|
170
|
+
"expectedMatches": 2,
|
|
171
|
+
"reason": "Contact prediction is outside the initial DNA sequence-embedding lane."
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"kind": "ignore",
|
|
175
|
+
"match": "^lm_head\\.",
|
|
176
|
+
"expectedMatches": 6,
|
|
177
|
+
"reason": "Masked-token logits require the checkpoint's dense-exact-GELU-LayerNorm output head; the initial lane is embeddings-only."
|
|
178
|
+
}
|
|
179
|
+
]
|
|
180
|
+
},
|
|
181
|
+
"manifest": {
|
|
182
|
+
"hashAlgorithm": "blake3",
|
|
183
|
+
"artifactIdentity": {
|
|
184
|
+
"sourceCheckpointId": "InstaDeepAI/nucleotide-transformer-v2-50m-multi-species@81b29e5786726d891dbf929404ef20adca5b36f1",
|
|
185
|
+
"sourceRepo": "InstaDeepAI/nucleotide-transformer-v2-50m-multi-species",
|
|
186
|
+
"sourceRevision": "81b29e5786726d891dbf929404ef20adca5b36f1",
|
|
187
|
+
"sourceFormat": "safetensors",
|
|
188
|
+
"conversionConfigPath": "src/config/conversion/nucleotide-transformer/nucleotide-transformer-v2-50m-f32-af32.json",
|
|
189
|
+
"weightPackId": "nucleotide-transformer-v2-50m-f32-af32-wp-v1",
|
|
190
|
+
"manifestVariantId": "nucleotide-transformer-v2-50m-f32-af32-mv-exec-v1",
|
|
191
|
+
"modalitySet": ["dna_sequence"],
|
|
192
|
+
"materializationProfile": "f32-weights-f32-activations",
|
|
193
|
+
"artifactCompleteness": "complete"
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
"inference": {
|
|
197
|
+
"supportsEmbedding": true,
|
|
198
|
+
"supportsSequence": true,
|
|
199
|
+
"sequence": {
|
|
200
|
+
"alphabet": "nucleotide",
|
|
201
|
+
"tokenEmbeddings": true,
|
|
202
|
+
"pooledEmbedding": {
|
|
203
|
+
"mode": "mean",
|
|
204
|
+
"excludeTokenIds": [0, 1, 2, 3]
|
|
205
|
+
},
|
|
206
|
+
"logits": false
|
|
207
|
+
},
|
|
208
|
+
"attention": {
|
|
209
|
+
"queryPreAttnScalar": 32,
|
|
210
|
+
"attnLogitSoftcapping": null,
|
|
211
|
+
"slidingWindow": null,
|
|
212
|
+
"queryKeyNorm": false,
|
|
213
|
+
"queryKeyNormType": "rmsnorm",
|
|
214
|
+
"queryKeyNormAxis": "head",
|
|
215
|
+
"queryKeyNormLayers": null,
|
|
216
|
+
"queryKeyNormWeightLayers": null,
|
|
217
|
+
"valueNorm": false,
|
|
218
|
+
"causal": false,
|
|
219
|
+
"attentionBias": true,
|
|
220
|
+
"attentionOutputGate": false,
|
|
221
|
+
"outputGateType": null
|
|
222
|
+
},
|
|
223
|
+
"normalization": {
|
|
224
|
+
"type": "layernorm",
|
|
225
|
+
"rmsNormEps": 1e-12,
|
|
226
|
+
"rmsNormWeightOffset": false,
|
|
227
|
+
"postAttentionNorm": true,
|
|
228
|
+
"preFeedforwardNorm": false,
|
|
229
|
+
"postFeedforwardNorm": false,
|
|
230
|
+
"finalNormBiasTensor": "model.norm.bias"
|
|
231
|
+
},
|
|
232
|
+
"ffn": {
|
|
233
|
+
"activation": "silu",
|
|
234
|
+
"gatedActivation": true,
|
|
235
|
+
"branchMode": "dense",
|
|
236
|
+
"useDoubleWideMlp": false,
|
|
237
|
+
"swigluLimit": null
|
|
238
|
+
},
|
|
239
|
+
"rope": {
|
|
240
|
+
"ropeTheta": 10000,
|
|
241
|
+
"ropeLocalTheta": null,
|
|
242
|
+
"ropeInterleaved": false,
|
|
243
|
+
"mropeInterleaved": false,
|
|
244
|
+
"mropeSection": null,
|
|
245
|
+
"partialRotaryFactor": null,
|
|
246
|
+
"ropeLocalPartialRotaryFactor": null,
|
|
247
|
+
"ropeFrequencyBaseDim": null,
|
|
248
|
+
"ropeLocalFrequencyBaseDim": null,
|
|
249
|
+
"ropeScalingType": null,
|
|
250
|
+
"ropeScalingFactor": 1,
|
|
251
|
+
"ropeLocalScalingType": null,
|
|
252
|
+
"ropeLocalScalingFactor": 1,
|
|
253
|
+
"yarnBetaFast": null,
|
|
254
|
+
"yarnBetaSlow": null,
|
|
255
|
+
"yarnOriginalMaxPos": null,
|
|
256
|
+
"ropeLocalYarnBetaFast": null,
|
|
257
|
+
"ropeLocalYarnBetaSlow": null,
|
|
258
|
+
"ropeLocalYarnOriginalMaxPos": null,
|
|
259
|
+
"longropeShortFactor": null,
|
|
260
|
+
"longropeLongFactor": null,
|
|
261
|
+
"longropeOriginalMaxPos": null
|
|
262
|
+
},
|
|
263
|
+
"output": {
|
|
264
|
+
"finalLogitSoftcapping": null,
|
|
265
|
+
"tieWordEmbeddings": false,
|
|
266
|
+
"scaleEmbeddings": false,
|
|
267
|
+
"embeddingScale": null,
|
|
268
|
+
"logitInputScale": 1,
|
|
269
|
+
"embeddingTranspose": false,
|
|
270
|
+
"embeddingVocabSize": null,
|
|
271
|
+
"embeddingPostprocessor": null,
|
|
272
|
+
"lmHeadBiasTensor": null
|
|
273
|
+
},
|
|
274
|
+
"layerPattern": {
|
|
275
|
+
"type": "uniform",
|
|
276
|
+
"globalPattern": null,
|
|
277
|
+
"period": null,
|
|
278
|
+
"offset": null,
|
|
279
|
+
"layerTypes": null,
|
|
280
|
+
"residualBranchScale": 1
|
|
281
|
+
},
|
|
282
|
+
"chatTemplate": { "type": null, "enabled": false }
|
|
283
|
+
},
|
|
284
|
+
"session": {
|
|
285
|
+
"compute": {
|
|
286
|
+
"defaults": {
|
|
287
|
+
"activationDtype": "f32",
|
|
288
|
+
"mathDtype": "f32",
|
|
289
|
+
"accumDtype": "f32",
|
|
290
|
+
"outputDtype": "f32"
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
"kvcache": {
|
|
294
|
+
"kvDtype": "f32",
|
|
295
|
+
"layout": "contiguous",
|
|
296
|
+
"maxSeqLen": 2050,
|
|
297
|
+
"pageSize": 256,
|
|
298
|
+
"tiering": {
|
|
299
|
+
"mode": "off",
|
|
300
|
+
"hotWindow": 1024,
|
|
301
|
+
"coldPageSize": 256,
|
|
302
|
+
"coldDtype": "f16",
|
|
303
|
+
"compression": { "mode": "none", "blockSize": 1, "bitWidth": 4, "prodMode": false },
|
|
304
|
+
"gating": { "mode": "auto", "minAluBwRatio": 0 }
|
|
305
|
+
},
|
|
306
|
+
"quantization": { "mode": "none", "bitWidth": 4, "prodMode": false }
|
|
307
|
+
},
|
|
308
|
+
"decodeLoop": {
|
|
309
|
+
"batchSize": 1,
|
|
310
|
+
"stopCheckMode": "per-token",
|
|
311
|
+
"readbackInterval": 1,
|
|
312
|
+
"readbackMode": "sequential",
|
|
313
|
+
"submitLatencyThresholdMs": null,
|
|
314
|
+
"ringTokens": 1,
|
|
315
|
+
"ringStop": 1,
|
|
316
|
+
"ringStaging": 1,
|
|
317
|
+
"disableCommandBatching": false
|
|
318
|
+
},
|
|
319
|
+
"perLayerInputs": {
|
|
320
|
+
"materialization": "auto",
|
|
321
|
+
"rowCache": { "mode": "lru", "maxRows": 256, "maxBytes": 134217728, "decodedDtype": "f32" },
|
|
322
|
+
"prefetch": { "mode": "next_token", "rowsAhead": 1 },
|
|
323
|
+
"gpuUpload": { "mode": "per_step_slices", "stagingRows": 2 },
|
|
324
|
+
"hotCache": { "mode": "prepared_tokens", "maxTokens": 1024, "maxBytes": 134217728, "outputDtype": "f32" }
|
|
325
|
+
},
|
|
326
|
+
"skipEmbeddingKVCacheWrites": true,
|
|
327
|
+
"prefillChunkSubmitMode": "sync",
|
|
328
|
+
"useFlashPrefillAttention": false,
|
|
329
|
+
"useWideTileQ4KPrefill": false,
|
|
330
|
+
"retainQ4KMaterialization": false
|
|
331
|
+
},
|
|
332
|
+
"execution": {
|
|
333
|
+
"inlineKernelPath": true,
|
|
334
|
+
"policies": {
|
|
335
|
+
"unsupportedPrecision": "error",
|
|
336
|
+
"dtypeTransition": "require_cast_step",
|
|
337
|
+
"unresolvedKernel": "error"
|
|
338
|
+
},
|
|
339
|
+
"kernels": {
|
|
340
|
+
"embed": { "kernel": "gather.wgsl", "entry": "main", "digest": "sha256:4b12653c53247b32ebde7f6cf6a989d6248977e3816c761540b990b5f9818cb6" },
|
|
341
|
+
"layernorm": { "kernel": "layernorm.wgsl", "entry": "main", "digest": "sha256:8ff885017bfcfc8fdb8d16e09c358c000830bfd5fbf3d87187694edb0cb44f7c" },
|
|
342
|
+
"tiled": { "kernel": "matmul_f32.wgsl", "entry": "main", "digest": "sha256:b5bb8e3d8014136e33de7935dd2a1f074c988044fe05cf5b559718c6f061eaa8" },
|
|
343
|
+
"bias_add": { "kernel": "bias_add.wgsl", "entry": "main", "digest": "sha256:e7d3b4a5f9efc8b0569c56bcdeb63e921fa6d1d006901deabc734cab40346715" },
|
|
344
|
+
"rope": { "kernel": "rope.wgsl", "entry": "main", "digest": "sha256:b2da9d396668981dab9794c2973b668279f768994466b083d2105730555e1a5b" },
|
|
345
|
+
"attn_small": { "kernel": "attention_small.wgsl", "entry": "main", "digest": "sha256:6752ddd7ab53e6235c9b5b1a9515141c0d111df7fac9f4c0d7a38f9943490ed4", "precision": { "kvDtype": "f32" } },
|
|
346
|
+
"residual": { "kernel": "residual.wgsl", "entry": "main", "digest": "sha256:abd19bc08ad668a7cad562e2bc0a4be1aa8827ad4300d8d474b7fc2af4c27117" },
|
|
347
|
+
"silu": { "kernel": "silu.wgsl", "entry": "main", "digest": "sha256:d6b21e62031ac0d748617f7ebfb43834552a5b8f9590c18dc19cd0cd41a2fbca", "constants": { "HAS_GATE": true } }
|
|
348
|
+
},
|
|
349
|
+
"preLayer": [["embed", "embed", "embed_tokens"]],
|
|
350
|
+
"decode": [
|
|
351
|
+
["input_norm", "layernorm"],
|
|
352
|
+
["q_proj", "tiled", "layer.{L}.self_attn.q_proj"],
|
|
353
|
+
["k_proj", "tiled", "layer.{L}.self_attn.k_proj"],
|
|
354
|
+
["v_proj", "tiled", "layer.{L}.self_attn.v_proj"],
|
|
355
|
+
["rope_q", "rope"],
|
|
356
|
+
["rope_k", "rope"],
|
|
357
|
+
["attention", "attn_small"],
|
|
358
|
+
["o_proj", "tiled", "layer.{L}.self_attn.o_proj"],
|
|
359
|
+
["attn_residual", "residual"],
|
|
360
|
+
["post_attn_norm", "layernorm"],
|
|
361
|
+
["gate_proj", "tiled", "layer.{L}.mlp.gate_proj"],
|
|
362
|
+
["up_proj", "tiled", "layer.{L}.mlp.up_proj"],
|
|
363
|
+
["activation", "silu"],
|
|
364
|
+
["down_proj", "tiled", "layer.{L}.mlp.down_proj"],
|
|
365
|
+
["ffn_residual", "residual"]
|
|
366
|
+
],
|
|
367
|
+
"prefill": [
|
|
368
|
+
["input_norm", "layernorm"],
|
|
369
|
+
["q_proj", "tiled", "layer.{L}.self_attn.q_proj"],
|
|
370
|
+
["k_proj", "tiled", "layer.{L}.self_attn.k_proj"],
|
|
371
|
+
["v_proj", "tiled", "layer.{L}.self_attn.v_proj"],
|
|
372
|
+
["rope_q", "rope"],
|
|
373
|
+
["rope_k", "rope"],
|
|
374
|
+
["attention", "attn_small"],
|
|
375
|
+
["o_proj", "tiled", "layer.{L}.self_attn.o_proj"],
|
|
376
|
+
["attn_residual", "residual"],
|
|
377
|
+
["post_attn_norm", "layernorm"],
|
|
378
|
+
["gate_proj", "tiled", "layer.{L}.mlp.gate_proj"],
|
|
379
|
+
["up_proj", "tiled", "layer.{L}.mlp.up_proj"],
|
|
380
|
+
["activation", "silu"],
|
|
381
|
+
["down_proj", "tiled", "layer.{L}.mlp.down_proj"],
|
|
382
|
+
["ffn_residual", "residual"]
|
|
383
|
+
],
|
|
384
|
+
"postLayer": [["final_norm", "layernorm"]],
|
|
385
|
+
"sampling": null
|
|
386
|
+
},
|
|
387
|
+
"largeWeights": { "gpuResidentOverrides": null }
|
|
388
|
+
}
|
|
@@ -112,6 +112,7 @@
|
|
|
112
112
|
"reachability": {
|
|
113
113
|
"status": "pinned",
|
|
114
114
|
"inlineConfigs": [
|
|
115
|
+
"amplify/amplify-120m-f16-af32",
|
|
115
116
|
"diffusiongemma/diffusiongemma-26b-a4b-it-q4k-ehf16-af16",
|
|
116
117
|
"embeddinggemma/google-embeddinggemma-300m-q4k-ehf16-af32",
|
|
117
118
|
"gemma3/translategemma-4b-1b-enes-q4k-ehf16-af32",
|
|
@@ -966,7 +967,12 @@
|
|
|
966
967
|
"weightDtype": "f32",
|
|
967
968
|
"reachability": {
|
|
968
969
|
"status": "pinned",
|
|
969
|
-
"inlineConfigs": [
|
|
970
|
+
"inlineConfigs": [
|
|
971
|
+
"esm/esm2-t12-35m-ur50d-f32-af32",
|
|
972
|
+
"esmc/esmc-300m-f32-af32",
|
|
973
|
+
"gemma3/translategemma-4b-it-q4k-ehf16-af32",
|
|
974
|
+
"nucleotide-transformer/nucleotide-transformer-v2-50m-f32-af32"
|
|
975
|
+
],
|
|
970
976
|
"ruleChains": ["matmul.rules.json#gemvVariant","matmul.rules.json#matmulKernel"],
|
|
971
977
|
"wgslOnDisk": true
|
|
972
978
|
}
|
|
@@ -1619,7 +1625,12 @@
|
|
|
1619
1625
|
},
|
|
1620
1626
|
"reachability": {
|
|
1621
1627
|
"status": "pinned",
|
|
1622
|
-
"inlineConfigs": [
|
|
1628
|
+
"inlineConfigs": [
|
|
1629
|
+
"embeddinggemma/google-embeddinggemma-300m-q4k-ehf16-af32",
|
|
1630
|
+
"esm/esm2-t12-35m-ur50d-f32-af32",
|
|
1631
|
+
"esmc/esmc-300m-f32-af32",
|
|
1632
|
+
"nucleotide-transformer/nucleotide-transformer-v2-50m-f32-af32"
|
|
1633
|
+
],
|
|
1623
1634
|
"ruleChains": [],
|
|
1624
1635
|
"wgslOnDisk": true
|
|
1625
1636
|
}
|
|
@@ -1635,7 +1646,12 @@
|
|
|
1635
1646
|
},
|
|
1636
1647
|
"reachability": {
|
|
1637
1648
|
"status": "pinned",
|
|
1638
|
-
"inlineConfigs": [
|
|
1649
|
+
"inlineConfigs": [
|
|
1650
|
+
"embeddinggemma/google-embeddinggemma-300m-q4k-ehf16-af32",
|
|
1651
|
+
"esm/esm2-t12-35m-ur50d-f32-af32",
|
|
1652
|
+
"esmc/esmc-300m-f32-af32",
|
|
1653
|
+
"nucleotide-transformer/nucleotide-transformer-v2-50m-f32-af32"
|
|
1654
|
+
],
|
|
1639
1655
|
"ruleChains": [],
|
|
1640
1656
|
"wgslOnDisk": true
|
|
1641
1657
|
}
|
|
@@ -1812,6 +1828,7 @@
|
|
|
1812
1828
|
"reachability": {
|
|
1813
1829
|
"status": "pinned",
|
|
1814
1830
|
"inlineConfigs": [
|
|
1831
|
+
"amplify/amplify-120m-f16-af32",
|
|
1815
1832
|
"diffusiongemma/diffusiongemma-26b-a4b-it-q4k-ehf16-af16",
|
|
1816
1833
|
"gemma3/gemma-3-1b-it-f16-af32",
|
|
1817
1834
|
"gemma3/gemma-3-1b-it-q4k-ehf16-af32",
|
|
@@ -1845,6 +1862,7 @@
|
|
|
1845
1862
|
"reachability": {
|
|
1846
1863
|
"status": "pinned",
|
|
1847
1864
|
"inlineConfigs": [
|
|
1865
|
+
"amplify/amplify-120m-f16-af32",
|
|
1848
1866
|
"diffusiongemma/diffusiongemma-26b-a4b-it-q4k-ehf16-af16",
|
|
1849
1867
|
"gemma3/gemma-3-1b-it-f16-af32",
|
|
1850
1868
|
"gemma3/gemma-3-1b-it-q4k-ehf16-af32",
|
|
@@ -3260,6 +3278,7 @@
|
|
|
3260
3278
|
"reachability": {
|
|
3261
3279
|
"status": "pinned",
|
|
3262
3280
|
"inlineConfigs": [
|
|
3281
|
+
"amplify/amplify-120m-f16-af32",
|
|
3263
3282
|
"diffusiongemma/diffusiongemma-26b-a4b-it-q4k-ehf16-af16",
|
|
3264
3283
|
"embeddinggemma/google-embeddinggemma-300m-q4k-ehf16-af32",
|
|
3265
3284
|
"gemma3/gemma-3-1b-it-f16-af32",
|
|
@@ -3748,8 +3767,12 @@
|
|
|
3748
3767
|
"workgroup": [256,1,1],
|
|
3749
3768
|
"requires": [],
|
|
3750
3769
|
"reachability": {
|
|
3751
|
-
"status": "
|
|
3752
|
-
"inlineConfigs": [
|
|
3770
|
+
"status": "pinned",
|
|
3771
|
+
"inlineConfigs": [
|
|
3772
|
+
"esm/esm2-t12-35m-ur50d-f32-af32",
|
|
3773
|
+
"esmc/esmc-300m-f32-af32",
|
|
3774
|
+
"nucleotide-transformer/nucleotide-transformer-v2-50m-f32-af32"
|
|
3775
|
+
],
|
|
3753
3776
|
"ruleChains": ["layernorm.rules.json#variant"],
|
|
3754
3777
|
"wgslOnDisk": true
|
|
3755
3778
|
}
|
|
@@ -3760,7 +3783,7 @@
|
|
|
3760
3783
|
"workgroup": [256,1,1],
|
|
3761
3784
|
"requires": ["shader-f16"],
|
|
3762
3785
|
"reachability": {
|
|
3763
|
-
"status": "selectable",
|
|
3786
|
+
"status": "model-selectable",
|
|
3764
3787
|
"inlineConfigs": [],
|
|
3765
3788
|
"ruleChains": ["layernorm.rules.json#variant"],
|
|
3766
3789
|
"wgslOnDisk": true
|
|
@@ -4388,8 +4411,11 @@
|
|
|
4388
4411
|
"reachability": {
|
|
4389
4412
|
"status": "pinned",
|
|
4390
4413
|
"inlineConfigs": [
|
|
4414
|
+
"amplify/amplify-120m-f16-af32",
|
|
4391
4415
|
"diffusiongemma/diffusiongemma-26b-a4b-it-q4k-ehf16-af16",
|
|
4392
4416
|
"embeddinggemma/google-embeddinggemma-300m-q4k-ehf16-af32",
|
|
4417
|
+
"esm/esm2-t12-35m-ur50d-f32-af32",
|
|
4418
|
+
"esmc/esmc-300m-f32-af32",
|
|
4393
4419
|
"gemma3/gemma-3-1b-it-f16-af32",
|
|
4394
4420
|
"gemma3/gemma-3-1b-it-q4k-ehf16-af32",
|
|
4395
4421
|
"gemma3/gemma-3-270m-it-f16-af32",
|
|
@@ -4411,6 +4437,7 @@
|
|
|
4411
4437
|
"janus/janus-pro-1b-text-q4k-ehaf16",
|
|
4412
4438
|
"lfm2/lfm2.5-1.2b-instruct-q4k-ehf16-af32",
|
|
4413
4439
|
"minicpm/minicpm4-0-5b-f16-af32",
|
|
4440
|
+
"nucleotide-transformer/nucleotide-transformer-v2-50m-f32-af32",
|
|
4414
4441
|
"qwen3/qwen-3-5-0-8b-q4k-ehaf16",
|
|
4415
4442
|
"qwen3/qwen-3-5-2b-q4k-ehaf16",
|
|
4416
4443
|
"qwen3/qwen-3-5-9b-f16-af32",
|
|
@@ -4684,7 +4711,10 @@
|
|
|
4684
4711
|
"reachability": {
|
|
4685
4712
|
"status": "pinned",
|
|
4686
4713
|
"inlineConfigs": [
|
|
4714
|
+
"amplify/amplify-120m-f16-af32",
|
|
4715
|
+
"esmc/esmc-300m-f32-af32",
|
|
4687
4716
|
"minicpm/minicpm4-0-5b-f16-af32",
|
|
4717
|
+
"nucleotide-transformer/nucleotide-transformer-v2-50m-f32-af32",
|
|
4688
4718
|
"qwen3/qwen-3-5-0-8b-q4k-ehaf16",
|
|
4689
4719
|
"qwen3/qwen-3-5-2b-q4k-ehaf16",
|
|
4690
4720
|
"qwen3/qwen-3-5-9b-f16-af32",
|
|
@@ -4763,6 +4793,7 @@
|
|
|
4763
4793
|
"inlineConfigs": [
|
|
4764
4794
|
"diffusiongemma/diffusiongemma-26b-a4b-it-q4k-ehf16-af16",
|
|
4765
4795
|
"embeddinggemma/google-embeddinggemma-300m-q4k-ehf16-af32",
|
|
4796
|
+
"esm/esm2-t12-35m-ur50d-f32-af32",
|
|
4766
4797
|
"gemma3/gemma-3-1b-it-f16-af32",
|
|
4767
4798
|
"gemma3/gemma-3-1b-it-q4k-ehf16-af32",
|
|
4768
4799
|
"gemma3/gemma-3-270m-it-f16-af32",
|
|
@@ -5601,6 +5632,8 @@
|
|
|
5601
5632
|
"inlineConfigs": [
|
|
5602
5633
|
"diffusiongemma/diffusiongemma-26b-a4b-it-q4k-ehf16-af16",
|
|
5603
5634
|
"embeddinggemma/google-embeddinggemma-300m-q4k-ehf16-af32",
|
|
5635
|
+
"esm/esm2-t12-35m-ur50d-f32-af32",
|
|
5636
|
+
"esmc/esmc-300m-f32-af32",
|
|
5604
5637
|
"gemma3/gemma-3-1b-it-f16-af32",
|
|
5605
5638
|
"gemma3/gemma-3-270m-it-f16-af32",
|
|
5606
5639
|
"gemma3/gemma-3-270m-it-q4k-ehf16-af16",
|
|
@@ -5609,7 +5642,8 @@
|
|
|
5609
5642
|
"gemma4/gemma-4-12b-it-text-q4k-ehf16-af32",
|
|
5610
5643
|
"gemma4/gemma-4-12b-it-text-w4a16-ct-ehf16-af16",
|
|
5611
5644
|
"gemma4/gemma-4-31b-it-text-q4k-ehf16-af16",
|
|
5612
|
-
"gemma4/gemma-4-31b-it-text-q4k-ehf16-af32"
|
|
5645
|
+
"gemma4/gemma-4-31b-it-text-q4k-ehf16-af32",
|
|
5646
|
+
"nucleotide-transformer/nucleotide-transformer-v2-50m-f32-af32"
|
|
5613
5647
|
],
|
|
5614
5648
|
"ruleChains": ["gather.rules.json#variant"],
|
|
5615
5649
|
"wgslOnDisk": true
|
|
@@ -5638,6 +5672,7 @@
|
|
|
5638
5672
|
"reachability": {
|
|
5639
5673
|
"status": "pinned",
|
|
5640
5674
|
"inlineConfigs": [
|
|
5675
|
+
"amplify/amplify-120m-f16-af32",
|
|
5641
5676
|
"gemma3/gemma-3-1b-it-q4k-ehf16-af32",
|
|
5642
5677
|
"gemma3/translategemma-4b-1b-enes-q4k-ehf16-af32",
|
|
5643
5678
|
"gemma3/translategemma-4b-it-q4k-ehf16-af32",
|
|
@@ -6122,8 +6157,11 @@
|
|
|
6122
6157
|
"reachability": {
|
|
6123
6158
|
"status": "pinned",
|
|
6124
6159
|
"inlineConfigs": [
|
|
6160
|
+
"amplify/amplify-120m-f16-af32",
|
|
6125
6161
|
"diffusiongemma/diffusiongemma-26b-a4b-it-q4k-ehf16-af16",
|
|
6126
6162
|
"embeddinggemma/google-embeddinggemma-300m-q4k-ehf16-af32",
|
|
6163
|
+
"esm/esm2-t12-35m-ur50d-f32-af32",
|
|
6164
|
+
"esmc/esmc-300m-f32-af32",
|
|
6127
6165
|
"gemma3/gemma-3-1b-it-f16-af32",
|
|
6128
6166
|
"gemma3/gemma-3-1b-it-q4k-ehf16-af32",
|
|
6129
6167
|
"gemma3/gemma-3-270m-it-f16-af32",
|
|
@@ -6144,6 +6182,7 @@
|
|
|
6144
6182
|
"janus/janus-pro-1b-text-q4k-ehaf16",
|
|
6145
6183
|
"lfm2/lfm2.5-1.2b-instruct-q4k-ehf16-af32",
|
|
6146
6184
|
"minicpm/minicpm4-0-5b-f16-af32",
|
|
6185
|
+
"nucleotide-transformer/nucleotide-transformer-v2-50m-f32-af32",
|
|
6147
6186
|
"qwen3/qwen-3-5-0-8b-q4k-ehaf16",
|
|
6148
6187
|
"qwen3/qwen-3-5-2b-q4k-ehaf16",
|
|
6149
6188
|
"qwen3/qwen-3-5-9b-f16-af32",
|
|
@@ -7153,8 +7192,12 @@
|
|
|
7153
7192
|
"workgroup": [256,1,1],
|
|
7154
7193
|
"requires": [],
|
|
7155
7194
|
"reachability": {
|
|
7156
|
-
"status": "
|
|
7157
|
-
"inlineConfigs": [
|
|
7195
|
+
"status": "pinned",
|
|
7196
|
+
"inlineConfigs": [
|
|
7197
|
+
"esm/esm2-t12-35m-ur50d-f32-af32",
|
|
7198
|
+
"esmc/esmc-300m-f32-af32",
|
|
7199
|
+
"nucleotide-transformer/nucleotide-transformer-v2-50m-f32-af32"
|
|
7200
|
+
],
|
|
7158
7201
|
"ruleChains": [],
|
|
7159
7202
|
"wgslOnDisk": true
|
|
7160
7203
|
}
|
package/src/config/merge.js
CHANGED
|
@@ -51,6 +51,18 @@ function mergeAttention(
|
|
|
51
51
|
runtime?.queryKeyNorm,
|
|
52
52
|
sources
|
|
53
53
|
),
|
|
54
|
+
queryKeyNormType: overlay(
|
|
55
|
+
`${prefix}.queryKeyNormType`,
|
|
56
|
+
manifest.queryKeyNormType,
|
|
57
|
+
runtime?.queryKeyNormType,
|
|
58
|
+
sources
|
|
59
|
+
),
|
|
60
|
+
queryKeyNormAxis: overlay(
|
|
61
|
+
`${prefix}.queryKeyNormAxis`,
|
|
62
|
+
manifest.queryKeyNormAxis,
|
|
63
|
+
runtime?.queryKeyNormAxis,
|
|
64
|
+
sources
|
|
65
|
+
),
|
|
54
66
|
queryKeyNormLayers: overlay(
|
|
55
67
|
`${prefix}.queryKeyNormLayers`,
|
|
56
68
|
manifest.queryKeyNormLayers,
|
|
@@ -97,6 +109,12 @@ function mergeNormalization(
|
|
|
97
109
|
) {
|
|
98
110
|
const prefix = 'inference.normalization';
|
|
99
111
|
return {
|
|
112
|
+
type: overlay(
|
|
113
|
+
`${prefix}.type`,
|
|
114
|
+
manifest.type,
|
|
115
|
+
runtime?.type,
|
|
116
|
+
sources
|
|
117
|
+
),
|
|
100
118
|
rmsNormEps: overlay(
|
|
101
119
|
`${prefix}.rmsNormEps`,
|
|
102
120
|
manifest.rmsNormEps,
|
|
@@ -127,6 +145,12 @@ function mergeNormalization(
|
|
|
127
145
|
runtime?.postFeedforwardNorm,
|
|
128
146
|
sources
|
|
129
147
|
),
|
|
148
|
+
finalNormBiasTensor: overlay(
|
|
149
|
+
`${prefix}.finalNormBiasTensor`,
|
|
150
|
+
manifest.finalNormBiasTensor,
|
|
151
|
+
runtime?.finalNormBiasTensor,
|
|
152
|
+
sources
|
|
153
|
+
),
|
|
130
154
|
};
|
|
131
155
|
}
|
|
132
156
|
|
|
@@ -17,11 +17,14 @@ import type {
|
|
|
17
17
|
ManifestArtifactIdentitySchema,
|
|
18
18
|
ManifestWeightsRefSchema,
|
|
19
19
|
MoEConfigSchema,
|
|
20
|
+
ArchitectureSchema,
|
|
20
21
|
} from './manifest.schema.js';
|
|
21
22
|
import type {
|
|
22
23
|
ExecutionV1GraphSchema,
|
|
23
24
|
ExecutionV1SessionSchema,
|
|
24
25
|
} from './execution-v1.schema.js';
|
|
26
|
+
import type { SourceTensorPolicy } from '../../converter/source-tensor-rules.js';
|
|
27
|
+
import type { SourceTokenizerPolicy } from '../../converter/source-tokenizer.js';
|
|
25
28
|
|
|
26
29
|
export type ComputePrecision = 'f16' | 'f32' | 'auto' | null;
|
|
27
30
|
/** Q4K layout: 'row' = fused kernel (fast), 'col' = dequant fallback */
|
|
@@ -112,6 +115,10 @@ export interface ConverterConfigSchema {
|
|
|
112
115
|
manifest: ConverterManifestConfigSchema;
|
|
113
116
|
inference: ConverterInferenceConfigSchema;
|
|
114
117
|
output: ConverterOutputConfigSchema;
|
|
118
|
+
/** Explicit architecture for custom checkpoints whose source config omits standard HF fields. */
|
|
119
|
+
architecture: ArchitectureSchema | null;
|
|
120
|
+
sourceTensors: SourceTensorPolicy | null;
|
|
121
|
+
sourceTokenizer: SourceTokenizerPolicy | null;
|
|
115
122
|
moeConfig?: MoEConfigSchema | null;
|
|
116
123
|
execution?: ExecutionV1GraphSchema;
|
|
117
124
|
session?: ExecutionV1SessionSchema;
|