doppler-gpu 0.4.6 → 0.4.7
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/README.md +43 -31
- package/assets/doppler-runtime-map.svg +1 -3
- package/assets/doppler.svg +1 -3
- package/package.json +25 -17
- package/src/cli/doppler-quickstart.js +1 -1
- package/src/cli/doppler-serve.js +2 -2
- package/src/client/doppler-registry.d.ts +19 -0
- package/src/client/doppler-registry.js +12 -0
- package/src/client/doppler-registry.json +50 -1
- package/src/config/conversion/README.md +4 -0
- package/src/config/conversion/diffusiongemma/diffusiongemma-26b-a4b-it-q4k-ehf16-af16.json +28 -4
- package/src/config/conversion/embeddinggemma/google-embeddinggemma-300m-q4k-ehf16-af32.json +29 -4
- package/src/config/conversion/gemma3/gemma-3-1b-it-f16-af32.json +29 -4
- package/src/config/conversion/gemma3/gemma-3-1b-it-q4k-ehf16-af32.json +29 -4
- package/src/config/conversion/gemma3/gemma-3-270m-it-f16-af32.json +29 -4
- package/src/config/conversion/gemma3/gemma-3-270m-it-q4k-ehf16-af16.json +29 -4
- package/src/config/conversion/gemma3/gemma-3-270m-it-q4k-ehf16-af32.json +29 -4
- package/src/config/conversion/gemma3/translategemma-4b-1b-enes-q4k-ehf16-af32.json +29 -4
- package/src/config/conversion/gemma3/translategemma-4b-it-q4k-ehf16-af32.json +29 -4
- package/src/config/conversion/gemma4/gemma-4-12b-it-text-q4k-ehf16-af16.json +31 -5
- package/src/config/conversion/gemma4/gemma-4-12b-it-text-q4k-ehf16-af32.json +30 -4
- package/src/config/conversion/gemma4/gemma-4-12b-it-text-q4k-ehf16-hq4k-af16.json +30 -4
- package/src/config/conversion/gemma4/gemma-4-12b-it-text-w4a16-ct-ehf16-af16.json +30 -4
- package/src/config/conversion/gemma4/gemma-4-31b-it-text-q4k-ehf16-af16.json +30 -5
- package/src/config/conversion/gemma4/gemma-4-31b-it-text-q4k-ehf16-af32.json +29 -4
- package/src/config/conversion/gemma4/gemma-4-e2b-it-q4k-ehf16-af16-int4ple.json +30 -5
- package/src/config/conversion/gemma4/gemma-4-e2b-it-q4k-ehf16-af32-int4ple.json +29 -4
- package/src/config/conversion/gemma4/gemma-4-e2b-it-q4k-ehf16-af32.json +29 -4
- package/src/config/conversion/gemma4/gemma-4-moe-q4k-ehf16-af32.json +29 -4
- package/src/config/conversion/gpt-oss-20b-f16-xmxfp4.json +29 -4
- package/src/config/conversion/janus/janus-pro-1b-text-q4k-ehaf16.json +29 -4
- package/src/config/conversion/lfm2/lfm2.5-1.2b-instruct-q4k-ehf16-af32.json +29 -4
- package/src/config/conversion/minicpm/minicpm4-0-5b-f16-af32.json +481 -0
- package/src/config/conversion/qwen3/qwen-3-5-0-8b-q4k-ehaf16.json +29 -4
- package/src/config/conversion/qwen3/qwen-3-5-2b-q4k-ehaf16.json +29 -4
- package/src/config/conversion/qwen3/qwen-3-6-27b-q4k-eaf16.json +30 -5
- package/src/config/conversion/qwen3/qwen-3-6-27b-q4k-ehaf16.json +29 -4
- package/src/config/conversion/qwen3/qwen-3-embedding-0-6b-q4k-ehf16-af32.json +395 -0
- package/src/config/conversion/qwen3/qwen-3-reranker-0-6b-f16-af32.json +429 -0
- package/src/config/conversion/qwen3/qwen-3-reranker-0-6b-q4k-ehf16-af32.json +540 -0
- package/src/config/execution-contract-check.js +14 -10
- package/src/config/merge-contract-check.js +1 -0
- package/src/config/merge.js +30 -0
- package/src/config/param-validator.d.ts +5 -0
- package/src/config/param-validator.js +42 -8
- package/src/config/required-inference-fields-contract-check.js +14 -0
- package/src/config/schema/debug.schema.d.ts +2 -0
- package/src/config/schema/debug.schema.js +1 -0
- package/src/config/schema/doppler.schema.d.ts +5 -1
- package/src/config/schema/doppler.schema.js +82 -292
- package/src/config/schema/inference.schema.d.ts +17 -3
- package/src/config/schema/kvcache.schema.d.ts +19 -3
- package/src/config/schema/kvcache.schema.js +2 -1
- package/src/config/schema/manifest.schema.d.ts +38 -1
- package/src/config/schema/manifest.schema.js +18 -0
- package/src/config/schema/policy-schema-registry.json +5 -0
- package/src/config/source-packages/litert/gemma-4-12b-it.json +20 -1
- package/src/config/source-packages/litert/gemma-4-e2b-it.json +20 -1
- package/src/config/source-packages/litert/gemma-4-e4b-it.json +21 -1
- package/src/config/transforms/execution-graph-transforms.d.ts +6 -0
- package/src/config/transforms/execution-graph-transforms.js +8 -0
- package/src/converter/conversion-plan.js +2 -0
- package/src/converter/parsers/transformer.js +27 -1
- package/src/converter/quantization-info.js +16 -4
- package/src/converter/rope-config.js +55 -3
- package/src/experimental/training/distillation/student-fixture.js +1 -1
- package/src/experimental/training/lora-pipeline.js +1 -1
- package/src/experimental/training/lora.js +2 -2
- package/src/experimental/training/suite.js +1 -1
- package/src/gpu/kernels/README.md +8 -1
- package/src/gpu/kernels/backward/attention_backward.js +8 -0
- package/src/gpu/kernels/dequant.d.ts +6 -6
- package/src/gpu/kernels/dequant.js +17 -6
- package/src/gpu/kernels/linear-attention-core.js +1 -6
- package/src/gpu/kernels/matmul-selection.d.ts +2 -2
- package/src/gpu/kernels/matmul-selection.js +4 -1
- package/src/gpu/kernels/matmul.d.ts +1 -1
- package/src/gpu/kernels/matmul.js +24 -6
- package/src/gpu/kernels/moe.d.ts +5 -1
- package/src/gpu/kernels/moe.js +5 -2
- package/src/gpu/kernels/softmax.d.ts +3 -3
- package/src/gpu/kernels/softmax.js +9 -2
- package/src/gpu/kernels/turboquant-codebook.js +1 -1
- package/src/gpu/kernels/types.d.ts +1 -1
- package/src/gpu/profiler.js +11 -1
- package/src/inference/browser-harness-model-helpers.js +4 -1
- package/src/inference/browser-harness-text-helpers.d.ts +28 -0
- package/src/inference/browser-harness-text-helpers.js +357 -116
- package/src/inference/browser-harness.d.ts +3 -3
- package/src/inference/browser-harness.js +266 -11
- package/src/inference/fixtures/rerank-semantic-fixtures.json +38 -0
- package/src/inference/kv-cache/quantized.js +16 -2
- package/src/inference/kv-cache/tiered.js +50 -15
- package/src/inference/moe-router.js +38 -7
- package/src/inference/pipelines/diffusion/text-encoder-gpu.d.ts +1 -1
- package/src/inference/pipelines/diffusion/text-encoder-gpu.js +8 -6
- package/src/inference/pipelines/text/config.d.ts +5 -1
- package/src/inference/pipelines/text/config.js +135 -112
- package/src/inference/pipelines/text/embed.d.ts +1 -0
- package/src/inference/pipelines/text/embed.js +39 -12
- package/src/inference/pipelines/text/execution-plan.js +8 -2
- package/src/inference/pipelines/text/ffn/dense.js +15 -4
- package/src/inference/pipelines/text/ffn/moe.js +4 -3
- package/src/inference/pipelines/text/ffn/standard.d.ts +2 -1
- package/src/inference/pipelines/text/ffn/standard.js +25 -2
- package/src/inference/pipelines/text/generator-helpers.js +2 -1
- package/src/inference/pipelines/text/generator-runtime.d.ts +6 -2
- package/src/inference/pipelines/text/generator-runtime.js +53 -20
- package/src/inference/pipelines/text/generator-steps.js +3 -0
- package/src/inference/pipelines/text/generator.js +6 -1
- package/src/inference/pipelines/text/init-rope.js +54 -6
- package/src/inference/pipelines/text/init.js +63 -15
- package/src/inference/pipelines/text/layer.js +32 -5
- package/src/inference/pipelines/text/linear-attention.js +12 -8
- package/src/inference/pipelines/text/logits/gpu.d.ts +1 -1
- package/src/inference/pipelines/text/logits/gpu.js +76 -113
- package/src/inference/pipelines/text/logits/index.js +44 -87
- package/src/inference/pipelines/text/logits/precision-policy.d.ts +11 -0
- package/src/inference/pipelines/text/logits/precision-policy.js +103 -0
- package/src/inference/pipelines/text/logits/types.d.ts +1 -0
- package/src/inference/pipelines/text/logits/utils.d.ts +2 -0
- package/src/inference/pipelines/text/logits/utils.js +11 -0
- package/src/inference/pipelines/text/lora-apply.js +6 -4
- package/src/inference/pipelines/text/moe-cpu.js +25 -0
- package/src/inference/pipelines/text/moe-gpu.js +148 -97
- package/src/inference/pipelines/text/moe-shape-validator.d.ts +33 -3
- package/src/inference/pipelines/text/moe-shape-validator.js +149 -31
- package/src/inference/pipelines/text/ops.d.ts +3 -0
- package/src/inference/pipelines/text/ops.js +26 -1
- package/src/inference/pipelines/text/per-layer-inputs.js +27 -12
- package/src/inference/pipelines/text/weights.js +7 -2
- package/src/inference/pipelines/text.js +24 -4
- package/src/inference/tokenizers/behavior-flags.js +23 -2
- package/src/loader/final-weights-loader.js +12 -1
- package/src/rules/execution-rules-contract-check.js +12 -3
- package/src/rules/inference/capability-transforms.rules.json +14 -2
- package/src/rules/inference/config.rules.json +26 -2
- package/src/rules/inference/dtype.rules.json +12 -5
- package/src/rules/inference/execution.rules.json +5 -19
- package/src/rules/inference/moe.rules.json +97 -0
- package/src/tooling/command-api-constants.js +2 -2
- package/src/tooling/command-api-family-normalizers.js +2 -1
- package/src/tooling/command-api.d.ts +1 -1
- package/src/tooling/command-runner-shared.d.ts +1 -1
- package/src/tooling/command-runner-shared.js +3 -1
- package/src/tooling/node-converter.js +20 -0
- package/src/tooling/node-source-runtime.js +5 -1
- package/src/version.js +1 -1
- package/assets/doppler-readme-hero.svg +0 -84
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
],
|
|
16
16
|
"f16OrF32FromDtype": [
|
|
17
17
|
{ "match": { "dtype": "f16" }, "value": "f16" },
|
|
18
|
-
{ "match": {}, "value": "f32" }
|
|
18
|
+
{ "match": { "dtype": "f32" }, "value": "f32" },
|
|
19
|
+
{ "match": {}, "value": { "context": "fallback" } }
|
|
19
20
|
],
|
|
20
21
|
"embeddingDtype": [
|
|
21
22
|
{ "match": { "dtype": "litert_int4" }, "value": "litert_int4" },
|
|
@@ -71,22 +72,28 @@
|
|
|
71
72
|
],
|
|
72
73
|
"bytesPerElement": [
|
|
73
74
|
{ "match": { "dtype": "f16" }, "value": 2 },
|
|
74
|
-
{ "match": {}, "value":
|
|
75
|
+
{ "match": { "dtype": "bf16" }, "value": 2 },
|
|
76
|
+
{ "match": { "dtype": "f32" }, "value": 4 },
|
|
77
|
+
{ "match": {}, "value": { "context": "fallback" } }
|
|
75
78
|
],
|
|
76
79
|
"dtypeFromSize": [
|
|
77
80
|
{ "match": { "bytesPerElement": 2 }, "value": "f16" },
|
|
78
|
-
{ "match": {}, "value": "f32" }
|
|
81
|
+
{ "match": { "bytesPerElement": 4 }, "value": "f32" },
|
|
82
|
+
{ "match": {}, "value": { "context": "fallback" } }
|
|
79
83
|
],
|
|
80
84
|
"bytesFromDtype": [
|
|
81
85
|
{ "match": { "dtype": "f16" }, "value": 2 },
|
|
82
|
-
{ "match": {}, "value":
|
|
86
|
+
{ "match": { "dtype": "bf16" }, "value": 2 },
|
|
87
|
+
{ "match": { "dtype": "f32" }, "value": 4 },
|
|
88
|
+
{ "match": {}, "value": { "context": "fallback" } }
|
|
83
89
|
],
|
|
84
90
|
"matmulDtype": [
|
|
85
91
|
{ "match": { "dtype": { "in": ["f16", "bf16"] } }, "value": "f16" },
|
|
92
|
+
{ "match": { "dtype": "f32" }, "value": "f32" },
|
|
86
93
|
{ "match": { "dtype": "q4k" }, "value": "q4k" },
|
|
87
94
|
{ "match": { "dtype": "litert_int4" }, "value": "litert_int4" },
|
|
88
95
|
{ "match": { "dtype": "w4a16" }, "value": "w4a16" },
|
|
89
|
-
{ "match": {}, "value": "
|
|
96
|
+
{ "match": {}, "value": { "context": "fallback" } }
|
|
90
97
|
],
|
|
91
98
|
"logitsDtype": [
|
|
92
99
|
{ "match": { "logitsDtype": "f16" }, "value": "f16" },
|
|
@@ -133,7 +133,11 @@
|
|
|
133
133
|
{
|
|
134
134
|
"match": {
|
|
135
135
|
"modelId": {
|
|
136
|
-
"
|
|
136
|
+
"in": [
|
|
137
|
+
"gemma-4-12b-it-text-q4k-ehf16-af16",
|
|
138
|
+
"gemma-4-12b-it-text-q4k-ehf16-hq4k-af16",
|
|
139
|
+
"gemma-4-12b-it-text-w4a16-ct-ehf16-af16"
|
|
140
|
+
]
|
|
137
141
|
},
|
|
138
142
|
"activationDtype": "f16",
|
|
139
143
|
"numLayers": {
|
|
@@ -187,23 +191,5 @@
|
|
|
187
191
|
"match": {},
|
|
188
192
|
"value": "f32"
|
|
189
193
|
}
|
|
190
|
-
],
|
|
191
|
-
"modelBatchingDefaults": [
|
|
192
|
-
{
|
|
193
|
-
"match": {
|
|
194
|
-
"modelId": {
|
|
195
|
-
"contains": "lfm2"
|
|
196
|
-
}
|
|
197
|
-
},
|
|
198
|
-
"value": {
|
|
199
|
-
"batchSize": 8,
|
|
200
|
-
"stopCheckMode": "batch",
|
|
201
|
-
"readbackInterval": 8
|
|
202
|
-
}
|
|
203
|
-
},
|
|
204
|
-
{
|
|
205
|
-
"match": {},
|
|
206
|
-
"value": null
|
|
207
|
-
}
|
|
208
194
|
]
|
|
209
195
|
}
|
|
@@ -1,4 +1,101 @@
|
|
|
1
1
|
{
|
|
2
|
+
"executionProfile": [
|
|
3
|
+
{
|
|
4
|
+
"match": { "expertFormat": "gpt-oss" },
|
|
5
|
+
"value": {
|
|
6
|
+
"id": "gpt-oss-mxfp4",
|
|
7
|
+
"label": "GPT-OSS MXFP4 experts",
|
|
8
|
+
"expertExecutor": "gpt-oss",
|
|
9
|
+
"intermediateSizeSource": "architecture",
|
|
10
|
+
"requiresShaderF16": true,
|
|
11
|
+
"routerScaleMode": "none",
|
|
12
|
+
"topkRouteExecutor": null,
|
|
13
|
+
"vendorProfile": {
|
|
14
|
+
"kind": "rule",
|
|
15
|
+
"domain": "kernels",
|
|
16
|
+
"group": "moeGptoss",
|
|
17
|
+
"name": "vendorQuirkProfile"
|
|
18
|
+
},
|
|
19
|
+
"kernelPathProfileResolver": "gpt-oss",
|
|
20
|
+
"kernelRuleModelType": "gpt-oss",
|
|
21
|
+
"shapePolicy": {
|
|
22
|
+
"kind": "rule",
|
|
23
|
+
"domain": "kernels",
|
|
24
|
+
"group": "moeGptoss",
|
|
25
|
+
"name": "shapePolicy"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"match": { "expertFormat": "mixtral" },
|
|
31
|
+
"value": {
|
|
32
|
+
"id": "mixtral-dense",
|
|
33
|
+
"label": "Mixtral dense experts",
|
|
34
|
+
"expertExecutor": "mixtral",
|
|
35
|
+
"intermediateSizeSource": "architecture",
|
|
36
|
+
"requiresShaderF16": false,
|
|
37
|
+
"routerScaleMode": "none",
|
|
38
|
+
"topkRouteExecutor": null,
|
|
39
|
+
"vendorProfile": {
|
|
40
|
+
"kind": "rule",
|
|
41
|
+
"domain": "kernels",
|
|
42
|
+
"group": "moeMixtral",
|
|
43
|
+
"name": "vendorQuirkProfile"
|
|
44
|
+
},
|
|
45
|
+
"kernelPathProfileResolver": "mixtral",
|
|
46
|
+
"kernelRuleModelType": "mixtral",
|
|
47
|
+
"shapePolicy": null
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"match": { "modelType": "diffusion_gemma", "expertFormat": "gemma4" },
|
|
52
|
+
"value": {
|
|
53
|
+
"id": "diffusion-gemma-packed",
|
|
54
|
+
"label": "DiffusionGemma packed experts",
|
|
55
|
+
"expertExecutor": "gemma4-packed",
|
|
56
|
+
"intermediateSizeSource": "expert",
|
|
57
|
+
"requiresShaderF16": false,
|
|
58
|
+
"routerScaleMode": "required",
|
|
59
|
+
"topkRouteExecutor": "gemma4-route",
|
|
60
|
+
"vendorProfile": {
|
|
61
|
+
"kind": "static",
|
|
62
|
+
"value": {
|
|
63
|
+
"preferVec4Dequant": false,
|
|
64
|
+
"dequantTileShape": null,
|
|
65
|
+
"routerWorkgroupSize": 256,
|
|
66
|
+
"maxTokensPerExpertScale": 1.0
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"kernelPathProfileResolver": null,
|
|
70
|
+
"kernelRuleModelType": null,
|
|
71
|
+
"shapePolicy": null
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"match": { "expertFormat": "gemma4" },
|
|
76
|
+
"value": {
|
|
77
|
+
"id": "gemma4-packed",
|
|
78
|
+
"label": "Gemma packed experts",
|
|
79
|
+
"expertExecutor": "gemma4-packed",
|
|
80
|
+
"intermediateSizeSource": "expert",
|
|
81
|
+
"requiresShaderF16": false,
|
|
82
|
+
"routerScaleMode": "optional",
|
|
83
|
+
"topkRouteExecutor": "gemma4-route",
|
|
84
|
+
"vendorProfile": {
|
|
85
|
+
"kind": "static",
|
|
86
|
+
"value": {
|
|
87
|
+
"preferVec4Dequant": false,
|
|
88
|
+
"dequantTileShape": null,
|
|
89
|
+
"routerWorkgroupSize": 256,
|
|
90
|
+
"maxTokensPerExpertScale": 1.0
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"kernelPathProfileResolver": null,
|
|
94
|
+
"kernelRuleModelType": null,
|
|
95
|
+
"shapePolicy": null
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
],
|
|
2
99
|
"biasAddCode": [
|
|
3
100
|
{
|
|
4
101
|
"match": { "logitsDtype": "f16", "biasDtype": "f16" },
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export const TOOLING_COMMAND_SET = ['convert', 'refresh-integrity', 'debug', 'bench', 'verify', 'lora', 'distill', 'diagnose'];
|
|
2
2
|
export const TOOLING_SURFACE_SET = ['browser', 'node'];
|
|
3
|
-
export const TOOLING_WORKLOAD_SET = ['kernels', 'inference', 'embedding', 'training', 'diffusion', 'energy'];
|
|
3
|
+
export const TOOLING_WORKLOAD_SET = ['kernels', 'inference', 'embedding', 'rerank', 'training', 'diffusion', 'energy'];
|
|
4
4
|
export const TOOLING_INTENT_SET = ['verify', 'investigate', 'calibrate'];
|
|
5
|
-
export const VERIFY_WORKLOADS = ['kernels', 'inference', 'embedding', 'training', 'diffusion', 'energy'];
|
|
5
|
+
export const VERIFY_WORKLOADS = ['kernels', 'inference', 'embedding', 'rerank', 'training', 'diffusion', 'energy'];
|
|
6
6
|
export const TRAINING_STAGE_SET = ['stage1_joint', 'stage2_base', 'stage_a', 'stage_b'];
|
|
7
7
|
export const DISTILL_ACTION_SET = ['run', 'stage-a', 'stage-b', 'eval', 'watch', 'compare', 'quality-gate', 'subsets'];
|
|
8
8
|
export const LORA_ACTION_SET = ['run', 'eval', 'watch', 'export', 'compare', 'quality-gate', 'activate'];
|
|
@@ -182,11 +182,12 @@ function resolveBenchRequestWorkload(raw) {
|
|
|
182
182
|
if (
|
|
183
183
|
workload !== 'inference'
|
|
184
184
|
&& workload !== 'embedding'
|
|
185
|
+
&& workload !== 'rerank'
|
|
185
186
|
&& workload !== 'training'
|
|
186
187
|
&& workload !== 'diffusion'
|
|
187
188
|
) {
|
|
188
189
|
throw new Error(
|
|
189
|
-
'tooling command: "bench" workload must be "inference", "embedding", "training", or "diffusion".'
|
|
190
|
+
'tooling command: "bench" workload must be "inference", "embedding", "rerank", "training", or "diffusion".'
|
|
190
191
|
);
|
|
191
192
|
}
|
|
192
193
|
return workload;
|
|
@@ -2,7 +2,7 @@ import type { ConverterConfigSchema } from '../config/schema/converter.schema.js
|
|
|
2
2
|
|
|
3
3
|
export type ToolingCommand = 'convert' | 'refresh-integrity' | 'debug' | 'bench' | 'verify' | 'lora' | 'distill' | 'diagnose';
|
|
4
4
|
export type ToolingSurface = 'browser' | 'node';
|
|
5
|
-
export type ToolingWorkload = 'kernels' | 'inference' | 'embedding' | 'training' | 'diffusion' | 'energy';
|
|
5
|
+
export type ToolingWorkload = 'kernels' | 'inference' | 'embedding' | 'rerank' | 'training' | 'diffusion' | 'energy';
|
|
6
6
|
export type ToolingIntent = 'verify' | 'investigate' | 'calibrate' | null;
|
|
7
7
|
export type ToolingTrainingStage = 'stage1_joint' | 'stage2_base' | 'stage_a' | 'stage_b';
|
|
8
8
|
export type ToolingDistillAction = 'run' | 'stage-a' | 'stage-b' | 'eval' | 'watch' | 'compare' | 'quality-gate' | 'subsets';
|
|
@@ -46,7 +46,7 @@ export declare function buildSuiteOptions(
|
|
|
46
46
|
workload: ToolingCommandRequest['workload'];
|
|
47
47
|
command: ToolingCommandRequest['command'];
|
|
48
48
|
surface: string | null;
|
|
49
|
-
expectedModelType?: 'embedding';
|
|
49
|
+
expectedModelType?: 'embedding' | 'rerank';
|
|
50
50
|
modelId?: string;
|
|
51
51
|
trainingTests?: string[];
|
|
52
52
|
trainingStage?: 'stage1_joint' | 'stage2_base' | 'stage_a' | 'stage_b';
|
|
@@ -109,7 +109,9 @@ function resolveExecutionMode(request) {
|
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
function resolveExpectedModelType(request) {
|
|
112
|
-
|
|
112
|
+
if (request.workload === 'embedding') return 'embedding';
|
|
113
|
+
if (request.workload === 'rerank') return 'rerank';
|
|
114
|
+
return undefined;
|
|
113
115
|
}
|
|
114
116
|
|
|
115
117
|
export async function applyRuntimeInputs(request, runtimeBridge, options = {}) {
|
|
@@ -1109,6 +1109,7 @@ export async function convertSafetensorsDirectory(options) {
|
|
|
1109
1109
|
let tokenizerJson = null;
|
|
1110
1110
|
let tokenizerConfig = null;
|
|
1111
1111
|
let generationConfig = null;
|
|
1112
|
+
let rerankScoring = null;
|
|
1112
1113
|
let hasTokenizerModel = false;
|
|
1113
1114
|
let tokenizerModelPath = null;
|
|
1114
1115
|
let diffusionAuxFiles = [];
|
|
@@ -1339,6 +1340,7 @@ export async function convertSafetensorsDirectory(options) {
|
|
|
1339
1340
|
tensors = parsedTransformer.tensors;
|
|
1340
1341
|
architectureHint = parsedTransformer.architectureHint;
|
|
1341
1342
|
embeddingPostprocessor = parsedTransformer.embeddingPostprocessor ?? null;
|
|
1343
|
+
rerankScoring = parsedTransformer.rerankScoring ?? null;
|
|
1342
1344
|
architecture = extractArchitecture(config, null);
|
|
1343
1345
|
const tokenizerJsonPath = path.join(inputDir, 'tokenizer.json');
|
|
1344
1346
|
tokenizerModelPath = path.join(inputDir, 'tokenizer.model');
|
|
@@ -1366,6 +1368,24 @@ export async function convertSafetensorsDirectory(options) {
|
|
|
1366
1368
|
const targetQuantization = plan.manifestQuantization;
|
|
1367
1369
|
const quantizationInfo = plan.quantizationInfo;
|
|
1368
1370
|
const inference = plan.manifestInference;
|
|
1371
|
+
if (rerankScoring) {
|
|
1372
|
+
const rerankConfig = inference?.rerank;
|
|
1373
|
+
if (!rerankConfig || typeof rerankConfig !== 'object' || Array.isArray(rerankConfig)) {
|
|
1374
|
+
throw new Error(
|
|
1375
|
+
'node convert: sentence-transformers LogitScore module requires explicit inference.rerank config.'
|
|
1376
|
+
);
|
|
1377
|
+
}
|
|
1378
|
+
if (Number(rerankConfig.trueTokenId) !== rerankScoring.trueTokenId) {
|
|
1379
|
+
throw new Error(
|
|
1380
|
+
`node convert: inference.rerank.trueTokenId=${rerankConfig.trueTokenId} does not match LogitScore true_token_id=${rerankScoring.trueTokenId}.`
|
|
1381
|
+
);
|
|
1382
|
+
}
|
|
1383
|
+
if (Number(rerankConfig.falseTokenId) !== rerankScoring.falseTokenId) {
|
|
1384
|
+
throw new Error(
|
|
1385
|
+
`node convert: inference.rerank.falseTokenId=${rerankConfig.falseTokenId} does not match LogitScore false_token_id=${rerankScoring.falseTokenId}.`
|
|
1386
|
+
);
|
|
1387
|
+
}
|
|
1388
|
+
}
|
|
1369
1389
|
const explicitModelId = resolveConfiguredModelId(options?.modelId, converterConfig);
|
|
1370
1390
|
if (!explicitModelId) {
|
|
1371
1391
|
throw new Error(
|
|
@@ -304,7 +304,11 @@ function applyPackageTokenizerAssets(parsedArtifact, tokenizerAssets) {
|
|
|
304
304
|
const next = {
|
|
305
305
|
...parsedArtifact,
|
|
306
306
|
};
|
|
307
|
-
|
|
307
|
+
const hasPackageTokenizer = next.tokenizerJson != null
|
|
308
|
+
|| next.tokenizerJsonPath != null
|
|
309
|
+
|| next.tokenizerModelName != null
|
|
310
|
+
|| next.tokenizerModelPath != null;
|
|
311
|
+
if (tokenizerAssets.tokenizerJson && !hasPackageTokenizer) {
|
|
308
312
|
next.tokenizerJson = tokenizerAssets.tokenizerJson;
|
|
309
313
|
next.tokenizerJsonPath = 'tokenizer.json';
|
|
310
314
|
}
|
package/src/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const DOPPLER_VERSION = '0.4.
|
|
1
|
+
export const DOPPLER_VERSION = '0.4.7';
|
|
2
2
|
export const DOPPLER_PROVIDER_VERSION = DOPPLER_VERSION;
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="360" viewBox="0 0 1200 360" role="img" aria-labelledby="title desc">
|
|
2
|
-
<title id="title">Doppler WebGPU inference runtime</title>
|
|
3
|
-
<desc id="desc">A product hero for Doppler showing browser, manifest, WebGPU kernels, and receipt-backed evidence lanes.</desc>
|
|
4
|
-
<defs>
|
|
5
|
-
<linearGradient id="hero-bg" x1="40" y1="20" x2="1160" y2="330" gradientUnits="userSpaceOnUse">
|
|
6
|
-
<stop offset="0" stop-color="#fff7ed"/>
|
|
7
|
-
<stop offset="0.36" stop-color="#edf7ff"/>
|
|
8
|
-
<stop offset="0.72" stop-color="#f1fff6"/>
|
|
9
|
-
<stop offset="1" stop-color="#fff0f4"/>
|
|
10
|
-
</linearGradient>
|
|
11
|
-
<linearGradient id="lane-a" x1="0" y1="0" x2="310" y2="0" gradientUnits="userSpaceOnUse">
|
|
12
|
-
<stop offset="0" stop-color="#ff6b7a"/>
|
|
13
|
-
<stop offset="0.48" stop-color="#00a88f"/>
|
|
14
|
-
<stop offset="1" stop-color="#4f7cff"/>
|
|
15
|
-
</linearGradient>
|
|
16
|
-
<linearGradient id="lane-b" x1="0" y1="0" x2="190" y2="140" gradientUnits="userSpaceOnUse">
|
|
17
|
-
<stop offset="0" stop-color="#111318"/>
|
|
18
|
-
<stop offset="1" stop-color="#353946"/>
|
|
19
|
-
</linearGradient>
|
|
20
|
-
<filter id="soft-shadow" x="-20%" y="-25%" width="140%" height="150%">
|
|
21
|
-
<feDropShadow dx="0" dy="10" stdDeviation="12" flood-color="#111318" flood-opacity="0.14"/>
|
|
22
|
-
</filter>
|
|
23
|
-
<style>
|
|
24
|
-
text { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; fill: #111318; }
|
|
25
|
-
.mono { font-family: "SFMono-Regular", "Cascadia Code", "Liberation Mono", Menlo, monospace; }
|
|
26
|
-
.title { font-size: 72px; font-weight: 900; letter-spacing: 2px; }
|
|
27
|
-
.subtitle { font-size: 25px; font-weight: 700; fill: #3b414c; }
|
|
28
|
-
.small { font-size: 17px; font-weight: 800; letter-spacing: 1px; }
|
|
29
|
-
.tiny { font-size: 14px; font-weight: 800; fill: #4c5360; }
|
|
30
|
-
.white { fill: #ffffff; }
|
|
31
|
-
</style>
|
|
32
|
-
</defs>
|
|
33
|
-
|
|
34
|
-
<rect width="1200" height="360" rx="42" fill="#ffffff"/>
|
|
35
|
-
<rect x="18" y="18" width="1164" height="324" rx="34" fill="url(#hero-bg)"/>
|
|
36
|
-
<rect x="18" y="18" width="1164" height="324" rx="34" fill="none" stroke="#111318" stroke-width="2"/>
|
|
37
|
-
|
|
38
|
-
<g transform="translate(72 68)" filter="url(#soft-shadow)">
|
|
39
|
-
<rect x="0" y="0" width="228" height="228" rx="52" fill="#111318"/>
|
|
40
|
-
<path d="M66 65h48c61 0 99 37 99 86s-38 86-99 86H66z" transform="translate(-27 -18)" fill="none" stroke="#ffffff" stroke-width="30" stroke-linecap="round" stroke-linejoin="round"/>
|
|
41
|
-
<path d="M102 58c46 0 76 31 76 70s-30 70-76 70" fill="none" stroke="url(#lane-a)" stroke-width="17" stroke-linecap="round"/>
|
|
42
|
-
<path d="M32 158h48M32 180h76" stroke="#ffffff" stroke-opacity="0.92" stroke-width="10" stroke-linecap="round"/>
|
|
43
|
-
<circle cx="180" cy="58" r="11" fill="#ff6b7a"/>
|
|
44
|
-
<circle cx="188" cy="198" r="11" fill="#4f7cff"/>
|
|
45
|
-
</g>
|
|
46
|
-
|
|
47
|
-
<g transform="translate(350 78)">
|
|
48
|
-
<text x="0" y="58" class="title">Doppler</text>
|
|
49
|
-
<text x="4" y="101" class="subtitle">Browser-native WebGPU inference with explicit runtime contracts.</text>
|
|
50
|
-
|
|
51
|
-
<g transform="translate(4 137)">
|
|
52
|
-
<rect x="0" y="0" width="188" height="42" rx="21" fill="#111318"/>
|
|
53
|
-
<text x="94" y="28" text-anchor="middle" class="small white">RDRR manifests</text>
|
|
54
|
-
<rect x="204" y="0" width="136" height="42" rx="21" fill="#ffffff" stroke="#111318" stroke-width="2"/>
|
|
55
|
-
<text x="272" y="28" text-anchor="middle" class="small">JS orchestration</text>
|
|
56
|
-
<rect x="356" y="0" width="134" height="42" rx="21" fill="#ffffff" stroke="#111318" stroke-width="2"/>
|
|
57
|
-
<text x="423" y="28" text-anchor="middle" class="small">WGSL kernels</text>
|
|
58
|
-
<rect x="506" y="0" width="152" height="42" rx="21" fill="#ffffff" stroke="#111318" stroke-width="2"/>
|
|
59
|
-
<text x="582" y="28" text-anchor="middle" class="small">evidence gates</text>
|
|
60
|
-
</g>
|
|
61
|
-
|
|
62
|
-
<g transform="translate(8 218)">
|
|
63
|
-
<path d="M0 0h310" stroke="url(#lane-a)" stroke-width="9" stroke-linecap="round"/>
|
|
64
|
-
<circle cx="0" cy="0" r="12" fill="#ff6b7a" stroke="#111318" stroke-width="2"/>
|
|
65
|
-
<circle cx="104" cy="0" r="12" fill="#f5b942" stroke="#111318" stroke-width="2"/>
|
|
66
|
-
<circle cx="208" cy="0" r="12" fill="#00a88f" stroke="#111318" stroke-width="2"/>
|
|
67
|
-
<circle cx="310" cy="0" r="12" fill="#4f7cff" stroke="#111318" stroke-width="2"/>
|
|
68
|
-
<text x="0" y="36" text-anchor="middle" class="tiny">model</text>
|
|
69
|
-
<text x="104" y="36" text-anchor="middle" class="tiny">cache</text>
|
|
70
|
-
<text x="208" y="36" text-anchor="middle" class="tiny">decode</text>
|
|
71
|
-
<text x="310" y="36" text-anchor="middle" class="tiny">receipt</text>
|
|
72
|
-
</g>
|
|
73
|
-
</g>
|
|
74
|
-
|
|
75
|
-
<g transform="translate(922 88)" filter="url(#soft-shadow)">
|
|
76
|
-
<rect x="0" y="0" width="190" height="180" rx="34" fill="url(#lane-b)"/>
|
|
77
|
-
<path d="M40 126c33-74 77-88 114-18" fill="none" stroke="#ffffff" stroke-width="10" stroke-linecap="round" opacity="0.9"/>
|
|
78
|
-
<path d="M40 126c33-74 77-88 114-18" fill="none" stroke="url(#lane-a)" stroke-width="4" stroke-linecap="round"/>
|
|
79
|
-
<circle cx="40" cy="126" r="13" fill="#ff6b7a" stroke="#ffffff" stroke-width="2"/>
|
|
80
|
-
<circle cx="93" cy="49" r="13" fill="#f5b942" stroke="#ffffff" stroke-width="2"/>
|
|
81
|
-
<circle cx="154" cy="108" r="13" fill="#4f7cff" stroke="#ffffff" stroke-width="2"/>
|
|
82
|
-
<text x="95" y="153" text-anchor="middle" class="small white">Metal / Vulkan</text>
|
|
83
|
-
</g>
|
|
84
|
-
</svg>
|