doppler-gpu 0.4.10 → 0.4.14

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 (131) hide show
  1. package/CHANGELOG.md +95 -0
  2. package/README.md +40 -1
  3. package/models/catalog.json +637 -32
  4. package/package.json +24 -3
  5. package/src/client/doppler-registry.js +6 -0
  6. package/src/client/doppler-registry.json +135 -13
  7. package/src/client/runtime/lora.d.ts +10 -0
  8. package/src/client/runtime/lora.js +69 -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/conversion/qwen3/qwen-3-5-0-8b-q4k-ehaf16.json +3 -2
  18. package/src/config/kernels/kernel-ref-digests.js +2 -1
  19. package/src/config/kernels/registry.json +73 -11
  20. package/src/config/merge.js +24 -0
  21. package/src/config/required-inference-fields-contract-check.js +2 -0
  22. package/src/config/schema/adapter.schema.d.ts +6 -1
  23. package/src/config/schema/adapter.schema.js +5 -0
  24. package/src/config/schema/converter.schema.d.ts +7 -0
  25. package/src/config/schema/converter.schema.js +15 -0
  26. package/src/config/schema/inference.schema.d.ts +8 -0
  27. package/src/config/schema/manifest.schema.d.ts +32 -1
  28. package/src/config/schema/manifest.schema.js +26 -0
  29. package/src/converter/conversion-plan.js +15 -1
  30. package/src/converter/core.js +5 -4
  31. package/src/converter/source-tensor-rules.d.ts +50 -0
  32. package/src/converter/source-tensor-rules.js +180 -0
  33. package/src/converter/source-tokenizer.d.ts +45 -0
  34. package/src/converter/source-tokenizer.js +155 -0
  35. package/src/experimental/adapters/artifact-contract.d.ts +83 -0
  36. package/src/experimental/adapters/artifact-contract.js +254 -0
  37. package/src/experimental/adapters/index.d.ts +25 -0
  38. package/src/experimental/adapters/index.js +12 -0
  39. package/src/experimental/adapters/lora-loader.js +24 -4
  40. package/src/experimental/bridge/trainer-artifact-bridge.d.ts +2 -1
  41. package/src/experimental/bridge/trainer-artifact-bridge.js +35 -13
  42. package/src/experimental/training/artifacts.d.ts +160 -0
  43. package/src/experimental/training/attention-backward.d.ts +64 -0
  44. package/src/experimental/training/attention-forward.d.ts +22 -0
  45. package/src/experimental/training/attention-forward.js +82 -0
  46. package/src/experimental/training/autograd.d.ts +76 -0
  47. package/src/experimental/training/checkpoint.d.ts +36 -0
  48. package/src/experimental/training/clip.d.ts +9 -0
  49. package/src/experimental/training/dataloader.d.ts +8 -0
  50. package/src/experimental/training/distillation/student-fixture.js +1 -0
  51. package/src/experimental/training/export.d.ts +41 -0
  52. package/src/experimental/training/lora-pipeline.d.ts +186 -0
  53. package/src/experimental/training/lora-pipeline.js +5 -0
  54. package/src/experimental/training/lora.d.ts +20 -0
  55. package/src/experimental/training/lora.js +4 -3
  56. package/src/experimental/training/loss-scaling.d.ts +21 -0
  57. package/src/experimental/training/loss.d.ts +10 -0
  58. package/src/experimental/training/native-qwen-lora.d.ts +106 -0
  59. package/src/experimental/training/native-qwen-lora.js +449 -0
  60. package/src/experimental/training/objectives/base.d.ts +58 -0
  61. package/src/experimental/training/optimizer.d.ts +22 -0
  62. package/src/experimental/training/optimizer.js +1 -0
  63. package/src/experimental/training/runner.d.ts +249 -0
  64. package/src/experimental/training/trainer.d.ts +89 -0
  65. package/src/experimental/training/workloads.d.ts +205 -0
  66. package/src/gpu/kernels/backward/adam.d.ts +1 -0
  67. package/src/gpu/kernels/backward/adam.js +6 -2
  68. package/src/gpu/kernels/backward/adam.wgsl +3 -2
  69. package/src/gpu/kernels/backward/matmul_backward_q4k.wgsl +90 -0
  70. package/src/gpu/kernels/backward/utils.js +18 -4
  71. package/src/inference/pipelines/text/attention/attn-config.js +2 -0
  72. package/src/inference/pipelines/text/attention/projections.js +161 -24
  73. package/src/inference/pipelines/text/attention/record.js +67 -9
  74. package/src/inference/pipelines/text/attention/run.js +60 -7
  75. package/src/inference/pipelines/text/attention/types.js +18 -9
  76. package/src/inference/pipelines/text/config.d.ts +5 -0
  77. package/src/inference/pipelines/text/config.js +91 -0
  78. package/src/inference/pipelines/text/ffn/dense.js +205 -2
  79. package/src/inference/pipelines/text/ffn/standard.js +50 -3
  80. package/src/inference/pipelines/text/generator-helpers.js +11 -1
  81. package/src/inference/pipelines/text/generator-runtime.js +63 -15
  82. package/src/inference/pipelines/text/generator-steps.js +3 -1
  83. package/src/inference/pipelines/text/generator.d.ts +5 -1
  84. package/src/inference/pipelines/text/generator.js +196 -3
  85. package/src/inference/pipelines/text/init-qkv-fusion.js +85 -1
  86. package/src/inference/pipelines/text/init.d.ts +2 -0
  87. package/src/inference/pipelines/text/init.js +2 -0
  88. package/src/inference/pipelines/text/layer.js +6 -0
  89. package/src/inference/pipelines/text/linear-attention.d.ts +2 -0
  90. package/src/inference/pipelines/text/linear-attention.js +77 -6
  91. package/src/inference/pipelines/text/logits/cpu.d.ts +6 -0
  92. package/src/inference/pipelines/text/logits/cpu.js +22 -0
  93. package/src/inference/pipelines/text/logits/index.d.ts +1 -1
  94. package/src/inference/pipelines/text/logits/index.js +85 -11
  95. package/src/inference/pipelines/text/logits/types.d.ts +4 -0
  96. package/src/inference/pipelines/text/lora-types.d.ts +6 -1
  97. package/src/inference/pipelines/text/lora-types.js +5 -0
  98. package/src/inference/pipelines/text/ops.js +33 -0
  99. package/src/inference/pipelines/text/types.d.ts +66 -0
  100. package/src/inference/pipelines/text/weights.d.ts +10 -0
  101. package/src/inference/pipelines/text/weights.js +33 -1
  102. package/src/inference/pipelines/text.d.ts +9 -2
  103. package/src/inference/pipelines/text.js +116 -0
  104. package/src/inference/tokenizers/behavior-flags.js +5 -1
  105. package/src/inference/tokenizers/bundled.js +99 -8
  106. package/src/loader/doppler-loader.d.ts +2 -0
  107. package/src/loader/doppler-loader.js +9 -0
  108. package/src/loader/final-weights-loader.d.ts +8 -0
  109. package/src/loader/final-weights-loader.js +42 -0
  110. package/src/loader/layer-loader.d.ts +6 -0
  111. package/src/loader/layer-loader.js +102 -3
  112. package/src/loader/loader-types.d.ts +15 -2
  113. package/src/models/diffusiongemma.js +1 -1
  114. package/src/models/embeddinggemma.js +1 -1
  115. package/src/models/gemma3.js +1 -1
  116. package/src/models/gemma4.js +1 -1
  117. package/src/models/qwen3.js +1 -1
  118. package/src/tooling/hf-registry-utils.js +1 -1
  119. package/src/tooling/node-browser-command-runner.d.ts +16 -0
  120. package/src/tooling/node-browser-command-runner.js +1 -1
  121. package/src/tooling/node-converter.js +33 -1
  122. package/src/tooling/node-webgpu.js +85 -2
  123. package/src/training-browser.d.ts +19 -0
  124. package/src/training-browser.js +13 -0
  125. package/src/training.d.ts +137 -0
  126. package/src/training.js +219 -0
  127. package/src/version.js +1 -1
  128. package/tests/kernels/browser/kernel-suite.js +9 -1
  129. package/tests/kernels/browser/test-page.js +4 -2
  130. package/tests/kernels/reference/adam.js +4 -2
  131. package/NOTICE +0 -5
