doppler-gpu 0.4.11 → 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 (73) hide show
  1. package/CHANGELOG.md +61 -0
  2. package/README.md +13 -1
  3. package/models/catalog.json +29 -29
  4. package/package.json +12 -3
  5. package/src/client/doppler-registry.json +9 -9
  6. package/src/client/runtime/lora.js +5 -0
  7. package/src/config/conversion/qwen3/qwen-3-5-0-8b-q4k-ehaf16.json +3 -2
  8. package/src/config/kernels/kernel-ref-digests.js +2 -1
  9. package/src/config/kernels/registry.json +21 -2
  10. package/src/config/schema/adapter.schema.d.ts +6 -1
  11. package/src/config/schema/adapter.schema.js +5 -0
  12. package/src/experimental/adapters/artifact-contract.d.ts +83 -0
  13. package/src/experimental/adapters/artifact-contract.js +254 -0
  14. package/src/experimental/adapters/index.d.ts +25 -0
  15. package/src/experimental/adapters/index.js +12 -0
  16. package/src/experimental/adapters/lora-loader.js +9 -4
  17. package/src/experimental/training/artifacts.d.ts +160 -0
  18. package/src/experimental/training/attention-backward.d.ts +64 -0
  19. package/src/experimental/training/attention-forward.d.ts +22 -0
  20. package/src/experimental/training/attention-forward.js +82 -0
  21. package/src/experimental/training/autograd.d.ts +76 -0
  22. package/src/experimental/training/checkpoint.d.ts +36 -0
  23. package/src/experimental/training/clip.d.ts +9 -0
  24. package/src/experimental/training/dataloader.d.ts +8 -0
  25. package/src/experimental/training/distillation/student-fixture.js +1 -0
  26. package/src/experimental/training/export.d.ts +41 -0
  27. package/src/experimental/training/lora-pipeline.d.ts +186 -0
  28. package/src/experimental/training/lora-pipeline.js +5 -0
  29. package/src/experimental/training/lora.d.ts +20 -0
  30. package/src/experimental/training/lora.js +4 -3
  31. package/src/experimental/training/loss-scaling.d.ts +21 -0
  32. package/src/experimental/training/loss.d.ts +10 -0
  33. package/src/experimental/training/native-qwen-lora.d.ts +106 -0
  34. package/src/experimental/training/native-qwen-lora.js +449 -0
  35. package/src/experimental/training/objectives/base.d.ts +58 -0
  36. package/src/experimental/training/optimizer.d.ts +22 -0
  37. package/src/experimental/training/optimizer.js +1 -0
  38. package/src/experimental/training/runner.d.ts +249 -0
  39. package/src/experimental/training/trainer.d.ts +89 -0
  40. package/src/experimental/training/workloads.d.ts +205 -0
  41. package/src/gpu/kernels/backward/adam.d.ts +1 -0
  42. package/src/gpu/kernels/backward/adam.js +6 -2
  43. package/src/gpu/kernels/backward/adam.wgsl +3 -2
  44. package/src/gpu/kernels/backward/matmul_backward_q4k.wgsl +90 -0
  45. package/src/gpu/kernels/backward/utils.js +18 -4
  46. package/src/inference/pipelines/text/ffn/dense.js +16 -0
  47. package/src/inference/pipelines/text/generator.d.ts +5 -1
  48. package/src/inference/pipelines/text/generator.js +106 -0
  49. package/src/inference/pipelines/text/linear-attention.d.ts +2 -0
  50. package/src/inference/pipelines/text/linear-attention.js +77 -6
  51. package/src/inference/pipelines/text/lora-types.d.ts +6 -1
  52. package/src/inference/pipelines/text/lora-types.js +5 -0
  53. package/src/inference/pipelines/text/ops.js +1 -0
  54. package/src/inference/pipelines/text/types.d.ts +28 -0
  55. package/src/inference/pipelines/text.d.ts +7 -2
  56. package/src/inference/pipelines/text.js +4 -0
  57. package/src/models/diffusiongemma.js +1 -1
  58. package/src/models/embeddinggemma.js +1 -1
  59. package/src/models/gemma3.js +1 -1
  60. package/src/models/gemma4.js +1 -1
  61. package/src/models/qwen3.js +1 -1
  62. package/src/tooling/hf-registry-utils.js +1 -1
  63. package/src/tooling/node-browser-command-runner.d.ts +16 -0
  64. package/src/tooling/node-browser-command-runner.js +1 -1
  65. package/src/training-browser.d.ts +19 -0
  66. package/src/training-browser.js +13 -0
  67. package/src/training.d.ts +137 -0
  68. package/src/training.js +219 -0
  69. package/src/version.js +1 -1
  70. package/tests/kernels/browser/kernel-suite.js +9 -1
  71. package/tests/kernels/browser/test-page.js +4 -2
  72. package/tests/kernels/reference/adam.js +4 -2
  73. package/NOTICE +0 -5
