doppler-gpu 0.4.9 → 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.
Files changed (78) hide show
  1. package/CHANGELOG.md +53 -0
  2. package/README.md +89 -12
  3. package/models/catalog.json +612 -7
  4. package/package.json +30 -1
  5. package/src/client/doppler-registry.js +6 -0
  6. package/src/client/doppler-registry.json +126 -4
  7. package/src/client/runtime/lora.d.ts +10 -0
  8. package/src/client/runtime/lora.js +64 -0
  9. package/src/client/runtime/model-manager.js +6 -167
  10. package/src/client/runtime/model-session.d.ts +3 -1
  11. package/src/client/runtime/model-session.js +6 -0
  12. package/src/client/wrap-pipeline-handle.js +7 -0
  13. package/src/config/conversion/amplify/amplify-120m-f16-af32.json +516 -0
  14. package/src/config/conversion/esm/esm2-t12-35m-ur50d-f32-af32.json +571 -0
  15. package/src/config/conversion/esmc/esmc-300m-f32-af32.json +342 -0
  16. package/src/config/conversion/nucleotide-transformer/nucleotide-transformer-v2-50m-f32-af32.json +388 -0
  17. package/src/config/kernels/registry.json +52 -9
  18. package/src/config/merge.js +24 -0
  19. package/src/config/required-inference-fields-contract-check.js +2 -0
  20. package/src/config/schema/converter.schema.d.ts +7 -0
  21. package/src/config/schema/converter.schema.js +15 -0
  22. package/src/config/schema/inference.schema.d.ts +8 -0
  23. package/src/config/schema/manifest.schema.d.ts +32 -1
  24. package/src/config/schema/manifest.schema.js +26 -0
  25. package/src/converter/conversion-plan.js +15 -1
  26. package/src/converter/core.js +5 -4
  27. package/src/converter/source-tensor-rules.d.ts +50 -0
  28. package/src/converter/source-tensor-rules.js +180 -0
  29. package/src/converter/source-tokenizer.d.ts +45 -0
  30. package/src/converter/source-tokenizer.js +155 -0
  31. package/src/experimental/adapters/lora-loader.js +15 -0
  32. package/src/experimental/bridge/trainer-artifact-bridge.d.ts +2 -1
  33. package/src/experimental/bridge/trainer-artifact-bridge.js +35 -13
  34. package/src/gpu/device.js +100 -32
  35. package/src/inference/pipelines/text/attention/attn-config.js +2 -0
  36. package/src/inference/pipelines/text/attention/projections.js +161 -24
  37. package/src/inference/pipelines/text/attention/record.js +67 -9
  38. package/src/inference/pipelines/text/attention/run.js +60 -7
  39. package/src/inference/pipelines/text/attention/types.js +18 -9
  40. package/src/inference/pipelines/text/config.d.ts +5 -0
  41. package/src/inference/pipelines/text/config.js +91 -0
  42. package/src/inference/pipelines/text/ffn/dense.js +189 -2
  43. package/src/inference/pipelines/text/ffn/standard.js +50 -3
  44. package/src/inference/pipelines/text/generator-helpers.js +11 -1
  45. package/src/inference/pipelines/text/generator-runtime.js +63 -15
  46. package/src/inference/pipelines/text/generator-steps.js +3 -1
  47. package/src/inference/pipelines/text/generator.js +90 -3
  48. package/src/inference/pipelines/text/init-qkv-fusion.js +85 -1
  49. package/src/inference/pipelines/text/init.d.ts +2 -0
  50. package/src/inference/pipelines/text/init.js +2 -0
  51. package/src/inference/pipelines/text/layer.js +6 -0
  52. package/src/inference/pipelines/text/logits/cpu.d.ts +6 -0
  53. package/src/inference/pipelines/text/logits/cpu.js +22 -0
  54. package/src/inference/pipelines/text/logits/index.d.ts +1 -1
  55. package/src/inference/pipelines/text/logits/index.js +85 -11
  56. package/src/inference/pipelines/text/logits/types.d.ts +4 -0
  57. package/src/inference/pipelines/text/ops.js +32 -0
  58. package/src/inference/pipelines/text/types.d.ts +38 -0
  59. package/src/inference/pipelines/text/weights.d.ts +10 -0
  60. package/src/inference/pipelines/text/weights.js +33 -1
  61. package/src/inference/pipelines/text.d.ts +4 -2
  62. package/src/inference/pipelines/text.js +112 -0
  63. package/src/inference/tokenizers/behavior-flags.js +5 -1
  64. package/src/inference/tokenizers/bundled.js +99 -8
  65. package/src/loader/doppler-loader.d.ts +2 -0
  66. package/src/loader/doppler-loader.js +9 -0
  67. package/src/loader/final-weights-loader.d.ts +8 -0
  68. package/src/loader/final-weights-loader.js +42 -0
  69. package/src/loader/layer-loader.d.ts +6 -0
  70. package/src/loader/layer-loader.js +102 -3
  71. package/src/loader/loader-types.d.ts +15 -2
  72. package/src/tooling/node-converter.js +33 -1
  73. package/src/tooling/node-webgpu.js +85 -2
  74. package/src/tooling/runtime-optimization.d.ts +109 -0
  75. package/src/tooling/runtime-optimization.js +872 -0
  76. package/src/tooling-exports.shared.d.ts +19 -0
  77. package/src/tooling-exports.shared.js +11 -0
  78. package/src/version.js +1 -1