package/CHANGELOG.md CHANGED
@@ -8,6 +8,101 @@ docs so the `0.1.x` line has one conventional npm-visible history surface.
8
8
 
9
9
  ## [Unreleased]
10
10
 
11
+ ## [0.4.14] - 2026-07-19
12
+
13
+ ### Added
14
+
15
+ - Added native browser, Node, and Bun LoRA training for the final Qwen 3.5
16
+ 0.8B `down_proj` over frozen row-wise Q4K base weights. The bounded native
17
+ path uses completion-masked causal-LM loss, AdamW, deterministic
18
+ checkpoint/resume, and runtime-loadable safetensors/RDRR export.
19
+ - Added Q4K frozen-weight input gradients for the native LoRA suffix and a
20
+ production inference capture contract for the final feed-forward activation.
21
+
22
+ ### Fixed
23
+
24
+ - Replaced the Qwen capability gate that incorrectly treated frozen Q4K base
25
+ weights as preventing native LoRA optimization. Other Qwen targets remain
26
+ unavailable on the native backend until their full backward graphs exist.
27
+ - Added explicit provider teardown to the validated Bun operator sequence;
28
+ model unload alone does not release Dawn's host-owned callback pump.
29
+
30
+ ### Release status
31
+
32
+ - `0.4.13` was tagged but never published. Its tarball is an invalid release
33
+ candidate because it rejects the supported native Qwen target. `0.4.14`
34
+ supersedes it; npm `latest` must not be updated with the `0.4.13` tarball.
35
+
36
+ ## [0.4.13] - 2026-07-19
37
+
38
+ ### Added
39
+
40
+ - Added the public `doppler-gpu/training` npm entry point for capability-gated
41
+ SFT/LoRA workloads, WebGPU autograd and optimization primitives, checkpoint
42
+ evaluation, and runtime-compatible safetensors adapter export.
43
+ - Added explicit `webgpu_native` and `external` training-backend selection.
44
+ Packed Q4K Gemma and Qwen workloads fail closed on the native backend and
45
+ require an injected or workload-declared external trainer.
46
+
47
+ ### Changed
48
+
49
+ - Added installed-package import, type, and capability smokes for the training
50
+ entry point so repository-only deep imports cannot masquerade as npm support.
51
+
52
+ ## [0.4.12] - 2026-07-19
53
+
54
+ ### Added
55
+
56
+ - Added LoRA activation for Qwen 3.5 linear-attention projections, including
57
+ `in_proj_a`, `in_proj_b`, `in_proj_qkv`, `in_proj_z`, and `out_proj` PEFT
58
+ targets, with deterministic intermediate-buffer cleanup.
59
+ - Added immutable adapter-custody catalog validation for preserved WGSL Repair
60
+ artifacts and their exact base-model, tokenizer, conversion, and source
61
+ lineage.
62
+
63
+ ### Changed
64
+
65
+ - Corrected the Qwen 3.5 0.8B chat contract to use the Qwen template with
66
+ thinking disabled, and published the refreshed complete RDRR artifact at an
67
+ immutable hosted revision.
68
+ - Reconciled WGSL Writer V3 campaign records with explicit generation budgets
69
+ and finite confirmation metrics; this does not promote general shader
70
+ authorship.
71
+
72
+ ## [0.4.11] - 2026-07-19
73
+
74
+ ### Added
75
+
76
+ - Added manifest-first conversion and WebGPU inference support for four
77
+ biological sequence encoders: ESM-2 35M, Nucleotide Transformer v2 50M,
78
+ AMPLIFY 120M, and ESMC 300M.
79
+ - Published hosted RDRR registry lanes and Node/WebGPU qualification evidence
80
+ for tokenizer identity, finite outputs, reference parity, and synthetic LoRA
81
+ activation/unload behavior. This evidence does not claim downstream
82
+ biological-task quality or trained-adapter quality.
83
+ - Added source tokenizer and tensor-mapping contracts for importing sequence
84
+ checkpoints without runtime family detection.
85
+ - Added a model taxonomy for domain, task, architecture role, inputs, and
86
+ outputs, and exposed that classification through the quickstart registry.
87
+ - Added the `tinker_peft_browser_adapter` trainer-artifact bridge profile with
88
+ explicit Gamma selection authority and browser-parity requirements.
89
+
90
+ ### Changed
91
+
92
+ - Extended the text pipeline and loader contracts for bidirectional sequence
93
+ encoders, including model-declared normalization and logits bias, QK
94
+ normalization shape, token-level outputs, and sequence embedding results.
95
+ - Expanded WGSL Writer V3 corpus, semantic-oracle, training, and evaluation
96
+ contracts after the four reference packages passed AMD/Vulkan Chromium
97
+ execution qualification. General shader authorship remains unproven.
98
+ - Rebuilt kernel reachability metadata for the current 301 registered
99
+ variants.
100
+
101
+ ### Fixed
102
+
103
+ - Required WGSL Writer V3 evaluation receipts to disclose output-generation
104
+ budgets so compared lanes cannot hide unequal generation work.
105
+
11
106
  ## [0.4.10] - 2026-07-18