package/CHANGELOG.md CHANGED
@@ -8,6 +8,67 @@ 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
+
11
72
  ## [0.4.11] - 2026-07-19
12
73
 
13
74
  ### Added
package/README.md CHANGED
@@ -49,6 +49,18 @@ modality.
49
49
 
50
50
  <!-- model-type-clusters:end -->
51
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
+
52
64
  ## Evidence
53
65
 
54
66
  Doppler has higher steady-state inference throughput than Transformers.js in each
@@ -216,7 +228,7 @@ const response = await client.chat.completions.create({
216
228
  });
217
229
  ```
218
230
 
219
- 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).
220
232
 
221
233
  ## Start here
222
234
 
@@ -35,8 +35,8 @@
35
35
  "format": "rdrr"
36
36
  },
37
37
  "hf": {
38
- "repoId": "Clocksmith/rdrr",
39
- "revision": "7e194b4a6824a8b71cbd0eaa511d9f2c7e1c0129",
38
+ "repoId": "clocksmith/rdrr",
39
+ "revision": "a8591b20bce7c22d75becde1315482e76ff85fc9",
40
40
  "path": "models/gemma-3-270m-it-q4k-ehf16-af32"
41
41
  },
42
42
  "baseUrl": null,
@@ -125,7 +125,7 @@
125
125
  "format": "rdrr"
126
126
  },
127
127
  "hf": {
128
- "repoId": "Clocksmith/rdrr",
128
+ "repoId": "clocksmith/rdrr",
129
129
  "revision": null,
130
130
  "path": "models/gemma-3-270m-it-f16-af32"
131
131
  },
@@ -197,7 +197,7 @@
197
197
  "format": "rdrr"
198
198
  },
199
199
  "hf": {
200
- "repoId": "Clocksmith/rdrr",
200
+ "repoId": "clocksmith/rdrr",
201
201
  "revision": "95f0b29ec73dea70394c6bcfa8407bc6796df6c9",
202
202
  "path": "models/google-embeddinggemma-300m-q4k-ehf16-af32"
203
203
  },
@@ -275,7 +275,7 @@
275
275
  "format": "rdrr"
276
276
  },
277
277
  "hf": {
278
- "repoId": "Clocksmith/rdrr",
278
+ "repoId": "clocksmith/rdrr",
279
279
  "revision": "7c3d30e300bcb02cbd68fb0db3eee64fbf738f99",
280
280
  "path": "models/gemma-3-1b-it-q4k-ehf16-af32"
281
281
  },
@@ -357,7 +357,7 @@
357
357
  "format": "rdrr"
358
358
  },
359
359
  "hf": {
360
- "repoId": "Clocksmith/rdrr",
360
+ "repoId": "clocksmith/rdrr",
361
361
  "revision": "2070777c77047d54e6eae105f6dcb1891cf6f21a",
362
362
  "path": "models/gemma-4-e2b-it-q4k-ehf16-af32"
363
363
  },
@@ -438,7 +438,7 @@
438
438
  "format": "rdrr"
439
439
  },
440
440
  "hf": {
441
- "repoId": "Clocksmith/rdrr",
441
+ "repoId": "clocksmith/rdrr",
442
442
  "path": "models/gemma-4-e2b-it-q4k-ehf16-af32-int4ple",
443
443
  "revision": "16256bf16dc8f92b8fe5105b07628cef91587f0a"
444
444
  },
@@ -524,7 +524,7 @@
524
524
  "format": "rdrr"
525
525
  },
526
526
  "hf": {
527
- "repoId": "Clocksmith/rdrr",
527
+ "repoId": "clocksmith/rdrr",
528
528
  "revision": "2d326649ae3d04b83323de0e6247e1e42fb1d9af",
529
529
  "path": "models/gemma-4-e2b-it-q4k-ehf16-af16-int4ple"
530
530
  },
@@ -602,7 +602,7 @@
602
602
  "format": "rdrr"
603
603
  },
604
604
  "hf": {
605
- "repoId": "Clocksmith/rdrr",
605
+ "repoId": "clocksmith/rdrr",
606
606
  "revision": null,
607
607
  "path": "models/gemma-4-12b-it-text-q4k-ehf16-af32"
608
608
  },
@@ -675,7 +675,7 @@
675
675
  "format": "rdrr"
676
676
  },
677
677
  "hf": {
678
- "repoId": "Clocksmith/rdrr",
678
+ "repoId": "clocksmith/rdrr",
679
679
  "revision": null,
680
680
  "path": "models/gemma-4-12b-it-text-q4k-ehf16-af16"
681
681
  },
@@ -749,7 +749,7 @@
749
749
  "format": "rdrr"
750
750
  },
751
751
  "hf": {
752
- "repoId": "Clocksmith/rdrr",
752
+ "repoId": "clocksmith/rdrr",
753
753
  "revision": null,
754
754
  "path": "models/gemma-4-12b-it-text-w4a16-ct-ehf16-af16"
755
755
  },
@@ -881,7 +881,7 @@
881
881
  "format": "rdrr"
882
882
  },
883
883
  "hf": {
884
- "repoId": "Clocksmith/rdrr",
884
+ "repoId": "clocksmith/rdrr",
885
885
  "revision": null,
886
886
  "path": "models/gemma-4-31b-it-text-q4k-ehf16-af32"
887
887
  },
@@ -959,7 +959,7 @@
959
959
  "format": "rdrr"
960
960
  },
961
961
  "hf": {
962
- "repoId": "Clocksmith/rdrr",
962
+ "repoId": "clocksmith/rdrr",
963
963
  "revision": null,
964
964
  "path": "models/gemma-4-31b-it-text-q4k-ehf16-af16"
965
965
  },
@@ -1033,7 +1033,7 @@
1033
1033
  "format": "rdrr"
1034
1034
  },
1035
1035
  "hf": {
1036
- "repoId": "Clocksmith/rdrr",
1036
+ "repoId": "clocksmith/rdrr",
1037
1037
  "path": "models/translategemma-4b-1b-enes-q4k-ehf16-af32",
1038
1038
  "revision": "1e2c047357f07dfe45a8effc2fa915acd73999ee"
1039
1039
  },
@@ -1111,7 +1111,7 @@
1111
1111
  "format": "rdrr"
1112
1112
  },
1113
1113
  "hf": {
1114
- "repoId": "Clocksmith/rdrr",
1114
+ "repoId": "clocksmith/rdrr",
1115
1115
  "revision": "6fc46049882e961a57d1690ba1ffde21677d001a",
1116
1116
  "path": "models/translategemma-4b-it-q4k-ehf16-af32"
1117
1117
  },
@@ -1189,7 +1189,7 @@
1189
1189
  "format": "rdrr"
1190
1190
  },
1191
1191
  "hf": {
1192
- "repoId": "Clocksmith/rdrr",
1192
+ "repoId": "clocksmith/rdrr",
1193
1193
  "revision": "049000f49325dca7db2ed2c9de2c8881bd0f4603",
1194
1194
  "path": "models/qwen-3-embedding-0-6b-q4k-ehf16-af32"
1195
1195
  },
@@ -1277,7 +1277,7 @@
1277
1277
  "format": "rdrr"
1278
1278
  },
1279
1279
  "hf": {
1280
- "repoId": "Clocksmith/rdrr",
1280
+ "repoId": "clocksmith/rdrr",
1281
1281
  "revision": "f86fe245b9bbc275cd69af46b1d45d47ea685a55",
1282
1282
  "path": "models/qwen-3-reranker-0-6b-q4k-ehf16-af32"
1283
1283
  },
@@ -1375,7 +1375,7 @@
1375
1375
  "format": "rdrr"
1376
1376
  },
1377
1377
  "hf": {
1378
- "repoId": "Clocksmith/rdrr",
1378
+ "repoId": "clocksmith/rdrr",
1379
1379
  "revision": "cc1fafff8cda609372b608cd92e487f6a2c32bc8",
1380
1380
  "path": "models/qwen-3-reranker-0-6b-f16-af32"
1381
1381
  },
@@ -1535,8 +1535,8 @@
1535
1535
  "format": "rdrr"
1536
1536
  },
1537
1537
  "hf": {
1538
- "repoId": "Clocksmith/rdrr",
1539
- "revision": "f58f1d0b58641c84e7ea50d13fea0dd4dc91389a",
1538
+ "repoId": "clocksmith/rdrr",
1539
+ "revision": "80d7716270b6371d541de979eff3370edaf34e13",
1540
1540
  "path": "models/qwen-3-5-0-8b-q4k-ehaf16"
1541
1541
  },
1542
1542
  "baseUrl": null,
@@ -1569,7 +1569,7 @@
1569
1569
  "result": "pass",
1570
1570
  "lastVerifiedAt": "2026-06-15",
1571
1571
  "source": "local-node-webgpu-verify",
1572
- "notes": "Browser/Node release evidence is package-visible at reports/release-claims/qwen-3-5-0-8b-q4k-ehaf16/2026-05-10T02-22-04.891Z.json. The hosted Clocksmith/rdrr artifact is approved for quickstart resolution with explicit stop-token metadata.",
1572
+ "notes": "Browser/Node release evidence is package-visible at reports/release-claims/qwen-3-5-0-8b-q4k-ehaf16/2026-05-10T02-22-04.891Z.json. The hosted clocksmith/rdrr artifact is approved for quickstart resolution with explicit stop-token metadata.",
1573
1573
  "contracts": {
1574
1574
  "executionContractOk": true
1575
1575
  }
@@ -1637,7 +1637,7 @@
1637
1637
  "format": "rdrr"
1638
1638
  },
1639
1639
  "hf": {
1640
- "repoId": "Clocksmith/rdrr",
1640
+ "repoId": "clocksmith/rdrr",
1641
1641
  "revision": "977d145bf2478a7fb542e6aca65030585620ca60",
1642
1642
  "path": "models/qwen-3-5-2b-q4k-ehaf16"
1643
1643
  },
@@ -1671,7 +1671,7 @@
1671
1671
  "result": "pass",
1672
1672
  "lastVerifiedAt": "2026-06-15",
1673
1673
  "source": "local-node-webgpu-verify",
1674
- "notes": "Browser/Node release evidence is package-visible at reports/release-claims/qwen-3-5-2b-q4k-ehaf16/2026-05-03T02-33-21.397Z.json. The execution-v1 lane keeps the fixed fused-Q4 decode path and q4 LM-head/prefill kernels; the hosted Clocksmith/rdrr artifact is approved for quickstart resolution with explicit stop-token metadata.",
1674
+ "notes": "Browser/Node release evidence is package-visible at reports/release-claims/qwen-3-5-2b-q4k-ehaf16/2026-05-03T02-33-21.397Z.json. The execution-v1 lane keeps the fixed fused-Q4 decode path and q4 LM-head/prefill kernels; the hosted clocksmith/rdrr artifact is approved for quickstart resolution with explicit stop-token metadata.",
1675
1675
  "contracts": {
1676
1676
  "executionContractOk": true
1677
1677
  }
@@ -1720,7 +1720,7 @@
1720
1720
  "format": "rdrr"
1721
1721
  },
1722
1722
  "hf": {
1723
- "repoId": "Clocksmith/rdrr",
1723
+ "repoId": "clocksmith/rdrr",
1724
1724
  "revision": "b402f6f27837857d51636da5f78c12bcd47e2a03",
1725
1725
  "path": "models/qwen-3-6-27b-q4k-ehaf16"
1726
1726
  },
@@ -1798,7 +1798,7 @@
1798
1798
  "format": "rdrr"
1799
1799
  },
1800
1800
  "hf": {
1801
- "repoId": "Clocksmith/rdrr",
1801
+ "repoId": "clocksmith/rdrr",
1802
1802
  "revision": "3dee21b3b12d65ac7fef9b24cbf759cacc953a67",
1803
1803
  "path": "models/qwen-3-6-27b-q4k-eaf16"
1804
1804
  },
@@ -1932,7 +1932,7 @@
1932
1932
  "format": "rdrr"
1933
1933
  },
1934
1934
  "hf": {
1935
- "repoId": "Clocksmith/rdrr",
1935
+ "repoId": "clocksmith/rdrr",
1936
1936
  "path": "models/amplify-120m-f16-af32",
1937
1937
  "revision": "990de206946a0972cc92e9dbcc9726399d257cac"
1938
1938
  },
@@ -2004,7 +2004,7 @@
2004
2004
  "format": "rdrr"
2005
2005
  },
2006
2006
  "hf": {
2007
- "repoId": "Clocksmith/rdrr",
2007
+ "repoId": "clocksmith/rdrr",
2008
2008
  "path": "models/esm2-t12-35m-ur50d-f32-af32",
2009
2009
  "revision": "feea324bae6c06c9d129ce39e188a75478ccdbbc"
2010
2010
  },
@@ -2076,7 +2076,7 @@
2076
2076
  "format": "rdrr"
2077
2077
  },
2078
2078
  "hf": {
2079
- "repoId": "Clocksmith/rdrr",
2079
+ "repoId": "clocksmith/rdrr",
2080
2080
  "path": "models/esmc-300m-f32-af32",
2081
2081
  "revision": "8354795dc544798ca7a4419bf00f844648f4b6f0"
2082
2082
  },
@@ -2148,7 +2148,7 @@
2148
2148
  "format": "rdrr"
2149
2149
  },
2150
2150
  "hf": {
2151
- "repoId": "Clocksmith/rdrr",
2151
+ "repoId": "clocksmith/rdrr",
2152
2152
  "path": "models/nucleotide-transformer-v2-50m-f32-af32",
2153
2153
  "revision": "a5703ef6971cc883438a393d73f2f54dccf94976"
2154
2154
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "doppler-gpu",
3
- "version": "0.4.11",
3
+ "version": "0.4.14",
4
4
  "description": "Browser-native WebGPU inference engine for local intent and inference loops",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -30,6 +30,8 @@
30
30
  "program-bundle:parity": "node tools/check-program-bundle-parity.js examples/program-bundles/gemma-3-270m-it-q4k-ehf16-af32.program-bundle.json",
31
31
  "artifact-identity:inventory": "node tools/artifact-identity-inventory.js",
32
32
  "artifact-identity:check": "node tools/artifact-identity-inventory.js --check",
33
+ "adapter-artifacts:check": "node tools/check-adapter-artifact-catalog.js",
34
+ "adapter-artifacts:verify-local": "node tools/check-adapter-artifact-catalog.js --verify-local-bytes",
33
35
  "ci:check": "npm run test:ci && npm run kernels:check && npm run check:green",
34
36
  "ci:contracts:check": "node tools/check-contract-artifacts.js --with-lean --lean-require-manifest-match",
35
37
  "ci:diffusion:contract": "node tools/ci-diffusion-contract-gates.js",
@@ -87,7 +89,7 @@
87
89
  "goals:check": "node tools/check-goal-completion.js",
88
90
  "goals:report": "node tools/render-goal-completion-summary.js",
89
91
  "commands:surface:check": "node tools/check-command-surface-contract.js",
90
- "check:green": "npm run agents:verify && npm run goals:check && npm run public:boundaries:check && npm run package:smoke && npm run commands:surface:check && npm run api:docs:check && npm run config:single-source:check && npm run capability-policy:check && npm run imports:check:browser && npm run pending:check && npm run exports:parity:check && npm run artifact:contract:check && npm run claims:evidence:check && npm run support:subsystems:check && npm run policy:schemas:check",
92
+ "check:green": "npm run agents:verify && npm run goals:check && npm run public:boundaries:check && npm run package:smoke && npm run commands:surface:check && npm run api:docs:check && npm run config:single-source:check && npm run capability-policy:check && npm run imports:check:browser && npm run pending:check && npm run exports:parity:check && npm run artifact:contract:check && npm run adapter-artifacts:check && npm run claims:evidence:check && npm run support:subsystems:check && npm run policy:schemas:check",
91
93
  "verify:model": "node src/cli/doppler-cli.js verify",
92
94
  "quickstart:sync": "node tools/sync-quickstart-registry.js",
93
95
  "quickstart:check": "node tools/sync-quickstart-registry.js --check",
@@ -285,6 +287,14 @@
285
287
  "types": "./src/generation/index.d.ts",
286
288
  "import": "./src/generation/index.js"
287
289
  },
290
+ "./training": {
291
+ "browser": {
292
+ "types": "./src/training-browser.d.ts",
293
+ "default": "./src/training-browser.js"
294
+ },
295
+ "types": "./src/training.d.ts",
296
+ "import": "./src/training.js"
297
+ },
288
298
  "./diffusion": {
289
299
  "types": "./src/experimental/diffusion/index.d.ts",
290
300
  "import": "./src/experimental/diffusion/index.js"
@@ -338,7 +348,6 @@
338
348
  "README.md",
339
349
  "CHANGELOG.md",
340
350
  "LICENSE",
341
- "NOTICE",
342
351
  "tools/convert-safetensors-node.js"
343
352
  ],
344
353
  "devDependencies": {
@@ -39,8 +39,8 @@
39
39
  "label": "Text generators"
40
40
  },
41
41
  "hf": {
42
- "repoId": "Clocksmith/rdrr",
43
- "revision": "7e194b4a6824a8b71cbd0eaa511d9f2c7e1c0129",
42
+ "repoId": "clocksmith/rdrr",
43
+ "revision": "a8591b20bce7c22d75becde1315482e76ff85fc9",
44
44
  "path": "models/gemma-3-270m-it-q4k-ehf16-af32"
45
45
  },
46
46
  "vendorBenchmark": {
@@ -91,7 +91,7 @@
91
91
  "label": "Language embedders"
92
92
  },
93
93
  "hf": {
94
- "repoId": "Clocksmith/rdrr",
94
+ "repoId": "clocksmith/rdrr",
95
95
  "revision": "95f0b29ec73dea70394c6bcfa8407bc6796df6c9",
96
96
  "path": "models/google-embeddinggemma-300m-q4k-ehf16-af32"
97
97
  },
@@ -136,7 +136,7 @@
136
136
  "label": "Text generators"
137
137
  },
138
138
  "hf": {
139
- "repoId": "Clocksmith/rdrr",
139
+ "repoId": "clocksmith/rdrr",
140
140
  "revision": "7c3d30e300bcb02cbd68fb0db3eee64fbf738f99",
141
141
  "path": "models/gemma-3-1b-it-q4k-ehf16-af32"
142
142
  },
@@ -183,7 +183,7 @@
183
183
  "label": "Multimodal generators"
184
184
  },
185
185
  "hf": {
186
- "repoId": "Clocksmith/rdrr",
186
+ "repoId": "clocksmith/rdrr",
187
187
  "revision": "2070777c77047d54e6eae105f6dcb1891cf6f21a",
188
188
  "path": "models/gemma-4-e2b-it-q4k-ehf16-af32"
189
189
  },
@@ -230,7 +230,7 @@
230
230
  "label": "Multimodal generators"
231
231
  },
232
232
  "hf": {
233
- "repoId": "Clocksmith/rdrr",
233
+ "repoId": "clocksmith/rdrr",
234
234
  "revision": "16256bf16dc8f92b8fe5105b07628cef91587f0a",
235
235
  "path": "models/gemma-4-e2b-it-q4k-ehf16-af32-int4ple"
236
236
  },
@@ -276,8 +276,8 @@
276
276
  "label": "Text generators"
277
277
  },
278
278
  "hf": {
279
- "repoId": "Clocksmith/rdrr",
280
- "revision": "f58f1d0b58641c84e7ea50d13fea0dd4dc91389a",
279
+ "repoId": "clocksmith/rdrr",
280
+ "revision": "80d7716270b6371d541de979eff3370edaf34e13",
281
281
  "path": "models/qwen-3-5-0-8b-q4k-ehaf16"
282
282
  },
283
283
  "vendorBenchmark": {
@@ -322,7 +322,7 @@
322
322
  "label": "Text generators"
323
323
  },
324
324
  "hf": {
325
- "repoId": "Clocksmith/rdrr",
325
+ "repoId": "clocksmith/rdrr",
326
326
  "revision": "977d145bf2478a7fb542e6aca65030585620ca60",
327
327
  "path": "models/qwen-3-5-2b-q4k-ehaf16"
328
328
  },
@@ -13,6 +13,11 @@ const LORA_TARGET_WEIGHT_KEYS = Object.freeze({
13
13
  up_proj: 'up',
14
14
  down_proj: 'down',
15
15
  gate_up_proj: 'gateUp',
16
+ in_proj_a: 'linearInProjA',
17
+ in_proj_b: 'linearInProjB',
18
+ in_proj_qkv: 'qkvProj',
19
+ in_proj_z: 'linearInProjZ',
20
+ out_proj: 'oProj',
16
21
  });
17
22
 
18
23
  async function getExperimentalLoRAModule() {
@@ -160,8 +160,9 @@
160
160
  "residualBranchScale": 1
161
161
  },
162
162
  "chatTemplate": {
163
- "type": "chatml",
164
- "enabled": true
163
+ "type": "qwen",
164
+ "enabled": true,
165
+ "thinking": false
165
166
  }
166
167
  },
167
168
  "session": {
@@ -38,7 +38,7 @@ export const KERNEL_REF_CONTENT_DIGESTS = Object.freeze({
38
38
  "attention_streaming_f16kv.wgsl#main": "c3ec920699a81ee6df04a64eb0ea2477bec168ebb809af29f2d4b0924a4bdf8f",
39
39
  "attention_streaming.wgsl#main": "bf6e44bbd021bd6752c311735f577a5ff05327f69fc7712d548ed3c84a8f4149",
40
40
  "attention.wgsl#main": "9e066a9a201a8b10707995a4b64322c68641873afb017e8f96d5249edc6caf55",
41
- "backward/adam.wgsl#main": "5520ab52aed793a665c16f25db2d0eecb69b34f953ce870691ab20f7a2e3acb7",
41
+ "backward/adam.wgsl#main": "0ed4c4bdd9dac17d658b9c194233449e40d90749cac03040e0f2e63461943baa",
42
42
  "backward/attention_backward.wgsl#main": "482e144cc1c76f371e5b39f439e9cab591db03e469045424c7de107adbd498c4",
43
43
  "backward/bias_add_backward.wgsl#main": "413b1fe8682c09075e2dccc40caf3ebdae13957133224fd4e4497ca9c5109c47",
44
44
  "backward/causal_conv1d_silu_backward.wgsl#main": "baaeec38caf714d12bdb48e1418c79df1736f11b79ed55813a1a9de666039593",
@@ -52,6 +52,7 @@ export const KERNEL_REF_CONTENT_DIGESTS = Object.freeze({
52
52
  "backward/groupnorm_backward.wgsl#main": "2962192fd365b0d4e95a02273d07724d0f145137bf0e2545a9da85b21ed30ec3",
53
53
  "backward/layernorm_backward.wgsl#main": "0d190147ce1291ca24469034001f7dfbfaff1318fe474e90bbcc472983c338ad",
54
54
  "backward/matmul_backward_f16w.wgsl#main": "93b83783a286b456792d7c595a2c205ee990abbb485dbfc17185db3df7bf483a",
55
+ "backward/matmul_backward_q4k.wgsl#main": "220d2fbd4dde1a54f13e69def8d62299f05afcbdee22b4601e645b4889dcd105",
55
56
  "backward/matmul_backward.wgsl#main": "989994ed66bb5c1564a550df9df3e38993f23d2704f527136bce71c521c1a7dc",
56
57
  "backward/matmul_transpose_a.wgsl#main": "48f9efa999af7614cf575026afd9ea96f1fc7164843e9c46336ebad838e0cea0",
57
58
  "backward/pixel_shuffle_backward.wgsl#main": "d56095ace4c14e267ae590f823a0c6d3da07c4dac35071ab17a831418f5bd27c",
@@ -3161,14 +3161,19 @@
3161
3161
  "type": "u32",
3162
3162
  "offset": 16
3163
3163
  },
3164
+ {
3165
+ "name": "num_blocks_per_row",
3166
+ "type": "u32",
3167
+ "offset": 20
3168
+ },
3164
3169
  {
3165
3170
  "name": "logit_softcap",
3166
3171
  "type": "f32",
3167
3172
  "offset": 20
3168
3173
  },
3169
3174
  {
3170
- "name": "_pad0",
3171
- "type": "u32",
3175
+ "name": "weightDecay",
3176
+ "type": "f32",
3172
3177
  "offset": 24
3173
3178
  },
3174
3179
  {
@@ -8449,6 +8454,20 @@
8449
8454
  "ruleChains": [],
8450
8455
  "wgslOnDisk": true
8451
8456
  }
8457
+ },
8458
+ "q4k_weight": {
8459
+ "wgsl": "backward/matmul_backward_q4k.wgsl",
8460
+ "entryPoint": "main",
8461
+ "workgroup": [16,16,1],
8462
+ "requires": [],
8463
+ "weightDtype": "q4k",
8464
+ "description": "Input gradient through a frozen row-wise Q4_K weight stored as [N,K]",
8465
+ "reachability": {
8466
+ "status": "unused",
8467
+ "inlineConfigs": [],
8468
+ "ruleChains": [],
8469
+ "wgslOnDisk": true
8470
+ }
8452
8471
  }
8453
8472
  }
8454
8473
  },
@@ -6,7 +6,12 @@ export type LoraTargetModule =
6
6
  | 'gate_proj'
7
7
  | 'up_proj'
8
8
  | 'down_proj'
9
- | 'gate_up_proj';
9
+ | 'gate_up_proj'
10
+ | 'in_proj_a'
11
+ | 'in_proj_b'
12
+ | 'in_proj_qkv'
13
+ | 'in_proj_z'
14
+ | 'out_proj';
10
15
 
11
16
  export const VALID_LORA_TARGET_MODULES: readonly LoraTargetModule[];
12
17
 
@@ -11,6 +11,11 @@ export const VALID_LORA_TARGET_MODULES = [
11
11
  'up_proj',
12
12
  'down_proj',
13
13
  'gate_up_proj',
14
+ 'in_proj_a',
15
+ 'in_proj_b',
16
+ 'in_proj_qkv',
17
+ 'in_proj_z',
18
+ 'out_proj',
14
19
  ];
15
20
 
16
21
  // =============================================================================
@@ -0,0 +1,83 @@
1
+ import type { AdapterManifest } from './adapter-manifest.js';
2
+
3
+ export type AdapterArtifactLifecycle = 'preserved' | 'candidate' | 'qualified' | 'promoted' | 'revoked';
4
+ export type AdapterArtifactAccess = 'public' | 'gated' | 'private';
5
+
6
+ export interface HuggingFaceArtifactOrigin {
7
+ provider: 'huggingface';
8
+ repoId: string;
9
+ revision: string;
10
+ path: string;
11
+ }
12
+
13
+ export interface GcsArtifactOrigin {
14
+ provider: 'gcs';
15
+ bucket: string;
16
+ object: string;
17
+ generation: string;
18
+ }
19
+
20
+ export interface HttpsPreservationOrigin {
21
+ provider: 'https-preservation';
22
+ url: string;
23
+ revision: string;
24
+ }
25
+
26
+ export type AdapterArtifactOrigin = HuggingFaceArtifactOrigin | GcsArtifactOrigin;
27
+ export type AdapterArtifactMirror = AdapterArtifactOrigin | HttpsPreservationOrigin;
28
+
29
+ export interface AdapterArtifactRecord {
30
+ schema: 'doppler.adapter-artifact/v1';
31
+ artifactId: string;
32
+ lifecycle: AdapterArtifactLifecycle;
33
+ access: AdapterArtifactAccess;
34
+ weights: {
35
+ sha256: string;
36
+ bytes: number;
37
+ format: 'safetensors';
38
+ };
39
+ adapterManifest: AdapterManifest;
40
+ trainingBase: {
41
+ repoId: string;
42
+ revision: string;
43
+ };
44
+ runtimeBase: {
45
+ modelId: string;
46
+ modelSha256: string;
47
+ manifestSha256: string;
48
+ tokenizerSha256: string;
49
+ weightPackId: string;
50
+ weightPackSha256: string;
51
+ manifestVariantId: string;
52
+ conversionConfigSha256: string;
53
+ };
54
+ primaryOrigin: AdapterArtifactOrigin | null;
55
+ preservationMirrors: AdapterArtifactMirror[];
56
+ evidence: Array<{ kind: string; path: string; sha256: string }>;
57
+ claimBoundary?: string;
58
+ }
59
+
60
+ export interface AdapterArtifactValidationError {
61
+ field: string;
62
+ message: string;
63
+ value?: unknown;
64
+ }
65
+
66
+ export interface AdapterArtifactValidationResult {
67
+ valid: boolean;
68
+ errors: AdapterArtifactValidationError[];
69
+ }
70
+
71
+ export declare const ADAPTER_ARTIFACT_SCHEMA: 'doppler.adapter-artifact/v1';
72
+ export declare const ADAPTER_ARTIFACT_LIFECYCLES: readonly AdapterArtifactLifecycle[];
73
+ export declare const ADAPTER_ARTIFACT_ACCESS: readonly AdapterArtifactAccess[];
74
+ export declare const ADAPTER_ARTIFACT_ORIGIN_PROVIDERS: readonly ['huggingface', 'gcs', 'https-preservation'];
75
+
76
+ export declare function validateAdapterArtifactOrigin(
77
+ origin: unknown,
78
+ options?: { allowPreservation?: boolean }
79
+ ): AdapterArtifactValidationResult;
80
+ export declare function validateAdapterArtifactRecord(record: unknown): AdapterArtifactValidationResult;
81
+ export declare function assertAdapterArtifactRecord<T extends AdapterArtifactRecord>(record: T): T;
82
+ export declare function buildImmutableArtifactUrl(origin: AdapterArtifactOrigin): string;
83
+ export declare function adapterArtifactCacheKey(record: AdapterArtifactRecord): string;