package/CHANGELOG.md CHANGED
@@ -8,6 +8,59 @@ docs so the `0.1.x` line has one conventional npm-visible history surface.
8
8
 
9
9
  ## [Unreleased]
10
10
 
11
+ ## [0.4.11] - 2026-07-19
12
+
13
+ ### Added
14
+
15
+ - Added manifest-first conversion and WebGPU inference support for four
16
+ biological sequence encoders: ESM-2 35M, Nucleotide Transformer v2 50M,
17
+ AMPLIFY 120M, and ESMC 300M.
18
+ - Published hosted RDRR registry lanes and Node/WebGPU qualification evidence
19
+ for tokenizer identity, finite outputs, reference parity, and synthetic LoRA
20
+ activation/unload behavior. This evidence does not claim downstream
21
+ biological-task quality or trained-adapter quality.
22
+ - Added source tokenizer and tensor-mapping contracts for importing sequence
23
+ checkpoints without runtime family detection.
24
+ - Added a model taxonomy for domain, task, architecture role, inputs, and
25
+ outputs, and exposed that classification through the quickstart registry.
26
+ - Added the `tinker_peft_browser_adapter` trainer-artifact bridge profile with
27
+ explicit Gamma selection authority and browser-parity requirements.
28
+
29
+ ### Changed
30
+
31
+ - Extended the text pipeline and loader contracts for bidirectional sequence
32
+ encoders, including model-declared normalization and logits bias, QK
33
+ normalization shape, token-level outputs, and sequence embedding results.
34
+ - Expanded WGSL Writer V3 corpus, semantic-oracle, training, and evaluation
35
+ contracts after the four reference packages passed AMD/Vulkan Chromium
36
+ execution qualification. General shader authorship remains unproven.
37
+ - Rebuilt kernel reachability metadata for the current 301 registered
38
+ variants.
39
+
40
+ ### Fixed
41
+
42
+ - Required WGSL Writer V3 evaluation receipts to disclose output-generation
43
+ budgets so compared lanes cannot hide unequal generation work.
44
+
45
+ ## [0.4.10] - 2026-07-18
46
+
47
+ ### Fixed
48
+
49
+ - Unified duplicate runtime module instances behind one authoritative WebGPU
50
+ device state and one in-flight initialization, preventing concurrent model
51
+ handles from creating incompatible devices.
52
+ - Rejected tracked cross-device GPU buffers before native bind-group creation
53
+ and prevented stale device-loss callbacks from clearing a replacement device.
54
+
55
+ ### Changed
56
+
57
+ - Included the WGSL Writer V3 package and campaign schemas in the generated npm
58
+ source closure.
59
+ - Retained the experimental
60
+ `translategemma-4b-1b-enes-q4k-ehf16-af32` NativeKD2 EN/ES candidate first
61
+ shipped in `0.4.8`, without changing its weights, evidence boundary, or
62
+ promotion status. Version `0.4.10` makes no new translation-model claim.
63
+
11
64
  ## [0.4.9] - 2026-07-14