12
107
 
13
108
  ### Fixed
package/README.md CHANGED
@@ -22,6 +22,45 @@ 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
+
52
+ ## Supported LoRA adapters (PEFT)
53
+
54
+ Doppler supports runtime loading and hot-swapping of LoRA adapters (in SafeTensors format) bound to specific base models.
55
+
56
+ | Adapter ID | Base Model ID | HF Repository | Lifecycle & Purpose |
57
+ | --- | --- | --- | --- |
58
+ | `doppler-wgsl-qwen35-9b-v12-external20-seed11` | `qwen-3-5-9b-f16-af32` | [clocksmith/lora](https://huggingface.co/clocksmith/lora/blob/5662f8f7e3dbcf1e2ec353b5a04d0d4f2f5254ce/adapters/seed11/adapter_model.safetensors) | Preserved portable adapter (v12) |
59
+ | `doppler-wgsl-qwen35-9b-v12-external20-seed29` | `qwen-3-5-9b-f16-af32` | [clocksmith/lora](https://huggingface.co/clocksmith/lora/blob/5662f8f7e3dbcf1e2ec353b5a04d0d4f2f5254ce/adapters/seed29/adapter_model.safetensors) | Candidate adapter for repair validation (v12) |
60
+ | `doppler-wgsl-qwen35-9b-v12-external20-seed47` | `qwen-3-5-9b-f16-af32` | [clocksmith/lora](https://huggingface.co/clocksmith/lora/blob/5662f8f7e3dbcf1e2ec353b5a04d0d4f2f5254ce/adapters/seed47/adapter_model.safetensors) | Preserved portable adapter (v12) |
61
+
62
+ Active adapters are registered in [models/adapters/catalog.json](models/adapters/catalog.json). See the [LoRA Format specification](docs/lora-format.md) for details on the adapter manifest schema.
63
+
25
64
  ## Evidence
26
65
 
27
66
  Doppler has higher steady-state inference throughput than Transformers.js in each
@@ -189,7 +228,7 @@ const response = await client.chat.completions.create({
189
228
  });
190
229
  ```
191
230
 
192
- Registry IDs resolve to hosted RDRR artifacts from `Clocksmith/rdrr` by default. See the [Root API guide](https://github.com/clocksmith/doppler/blob/main/docs/api/root.md).
231
+ Registry IDs resolve to hosted RDRR artifacts from `clocksmith/rdrr` by default. See the [Root API guide](https://github.com/clocksmith/doppler/blob/main/docs/api/root.md).
193
232
 
194
233
  ## Start here
195
234