12
65
 
13
66
  ### Fixed
package/README.md CHANGED
@@ -22,15 +22,42 @@ is experimental.
22
22
  npx doppler-gpu
23
23
  ```
24
24
 
25
+ <!-- model-type-clusters:start -->
26
+
27
+ ## Supported RDRR model types
28
+
29
+ Doppler classifies artifacts by what they consume and produce. This is
30
+ separate from lineage (`family`), runtime implementation (`modelType`), and
31
+ artifact-size tier.
32
+
33
+ | Type | Input → output | Runtime-verified / cataloged | Representative lanes |
34
+ | --- | --- | --- | --- |
35
+ | Text generators | text → text | 12 / 14 | gemma-3-1b-it-q4k-ehf16-af32<br>gemma-3-270m-it-f16-af32<br>gemma-3-270m-it-q4k-ehf16-af32<br>+11 more |
36
+ | Multimodal generators | audio + image + text → text | 3 / 3 | gemma-4-e2b-it-q4k-ehf16-af16-int4ple<br>gemma-4-e2b-it-q4k-ehf16-af32<br>gemma-4-e2b-it-q4k-ehf16-af32-int4ple |
37
+ | Diffusion language models | text → text | 0 / 1 | diffusiongemma-26b-a4b-it-q4k-ehf16-af16 |
38
+ | Translation specialists | text → text | 2 / 2 | translategemma-4b-1b-enes-q4k-ehf16-af32<br>translategemma-4b-it-q4k-ehf16-af32 |
39
+ | Language embedders | text → pooled-embedding | 2 / 2 | google-embeddinggemma-300m-q4k-ehf16-af32<br>qwen-3-embedding-0-6b-q4k-ehf16-af32 |
40
+ | Rerankers | text-pair → relevance-score | 2 / 2 | qwen-3-reranker-0-6b-f16-af32<br>qwen-3-reranker-0-6b-q4k-ehf16-af32 |
41
+ | Protein encoders | protein-sequence → pooled-embedding + token-embedding + token-logits | 3 / 3 | amplify-120m-f16-af32<br>esm2-t12-35m-ur50d-f32-af32<br>esmc-300m-f32-af32 |
42
+ | Nucleotide encoders | dna-sequence → pooled-embedding + token-embedding | 1 / 1 | nucleotide-transformer-v2-50m-f32-af32 |
43
+
44
+ The [full model-support matrix](https://github.com/clocksmith/doppler/blob/main/docs/model-support-matrix.md)
45
+ lists every lane and its lifecycle evidence. Classification says what an
46
+ artifact is shaped to do; only lifecycle receipts establish what is
47
+ verified, and a runtime pass does not by itself qualify every declared input
48
+ modality.
49
+
50
+ <!-- model-type-clusters:end -->
51
+
25
52
  ## Evidence
26
53
 
27
- Doppler has lower steady-state inference latency than Transformers.js in each
54
+ Doppler has higher steady-state inference throughput than Transformers.js in each
28
55
  of the comparable browser WebGPU results indexed below.
29
56
 
30
- ![Metal and Vulkan browser WebGPU latency distributions](https://raw.githubusercontent.com/clocksmith/doppler/main/assets/doppler-webgpu-evidence.svg)
57
+ ![Metal and Vulkan browser WebGPU throughput distributions](https://raw.githubusercontent.com/clocksmith/doppler/main/assets/doppler-webgpu-evidence.svg)
31
58
 
32
- For text, faster means lower decode ms/token; for retrieval it means lower
33
- ms/embedding or ms/rerank. Every comparison passes its declared workload
59
+ Text uses tok/s, embeddings use embedding/s, and reranking uses rerank/s;
60
+ higher is faster. Every comparison passes its declared workload
34
61
  correctness gate. Model loading is separate: Transformers.js loads the Vulkan
35
62
  embedding and reranker artifacts faster. The
36
63
  [competition scoreboard](https://github.com/clocksmith/doppler/blob/main/docs/model-competition-scoreboard.md) links every
@@ -68,14 +95,64 @@ benchmark gates.
68
95
 
69
96
  ## How it works
70
97
 
71
- ```text
72
- +----------+ +------------------+ +--------------+ +-----------------+ +------------------+
73
- | Contract | --> | Candidate | --> | Parity gate | --> | Benchmark gate | --> | Retain or reject |
74
- | RDRR / | | model / plan / | | correctness | | comparable | | receipts / |
75
- | request | | kernel edit | | vs reference | | speed vs prior | | findings |
76
- +----------+ +------------------+ +--------------+ +-----------------+ +--------+---------+
77
- |
78
- next search <------+
98
+ ```mermaid
99
+ flowchart TB
100
+ subgraph Propose["1 · Propose"]
101
+ direction LR
102
+ HUMAN["Engineer or optimizer"]
103
+ CANDIDATE["Candidate edit<br/>manifest · plan · WGSL"]
104
+ HUMAN --> CANDIDATE
105
+ end
106
+
107
+ subgraph Run["2 · Resolve and run"]
108
+ direction LR
109
+ ARTIFACT["RDRR artifact<br/>manifest · weights · tokenizer"]
110
+ REQUEST["Request + runtime profile"]
111
+ VALIDATE["Validate contracts"]
112
+ RESOLVE["Resolve execution graph<br/>kernel refs · session"]
113
+ LOAD["Load + bind<br/>GPU buffers · cache"]
114
+ DISPATCH["Dispatch WGSL<br/>prefill · decode · retrieval"]
115
+ OUTPUT["Tokens · embeddings · scores"]
116
+
117
+ ARTIFACT --> VALIDATE
118
+ REQUEST --> VALIDATE
119
+ CANDIDATE --> VALIDATE
120
+ VALIDATE --> RESOLVE --> LOAD --> DISPATCH --> OUTPUT
121
+ end
122
+
123
+ subgraph Verify["3 · Evidence disposes"]
124
+ direction LR
125
+ PARITY{"Parity gate<br/>correct vs reference"}
126
+ BENCH{"Benchmark gate<br/>comparable speed vs prior"}
127
+ RETAIN["Retain<br/>versioned lane + receipt"]
128
+ REJECT["Reject<br/>finding + negative result"]
129
+
130
+ OUTPUT --> PARITY
131
+ PARITY -- pass --> BENCH
132
+ PARITY -- mismatch --> REJECT
133
+ BENCH -- pass --> RETAIN
134
+ BENCH -- fail --> REJECT
135
+ end
136
+
137
+ RETAIN -. reusable asset .-> HUMAN
138
+ REJECT -. search memory .-> HUMAN
139
+
140
+ classDef proposal fill:#fff1f3,stroke:#ff6b7a,color:#08090c,stroke-width:2px;
141
+ classDef runtime fill:#eef4ff,stroke:#5d8dff,color:#08090c,stroke-width:2px;
142
+ classDef gate fill:#f7f1ff,stroke:#b98cff,color:#08090c,stroke-width:2px;
143
+ classDef accepted fill:#08090c,stroke:#5d8dff,color:#ffffff,stroke-width:3px;
144
+ classDef rejected fill:#fff1f3,stroke:#ff6b7a,color:#08090c,stroke-width:2px;
145
+
146
+ class HUMAN,CANDIDATE proposal;
147
+ class ARTIFACT,REQUEST,VALIDATE,RESOLVE,LOAD,DISPATCH,OUTPUT runtime;
148
+ class PARITY,BENCH gate;
149
+ class RETAIN accepted;
150
+ class REJECT rejected;
151
+
152
+ style Propose fill:#fffafa,stroke:#ff6b7a,stroke-width:1px
153
+ style Run fill:#f8faff,stroke:#5d8dff,stroke-width:1px
154
+ style Verify fill:#fcfaff,stroke:#b98cff,stroke-width:1px
155
+ linkStyle default stroke:#5d8dff,stroke-width:2px;
79
156
  ```
80
157
 
81
158
  The full resolve, load, bind, dispatch, and readback flow lives in the