doppler-gpu 0.6.1 → 0.7.0

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 (1435) hide show
  1. package/CHANGELOG.md +100 -38
  2. package/README.md +47 -195
  3. package/models/catalog.json +108 -51
  4. package/package.json +92 -122
  5. package/src/capsule-runtime.d.ts +15 -8
  6. package/src/capsule-runtime.js +7 -3
  7. package/src/cli/cli-output.js +85 -9
  8. package/src/cli/doppler-cli.js +23 -21
  9. package/src/client/capsule-host.browser.js +6 -0
  10. package/src/client/capsule-host.d.ts +11 -0
  11. package/src/client/capsule-host.js +6 -0
  12. package/src/client/doppler-api.browser.js +1 -1
  13. package/src/client/doppler-api.d.ts +1 -0
  14. package/src/client/doppler-api.js +1 -1
  15. package/src/client/doppler-registry.js +6 -0
  16. package/src/client/inspection.d.ts +10 -1
  17. package/src/client/inspection.js +24 -12
  18. package/src/client/model-host/index.d.ts +3 -0
  19. package/src/client/model-host/index.js +73 -18
  20. package/src/client/model-host/model-session.d.ts +41 -17
  21. package/src/client/model-host/model-session.js +283 -154
  22. package/src/client/model-host/source-loading.js +910 -0
  23. package/src/client/provider.js +6 -6
  24. package/src/client/resident-partitions.d.ts +30 -0
  25. package/src/client/resident-partitions.js +114 -0
  26. package/src/client/runtime/capsule-acquisition.d.ts +17 -2
  27. package/src/client/runtime/capsule-artifact-source.js +23 -1
  28. package/src/client/runtime/capsule-operation-adapters.d.ts +3 -2
  29. package/src/client/runtime/capsule-operation-adapters.js +44 -8
  30. package/src/client/runtime/capsule-operation-deltas.js +44 -0
  31. package/src/client/runtime/capsule-operation-executor.d.ts +2 -2
  32. package/src/client/runtime/capsule-operation-executor.js +11 -5
  33. package/src/client/runtime/capsule-operation-stream.d.ts +10 -0
  34. package/src/client/runtime/capsule-operation-stream.js +81 -0
  35. package/src/client/runtime/capsule-piece-reader.js +88 -0
  36. package/src/client/runtime/capsule-program-adapter.js +51 -21
  37. package/src/client/runtime/command-executor.d.ts +13 -0
  38. package/src/client/runtime/command-executor.js +54 -11
  39. package/src/client/runtime/composition-root.d.ts +35 -12
  40. package/src/client/runtime/composition-root.js +186 -57
  41. package/src/client/runtime/fetch-capsule-artifact-store.d.ts +3 -2
  42. package/src/client/runtime/fetch-capsule-artifact-store.js +56 -1
  43. package/src/client/runtime/lora.d.ts +22 -0
  44. package/src/client/runtime/lora.js +86 -26
  45. package/src/client/runtime/model-manager.js +10 -75
  46. package/src/client/runtime/model-source.d.ts +1 -0
  47. package/src/client/runtime/model-source.js +1 -1
  48. package/src/client/runtime/node-quickstart-cache.js +7 -2
  49. package/src/client/runtime/resource-binder.d.ts +1 -0
  50. package/src/client/runtime/resource-binder.js +20 -14
  51. package/src/client/runtime/scoped-session.d.ts +10 -0
  52. package/src/client/runtime/scoped-session.js +41 -3
  53. package/src/client/runtime/session-controller.d.ts +15 -1
  54. package/src/client/runtime/session-controller.js +102 -30
  55. package/src/client/runtime/verified-capsule-artifact-store.d.ts +27 -0
  56. package/src/client/runtime/verified-capsule-artifact-store.js +255 -58
  57. package/src/client/wrap-pipeline-handle.js +23 -17
  58. package/src/config/canonical-contract-codec.d.ts +10 -0
  59. package/src/config/canonical-contract-codec.js +144 -0
  60. package/src/config/canonical-generation-policy.d.ts +7 -0
  61. package/src/config/canonical-generation-policy.js +66 -0
  62. package/src/config/capsule-loading.d.ts +5 -1
  63. package/src/config/capsule-loading.js +1 -1
  64. package/src/config/capsule-loading.schema.json +63 -4
  65. package/src/config/capsule-operation.d.ts +10 -3
  66. package/src/config/capsule-operation.js +6 -1
  67. package/src/config/capsule-operations.json +26 -1
  68. package/src/config/capsule-release-contract.js +2 -29
  69. package/src/config/capsule-token-selection.d.ts +15 -0
  70. package/src/config/capsule-token-selection.js +39 -0
  71. package/src/config/capsule-token-selection.json +11 -0
  72. package/src/config/capsule-v2.d.ts +1 -0
  73. package/src/config/capsule-v2.js +14 -21
  74. package/src/config/choice-scoring-reference.js +66 -0
  75. package/src/config/choice-scoring.d.ts +21 -0
  76. package/src/config/choice-scoring.js +66 -0
  77. package/src/config/choice-scoring.json +8 -0
  78. package/src/config/conversion/amplify/amplify-120m-f16-af32.json +4 -4
  79. package/src/config/conversion/diffusiongemma/diffusiongemma-26b-a4b-it-q4k-ehf16-af16.json +7 -7
  80. package/src/config/conversion/embeddinggemma/google-embeddinggemma-300m-q4k-ehf16-af32.json +3 -3
  81. package/src/config/conversion/esm/esm2-t12-35m-ur50d-f32-af32.json +12 -8
  82. package/src/config/conversion/esmc/esmc-300m-f32-af32.json +260 -55
  83. package/src/config/conversion/gemma3/gemma-3-1b-it-f16-af32.json +16 -10
  84. package/src/config/conversion/gemma3/gemma-3-1b-it-q4k-ehf16-af32.json +9 -8
  85. package/src/config/conversion/gemma3/gemma-3-270m-it-f16-af32.json +6 -6
  86. package/src/config/conversion/gemma3/gemma-3-270m-it-q4k-ehf16-af16.json +9 -9
  87. package/src/config/conversion/gemma3/gemma-3-270m-it-q4k-ehf16-af32.json +8 -7
  88. package/src/config/conversion/gemma3/gemma-3-270m-it-w8a8-ehf16-af32.json +491 -0
  89. package/src/config/conversion/gemma3/translategemma-4b-1b-enes-q4k-ehf16-af32.json +5 -5
  90. package/src/config/conversion/gemma3/translategemma-4b-it-q4k-ehf16-af32.json +9 -8
  91. package/src/config/conversion/gemma4/gemma-4-12b-it-text-q4k-ehf16-af16.json +24 -8
  92. package/src/config/conversion/gemma4/gemma-4-12b-it-text-q4k-ehf16-af32.json +24 -8
  93. package/src/config/conversion/gemma4/gemma-4-12b-it-text-q4k-ehf16-hq4k-af16.json +25 -9
  94. package/src/config/conversion/gemma4/gemma-4-12b-it-text-w4a16-ct-ehf16-af16.json +21 -5
  95. package/src/config/conversion/gemma4/gemma-4-31b-it-text-q4k-ehf16-af16.json +26 -9
  96. package/src/config/conversion/gemma4/gemma-4-31b-it-text-q4k-ehf16-af32.json +26 -9
  97. package/src/config/conversion/gemma4/gemma-4-e2b-it-q4k-ehf16-af16-int4ple.json +26 -9
  98. package/src/config/conversion/gemma4/gemma-4-e2b-it-q4k-ehf16-af32-int4ple.json +25 -8
  99. package/src/config/conversion/gemma4/gemma-4-e2b-it-q4k-ehf16-af32.json +25 -8
  100. package/src/config/conversion/gemma4/gemma-4-moe-q4k-ehf16-af32.json +7 -6
  101. package/src/config/conversion/glmocr/glm-ocr-f16-af32.json +7 -7
  102. package/src/config/conversion/gpt-oss-20b-f16-xmxfp4.json +7 -6
  103. package/src/config/conversion/janus/janus-pro-1b-text-q4k-ehaf16.json +7 -6
  104. package/src/config/conversion/lfm2/lfm2.5-1.2b-instruct-q4k-ehf16-af32.json +20 -12
  105. package/src/config/conversion/minicpm/minicpm4-0-5b-f16-af32.json +7 -9
  106. package/src/config/conversion/muse-glimmer/muse-glimmer-30b-text-bf16-af32.json +7 -7
  107. package/src/config/conversion/muse-glimmer/muse-glimmer-30b-text-f16-af32.json +7 -7
  108. package/src/config/conversion/nucleotide-transformer/nucleotide-transformer-v2-50m-f32-af32.json +252 -53
  109. package/src/config/conversion/qwen3/qwen-3-4b-instruct-2507-q4k-ehf16-af32.json +501 -0
  110. package/src/config/conversion/qwen3/qwen-3-5-0-8b-canonical-f32.json +461 -0
  111. package/src/config/conversion/qwen3/qwen-3-5-0-8b-q4k-ehaf16.json +8 -8
  112. package/src/config/conversion/qwen3/qwen-3-5-2b-q4k-ehaf16.json +8 -8
  113. package/src/config/conversion/qwen3/qwen-3-5-9b-f16-af32.json +7 -7
  114. package/src/config/conversion/qwen3/qwen-3-5-9b-q4k-ehaf16.json +8 -8
  115. package/src/config/conversion/qwen3/qwen-3-6-27b-q4k-eaf16.json +8 -8
  116. package/src/config/conversion/qwen3/qwen-3-6-27b-q4k-ehaf16.json +8 -8
  117. package/src/config/conversion/qwen3/qwen-3-6-35b-a3b-q4_0-passthrough.json +1218 -0
  118. package/src/config/conversion/qwen3/qwen-3-6-35b-a3b-text-q4k-ehf16-af32.json +581 -0
  119. package/src/config/conversion/qwen3/qwen-3-8-flash-next-text-q4k-ehf16-af32.json +1063 -0
  120. package/src/config/conversion/qwen3/qwen-3-embedding-0-6b-f16-af32.json +11 -11
  121. package/src/config/conversion/qwen3/qwen-3-embedding-0-6b-q4k-ehf16-af32.json +6 -6
  122. package/src/config/conversion/qwen3/qwen-3-reranker-0-6b-f16-af32.json +18 -10
  123. package/src/config/conversion/qwen3/qwen-3-reranker-0-6b-f16-true-logit-af32.json +10 -10
  124. package/src/config/conversion/qwen3/qwen-3-reranker-0-6b-q4k-ehf16-af32.json +18 -18
  125. package/src/config/conversion/qwen3/qwen3.8-27b-q4_0-passthrough.json +823 -0
  126. package/src/config/conversion/qwen3/qwen3.8-27b-text-f16-af32.json +11 -11
  127. package/src/config/conversion/qwen3/qwen3.8-27b-text-q4k-ehaf16.json +11 -11
  128. package/src/config/embedding-contract.d.ts +17 -0
  129. package/src/config/embedding-contract.js +12 -0
  130. package/src/config/embedding-reference.js +32 -0
  131. package/src/config/execution-registry-contract.d.ts +41 -0
  132. package/src/config/execution-registry-contract.js +171 -0
  133. package/src/config/generation-contract.d.ts +28 -1
  134. package/src/config/generation-contract.json +119 -0
  135. package/src/config/initial-execution-identity.d.ts +1 -1
  136. package/src/config/initial-execution-identity.js +9 -9
  137. package/src/config/inspection/activity-stages.json +14 -0
  138. package/src/config/inspection/observation-policies.json +123 -0
  139. package/src/config/kernel-path-loader.d.ts +30 -0
  140. package/src/config/kernel-path-loader.js +69 -13
  141. package/src/config/kernel-registry-contract.d.ts +78 -13
  142. package/src/config/kernel-registry-contract.js +110 -38
  143. package/src/config/kernels/backward-registry.json +1 -1
  144. package/src/config/kernels/registry.js +3 -47
  145. package/src/config/kernels/registry.json +31747 -7849
  146. package/src/config/layer-partition-plan.d.ts +93 -0
  147. package/src/config/layer-partition-plan.js +305 -0
  148. package/src/config/manifest-inference-validation.js +10 -0
  149. package/src/config/merge/execution-patches.js +14 -0
  150. package/src/config/merge.d.ts +4 -0
  151. package/src/config/merge.js +50 -0
  152. package/src/config/model-ir-v2.d.ts +1 -0
  153. package/src/config/model-ir-v2.js +5 -16
  154. package/src/config/model-ir.js +9 -14
  155. package/src/config/ordered-resident-qualification.d.ts +16 -0
  156. package/src/config/ordered-resident-qualification.js +62 -0
  157. package/src/config/param-categories.js +4 -0
  158. package/src/config/param-validator.js +64 -29
  159. package/src/config/production-release-evidence.js +2 -27
  160. package/src/config/production-release.js +2 -29
  161. package/src/config/quickstart-registry.json +57 -8
  162. package/src/config/reasoning-output.d.ts +6 -0
  163. package/src/config/reasoning-output.js +26 -0
  164. package/src/config/revocation-policy.js +1 -4
  165. package/src/config/rope-frequencies.js +9 -0
  166. package/src/config/runtime/profiles/demo-f16-comparison.json +20 -0
  167. package/src/config/runtime/profiles/flash-next-node-host-cache-qualification.json +21 -0
  168. package/src/config/runtime/profiles/flash-next-paged-qualification.json +23 -0
  169. package/src/config/runtime/profiles/flash-next-routed-f32kv-qualification.json +72 -0
  170. package/src/config/runtime/profiles/flash-next-routed-qualification.json +27 -0
  171. package/src/config/runtime/profiles/qwen-3-5-0-8b-metal-parity.json +51 -2
  172. package/src/config/runtime/profiles/qwen-3-5-0-8b-vulkan-parity.json +88 -0
  173. package/src/config/runtime/profiles/qwen-3-5-0-8b-vulkan-subgroup8.json +173 -0
  174. package/src/config/runtime/profiles/qwen-3-5-0-8b-vulkan-throughput.json +33 -0
  175. package/src/config/runtime/profiles/qwen-3-5-2b-metal-throughput.json +51 -2
  176. package/src/config/runtime/profiles/qwen-3-5-2b-vulkan-parity.json +15 -0
  177. package/src/config/runtime/profiles/qwen3-6-35b-a3b-q4_0-candidate.json +4491 -0
  178. package/src/config/runtime/profiles/qwen3-6-35b-a3b-q4_0-pooled-q8-common-diagnostic.json +4407 -0
  179. package/src/config/runtime/profiles/qwen3-6-35b-a3b-route-f32-candidate.json +17 -0
  180. package/src/config/runtime/profiles/qwen3-6-35b-a3b-route-f32-workspace-candidate.json +13 -0
  181. package/src/config/runtime.d.ts +6 -0
  182. package/src/config/runtime.js +51 -21
  183. package/src/config/schema/benchmark.schema.d.ts +1 -0
  184. package/src/config/schema/benchmark.schema.js +2 -0
  185. package/src/config/schema/conversion.schema.d.ts +5 -0
  186. package/src/config/schema/converter.schema.d.ts +10 -0
  187. package/src/config/schema/converter.schema.js +10 -0
  188. package/src/config/schema/debug.schema.d.ts +1 -0
  189. package/src/config/schema/doppler.schema.js +16 -9
  190. package/src/config/schema/emulation.schema.js +0 -77
  191. package/src/config/schema/execution-v1.schema.d.ts +32 -2
  192. package/src/config/schema/execution-v1.schema.js +8 -0
  193. package/src/config/schema/fp8.schema.d.ts +17 -0
  194. package/src/config/schema/fp8.schema.js +27 -0
  195. package/src/config/schema/hyper-connection-decoder.schema.d.ts +98 -0
  196. package/src/config/schema/hyper-connection-decoder.schema.js +213 -0
  197. package/src/config/schema/index.d.ts +2 -2
  198. package/src/config/schema/index.js +3 -0
  199. package/src/config/schema/inference.schema.d.ts +8 -2
  200. package/src/config/schema/kernel-registry.schema.d.ts +22 -7
  201. package/src/config/schema/kernel-registry.schema.js +13 -2
  202. package/src/config/schema/kernel-thresholds.schema.d.ts +3 -0
  203. package/src/config/schema/kernel-thresholds.schema.js +14 -3
  204. package/src/config/schema/kernel-warmup.schema.d.ts +15 -0
  205. package/src/config/schema/kernel-warmup.schema.js +3 -0
  206. package/src/config/schema/loading.schema.d.ts +41 -0
  207. package/src/config/schema/loading.schema.js +67 -0
  208. package/src/config/schema/manifest-rope.schema.d.ts +55 -0
  209. package/src/config/schema/manifest.schema.d.ts +47 -57
  210. package/src/config/schema/manifest.schema.js +41 -2
  211. package/src/config/schema/ngram-embedding.schema.d.ts +116 -0
  212. package/src/config/schema/ngram-embedding.schema.js +312 -0
  213. package/src/config/schema/program-bundle.schema.d.ts +1 -0
  214. package/src/config/schema/program-bundle.schema.js +8 -3
  215. package/src/config/schema/quantization-defaults.schema.d.ts +1 -1
  216. package/src/config/schema/quantization.schema.d.ts +2 -0
  217. package/src/config/schema/quantization.schema.js +2 -0
  218. package/src/config/schema/speculation-self.schema.d.ts +6 -1
  219. package/src/config/schema/speculation-self.schema.js +29 -2
  220. package/src/config/schema/w8a8.schema.d.ts +24 -0
  221. package/src/config/schema/w8a8.schema.js +38 -0
  222. package/src/config/source-packages/litert/gemma-4-e2b-it.json +6 -6
  223. package/src/config/supported-operations.json +105 -0
  224. package/src/config/target-plan.d.ts +16 -2
  225. package/src/config/target-plan.js +63 -16
  226. package/src/config/wgsl-language-contract.js +47 -0
  227. package/src/converter/artifact-identity.js +27 -47
  228. package/src/converter/capability-transform-resolver.js +80 -0
  229. package/src/converter/conversion-plan.js +14 -14
  230. package/src/converter/core.d.ts +2 -0
  231. package/src/converter/core.js +15 -16
  232. package/src/converter/execution-graph/fusion.js +343 -0
  233. package/src/converter/execution-graph/kv-storage.js +14 -0
  234. package/src/converter/execution-graph/validation.js +431 -0
  235. package/src/converter/execution-graph-transforms.js +927 -0
  236. package/src/converter/forge-candidate-evaluation.js +1 -1
  237. package/src/converter/forge-qualification.js +101 -30
  238. package/src/converter/forge-stages.js +107 -102
  239. package/src/converter/fp8-source.js +99 -0
  240. package/src/converter/linear-norm-gate.js +115 -0
  241. package/src/converter/manifest-builder.js +20 -6
  242. package/src/converter/parsers/gguf.js +21 -2
  243. package/src/converter/quantization-info.js +56 -5
  244. package/src/converter/quantizer.js +4 -159
  245. package/src/converter/qwen4-exp-source-defaults.json +35 -0
  246. package/src/converter/qwen4-exp-source.js +293 -0
  247. package/src/converter/resident-qualification.js +58 -0
  248. package/src/converter/retained-source-shards.js +97 -0
  249. package/src/converter/rope-config.js +1 -0
  250. package/src/converter/source-rotary-frequencies.d.ts +12 -0
  251. package/src/converter/source-rotary-frequencies.js +34 -0
  252. package/src/converter/source-tensor-rules.d.ts +25 -1
  253. package/src/converter/source-tensor-rules.js +31 -1
  254. package/src/converter/tensor-transform.js +60 -7
  255. package/src/converter/tokenizer-contract.js +1 -3
  256. package/src/converter/w8a8-quantizer.js +56 -0
  257. package/src/debug/activation-trace.d.ts +34 -0
  258. package/src/debug/activation-trace.js +89 -0
  259. package/src/debug/activity-trace.d.ts +52 -0
  260. package/src/debug/activity-trace.js +127 -0
  261. package/src/debug/capture-policy.d.ts +9 -1
  262. package/src/debug/capture-policy.js +52 -21
  263. package/src/debug/index.d.ts +3 -0
  264. package/src/debug/index.js +12 -6
  265. package/src/debug/log.d.ts +6 -0
  266. package/src/debug/log.js +26 -0
  267. package/src/debug/perf-guards.js +71 -0
  268. package/src/debug/pipeline-config.js +141 -0
  269. package/src/debug/stats.d.ts +1 -1
  270. package/src/debug/stats.js +7 -2
  271. package/src/debug/tensor.d.ts +15 -3
  272. package/src/debug/tensor.js +43 -27
  273. package/src/debug/trace.js +12 -0
  274. package/src/errors/doppler-error.js +6 -2
  275. package/src/experimental/audio/gemma4.js +19 -10
  276. package/src/experimental/bdpa/basis-decomposed-paged.d.ts +1 -1
  277. package/src/experimental/diffusion/pipeline.d.ts +1 -0
  278. package/src/experimental/distribution/shard-delivery/receipt.js +3 -73
  279. package/src/experimental/distribution/shard-delivery/retry.js +6 -112
  280. package/src/experimental/distribution/shard-delivery.js +19 -632
  281. package/src/experimental/energy/pipeline.d.ts +1 -0
  282. package/src/experimental/logits/cpu.js +2 -7
  283. package/src/experimental/training/artifacts.js +1 -4
  284. package/src/experimental/training/attention-forward.js +1 -1
  285. package/src/experimental/training/autograd.d.ts +21 -0
  286. package/src/experimental/training/autograd.js +44 -20
  287. package/src/experimental/training/checkpoint.js +1 -4
  288. package/src/experimental/training/clip.js +1 -1
  289. package/src/experimental/training/distillation/student-fixture/execution.js +9 -12
  290. package/src/experimental/training/distillation/student-fixture/model.js +9 -12
  291. package/src/experimental/training/distillation/student-fixture.js +9 -12
  292. package/src/experimental/training/lora/checkpoint.js +1 -1
  293. package/src/experimental/training/lora/execution.js +1 -1
  294. package/src/experimental/training/lora/plan.js +1 -1
  295. package/src/experimental/training/lora/recovery.js +1 -1
  296. package/src/experimental/training/lora-pipeline.js +9 -83
  297. package/src/experimental/training/lora-training-round.d.ts +39 -0
  298. package/src/experimental/training/lora-training-round.js +90 -0
  299. package/src/experimental/training/lora.js +2 -1
  300. package/src/experimental/training/loss-scaling.js +1 -1
  301. package/src/experimental/training/loss.js +3 -1
  302. package/src/experimental/training/native-qwen-lora.d.ts +25 -6
  303. package/src/experimental/training/native-qwen-lora.js +176 -21
  304. package/src/experimental/training/operator-command.js +1 -49
  305. package/src/experimental/training/parameter-groups.js +39 -0
  306. package/src/experimental/training/report-ranking.js +52 -0
  307. package/src/experimental/training/runner/lifecycle.js +4 -61
  308. package/src/experimental/training/runner.js +2 -5
  309. package/src/experimental/training/suite/execution.js +3 -5
  310. package/src/experimental/training/suite/plan.js +6 -21
  311. package/src/experimental/training/suite.js +5 -34
  312. package/src/experimental/training/trainer.js +2 -36
  313. package/src/experimental/training/workload-capsules/registry.json +473 -0
  314. package/src/experimental/turboquant/codebook.js +0 -29
  315. package/src/formats/contract-validation.js +30 -0
  316. package/src/formats/flatbuffer-tables.js +55 -0
  317. package/src/formats/float16.js +81 -0
  318. package/src/formats/float8.js +19 -0
  319. package/src/formats/gguf/block-storage.js +51 -0
  320. package/src/formats/gguf/quantized-formats.json +10 -0
  321. package/src/formats/gguf/qwen-source.js +88 -0
  322. package/src/formats/gguf/qwen-source.json +8 -0
  323. package/src/formats/gguf/tokenizer-pre.json +4 -0
  324. package/src/formats/gguf/tokenizer.js +50 -0
  325. package/src/formats/litert/types.js +8 -180
  326. package/src/formats/paged-source-reader.js +158 -0
  327. package/src/formats/q4k-dequant.js +95 -0
  328. package/src/formats/rdrr/classification.js +4 -0
  329. package/src/formats/rdrr/distributed/validation.js +1 -4
  330. package/src/formats/rdrr/fp8-contract.js +38 -0
  331. package/src/formats/rdrr/fp8-storage.js +83 -0
  332. package/src/formats/rdrr/functional-descriptor.js +1 -4
  333. package/src/formats/rdrr/parsing.js +1 -1
  334. package/src/formats/rdrr/q4_0-storage.js +24 -0
  335. package/src/formats/rdrr/storage-descriptor.js +7 -1
  336. package/src/formats/rdrr/types.d.ts +7 -1
  337. package/src/formats/rdrr/validation.js +37 -6
  338. package/src/formats/rdrr/w8a8-storage.js +64 -0
  339. package/src/formats/safetensors/types.js +4 -0
  340. package/src/formats/sha256.js +104 -103
  341. package/src/formats/sorted-json.js +9 -0
  342. package/src/formats/source-runtime.d.ts +52 -0
  343. package/src/formats/tflite/types.js +7 -161
  344. package/src/generation/index.d.ts +7 -1
  345. package/src/generation/index.js +7 -1
  346. package/src/gpu/buffer-identity.js +4 -0
  347. package/src/gpu/command-recorder.d.ts +66 -29
  348. package/src/gpu/command-recorder.js +157 -161
  349. package/src/gpu/device-bindings.js +98 -0
  350. package/src/gpu/device-state.js +0 -12
  351. package/src/gpu/device.d.ts +9 -0
  352. package/src/gpu/device.js +104 -141
  353. package/src/gpu/kernel-selector.js +73 -12
  354. package/src/gpu/kernels/attention/executors-components.js +235 -0
  355. package/src/gpu/kernels/attention/executors.js +296 -510
  356. package/src/gpu/kernels/attention/plan.js +65 -18
  357. package/src/gpu/kernels/attention/query-splitk.js +80 -0
  358. package/src/gpu/kernels/attention_decode_gqa_splitk.wgsl +197 -0
  359. package/src/gpu/kernels/attention_decode_online.wgsl +348 -0
  360. package/src/gpu/kernels/attention_decode_online_f16kv.wgsl +126 -22
  361. package/src/gpu/kernels/attention_decode_subgroup.wgsl +5 -6
  362. package/src/gpu/kernels/attention_head256_f16kv.wgsl +56 -9
  363. package/src/gpu/kernels/attention_indexed.wgsl +179 -0
  364. package/src/gpu/kernels/attention_indexed_f16kv.wgsl +180 -0
  365. package/src/gpu/kernels/attention_paired.wgsl +361 -0
  366. package/src/gpu/kernels/attention_paired_tiled.wgsl +383 -0
  367. package/src/gpu/kernels/attention_prefill_partitioned_head256_f16kv.wgsl +247 -0
  368. package/src/gpu/kernels/attention_prefill_query_splitk_f32.wgsl +234 -0
  369. package/src/gpu/kernels/attention_prefill_query_splitk_reduce_f32.wgsl +103 -0
  370. package/src/gpu/kernels/attention_prefill_query_tile_f16kv.wgsl +225 -0
  371. package/src/gpu/kernels/attention_prefill_query_tile_f32.wgsl +222 -0
  372. package/src/gpu/kernels/backward/adam.js +11 -3
  373. package/src/gpu/kernels/backward/gated_delta_recurrent_backward.js +51 -15
  374. package/src/gpu/kernels/backward/gated_delta_recurrent_backward.wgsl +9 -8
  375. package/src/gpu/kernels/backward/gated_delta_recurrent_checkpoint_forward.js +149 -0
  376. package/src/gpu/kernels/backward/gated_delta_recurrent_checkpoint_forward.wgsl +109 -0
  377. package/src/gpu/kernels/backward/gated_delta_recurrent_checkpointed_backward.js +120 -0
  378. package/src/gpu/kernels/backward/gelu_backward.js +8 -12
  379. package/src/gpu/kernels/backward/index.js +6 -0
  380. package/src/gpu/kernels/backward/qwen_attention_split_q_gate_backward.js +80 -0
  381. package/src/gpu/kernels/backward/qwen_attention_split_q_gate_backward.wgsl +26 -0
  382. package/src/gpu/kernels/backward/qwen_gqa_attention_backward.js +157 -0
  383. package/src/gpu/kernels/backward/qwen_gqa_attention_backward.wgsl +82 -0
  384. package/src/gpu/kernels/backward/qwen_gqa_softmax_backward_scores.wgsl +73 -0
  385. package/src/gpu/kernels/backward/qwen_gqa_softmax_recompute.wgsl +97 -0
  386. package/src/gpu/kernels/backward/qwen_linear_attention_prepare_backward.js +221 -0
  387. package/src/gpu/kernels/backward/qwen_linear_attention_prepare_backward.wgsl +136 -0
  388. package/src/gpu/kernels/backward/rmsnorm_backward.js +98 -80
  389. package/src/gpu/kernels/backward/rope_backward.js +47 -10
  390. package/src/gpu/kernels/backward/rope_backward.wgsl +46 -22
  391. package/src/gpu/kernels/backward/sigmoid_gated_backward.js +83 -0
  392. package/src/gpu/kernels/backward/sigmoid_gated_backward.wgsl +49 -0
  393. package/src/gpu/kernels/backward/silu_backward.js +8 -12
  394. package/src/gpu/kernels/backward/softmax_backward.js +8 -12
  395. package/src/gpu/kernels/cast_f32_to_two_f32.wgsl +12 -0
  396. package/src/gpu/kernels/cast_two_f32_to_f16.wgsl +49 -0
  397. package/src/gpu/kernels/causal_conv1d_silu.js +80 -0
  398. package/src/gpu/kernels/causal_conv1d_silu.wgsl +44 -0
  399. package/src/gpu/kernels/check-stop.js +1 -1
  400. package/src/gpu/kernels/check_finiteness_f32.wgsl +33 -0
  401. package/src/gpu/kernels/conv2d.js +30 -42
  402. package/src/gpu/kernels/dequant.js +1 -1
  403. package/src/gpu/kernels/dequant_mxfp4.wgsl +6 -4
  404. package/src/gpu/kernels/diffusion-gemma-sampling.js +26 -7
  405. package/src/gpu/kernels/diffusion_gemma_sampling.wgsl +66 -2
  406. package/src/gpu/kernels/dispatch.js +36 -1
  407. package/src/gpu/kernels/embedding-pool.js +15 -13
  408. package/src/gpu/kernels/feature-check.js +7 -2
  409. package/src/gpu/kernels/fp8.js +70 -0
  410. package/src/gpu/kernels/fused_ffn.js +83 -154
  411. package/src/gpu/kernels/fused_ffn_q4k.wgsl +43 -1
  412. package/src/gpu/kernels/fused_ffn_q4k_subgroup8.wgsl +228 -0
  413. package/src/gpu/kernels/fused_matmul_q4_batched_f16acc_f16a.wgsl +2 -2
  414. package/src/gpu/kernels/fused_matmul_q4_subgroup.wgsl +146 -0
  415. package/src/gpu/kernels/fused_matmul_q4_widetile.wgsl +14 -4
  416. package/src/gpu/kernels/fused_matmul_q4_widetile_direct.wgsl +204 -0
  417. package/src/gpu/kernels/fused_matmul_residual.js +19 -72
  418. package/src/gpu/kernels/fused_matmul_rmsnorm.js +34 -127
  419. package/src/gpu/kernels/gated-delta-norm-gate.js +45 -0
  420. package/src/gpu/kernels/gated_delta_conv.wgsl +57 -6
  421. package/src/gpu/kernels/gated_delta_conv_f16.wgsl +57 -6
  422. package/src/gpu/kernels/gated_delta_conv_paired.wgsl +282 -0
  423. package/src/gpu/kernels/gated_delta_conv_prefill.wgsl +144 -0
  424. package/src/gpu/kernels/gated_delta_fused_decode.wgsl +375 -40
  425. package/src/gpu/kernels/gated_delta_fused_decode_f16.wgsl +375 -40
  426. package/src/gpu/kernels/gated_delta_fused_decode_paired.wgsl +511 -0
  427. package/src/gpu/kernels/gated_delta_fused_decode_paired_f16.wgsl +513 -0
  428. package/src/gpu/kernels/gated_delta_fused_decode_paired_sigmoid_gate.wgsl +514 -0
  429. package/src/gpu/kernels/gated_delta_fused_decode_paired_sigmoid_gate_f16.wgsl +516 -0
  430. package/src/gpu/kernels/gated_delta_fused_decode_register.wgsl +750 -0
  431. package/src/gpu/kernels/gated_delta_fused_decode_sigmoid_gate.wgsl +511 -0
  432. package/src/gpu/kernels/gated_delta_fused_decode_sigmoid_gate_f16.wgsl +513 -0
  433. package/src/gpu/kernels/gated_delta_gate_paired.wgsl +271 -0
  434. package/src/gpu/kernels/gated_delta_gate_sigmoid_paired.wgsl +273 -0
  435. package/src/gpu/kernels/gated_delta_norm_paired.wgsl +288 -0
  436. package/src/gpu/kernels/gated_delta_prefill_norm_gate.wgsl +227 -0
  437. package/src/gpu/kernels/gated_delta_qk_paired.wgsl +297 -0
  438. package/src/gpu/kernels/gated_delta_qk_paired_parallel.wgsl +299 -0
  439. package/src/gpu/kernels/gated_delta_recurrent.wgsl +362 -32
  440. package/src/gpu/kernels/gated_delta_recurrent_f16.wgsl +362 -32
  441. package/src/gpu/kernels/gated_delta_recurrent_gguf.wgsl +496 -0
  442. package/src/gpu/kernels/gated_delta_recurrent_gguf_register_prefill.wgsl +727 -0
  443. package/src/gpu/kernels/gated_delta_recurrent_paired.wgsl +337 -0
  444. package/src/gpu/kernels/gated_delta_recurrent_register_prefill.wgsl +546 -0
  445. package/src/gpu/kernels/gated_delta_recurrent_sigmoid_gate.wgsl +498 -0
  446. package/src/gpu/kernels/gated_delta_recurrent_sigmoid_gate_f16.wgsl +500 -0
  447. package/src/gpu/kernels/gated_delta_state_paired.wgsl +310 -0
  448. package/src/gpu/kernels/gated_delta_state_paired_sliced.wgsl +348 -0
  449. package/src/gpu/kernels/gated_delta_state_paired_sliced_rolled.wgsl +353 -0
  450. package/src/gpu/kernels/gated_rmsnorm.js +74 -0
  451. package/src/gpu/kernels/gated_rmsnorm.wgsl +62 -0
  452. package/src/gpu/kernels/gather.js +81 -46
  453. package/src/gpu/kernels/gather.wgsl +3 -2
  454. package/src/gpu/kernels/gather_bf16.wgsl +3 -2
  455. package/src/gpu/kernels/gather_f16.wgsl +3 -2
  456. package/src/gpu/kernels/gather_f16_f16_out.wgsl +3 -2
  457. package/src/gpu/kernels/gather_f16_out.wgsl +3 -2
  458. package/src/gpu/kernels/gather_f16_vec4.wgsl +3 -2
  459. package/src/gpu/kernels/gather_f16_vec4_f16_out.wgsl +3 -2
  460. package/src/gpu/kernels/gather_litert_int4_vec4_f16_out.wgsl +3 -2
  461. package/src/gpu/kernels/gather_litert_int4_vec4_f32_out.wgsl +3 -2
  462. package/src/gpu/kernels/gather_q4_0.wgsl +57 -0
  463. package/src/gpu/kernels/gather_split4_f16_vec4_f16_out.wgsl +3 -2
  464. package/src/gpu/kernels/gather_split4_f16_vec4_f32_out.wgsl +104 -0
  465. package/src/gpu/kernels/gather_split8_f16_vec4_f16_out.wgsl +3 -2
  466. package/src/gpu/kernels/gather_split8_f16_vec4_f32_out.wgsl +3 -2
  467. package/src/gpu/kernels/gather_vec4.wgsl +3 -2
  468. package/src/gpu/kernels/gather_vec4_f16_out.wgsl +3 -2
  469. package/src/gpu/kernels/gelu.js +5 -12
  470. package/src/gpu/kernels/gemma4-route-expert.js +2 -5
  471. package/src/gpu/kernels/generated/uniform-writers-0.js +600 -0
  472. package/src/gpu/kernels/generated/uniform-writers-1.js +602 -0
  473. package/src/gpu/kernels/generated/uniform-writers-2.js +516 -0
  474. package/src/gpu/kernels/generated/uniform-writers.js +557 -0
  475. package/src/gpu/kernels/hyper-connection.js +240 -0
  476. package/src/gpu/kernels/hyper_connection_activation.wgsl +110 -0
  477. package/src/gpu/kernels/hyper_connection_branch.wgsl +60 -0
  478. package/src/gpu/kernels/hyper_connection_inject.wgsl +49 -0
  479. package/src/gpu/kernels/hyper_connection_norm.wgsl +72 -0
  480. package/src/gpu/kernels/kernel-bindings.js +37 -0
  481. package/src/gpu/kernels/kernel-configs.d.ts +12 -2
  482. package/src/gpu/kernels/kernel-configs.js +40 -23
  483. package/src/gpu/kernels/kernel-execution.js +87 -26
  484. package/src/gpu/kernels/kernel-geometry.js +43 -0
  485. package/src/gpu/kernels/kernel-prewarm.js +18 -15
  486. package/src/gpu/kernels/kv-cache-write.js +4 -6
  487. package/src/gpu/kernels/layernorm.js +7 -45
  488. package/src/gpu/kernels/linear-attention-core.js +247 -119
  489. package/src/gpu/kernels/linear-attention-recovery.js +90 -0
  490. package/src/gpu/kernels/linear-norm-ab.js +80 -0
  491. package/src/gpu/kernels/linear_norm_ab_f32.wgsl +243 -0
  492. package/src/gpu/kernels/logit-finalize.js +9 -3
  493. package/src/gpu/kernels/logit-scatter.js +9 -3
  494. package/src/gpu/kernels/logit-suppress.js +24 -0
  495. package/src/gpu/kernels/logit_suppress.wgsl +19 -0
  496. package/src/gpu/kernels/matmul-dispatch.js +70 -146
  497. package/src/gpu/kernels/matmul-selection.js +75 -18
  498. package/src/gpu/kernels/matmul-workgroup-capacity.js +37 -0
  499. package/src/gpu/kernels/matmul.js +81 -108
  500. package/src/gpu/kernels/matmul_compensated_f32.wgsl +215 -0
  501. package/src/gpu/kernels/matmul_f16w_f32a_tiled.wgsl +59 -46
  502. package/src/gpu/kernels/matmul_f32.wgsl +23 -17
  503. package/src/gpu/kernels/matmul_f32_row_subgroup.wgsl +88 -0
  504. package/src/gpu/kernels/matmul_fp8.wgsl +60 -0
  505. package/src/gpu/kernels/matmul_gemv_compensated_f32.wgsl +211 -0
  506. package/src/gpu/kernels/matmul_gemv_f32.wgsl +63 -0
  507. package/src/gpu/kernels/matmul_gemv_f32_subgroup.wgsl +84 -0
  508. package/src/gpu/kernels/matmul_gguf_columns_hoisted_f32.wgsl +342 -0
  509. package/src/gpu/kernels/matmul_gguf_pair_columns_f32.wgsl +279 -0
  510. package/src/gpu/kernels/matmul_gguf_pair_f32.wgsl +197 -0
  511. package/src/gpu/kernels/matmul_paired.wgsl +315 -0
  512. package/src/gpu/kernels/matmul_paired_compensated.wgsl +334 -0
  513. package/src/gpu/kernels/matmul_q4_0.wgsl +234 -0
  514. package/src/gpu/kernels/matmul_q4_0_tile128.wgsl +477 -0
  515. package/src/gpu/kernels/matmul_q4_0_tile128_bounded.wgsl +483 -0
  516. package/src/gpu/kernels/matmul_q4_0_tile64.wgsl +282 -0
  517. package/src/gpu/kernels/matmul_q4_0_tile64_bounded.wgsl +288 -0
  518. package/src/gpu/kernels/matmul_q4_0_tile64x128.wgsl +364 -0
  519. package/src/gpu/kernels/matmul_q4_0_tile64x128_bounded.wgsl +370 -0
  520. package/src/gpu/kernels/matmul_q4_1_columns_f32.wgsl +132 -0
  521. package/src/gpu/kernels/matmul_q5k.wgsl +181 -0
  522. package/src/gpu/kernels/matmul_q5k_columns.wgsl +194 -0
  523. package/src/gpu/kernels/matmul_q5k_cooperative.wgsl +129 -0
  524. package/src/gpu/kernels/matmul_q5k_tile64.wgsl +309 -0
  525. package/src/gpu/kernels/matmul_w8a8.wgsl +55 -0
  526. package/src/gpu/kernels/matmul_w8a8_packed.wgsl +54 -0
  527. package/src/gpu/kernels/matmul_w8a8_packed_cooperative.wgsl +77 -0
  528. package/src/gpu/kernels/moe-grouped.js +132 -0
  529. package/src/gpu/kernels/moe-norm-router.js +91 -0
  530. package/src/gpu/kernels/moe-route.js +135 -0
  531. package/src/gpu/kernels/moe-shared-slot.js +219 -0
  532. package/src/gpu/kernels/moe_grouped_matmul_f32.wgsl +216 -0
  533. package/src/gpu/kernels/moe_grouped_matmul_ordered_f32.wgsl +158 -0
  534. package/src/gpu/kernels/moe_grouped_sort.wgsl +101 -0
  535. package/src/gpu/kernels/moe_norm_router_f32.wgsl +254 -0
  536. package/src/gpu/kernels/moe_route_gguf_split_f32.wgsl +117 -0
  537. package/src/gpu/kernels/moe_route_q4_0_f32.wgsl +81 -0
  538. package/src/gpu/kernels/moe_route_q4_f32.wgsl +250 -0
  539. package/src/gpu/kernels/moe_shared_slot_combine_f32.wgsl +91 -0
  540. package/src/gpu/kernels/moe_shared_slot_down_f32.wgsl +264 -0
  541. package/src/gpu/kernels/moe_shared_slot_down_pair_combine_f32.wgsl +254 -0
  542. package/src/gpu/kernels/moe_shared_slot_down_pair_combine_residual_f32.wgsl +262 -0
  543. package/src/gpu/kernels/moe_shared_slot_down_pair_f32.wgsl +187 -0
  544. package/src/gpu/kernels/moe_shared_slot_gu_f32.wgsl +264 -0
  545. package/src/gpu/kernels/moe_shared_slot_gu_pair_f32.wgsl +267 -0
  546. package/src/gpu/kernels/paired-activation.js +86 -0
  547. package/src/gpu/kernels/paired-attention.js +85 -0
  548. package/src/gpu/kernels/paired-cast.js +82 -0
  549. package/src/gpu/kernels/paired-linear-attention.js +180 -0
  550. package/src/gpu/kernels/paired-matmul.js +86 -0
  551. package/src/gpu/kernels/paired-rmsnorm.js +127 -0
  552. package/src/gpu/kernels/paired-rope.js +44 -0
  553. package/src/gpu/kernels/paired-split.js +74 -0
  554. package/src/gpu/kernels/paired_add.wgsl +261 -0
  555. package/src/gpu/kernels/paired_multiply.wgsl +261 -0
  556. package/src/gpu/kernels/paired_scale.wgsl +260 -0
  557. package/src/gpu/kernels/paired_scale_inplace.wgsl +259 -0
  558. package/src/gpu/kernels/paired_sigmoid.wgsl +266 -0
  559. package/src/gpu/kernels/paired_silu.wgsl +266 -0
  560. package/src/gpu/kernels/paired_silu_unary.wgsl +260 -0
  561. package/src/gpu/kernels/pipeline-cache.d.ts +37 -4
  562. package/src/gpu/kernels/pipeline-cache.js +185 -88
  563. package/src/gpu/kernels/ple.js +145 -0
  564. package/src/gpu/kernels/ple_conv.wgsl +104 -0
  565. package/src/gpu/kernels/ple_gate.wgsl +131 -0
  566. package/src/gpu/kernels/q4_0.js +200 -0
  567. package/src/gpu/kernels/qsa-indexer.d.ts +105 -0
  568. package/src/gpu/kernels/qsa-indexer.js +304 -0
  569. package/src/gpu/kernels/qsa_block_keys.wgsl +110 -0
  570. package/src/gpu/kernels/qsa_block_scores.wgsl +73 -0
  571. package/src/gpu/kernels/qsa_prepare.wgsl +116 -0
  572. package/src/gpu/kernels/qsa_select.wgsl +172 -0
  573. package/src/gpu/kernels/quantize_w8a8.wgsl +81 -0
  574. package/src/gpu/kernels/qwen_attention_split_q_gate.js +71 -0
  575. package/src/gpu/kernels/qwen_attention_split_q_gate.wgsl +26 -0
  576. package/src/gpu/kernels/qwen_linear_attention_decay_paired.wgsl +266 -0
  577. package/src/gpu/kernels/qwen_linear_attention_log_decay_paired.wgsl +273 -0
  578. package/src/gpu/kernels/qwen_linear_attention_prepare.js +153 -0
  579. package/src/gpu/kernels/qwen_linear_attention_prepare.wgsl +120 -0
  580. package/src/gpu/kernels/qwen_linear_attention_prepare_paired.wgsl +267 -0
  581. package/src/gpu/kernels/qwen_linear_attention_scale_paired.wgsl +276 -0
  582. package/src/gpu/kernels/relu.js +5 -12
  583. package/src/gpu/kernels/repeat_channels.js +22 -9
  584. package/src/gpu/kernels/repeat_channels.wgsl +12 -5
  585. package/src/gpu/kernels/repeat_channels_f16.wgsl +12 -5
  586. package/src/gpu/kernels/rescale_w8a8.wgsl +74 -0
  587. package/src/gpu/kernels/residual.js +5 -0
  588. package/src/gpu/kernels/rmsnorm-pair.js +2 -2
  589. package/src/gpu/kernels/rmsnorm-qk.js +27 -5
  590. package/src/gpu/kernels/rmsnorm-stats.js +62 -78
  591. package/src/gpu/kernels/rmsnorm.js +74 -96
  592. package/src/gpu/kernels/rmsnorm.wgsl +9 -3
  593. package/src/gpu/kernels/rmsnorm_f16.wgsl +2 -0
  594. package/src/gpu/kernels/rmsnorm_paired.wgsl +321 -0
  595. package/src/gpu/kernels/rmsnorm_paired_sliced.wgsl +326 -0
  596. package/src/gpu/kernels/rmsnorm_qk.wgsl +32 -8
  597. package/src/gpu/kernels/rmsnorm_stats_subgroups.wgsl +7 -7
  598. package/src/gpu/kernels/rope-dispatch.js +26 -0
  599. package/src/gpu/kernels/rope-precompute.js +29 -28
  600. package/src/gpu/kernels/rope-qk.js +35 -24
  601. package/src/gpu/kernels/rope.js +5 -2
  602. package/src/gpu/kernels/rope.wgsl +2 -2
  603. package/src/gpu/kernels/rope_precompute.wgsl +150 -6
  604. package/src/gpu/kernels/rope_precompute_paired.wgsl +285 -0
  605. package/src/gpu/kernels/rope_qk.wgsl +3 -2
  606. package/src/gpu/kernels/rope_qk_paired.wgsl +341 -0
  607. package/src/gpu/kernels/sample.js +115 -244
  608. package/src/gpu/kernels/sample.wgsl +53 -38
  609. package/src/gpu/kernels/sample_f16.wgsl +53 -38
  610. package/src/gpu/kernels/scale.js +6 -1
  611. package/src/gpu/kernels/scatter_add_routes_f32.wgsl +43 -0
  612. package/src/gpu/kernels/shader-cache.d.ts +7 -1
  613. package/src/gpu/kernels/shader-cache.js +61 -20
  614. package/src/gpu/kernels/shader-source-scope.d.ts +14 -0
  615. package/src/gpu/kernels/shader-source-scope.js +127 -12
  616. package/src/gpu/kernels/sigmoid-gated-add.js +68 -0
  617. package/src/gpu/kernels/sigmoid_gated_add_f32.wgsl +76 -0
  618. package/src/gpu/kernels/silu.js +56 -136
  619. package/src/gpu/kernels/silu.wgsl +54 -3
  620. package/src/gpu/kernels/silu_f16.wgsl +3 -2
  621. package/src/gpu/kernels/softmax.js +57 -19
  622. package/src/gpu/kernels/softmax_topk_logit_rank.wgsl +137 -0
  623. package/src/gpu/kernels/softmax_topk_ranked.wgsl +132 -0
  624. package/src/gpu/kernels/softmax_topk_strided.wgsl +80 -0
  625. package/src/gpu/kernels/speculative-accept.js +97 -0
  626. package/src/gpu/kernels/speculative_accept.wgsl +38 -0
  627. package/src/gpu/kernels/speculative_accept_gpu_limit.wgsl +42 -0
  628. package/src/gpu/kernels/split-dispatch.js +18 -0
  629. package/src/gpu/kernels/split-qkv-rmsnorm-qk.js +3 -6
  630. package/src/gpu/kernels/split-qkv-rmsnorm-rope-qk.js +4 -11
  631. package/src/gpu/kernels/split_qg.js +6 -2
  632. package/src/gpu/kernels/split_qg.wgsl +3 -2
  633. package/src/gpu/kernels/split_qg_f16.wgsl +3 -2
  634. package/src/gpu/kernels/split_qg_paired.wgsl +59 -0
  635. package/src/gpu/kernels/split_qkv.js +7 -16
  636. package/src/gpu/kernels/split_qkv_paired.wgsl +75 -0
  637. package/src/gpu/kernels/subgroup-partition.js +11 -0
  638. package/src/gpu/kernels/uniform-encoding.js +20 -0
  639. package/src/gpu/kernels/uniform-utils.js +44 -49
  640. package/src/gpu/kernels/vision-average-pool.js +2 -5
  641. package/src/gpu/kernels/vision-patch-embed.js +2 -5
  642. package/src/gpu/kernels/vision-position-embedding.js +2 -5
  643. package/src/gpu/kernels/vision-rope-2d.js +2 -5
  644. package/src/gpu/kernels/vision-spatial-merge.js +2 -5
  645. package/src/gpu/kernels/w8a8.js +166 -0
  646. package/src/gpu/prepared-decode-workspace.d.ts +11 -0
  647. package/src/gpu/prepared-decode-workspace.js +104 -0
  648. package/src/gpu/recorder-timestamps.js +63 -0
  649. package/src/gpu/step-contract.d.ts +27 -0
  650. package/src/gpu/step-contract.js +26 -0
  651. package/src/gpu/submit-tracker.js +1 -17
  652. package/src/gpu/tensor.d.ts +13 -4
  653. package/src/gpu/tensor.js +38 -19
  654. package/src/gpu/uniform-cache.d.ts +8 -4
  655. package/src/gpu/uniform-cache.js +41 -25
  656. package/src/gpu/weight-buffer.d.ts +10 -1
  657. package/src/gpu/weight-buffer.js +2 -1
  658. package/src/index.d.ts +1 -0
  659. package/src/index.js +1 -0
  660. package/src/inference/choice-scoring.js +70 -0
  661. package/src/inference/decode-buffers.d.ts +11 -3
  662. package/src/inference/decode-buffers.js +93 -63
  663. package/src/inference/generation-output.js +128 -0
  664. package/src/inference/generation-step.d.ts +14 -0
  665. package/src/inference/generation-step.js +26 -0
  666. package/src/inference/kv-cache/base.d.ts +7 -2
  667. package/src/inference/kv-cache/base.js +10 -8
  668. package/src/inference/kv-cache/copy-state.js +39 -0
  669. package/src/inference/kv-cache/layer-range.js +76 -0
  670. package/src/inference/kv-cache/mixed-geometry.d.ts +3 -2
  671. package/src/inference/kv-cache/mixed-geometry.js +25 -1
  672. package/src/inference/kv-cache/quantized.d.ts +1 -1
  673. package/src/inference/kv-cache/quantized.js +1 -1
  674. package/src/inference/kv-cache/sliding-window.d.ts +2 -2
  675. package/src/inference/kv-cache/sliding-window.js +58 -183
  676. package/src/inference/kv-cache/tiered.d.ts +1 -1
  677. package/src/inference/kv-cache/tiered.js +1 -1
  678. package/src/inference/kv-cache/types.js +2 -28
  679. package/src/inference/kv-cache/update.js +104 -157
  680. package/src/inference/moe-router.d.ts +5 -0
  681. package/src/inference/moe-router.js +42 -31
  682. package/src/inference/pipelines/audio/index.js +5 -2
  683. package/src/inference/pipelines/audio/mel.js +116 -81
  684. package/src/inference/pipelines/context.js +109 -79
  685. package/src/inference/pipelines/factory.js +27 -5
  686. package/src/inference/pipelines/registry.js +9 -3
  687. package/src/inference/pipelines/shader-scoped-pipeline.d.ts +24 -0
  688. package/src/inference/pipelines/shader-scoped-pipeline.js +243 -11
  689. package/src/inference/pipelines/shared/clipped-linear.js +1 -1
  690. package/src/inference/pipelines/structured/json-head-pipeline.js +1 -1
  691. package/src/inference/pipelines/text/activity-weights.js +110 -0
  692. package/src/inference/pipelines/text/attention/cache-cast.js +15 -0
  693. package/src/inference/pipelines/text/attention/dispatch-params.js +2 -1
  694. package/src/inference/pipelines/text/attention/interpreter/immediate.js +16 -19
  695. package/src/inference/pipelines/text/attention/interpreter/recorded.js +20 -21
  696. package/src/inference/pipelines/text/attention/interpreter.js +34 -38
  697. package/src/inference/pipelines/text/attention/paired-contract.js +29 -0
  698. package/src/inference/pipelines/text/attention/plan.d.ts +2 -0
  699. package/src/inference/pipelines/text/attention/plan.js +11 -4
  700. package/src/inference/pipelines/text/attention/projection-executor.js +10 -27
  701. package/src/inference/pipelines/text/attention/projection-plan.js +24 -31
  702. package/src/inference/pipelines/text/attention/projections.js +10 -27
  703. package/src/inference/pipelines/text/attention/query-transform.js +2 -2
  704. package/src/inference/pipelines/text/attention/recorded-health.js +2 -1
  705. package/src/inference/pipelines/text/attention/rope-observation.js +26 -3
  706. package/src/inference/pipelines/text/chat-format.js +2 -1
  707. package/src/inference/pipelines/text/config/normalization.js +115 -226
  708. package/src/inference/pipelines/text/config/vision-normalizers.js +240 -0
  709. package/src/inference/pipelines/text/config-components.js +49 -0
  710. package/src/inference/pipelines/text/config.d.ts +45 -1
  711. package/src/inference/pipelines/text/config.js +26 -38
  712. package/src/inference/pipelines/text/debug-utils/config.js +13 -156
  713. package/src/inference/pipelines/text/debug-utils/health-metrics.js +8 -23
  714. package/src/inference/pipelines/text/debug-utils/readback-decoding.js +5 -1
  715. package/src/inference/pipelines/text/embed.js +38 -4
  716. package/src/inference/pipelines/text/embedding-batch.js +23 -0
  717. package/src/inference/pipelines/text/embedding-extraction.js +7 -2
  718. package/src/inference/pipelines/text/embedding-normalization.js +2 -1
  719. package/src/inference/pipelines/text/execution-plan.d.ts +16 -0
  720. package/src/inference/pipelines/text/execution-plan.js +49 -2
  721. package/src/inference/pipelines/text/execution-runtime-builders.js +31 -0
  722. package/src/inference/pipelines/text/execution-v1/validation.js +3 -3
  723. package/src/inference/pipelines/text/execution-v1.js +14 -14
  724. package/src/inference/pipelines/text/execution.js +78 -128
  725. package/src/inference/pipelines/text/ffn/activation-observation.js +45 -0
  726. package/src/inference/pipelines/text/ffn/decode-intermediate.js +10 -0
  727. package/src/inference/pipelines/text/ffn/dense-executor.js +55 -50
  728. package/src/inference/pipelines/text/ffn/dense-plan.js +28 -27
  729. package/src/inference/pipelines/text/ffn/dense.js +28 -48
  730. package/src/inference/pipelines/text/ffn/moe.js +67 -3
  731. package/src/inference/pipelines/text/ffn/paired.js +144 -0
  732. package/src/inference/pipelines/text/ffn/qwen-shared-expert.js +212 -0
  733. package/src/inference/pipelines/text/ffn/sandwich.js +8 -3
  734. package/src/inference/pipelines/text/ffn/standard.js +67 -16
  735. package/src/inference/pipelines/text/finiteness-guard-status.js +9 -0
  736. package/src/inference/pipelines/text/generation-request.d.ts +36 -0
  737. package/src/inference/pipelines/text/generation-request.js +73 -0
  738. package/src/inference/pipelines/text/generator/activation-storage.js +15 -0
  739. package/src/inference/pipelines/text/generator/batch-retry-policy.js +20 -0
  740. package/src/inference/pipelines/text/generator/capsule-generation.js +37 -0
  741. package/src/inference/pipelines/text/generator/compiled-greedy-window.js +154 -0
  742. package/src/inference/pipelines/text/generator/decode-components.js +24 -0
  743. package/src/inference/pipelines/text/generator/decode-readback.js +73 -0
  744. package/src/inference/pipelines/text/generator/decode-runtime.js +396 -392
  745. package/src/inference/pipelines/text/generator/decode.js +593 -637
  746. package/src/inference/pipelines/text/generator/diagnostic-sequence.d.ts +63 -0
  747. package/src/inference/pipelines/text/generator/diagnostic-sequence.js +106 -0
  748. package/src/inference/pipelines/text/generator/diffusion.js +24 -12
  749. package/src/inference/pipelines/text/generator/greedy-head-policy.js +15 -0
  750. package/src/inference/pipelines/text/generator/logits-config.js +11 -4
  751. package/src/inference/pipelines/text/generator/per-layer-buffer.js +21 -0
  752. package/src/inference/pipelines/text/generator/prefill-observation.js +25 -1
  753. package/src/inference/pipelines/text/generator/prefill-policy.js +30 -18
  754. package/src/inference/pipelines/text/generator/prefill-runtime.js +511 -511
  755. package/src/inference/pipelines/text/generator/recorded-step-executor.js +70 -0
  756. package/src/inference/pipelines/text/generator/recorder-stats.js +17 -0
  757. package/src/inference/pipelines/text/generator/recovery.js +6 -0
  758. package/src/inference/pipelines/text/generator/session-context.js +19 -7
  759. package/src/inference/pipelines/text/generator/speculative-runtime.js +82 -0
  760. package/src/inference/pipelines/text/generator/text.js +17 -149
  761. package/src/inference/pipelines/text/generator/token-selection.d.ts +7 -0
  762. package/src/inference/pipelines/text/generator/token-selection.js +59 -0
  763. package/src/inference/pipelines/text/generator/training.js +39 -58
  764. package/src/inference/pipelines/text/generator/whole-token-lane.js +371 -0
  765. package/src/inference/pipelines/text/generator/whole-token-observation.d.ts +72 -0
  766. package/src/inference/pipelines/text/generator/whole-token-observation.js +502 -0
  767. package/src/inference/pipelines/text/generator/whole-token-program.d.ts +93 -0
  768. package/src/inference/pipelines/text/generator/whole-token-program.js +731 -0
  769. package/src/inference/pipelines/text/generator/whole-token-template.js +437 -0
  770. package/src/inference/pipelines/text/generator-runtime.d.ts +107 -0
  771. package/src/inference/pipelines/text/generator-runtime.js +24 -64
  772. package/src/inference/pipelines/text/generator-steps.js +49 -49
  773. package/src/inference/pipelines/text/generator.d.ts +10 -1
  774. package/src/inference/pipelines/text/generator.js +96 -166
  775. package/src/inference/pipelines/text/hyper-connection/decoder-layer.d.ts +75 -0
  776. package/src/inference/pipelines/text/hyper-connection/decoder-layer.js +132 -0
  777. package/src/inference/pipelines/text/hyper-connection/layer-executor.js +104 -0
  778. package/src/inference/pipelines/text/hyper-connection/logits-input.js +20 -0
  779. package/src/inference/pipelines/text/hyper-connection/projection.js +21 -0
  780. package/src/inference/pipelines/text/hyper-connection/sequence-transaction.js +145 -0
  781. package/src/inference/pipelines/text/hyper-connection/session.d.ts +39 -0
  782. package/src/inference/pipelines/text/hyper-connection/session.js +236 -0
  783. package/src/inference/pipelines/text/image-transcription.js +2 -3
  784. package/src/inference/pipelines/text/indexed-attention/attention-runner.js +49 -0
  785. package/src/inference/pipelines/text/indexed-attention/qsa-cache.d.ts +54 -0
  786. package/src/inference/pipelines/text/indexed-attention/qsa-cache.js +256 -0
  787. package/src/inference/pipelines/text/init-qkv-fusion.js +121 -104
  788. package/src/inference/pipelines/text/init-rope.d.ts +26 -0
  789. package/src/inference/pipelines/text/init-rope.js +109 -14
  790. package/src/inference/pipelines/text/init-tokenizer.js +29 -0
  791. package/src/inference/pipelines/text/init.d.ts +28 -10
  792. package/src/inference/pipelines/text/init.js +65 -74
  793. package/src/inference/pipelines/text/kernel-trace.js +33 -11
  794. package/src/inference/pipelines/text/layer-execution-contract.js +1 -1
  795. package/src/inference/pipelines/text/layer-input-execution.js +10 -9
  796. package/src/inference/pipelines/text/layer-partition-contract.d.ts +47 -0
  797. package/src/inference/pipelines/text/layer-partition-contract.js +220 -0
  798. package/src/inference/pipelines/text/layer-plan-gpu.js +153 -80
  799. package/src/inference/pipelines/text/layer-plan.js +9 -2
  800. package/src/inference/pipelines/text/layer.js +34 -47
  801. package/src/inference/pipelines/text/lifecycle.js +79 -178
  802. package/src/inference/pipelines/text/linear-attention/activity.js +29 -0
  803. package/src/inference/pipelines/text/linear-attention/norm-ab.js +59 -0
  804. package/src/inference/pipelines/text/linear-attention/plan.js +35 -34
  805. package/src/inference/pipelines/text/linear-attention/state-checkpoint.js +83 -0
  806. package/src/inference/pipelines/text/linear-attention/state-clone.js +109 -0
  807. package/src/inference/pipelines/text/linear-attention/state-layout.js +45 -0
  808. package/src/inference/pipelines/text/linear-attention-ab-fusion.js +48 -45
  809. package/src/inference/pipelines/text/linear-attention.d.ts +20 -0
  810. package/src/inference/pipelines/text/linear-attention.js +130 -135
  811. package/src/inference/pipelines/text/load-errors.js +2 -19
  812. package/src/inference/pipelines/text/load-policy.js +55 -0
  813. package/src/inference/pipelines/text/logits/gpu-executor.js +130 -103
  814. package/src/inference/pipelines/text/logits/gpu.js +93 -70
  815. package/src/inference/pipelines/text/logits/index.d.ts +14 -2
  816. package/src/inference/pipelines/text/logits/index.js +420 -352
  817. package/src/inference/pipelines/text/logits/output-transform.js +28 -23
  818. package/src/inference/pipelines/text/logits/precision-policy.js +1 -1
  819. package/src/inference/pipelines/text/logits/types.d.ts +8 -1
  820. package/src/inference/pipelines/text/lora-apply.js +1 -1
  821. package/src/inference/pipelines/text/model-load.js +71 -117
  822. package/src/inference/pipelines/text/moe/gpu-executor.js +39 -17
  823. package/src/inference/pipelines/text/moe/grouped-prefill.js +67 -0
  824. package/src/inference/pipelines/text/moe/qwen-route-executor.d.ts +41 -0
  825. package/src/inference/pipelines/text/moe/qwen-route-executor.js +125 -0
  826. package/src/inference/pipelines/text/moe/routed-expert-chunks.js +95 -0
  827. package/src/inference/pipelines/text/moe-gpu.js +132 -50
  828. package/src/inference/pipelines/text/moe-impl.d.ts +23 -3
  829. package/src/inference/pipelines/text/moe-shape-validator.js +12 -0
  830. package/src/inference/pipelines/text/ngram/ngram-addresses.d.ts +30 -0
  831. package/src/inference/pipelines/text/ngram/ngram-addresses.js +134 -0
  832. package/src/inference/pipelines/text/ngram/ngram-table.d.ts +89 -0
  833. package/src/inference/pipelines/text/ngram/ngram-table.js +233 -0
  834. package/src/inference/pipelines/text/ngram/ple-layer.d.ts +54 -0
  835. package/src/inference/pipelines/text/ngram/ple-layer.js +115 -0
  836. package/src/inference/pipelines/text/operator-events.d.ts +129 -0
  837. package/src/inference/pipelines/text/operator-events.js +19 -2
  838. package/src/inference/pipelines/text/ops.js +40 -30
  839. package/src/inference/pipelines/text/paired-execution.js +140 -0
  840. package/src/inference/pipelines/text/partition-attempt.js +105 -0
  841. package/src/inference/pipelines/text/partition-execution.js +347 -0
  842. package/src/inference/pipelines/text/per-layer/materialize.js +3 -10
  843. package/src/inference/pipelines/text/per-layer/plan.js +3 -10
  844. package/src/inference/pipelines/text/per-layer-inputs.js +3 -10
  845. package/src/inference/pipelines/text/pipeline-load-timing.js +2 -1
  846. package/src/inference/pipelines/text/pipeline.d.ts +227 -0
  847. package/src/inference/pipelines/text/pipeline.js +629 -0
  848. package/src/inference/pipelines/text/precomputed-input-norm.js +29 -0
  849. package/src/inference/pipelines/text/probes.js +65 -23
  850. package/src/inference/pipelines/text/resident-partition-contract.d.ts +179 -0
  851. package/src/inference/pipelines/text/resident-partition-contract.js +98 -0
  852. package/src/inference/pipelines/text/resident-partition.js +403 -0
  853. package/src/inference/pipelines/text/resident-pipeline-preparation.js +341 -0
  854. package/src/inference/pipelines/text/sampling-config.d.ts +16 -0
  855. package/src/inference/pipelines/text/sampling-config.js +7 -4
  856. package/src/inference/pipelines/text/sequence-state.d.ts +68 -0
  857. package/src/inference/pipelines/text/sequence-state.js +514 -0
  858. package/src/inference/pipelines/text/stage-names.d.ts +88 -0
  859. package/src/inference/pipelines/text/state.d.ts +17 -8
  860. package/src/inference/pipelines/text/state.js +10 -0
  861. package/src/inference/pipelines/text/stopping.js +17 -0
  862. package/src/inference/pipelines/text/tsir-fixture-writer.d.ts +77 -0
  863. package/src/inference/pipelines/text/tsir-fixture-writer.js +3 -12
  864. package/src/inference/pipelines/text/types.d.ts +65 -111
  865. package/src/inference/pipelines/text/warm-generation.d.ts +27 -0
  866. package/src/inference/pipelines/text/warm-generation.js +34 -0
  867. package/src/inference/pipelines/text/weight-loading-config.js +16 -10
  868. package/src/inference/pipelines/text/weights.d.ts +103 -1
  869. package/src/inference/pipelines/text/weights.js +0 -17
  870. package/src/inference/pipelines/text.d.ts +3 -211
  871. package/src/inference/pipelines/text.js +16 -578
  872. package/src/inference/pipelines/video/feature-concat.js +30 -0
  873. package/src/inference/pipelines/video/frame-sampler.js +4 -0
  874. package/src/inference/pipelines/video/index.js +33 -44
  875. package/src/inference/pipelines/vision/encoder.js +1 -1
  876. package/src/inference/pipelines/vision/gemma4.js +6 -7
  877. package/src/inference/pipelines/vision/glmocr.js +11 -13
  878. package/src/inference/pipelines/vision/index.js +14 -3
  879. package/src/inference/pipelines/vision/support.js +93 -0
  880. package/src/inference/pipelines/vision/weight-loading.js +111 -0
  881. package/src/inference/rerank.d.ts +44 -0
  882. package/src/inference/resident-block-contract.d.ts +35 -0
  883. package/src/inference/resident-block-contract.js +105 -0
  884. package/src/inference/resident-output-state.d.ts +14 -0
  885. package/src/inference/resident-output-state.js +89 -0
  886. package/src/inference/resident-publication-contract.d.ts +32 -0
  887. package/src/inference/resident-publication-contract.js +104 -0
  888. package/src/inference/resident-state-contract.d.ts +26 -0
  889. package/src/inference/resident-state-contract.js +135 -0
  890. package/src/inference/resident-target-state.d.ts +32 -0
  891. package/src/inference/resident-target-state.js +152 -0
  892. package/src/inference/sampling-rng.js +35 -0
  893. package/src/inference/token-sampling.js +76 -0
  894. package/src/inference/tokenizer.d.ts +2 -0
  895. package/src/inference/tokenizer.js +16 -0
  896. package/src/inference/tokenizers/bundled/incremental-decoder.d.ts +16 -0
  897. package/src/inference/tokenizers/bundled/incremental-decoder.js +100 -0
  898. package/src/inference/tokenizers/bundled/normalizer.js +44 -0
  899. package/src/inference/tokenizers/bundled.js +25 -42
  900. package/src/inference/tokenizers/sentencepiece.js +4 -26
  901. package/src/loader/doppler-loader.d.ts +13 -0
  902. package/src/loader/doppler-loader.js +34 -62
  903. package/src/loader/dtype-utils.js +1 -19
  904. package/src/loader/embedding-limit-preflight.js +77 -8
  905. package/src/loader/embedding-loader.js +43 -114
  906. package/src/loader/experts/expert-cache.js +1 -4
  907. package/src/loader/experts/expert-loader.d.ts +6 -1
  908. package/src/loader/experts/expert-loader.js +90 -29
  909. package/src/loader/experts/expert-preparation.d.ts +16 -0
  910. package/src/loader/experts/expert-preparation.js +57 -0
  911. package/src/loader/experts/loader-bindings.js +53 -0
  912. package/src/loader/experts/qwen-paging.d.ts +19 -0
  913. package/src/loader/experts/qwen-paging.js +70 -0
  914. package/src/loader/experts/routed-expert-cache.d.ts +56 -0
  915. package/src/loader/experts/routed-expert-cache.js +372 -0
  916. package/src/loader/experts/routed-expert-plan.d.ts +20 -0
  917. package/src/loader/experts/routed-expert-plan.js +46 -0
  918. package/src/loader/final-weights-loader.d.ts +7 -1
  919. package/src/loader/final-weights-loader.js +17 -40
  920. package/src/loader/hyper-connection-loader.d.ts +25 -0
  921. package/src/loader/hyper-connection-loader.js +150 -0
  922. package/src/loader/layer-loader.d.ts +8 -1
  923. package/src/loader/layer-loader.js +67 -97
  924. package/src/loader/layer-tensor-aliases.js +77 -11
  925. package/src/loader/layer-weight-shape.js +13 -0
  926. package/src/loader/load-timing.js +2 -0
  927. package/src/loader/loader-types.d.ts +24 -1
  928. package/src/loader/model-executor.js +27 -365
  929. package/src/loader/model-load.d.ts +18 -0
  930. package/src/loader/model-load.js +432 -0
  931. package/src/loader/ngram-table-bindings.d.ts +11 -0
  932. package/src/loader/ngram-table-bindings.js +61 -0
  933. package/src/loader/per-layer-input-loader.js +5 -83
  934. package/src/loader/q4k-reference-weight.js +84 -0
  935. package/src/loader/shard-cache.js +3 -0
  936. package/src/loader/tensor-load-error.js +20 -1
  937. package/src/loader/tensors/bf16-loader.js +3 -29
  938. package/src/loader/tensors/buffer-write.js +26 -0
  939. package/src/loader/tensors/fp8-loader.js +28 -0
  940. package/src/loader/tensors/load-executor.js +124 -117
  941. package/src/loader/tensors/q4_0-loader.js +32 -0
  942. package/src/loader/tensors/range-backed-weights.js +34 -0
  943. package/src/loader/tensors/source-transform.js +1 -1
  944. package/src/loader/tensors/tensor-loader.js +22 -6
  945. package/src/loader/tensors/w8a8-loader.js +36 -0
  946. package/src/loader/weight-downcast.js +9 -13
  947. package/src/loader/weight-representation-plan.d.ts +28 -0
  948. package/src/loader/weight-representation-plan.js +146 -0
  949. package/src/loader/weights.d.ts +1 -1
  950. package/src/memory/buffer-pool.d.ts +24 -4
  951. package/src/memory/buffer-pool.js +124 -128
  952. package/src/memory/device-budget.d.ts +10 -0
  953. package/src/memory/device-budget.js +89 -0
  954. package/src/memory/device-residency.js +60 -0
  955. package/src/partitions.d.ts +21 -0
  956. package/src/partitions.js +10 -0
  957. package/src/rules/execution-rules-contract-check.js +73 -570
  958. package/src/rules/generated/rule-bundle.json +1 -4305
  959. package/src/rules/greedy-sampling.js +16 -0
  960. package/src/rules/inference/capability-transforms.rules.json +11 -1
  961. package/src/rules/layer-pattern-contract-check.js +49 -222
  962. package/src/rules/rule-matcher.d.ts +62 -0
  963. package/src/rules/rule-matcher.js +132 -1
  964. package/src/rules/rule-registry.d.ts +75 -0
  965. package/src/rules/rule-registry.js +64 -24
  966. package/src/storage/artifact-storage-context.d.ts +99 -0
  967. package/src/storage/artifact-storage-context.js +71 -114
  968. package/src/storage/backend-selection.js +3 -0
  969. package/src/storage/backends/idb-store.d.ts +54 -0
  970. package/src/storage/backends/idb-store.js +12 -0
  971. package/src/storage/backends/memory-store.d.ts +38 -0
  972. package/src/storage/backends/memory-store.js +15 -6
  973. package/src/storage/backends/opfs-store.d.ts +2 -0
  974. package/src/storage/backends/opfs-store.js +6 -0
  975. package/src/storage/blake3.d.ts +17 -0
  976. package/src/storage/blake3.js +153 -68
  977. package/src/storage/distribution-transport.js +626 -3
  978. package/src/storage/download/http-contract.js +199 -0
  979. package/src/storage/download/http-transport.js +824 -0
  980. package/src/storage/download/integrity.d.ts +10 -2
  981. package/src/storage/download/integrity.js +39 -2
  982. package/src/storage/download/transport.js +2 -2
  983. package/src/storage/downloader.js +404 -388
  984. package/src/storage/export.d.ts +1 -0
  985. package/src/storage/export.js +22 -70
  986. package/src/storage/model-cache.d.ts +4 -1
  987. package/src/storage/model-cache.js +131 -52
  988. package/src/storage/model-read-session.d.ts +13 -0
  989. package/src/storage/model-read-session.js +76 -0
  990. package/src/storage/node-file-access.js +108 -0
  991. package/src/storage/reports.js +1 -4
  992. package/src/storage/runtime-env.js +6 -0
  993. package/src/storage/shard-manager.d.ts +10 -0
  994. package/src/storage/shard-manager.js +644 -579
  995. package/src/storage/shards/index.js +16 -0
  996. package/src/storage/shards/integrity.js +35 -49
  997. package/src/storage/source-artifact-store.d.ts +59 -0
  998. package/src/storage/source-artifact-store.js +24 -37
  999. package/src/storage/source-storage-context.d.ts +53 -0
  1000. package/src/storage/source-storage-context.js +298 -0
  1001. package/src/storage/verified-piece-reader.d.ts +23 -0
  1002. package/src/storage/verified-piece-reader.js +134 -0
  1003. package/src/storage/verified-piece-storage.d.ts +7 -0
  1004. package/src/storage/verified-piece-storage.js +16 -0
  1005. package/src/tooling/boundary-evidence.js +1 -4
  1006. package/src/tooling/browser-command-runner.d.ts +1 -1
  1007. package/src/tooling/browser-command-runner.js +2 -2
  1008. package/src/tooling/browser-harness/benchmark-comparison.js +105 -0
  1009. package/src/tooling/browser-harness/benchmark-execution.js +865 -0
  1010. package/src/tooling/browser-harness/decode-diagnostics.js +201 -0
  1011. package/src/tooling/browser-harness/inference-execution.js +543 -0
  1012. package/src/tooling/browser-harness/model-initialization.js +230 -0
  1013. package/src/tooling/browser-harness/model-resolution.js +134 -0
  1014. package/src/tooling/browser-harness/report.js +338 -0
  1015. package/src/tooling/browser-harness/request-timing.js +50 -0
  1016. package/src/tooling/browser-harness/request.js +264 -0
  1017. package/src/tooling/browser-harness/runtime-config.d.ts +26 -0
  1018. package/src/tooling/browser-harness/runtime-config.js +256 -0
  1019. package/src/tooling/browser-harness/text-evidence.d.ts +81 -0
  1020. package/src/tooling/browser-harness/text-evidence.js +695 -0
  1021. package/src/tooling/browser-harness/text-execution.d.ts +37 -0
  1022. package/src/tooling/browser-harness/text-execution.js +721 -0
  1023. package/src/tooling/browser-harness/text-input.d.ts +45 -0
  1024. package/src/tooling/browser-harness/text-input.js +722 -0
  1025. package/src/tooling/browser-harness/timing-diagnostics.js +416 -0
  1026. package/src/tooling/browser-harness-text-helpers.d.ts +31 -0
  1027. package/src/tooling/browser-harness-text-helpers.js +31 -0
  1028. package/src/tooling/browser-harness.d.ts +245 -0
  1029. package/src/tooling/browser-harness.js +337 -0
  1030. package/src/tooling/command-api.d.ts +1 -0
  1031. package/src/tooling/diagnose-runner.js +2 -2
  1032. package/src/tooling/distribution-shard-transport.d.ts +6 -0
  1033. package/src/tooling/execution-cost-ledger.d.ts +2 -1
  1034. package/src/tooling/execution-cost-ledger.js +10 -7
  1035. package/src/tooling/hf-registry/catalog-io.js +7 -5
  1036. package/src/tooling/litert-package-runtime.js +1 -98
  1037. package/src/tooling/model-capsule-pieces.js +47 -0
  1038. package/src/tooling/model-capsule-rig.js +528 -0
  1039. package/src/tooling/node-browser/execution.d.ts +1 -1
  1040. package/src/tooling/node-browser/static-server.js +25 -2
  1041. package/src/tooling/node-browser/transport.js +0 -43
  1042. package/src/tooling/node-capsule-artifact-store.js +24 -0
  1043. package/src/tooling/node-command-execution.js +2 -2
  1044. package/src/tooling/node-command-runner.d.ts +1 -1
  1045. package/src/tooling/node-converter/input.js +36 -5
  1046. package/src/tooling/node-converter/output.js +75 -1
  1047. package/src/tooling/node-converter.js +33 -34
  1048. package/src/tooling/node-source-runtime.js +5 -5
  1049. package/src/tooling/portable-source-path.js +26 -0
  1050. package/src/tooling/production-release.js +3 -6
  1051. package/src/tooling/program-bundle/choice-scoring-reference.js +22 -0
  1052. package/src/tooling/program-bundle/materialize.js +4 -0
  1053. package/src/tooling/program-bundle/wgsl-closure.js +3 -9
  1054. package/src/tooling/program-bundle-host.js +26 -0
  1055. package/src/tooling/program-bundle.js +11 -6
  1056. package/src/tooling/reference-verify.js +5 -17
  1057. package/src/tooling/registered-variant-calibration-job.js +1 -4
  1058. package/src/tooling/registered-variant-calibration.js +1 -4
  1059. package/src/tooling/source-artifact-adapter.d.ts +1 -0
  1060. package/src/tooling/source-artifact-adapter.js +33 -1
  1061. package/src/tooling/source-intake.js +1 -4
  1062. package/src/tooling/source-runtime-bundle.d.ts +4 -85
  1063. package/src/tooling/source-runtime-bundle.js +3 -3
  1064. package/src/tooling/source-runtime-converter-config.js +41 -8
  1065. package/src/tooling/test-harness.d.ts +173 -0
  1066. package/src/tooling/test-harness.js +476 -0
  1067. package/src/tooling-exports/device.d.ts +1 -0
  1068. package/src/tooling-exports/device.js +1 -0
  1069. package/src/tooling-exports/evidence.d.ts +3 -0
  1070. package/src/tooling-exports/manifest.d.ts +1 -1
  1071. package/src/tooling-exports/manifest.js +1 -1
  1072. package/src/tooling-exports/runtime.d.ts +6 -1
  1073. package/src/tooling-exports/runtime.js +6 -1
  1074. package/src/tooling-exports/storage.d.ts +8 -0
  1075. package/src/tooling-exports/storage.js +8 -0
  1076. package/src/tooling-exports/structured.d.ts +2 -1
  1077. package/src/tooling-exports/structured.js +2 -1
  1078. package/src/tooling-exports.shared.d.ts +12 -9
  1079. package/src/tooling-exports.shared.js +6 -12
  1080. package/src/training-browser.d.ts +5 -0
  1081. package/src/training.d.ts +7 -0
  1082. package/src/training.js +1 -0
  1083. package/src/version.js +1 -1
  1084. package/tests/fixtures/linear-core-activation-accuracy.json +12 -0
  1085. package/tests/fixtures/linear-core-refined-accuracy.json +128 -0
  1086. package/tests/fixtures/q4k-ordered-accumulation.json +87 -0
  1087. package/tests/fixtures/rmsnorm-inverse-root.json +18 -0
  1088. package/tests/kernels/browser/kernel-suite.js +230 -0
  1089. package/tests/kernels/browser/test-page.js +4 -6
  1090. package/tests/kernels/harness/benchmark.js +11 -3
  1091. package/tests/kernels/reference/dequant.js +23 -3
  1092. package/tests/kernels/reference/index.js +1 -0
  1093. package/tools/convert-safetensors-node.js +7 -1
  1094. package/src/capsule.d.ts +0 -8
  1095. package/src/capsule.js +0 -4
  1096. package/src/cli/serve/capsule-handler.d.ts +0 -33
  1097. package/src/cli/serve/capsule-handler.js +0 -105
  1098. package/src/cli/serve/capsule-http.js +0 -102
  1099. package/src/client/runtime/index.js +0 -1
  1100. package/src/client/runtime/source-runtime.js +0 -910
  1101. package/src/client/runtime/target-selector.js +0 -2
  1102. package/src/config/backward-registry-loader.d.ts +0 -3
  1103. package/src/config/capsule-serve.d.ts +0 -9
  1104. package/src/config/capsule-serve.js +0 -28
  1105. package/src/config/capsule-serve.schema.json +0 -14
  1106. package/src/config/index.d.ts +0 -52
  1107. package/src/config/index.js +0 -22
  1108. package/src/config/kernels/kernel-ref-digests.js +0 -348
  1109. package/src/config/runtime/diagnostics/debug-logits.json +0 -54
  1110. package/src/config/runtime/experiments/bench/gemma3-bench-q4k-alt.json +0 -58
  1111. package/src/config/runtime/experiments/bench/gemma3-bench-q4k-batched.json +0 -58
  1112. package/src/config/runtime/experiments/bench/gemma3-bench-q4k.json +0 -57
  1113. package/src/config/runtime/experiments/bench/gemma4-bench-q4k.json +0 -33
  1114. package/src/config/runtime/experiments/bench/qwen3-bench-q4k-alt.json +0 -58
  1115. package/src/config/runtime/experiments/bench/qwen3-bench-q4k-batched.json +0 -58
  1116. package/src/config/runtime/experiments/debug/gemma3-browser-diagnose-q4k.json +0 -81
  1117. package/src/config/runtime/experiments/debug/gemma3-debug-q4k.json +0 -213
  1118. package/src/config/runtime/experiments/debug/gemma4-e2b-browser-diagnose-q4k.json +0 -85
  1119. package/src/config/runtime/experiments/debug/qwen35-browser-diagnose-q4k.json +0 -81
  1120. package/src/config/runtime/experiments/verify/gemma3-verify.json +0 -37
  1121. package/src/config/runtime/experiments/verify/gemma4-e2b-verify.json +0 -36
  1122. package/src/config/runtime/experiments/verify/lfm2-verify.json +0 -44
  1123. package/src/config/runtime/experiments/verify/translategemma-verify.json +0 -37
  1124. package/src/config/runtime/model/gemma2-debug.json +0 -78
  1125. package/src/config/runtime/model/gemma2-pipeline-debug.json +0 -67
  1126. package/src/config/runtime/model/gemma2-pipeline.json +0 -76
  1127. package/src/config/runtime/model/gemma3-layer-probe.json +0 -86
  1128. package/src/config/runtime/model/qwen3-5-layer-probe.json +0 -53
  1129. package/src/config/runtime/model/qwen3-5-layer3-boundary-probe.json +0 -109
  1130. package/src/config/runtime/model/qwen3-5-linear-attn-debug.json +0 -91
  1131. package/src/config/runtime/optimization-candidates/registry.json +0 -5
  1132. package/src/config/runtime/profiles/diffusiongemma-26b-a4b-throughput.json +0 -27
  1133. package/src/config/runtime/profiles/gemma3-270m-q4k-throughput-overlapped-probe.json +0 -43
  1134. package/src/config/runtime/profiles/gemma3-270m-q4k-throughput-probe.json +0 -40
  1135. package/src/config/runtime/profiles/gemma4-12b-rdrr-safe-b4.json +0 -46
  1136. package/src/config/runtime/profiles/gemma4-12b-rdrr-safe-single.json +0 -44
  1137. package/src/config/runtime/profiles/gemma4-31b-f16-activations-probe.json +0 -61
  1138. package/src/config/runtime/profiles/gemma4-e2b-baseline-probe.json +0 -39
  1139. package/src/config/runtime/profiles/gemma4-e2b-fused-rmsnorm-probe.json +0 -42
  1140. package/src/config/runtime/profiles/gemma4-e2b-fused-rmsnorm-test.json +0 -20
  1141. package/src/config/runtime/profiles/gemma4-e2b-int4ple-baseline-probe.json +0 -27
  1142. package/src/config/runtime/profiles/gemma4-e2b-int4ple-f16a-probe.json +0 -30
  1143. package/src/config/runtime/profiles/gemma4-e2b-int4ple-reference-export.json +0 -62
  1144. package/src/config/runtime/profiles/gemma4-e2b-int4ple-retain-q4k-probe.json +0 -43
  1145. package/src/config/runtime/profiles/gemma4-e2b-low-memory.json +0 -64
  1146. package/src/config/runtime/profiles/gemma4-e2b-prefill-profile.json +0 -33
  1147. package/src/config/runtime/profiles/gemma4-e2b-throughput-probe.json +0 -17
  1148. package/src/config/runtime/profiles/muse-glimmer-30b-source-parity-f32kv.json +0 -30
  1149. package/src/config/runtime/profiles/muse-glimmer-30b-source-parity.json +0 -110
  1150. package/src/config/runtime/profiles/qwen-3-5-0-8b-metal-attn128-candidate.json +0 -21
  1151. package/src/config/runtime/profiles/qwen-3-5-0-8b-metal-maxbatch64-candidate.json +0 -53
  1152. package/src/config/runtime/profiles/qwen-3-5-0-8b-metal-normed-ffn-candidate.json +0 -19
  1153. package/src/config/runtime/profiles/qwen-3-5-0-8b-metal-overlap-ringtokens1-candidate.json +0 -53
  1154. package/src/config/runtime/profiles/qwen-3-5-0-8b-metal-sequential-candidate.json +0 -53
  1155. package/src/config/runtime/profiles/qwen-3-5-0-8b-metal-throughput.json +0 -86
  1156. package/src/config/runtime/profiles/qwen-3-5-0-8b-prefill-profile.json +0 -33
  1157. package/src/config/runtime/profiles/qwen-3-5-0-8b-throughput-probe.json +0 -17
  1158. package/src/config/runtime/profiles/qwen-3-5-2b-f16-primary-throughput.json +0 -19
  1159. package/src/config/runtime/profiles/qwen-3-5-9b-metal-correctness.json +0 -47
  1160. package/src/config/runtime/profiles/qwen3-6-27b-f16-activations-probe.json +0 -58
  1161. package/src/config/runtime/profiles/qwen3-8-27b-source-parity.json +0 -87
  1162. package/src/config/runtime/profiles/simulation.json +0 -29
  1163. package/src/config/runtime/profiles/trace-layers.json +0 -125
  1164. package/src/config/runtime/profiles/translategemma-1b-nativekd2-q4k-rdna3-throughput-probe.json +0 -23
  1165. package/src/config/runtime/profiles/turboquant-contiguous-prod.json +0 -30
  1166. package/src/config/runtime/profiles/turboquant-contiguous.json +0 -30
  1167. package/src/config/runtime/profiles/turboquant.json +0 -37
  1168. package/src/config/runtime/profiles/verbose-trace.json +0 -37
  1169. package/src/config/runtime/tiers/gemma4-128gb.json +0 -80
  1170. package/src/config/runtime/tiers/gemma4-16gb.json +0 -83
  1171. package/src/config/runtime/tiers/gemma4-24gb.json +0 -80
  1172. package/src/config/runtime/tiers/gemma4-32gb.json +0 -80
  1173. package/src/config/transforms/capability-transform-resolver.js +0 -4
  1174. package/src/config/transforms/execution-graph/fusion.js +0 -436
  1175. package/src/config/transforms/execution-graph/validation.js +0 -414
  1176. package/src/config/transforms/execution-graph-transforms.js +0 -987
  1177. package/src/converter/shard-packer.d.ts +0 -138
  1178. package/src/converter/shard-packer.js +0 -425
  1179. package/src/experimental/adapters/adapter-manager.d.ts +0 -200
  1180. package/src/experimental/adapters/adapter-manager.js +0 -511
  1181. package/src/experimental/adapters/adapter-registry.d.ts +0 -192
  1182. package/src/experimental/adapters/adapter-registry.js +0 -477
  1183. package/src/experimental/adapters/artifact-contract.d.ts +0 -83
  1184. package/src/experimental/adapters/artifact-contract.js +0 -257
  1185. package/src/experimental/adapters/index.d.ts +0 -114
  1186. package/src/experimental/adapters/index.js +0 -54
  1187. package/src/experimental/bridge/trainer-artifact-bridge.d.ts +0 -162
  1188. package/src/experimental/bridge/trainer-artifact-bridge.js +0 -595
  1189. package/src/experimental/browser/browser-converter.d.ts +0 -71
  1190. package/src/experimental/browser/browser-converter.js +0 -978
  1191. package/src/experimental/browser/file-picker.d.ts +0 -63
  1192. package/src/experimental/browser/file-picker.js +0 -281
  1193. package/src/experimental/browser/gguf-parser-browser.js +0 -17
  1194. package/src/experimental/browser/quantization.js +0 -328
  1195. package/src/experimental/browser/safetensors-parser-browser.js +0 -347
  1196. package/src/experimental/browser/tensor-source-download.js +0 -245
  1197. package/src/experimental/browser/tensor-source-file.d.ts +0 -26
  1198. package/src/experimental/browser/tensor-source-file.js +0 -53
  1199. package/src/experimental/browser/tensor-source-http.d.ts +0 -29
  1200. package/src/experimental/browser/tensor-source-http.js +0 -130
  1201. package/src/experimental/diffusion/image-regression.d.ts +0 -31
  1202. package/src/experimental/diffusion/image-regression.js +0 -107
  1203. package/src/experimental/diffusion/index.d.ts +0 -32
  1204. package/src/experimental/diffusion/index.js +0 -18
  1205. package/src/experimental/diffusion/pipeline.js +0 -727
  1206. package/src/experimental/diffusion/scheduler.js +0 -153
  1207. package/src/experimental/diffusion/text-encoder-gpu.js +0 -947
  1208. package/src/experimental/diffusion/vae.js +0 -596
  1209. package/src/experimental/distribution/descriptor-transport.d.ts +0 -117
  1210. package/src/experimental/distribution/descriptor-transport.js +0 -342
  1211. package/src/experimental/distribution/p2p-control-plane.d.ts +0 -52
  1212. package/src/experimental/distribution/p2p-observability.d.ts +0 -116
  1213. package/src/experimental/distribution/p2p-observability.js +0 -303
  1214. package/src/experimental/distribution/p2p-webrtc-browser.d.ts +0 -37
  1215. package/src/experimental/distribution/shard-delivery/transport.js +0 -831
  1216. package/src/experimental/distribution/shard-delivery.d.ts +0 -251
  1217. package/src/experimental/energy/index.d.ts +0 -2
  1218. package/src/experimental/energy/index.js +0 -2
  1219. package/src/experimental/energy/pipeline.js +0 -697
  1220. package/src/experimental/energy/quintel.d.ts +0 -107
  1221. package/src/experimental/energy/quintel.js +0 -218
  1222. package/src/experimental/orchestration/energy-row-head-pipeline.js +0 -491
  1223. package/src/experimental/orchestration/index.d.ts +0 -21
  1224. package/src/experimental/orchestration/index.js +0 -12
  1225. package/src/formats/quantization-constants.d.ts +0 -11
  1226. package/src/formats/quantization-constants.js +0 -11
  1227. package/src/formats/tokenizer/types.js +0 -22
  1228. package/src/gpu/kernel-selector.d.ts +0 -11
  1229. package/src/gpu/kernels/activation-static-qdq.d.ts +0 -22
  1230. package/src/gpu/kernels/attention.d.ts +0 -253
  1231. package/src/gpu/kernels/backward/adam.d.ts +0 -29
  1232. package/src/gpu/kernels/backward/attention_backward.d.ts +0 -35
  1233. package/src/gpu/kernels/backward/bias_add_backward.d.ts +0 -17
  1234. package/src/gpu/kernels/backward/causal_conv1d_silu_backward.d.ts +0 -24
  1235. package/src/gpu/kernels/backward/conv2d_backward.d.ts +0 -31
  1236. package/src/gpu/kernels/backward/cross_entropy_backward.d.ts +0 -23
  1237. package/src/gpu/kernels/backward/embed_backward.d.ts +0 -29
  1238. package/src/gpu/kernels/backward/executor.d.ts +0 -34
  1239. package/src/gpu/kernels/backward/gated_delta_recurrent_backward.d.ts +0 -39
  1240. package/src/gpu/kernels/backward/gated_rmsnorm_backward.d.ts +0 -32
  1241. package/src/gpu/kernels/backward/gelu_backward.d.ts +0 -16
  1242. package/src/gpu/kernels/backward/groupnorm_backward.d.ts +0 -24
  1243. package/src/gpu/kernels/backward/index.d.ts +0 -26
  1244. package/src/gpu/kernels/backward/layernorm_backward.d.ts +0 -22
  1245. package/src/gpu/kernels/backward/matmul_backward.d.ts +0 -31
  1246. package/src/gpu/kernels/backward/pixel_shuffle_backward.d.ts +0 -22
  1247. package/src/gpu/kernels/backward/rmsnorm_backward.d.ts +0 -24
  1248. package/src/gpu/kernels/backward/rope_backward.d.ts +0 -25
  1249. package/src/gpu/kernels/backward/scale_backward.d.ts +0 -16
  1250. package/src/gpu/kernels/backward/silu_backward.d.ts +0 -16
  1251. package/src/gpu/kernels/backward/softmax_backward.d.ts +0 -16
  1252. package/src/gpu/kernels/backward/upsample2d_backward.d.ts +0 -21
  1253. package/src/gpu/kernels/backward/utils.js +0 -2
  1254. package/src/gpu/kernels/cast.d.ts +0 -67
  1255. package/src/gpu/kernels/clamp.d.ts +0 -22
  1256. package/src/gpu/kernels/conv2d.d.ts +0 -30
  1257. package/src/gpu/kernels/cross_entropy_loss.d.ts +0 -21
  1258. package/src/gpu/kernels/depthwise_conv1d.d.ts +0 -23
  1259. package/src/gpu/kernels/depthwise_conv2d.d.ts +0 -29
  1260. package/src/gpu/kernels/dequant.d.ts +0 -92
  1261. package/src/gpu/kernels/diffusion-gemma-sampling.d.ts +0 -19
  1262. package/src/gpu/kernels/energy.d.ts +0 -113
  1263. package/src/gpu/kernels/feature-check.d.ts +0 -42
  1264. package/src/gpu/kernels/fused_ffn.d.ts +0 -97
  1265. package/src/gpu/kernels/fused_matmul_residual.d.ts +0 -46
  1266. package/src/gpu/kernels/fused_matmul_rmsnorm.d.ts +0 -64
  1267. package/src/gpu/kernels/gather.d.ts +0 -144
  1268. package/src/gpu/kernels/gelu.d.ts +0 -37
  1269. package/src/gpu/kernels/gemma4-route-expert.d.ts +0 -35
  1270. package/src/gpu/kernels/grouped_pointwise_conv2d.d.ts +0 -27
  1271. package/src/gpu/kernels/groupnorm.d.ts +0 -27
  1272. package/src/gpu/kernels/index.d.ts +0 -517
  1273. package/src/gpu/kernels/index.js +0 -408
  1274. package/src/gpu/kernels/kernel-cache-lifecycle.d.ts +0 -9
  1275. package/src/gpu/kernels/kernel-prewarm.d.ts +0 -3
  1276. package/src/gpu/kernels/kv-cache-write.d.ts +0 -22
  1277. package/src/gpu/kernels/kv-quantize.d.ts +0 -37
  1278. package/src/gpu/kernels/layernorm.d.ts +0 -33
  1279. package/src/gpu/kernels/linear_attention.d.ts +0 -27
  1280. package/src/gpu/kernels/lm-head-argmax.d.ts +0 -28
  1281. package/src/gpu/kernels/lm-head-select-logits.d.ts +0 -23
  1282. package/src/gpu/kernels/logit-merge.d.ts +0 -86
  1283. package/src/gpu/kernels/logit-merge.js +0 -266
  1284. package/src/gpu/kernels/matmul.d.ts +0 -89
  1285. package/src/gpu/kernels/modulate.d.ts +0 -29
  1286. package/src/gpu/kernels/moe.d.ts +0 -113
  1287. package/src/gpu/kernels/pixel_shuffle.d.ts +0 -27
  1288. package/src/gpu/kernels/relu.d.ts +0 -18
  1289. package/src/gpu/kernels/repeat_channels.d.ts +0 -21
  1290. package/src/gpu/kernels/residual.d.ts +0 -65
  1291. package/src/gpu/kernels/rmsnorm-pair.d.ts +0 -72
  1292. package/src/gpu/kernels/rmsnorm-qk.d.ts +0 -41
  1293. package/src/gpu/kernels/rmsnorm-stats.d.ts +0 -29
  1294. package/src/gpu/kernels/rmsnorm.d.ts +0 -76
  1295. package/src/gpu/kernels/rope-qk.d.ts +0 -41
  1296. package/src/gpu/kernels/rope.d.ts +0 -48
  1297. package/src/gpu/kernels/sample.d.ts +0 -71
  1298. package/src/gpu/kernels/scale.d.ts +0 -40
  1299. package/src/gpu/kernels/silu.d.ts +0 -77
  1300. package/src/gpu/kernels/soft-embedding.d.ts +0 -28
  1301. package/src/gpu/kernels/softmax.d.ts +0 -57
  1302. package/src/gpu/kernels/split-qkv-rmsnorm-qk.d.ts +0 -44
  1303. package/src/gpu/kernels/split-qkv-rmsnorm-rope-qk.d.ts +0 -59
  1304. package/src/gpu/kernels/split_qg.d.ts +0 -50
  1305. package/src/gpu/kernels/split_qkv.d.ts +0 -53
  1306. package/src/gpu/kernels/transpose.d.ts +0 -21
  1307. package/src/gpu/kernels/types.d.ts +0 -21
  1308. package/src/gpu/kernels/upsample2d.d.ts +0 -21
  1309. package/src/gpu/kernels/utils.js +0 -9
  1310. package/src/gpu/kernels/vision-average-pool.d.ts +0 -13
  1311. package/src/gpu/kernels/vision-patch-embed.d.ts +0 -17
  1312. package/src/gpu/kernels/vision-position-embedding.d.ts +0 -13
  1313. package/src/gpu/kernels/vision-rope-2d.d.ts +0 -16
  1314. package/src/gpu/kernels/vision-spatial-merge.d.ts +0 -19
  1315. package/src/gpu/multi-model-recorder.d.ts +0 -21
  1316. package/src/gpu/multi-model-recorder.js +0 -31
  1317. package/src/gpu/partitioned-buffer-pool.d.ts +0 -28
  1318. package/src/gpu/partitioned-buffer-pool.js +0 -57
  1319. package/src/gpu/perf-guards.js +0 -71
  1320. package/src/inference/browser-harness/benchmark-execution.js +0 -872
  1321. package/src/inference/browser-harness/decode-diagnostics.js +0 -241
  1322. package/src/inference/browser-harness/inference-execution.js +0 -543
  1323. package/src/inference/browser-harness/model-initialization.js +0 -225
  1324. package/src/inference/browser-harness/model-resolution.js +0 -137
  1325. package/src/inference/browser-harness/report.js +0 -338
  1326. package/src/inference/browser-harness/request.js +0 -263
  1327. package/src/inference/browser-harness/runtime-config.d.ts +0 -25
  1328. package/src/inference/browser-harness/runtime-config.js +0 -255
  1329. package/src/inference/browser-harness/runtime-isolation.d.ts +0 -13
  1330. package/src/inference/browser-harness/runtime-report.d.ts +0 -26
  1331. package/src/inference/browser-harness/text-evidence.js +0 -694
  1332. package/src/inference/browser-harness/text-execution.js +0 -757
  1333. package/src/inference/browser-harness/text-input.js +0 -725
  1334. package/src/inference/browser-harness/timing-diagnostics.js +0 -414
  1335. package/src/inference/browser-harness-runtime-helpers.d.ts +0 -3
  1336. package/src/inference/browser-harness-runtime-helpers.js +0 -3
  1337. package/src/inference/browser-harness-text-helpers.js +0 -31
  1338. package/src/inference/browser-harness.d.ts +0 -245
  1339. package/src/inference/browser-harness.js +0 -337
  1340. package/src/inference/expert-router.d.ts +0 -27
  1341. package/src/inference/expert-router.js +0 -55
  1342. package/src/inference/kv-cache/index.d.ts +0 -38
  1343. package/src/inference/kv-cache/index.js +0 -22
  1344. package/src/inference/kv-cache.d.ts +0 -39
  1345. package/src/inference/kv-cache.js +0 -20
  1346. package/src/inference/multi-model-network.d.ts +0 -139
  1347. package/src/inference/multi-model-network.js +0 -435
  1348. package/src/inference/multi-pipeline-pool.d.ts +0 -62
  1349. package/src/inference/multi-pipeline-pool.js +0 -161
  1350. package/src/inference/network-evolution.d.ts +0 -43
  1351. package/src/inference/pipelines/diffusion/init.d.ts +0 -24
  1352. package/src/inference/pipelines/diffusion/init.js +0 -138
  1353. package/src/inference/pipelines/diffusion/profile-timing.js +0 -10
  1354. package/src/inference/pipelines/diffusion/runtime-resources.js +0 -54
  1355. package/src/inference/pipelines/diffusion/sd3/execution.js +0 -805
  1356. package/src/inference/pipelines/diffusion/sd3/plan.js +0 -125
  1357. package/src/inference/pipelines/diffusion/sd3-transformer.js +0 -343
  1358. package/src/inference/pipelines/diffusion/sd3-weights.js +0 -287
  1359. package/src/inference/pipelines/diffusion/text-encoder.js +0 -195
  1360. package/src/inference/pipelines/diffusion/vae/execution.js +0 -803
  1361. package/src/inference/pipelines/diffusion/weight-contract.js +0 -53
  1362. package/src/inference/pipelines/diffusion/weights.js +0 -155
  1363. package/src/inference/pipelines/diffusion-gemma/config.d.ts +0 -27
  1364. package/src/inference/pipelines/diffusion-gemma/config.js +0 -149
  1365. package/src/inference/pipelines/diffusion-gemma/index.d.ts +0 -31
  1366. package/src/inference/pipelines/diffusion-gemma/index.js +0 -12
  1367. package/src/inference/pipelines/diffusion-gemma/pipeline.d.ts +0 -69
  1368. package/src/inference/pipelines/diffusion-gemma/pipeline.js +0 -380
  1369. package/src/inference/pipelines/diffusion-gemma/sampling.d.ts +0 -128
  1370. package/src/inference/pipelines/diffusion-gemma/sampling.js +0 -395
  1371. package/src/inference/pipelines/rng.js +0 -17
  1372. package/src/inference/pipelines/structured/index.d.ts +0 -10
  1373. package/src/inference/pipelines/structured/index.js +0 -10
  1374. package/src/inference/pipelines/text/attention/heterogeneous-contract.js +0 -8
  1375. package/src/inference/pipelines/text/attention/index.js +0 -24
  1376. package/src/inference/pipelines/text/attention/record.js +0 -2
  1377. package/src/inference/pipelines/text/attention/run.js +0 -2
  1378. package/src/inference/pipelines/text/config/validation.js +0 -9
  1379. package/src/inference/pipelines/text/debug-utils/index.js +0 -39
  1380. package/src/inference/pipelines/text/debug-utils/profiles.js +0 -8
  1381. package/src/inference/pipelines/text/debug-utils.js +0 -34
  1382. package/src/inference/pipelines/text/ffn/index.js +0 -16
  1383. package/src/inference/pipelines/text/model-load.d.ts +0 -59
  1384. package/src/inference/test-harness.d.ts +0 -172
  1385. package/src/inference/test-harness.js +0 -470
  1386. package/src/loader/dtype-utils.d.ts +0 -40
  1387. package/src/loader/embedding-loader.d.ts +0 -66
  1388. package/src/loader/index.d.ts +0 -152
  1389. package/src/loader/index.js +0 -126
  1390. package/src/loader/loader-state.d.ts +0 -51
  1391. package/src/loader/loader-state.js +0 -142
  1392. package/src/loader/manifest-config.d.ts +0 -118
  1393. package/src/loader/multi-model-loader.d.ts +0 -59
  1394. package/src/loader/multi-model-loader.js +0 -141
  1395. package/src/loader/quantization-constants.d.ts +0 -11
  1396. package/src/loader/quantization-constants.js +0 -13
  1397. package/src/loader/shard-resolver.d.ts +0 -13
  1398. package/src/loader/tensors/tensor-loader.d.ts +0 -197
  1399. package/src/loader/tensors/tensor-reader.d.ts +0 -33
  1400. package/src/loader/tensors/tensor-role.d.ts +0 -7
  1401. package/src/loader/weight-downcast.d.ts +0 -62
  1402. package/src/loader/weights.js +0 -4
  1403. package/src/loaders/index.d.ts +0 -4
  1404. package/src/loaders/index.js +0 -4
  1405. package/src/models/diffusiongemma.d.ts +0 -7
  1406. package/src/models/diffusiongemma.js +0 -25
  1407. package/src/models/embeddinggemma.d.ts +0 -7
  1408. package/src/models/embeddinggemma.js +0 -24
  1409. package/src/models/family.d.ts +0 -24
  1410. package/src/models/family.js +0 -25
  1411. package/src/models/gemma3.d.ts +0 -7
  1412. package/src/models/gemma3.js +0 -33
  1413. package/src/models/gemma4.d.ts +0 -7
  1414. package/src/models/gemma4.js +0 -65
  1415. package/src/models/qwen3.d.ts +0 -7
  1416. package/src/models/qwen3.js +0 -36
  1417. package/src/rules/capability-transform-resolver.js +0 -80
  1418. package/src/tooling/capsule-v2.d.ts +0 -11
  1419. package/src/tooling/model-capsule-forge.js +0 -478
  1420. package/src/tooling/source-runtime/bundle-materialize.js +0 -298
  1421. package/src/tooling-experimental-exports.browser.js +0 -2
  1422. package/src/tooling-experimental-exports.d.ts +0 -7
  1423. package/src/tooling-experimental-exports.js +0 -2
  1424. package/src/tooling-experimental-exports.shared.d.ts +0 -61
  1425. package/src/tooling-experimental-exports.shared.js +0 -57
  1426. /package/src/{config/transforms → converter}/execution-graph/dtype.js +0 -0
  1427. /package/src/{tooling/source-runtime/bundle-plan.js → formats/source-runtime.js} +0 -0
  1428. /package/src/{inference → tooling}/browser-harness/benchmark-rerank.js +0 -0
  1429. /package/src/{inference → tooling}/browser-harness/diffusion-performance.js +0 -0
  1430. /package/src/{inference → tooling}/browser-harness/runtime-isolation.js +0 -0
  1431. /package/src/{inference → tooling}/browser-harness/runtime-report.js +0 -0
  1432. /package/src/{inference → tooling}/browser-harness/suite-summary.js +0 -0
  1433. /package/src/{inference → tooling}/browser-harness-contract-helpers.js +0 -0
  1434. /package/src/{inference → tooling}/browser-harness-diffusion-energy-suites.js +0 -0
  1435. /package/src/{inference → tooling}/browser-harness-report-helpers.js +0 -0
@@ -1,4305 +1 @@
1
- {
2
- "schema": "doppler.rule-bundle/v1",
3
- "sources": [
4
- {
5
- "path": "converter/execution.rules.json",
6
- "digest": "sha256:ae259e6ea2ed52fa20b76f899de7f78c239cf23c261cc11c8540c3f1b070a4c0"
7
- },
8
- {
9
- "path": "converter/tensor-roles.rules.json",
10
- "digest": "sha256:5eed33348fe59c55d779fad81e87d045337e75c678e54da64a240d8b589e2f57"
11
- },
12
- {
13
- "path": "converter/tokenizer.rules.json",
14
- "digest": "sha256:5985376bfa9bfacc3bba877407e7be1c10554fda74ea73c2dc18b96ca4827a15"
15
- },
16
- {
17
- "path": "inference/attention.rules.json",
18
- "digest": "sha256:3089278056e554c053dc2086942786cec1b20dff9f83f9908b82f9333c34c566"
19
- },
20
- {
21
- "path": "inference/config.rules.json",
22
- "digest": "sha256:c774e14366d68cab96fa64c91000237ffed46fa9aacac3ebb10969102e3f279e"
23
- },
24
- {
25
- "path": "inference/dtype.rules.json",
26
- "digest": "sha256:3f58b85a48d7c390573d914f4e6d0097b0e7099ce5cb8449685472e25adf1526"
27
- },
28
- {
29
- "path": "inference/execution.rules.json",
30
- "digest": "sha256:269ba92d1615f607b94a7b8034ed9cb41561fb046aa03d96ad3ffb81c39c7162"
31
- },
32
- {
33
- "path": "inference/ffn.rules.json",
34
- "digest": "sha256:3aa3c66dcc3d154158d2fc59dc94165bbb47955c7c017612568f6825a995b260"
35
- },
36
- {
37
- "path": "inference/layer-pattern.rules.json",
38
- "digest": "sha256:c3fe086f991b2c89d0eacf6f21c169c97f30ef87a669e1fed83729da4f7f7c7e"
39
- },
40
- {
41
- "path": "inference/layer.rules.json",
42
- "digest": "sha256:4cd14673e534ed8f03779ee7396c637225f5cf4183977269526ac887d918b70a"
43
- },
44
- {
45
- "path": "inference/moe.rules.json",
46
- "digest": "sha256:1220866cc0875d5b992e85d61e3a99562abd1104342b4d37c5ac37a600e22046"
47
- },
48
- {
49
- "path": "kernels/attention.rules.json",
50
- "digest": "sha256:d26958ed2b0cd85cca8f4a20d4562fc1c994b375fa536fc202e17882ec187229"
51
- },
52
- {
53
- "path": "kernels/conv2d.rules.json",
54
- "digest": "sha256:fa13daf4856f2feb0175779aaf921da6870bda64143c6f4d728d3a72d4bfc544"
55
- },
56
- {
57
- "path": "kernels/depthwise-conv2d.rules.json",
58
- "digest": "sha256:fa13daf4856f2feb0175779aaf921da6870bda64143c6f4d728d3a72d4bfc544"
59
- },
60
- {
61
- "path": "kernels/dequant.rules.json",
62
- "digest": "sha256:a35d693164b8938e2de4c5185977d72eeeeecb095f91e44f87d9b88ad24c4650"
63
- },
64
- {
65
- "path": "kernels/energy.rules.json",
66
- "digest": "sha256:6a3e6975064228896abd1abd3500e2e4f05d87cb7a54f447456f7acddcc60e50"
67
- },
68
- {
69
- "path": "kernels/fused-ffn.rules.json",
70
- "digest": "sha256:cd5d0b36d51b3f036eb62596b039103307d27acc5447933632d99e3aa9bf8c79"
71
- },
72
- {
73
- "path": "kernels/fused-matmul-residual.rules.json",
74
- "digest": "sha256:cf5433a5d416705d3f04b9321e560d959a37b40c3f282e1ff058134244605ba7"
75
- },
76
- {
77
- "path": "kernels/fused-matmul-rmsnorm.rules.json",
78
- "digest": "sha256:6a5aca1f92300e35f8371fb13a05963c54ac56730cc4bedc93b2bc5d8d9b2e16"
79
- },
80
- {
81
- "path": "kernels/gather.rules.json",
82
- "digest": "sha256:435163572c60ea1f1a8e7b5a8ab991b958b0f938edb92c50eb1c3b035049f16d"
83
- },
84
- {
85
- "path": "kernels/gelu.rules.json",
86
- "digest": "sha256:ead4f5f4216c9c0eeaf3e01d084d501bc66f314a956ffad442ca84160ee48d99"
87
- },
88
- {
89
- "path": "kernels/grouped-pointwise-conv2d.rules.json",
90
- "digest": "sha256:fa13daf4856f2feb0175779aaf921da6870bda64143c6f4d728d3a72d4bfc544"
91
- },
92
- {
93
- "path": "kernels/groupnorm.rules.json",
94
- "digest": "sha256:019810e2473fdeb748c04aa92ffb247a3cac7b0bba890ed7fefb5f3061168040"
95
- },
96
- {
97
- "path": "kernels/kv_quantize.rules.json",
98
- "digest": "sha256:f0a56bea79a43bad2fd257aa36aa38a2afc16b583b20ed28fa7819e65120fece"
99
- },
100
- {
101
- "path": "kernels/layernorm.rules.json",
102
- "digest": "sha256:fa13daf4856f2feb0175779aaf921da6870bda64143c6f4d728d3a72d4bfc544"
103
- },
104
- {
105
- "path": "kernels/linear-attention.rules.json",
106
- "digest": "sha256:fa13daf4856f2feb0175779aaf921da6870bda64143c6f4d728d3a72d4bfc544"
107
- },
108
- {
109
- "path": "kernels/lm-head-argmax.rules.json",
110
- "digest": "sha256:a265a2cb85f96b869110fe1761798c8c9b274c9a4d0c73ec452743dfcdad176d"
111
- },
112
- {
113
- "path": "kernels/matmul.rules.json",
114
- "digest": "sha256:5e8877bd12eafab5eb3e071d85dd1a27c992e427886d6108432da24cb2122b6e"
115
- },
116
- {
117
- "path": "kernels/modulate.rules.json",
118
- "digest": "sha256:29b89188774997a0c32e4722d104a6a90c64fac88a89d623a86103df40321213"
119
- },
120
- {
121
- "path": "kernels/moe.rules.gptoss.json",
122
- "digest": "sha256:8471e2a19890e45d8be6431491e98c11520598f5e98b8ac8a28977bfbeec7966"
123
- },
124
- {
125
- "path": "kernels/moe.rules.json",
126
- "digest": "sha256:ef6bda6b2e6ef8f889c34d99c157295297375a5845f40cf7b90ea67daec36ae2"
127
- },
128
- {
129
- "path": "kernels/moe.rules.mixtral.json",
130
- "digest": "sha256:16454ff88c7bf99d0f66cb704b6d60b7f63850e378acda3cef6c2ffde21c2def"
131
- },
132
- {
133
- "path": "kernels/pixel_shuffle.rules.json",
134
- "digest": "sha256:cf5433a5d416705d3f04b9321e560d959a37b40c3f282e1ff058134244605ba7"
135
- },
136
- {
137
- "path": "kernels/relu.rules.json",
138
- "digest": "sha256:87256e54451a2834f42dcc4aa392dfdabfcdaf694fb8d01e10dcc661bbc8526c"
139
- },
140
- {
141
- "path": "kernels/rep-penalty.rules.json",
142
- "digest": "sha256:a8eba10370f282536e6b741895ea481f0c8ae33a7379e03a4f40812f26652f08"
143
- },
144
- {
145
- "path": "kernels/repeat-channels.rules.json",
146
- "digest": "sha256:87256e54451a2834f42dcc4aa392dfdabfcdaf694fb8d01e10dcc661bbc8526c"
147
- },
148
- {
149
- "path": "kernels/residual.rules.json",
150
- "digest": "sha256:f801dc9c88e34086261dfeb7c5dc74c8c1d7b18085e9b6fdb2ede597e5827a5e"
151
- },
152
- {
153
- "path": "kernels/rmsnorm-qk.rules.json",
154
- "digest": "sha256:fa13daf4856f2feb0175779aaf921da6870bda64143c6f4d728d3a72d4bfc544"
155
- },
156
- {
157
- "path": "kernels/rmsnorm.rules.json",
158
- "digest": "sha256:fa5872e9d5bd9912775d45c678075d3e17221b0f8693366a3999c4322c503b2c"
159
- },
160
- {
161
- "path": "kernels/rope-qk.rules.json",
162
- "digest": "sha256:a8eba10370f282536e6b741895ea481f0c8ae33a7379e03a4f40812f26652f08"
163
- },
164
- {
165
- "path": "kernels/rope.rules.json",
166
- "digest": "sha256:a8eba10370f282536e6b741895ea481f0c8ae33a7379e03a4f40812f26652f08"
167
- },
168
- {
169
- "path": "kernels/sample.rules.json",
170
- "digest": "sha256:a988a3759bfa0d71752fb73031a49bc5b1783fb290bcdf756ed4efa706a49071"
171
- },
172
- {
173
- "path": "kernels/scale.rules.json",
174
- "digest": "sha256:53ce216b17a6a8d5866b48afaf09c7c307258121d6e4d37910f4ddb9bbb11d08"
175
- },
176
- {
177
- "path": "kernels/silu.rules.json",
178
- "digest": "sha256:03adb9334c1825f65e12f6af440d4837d7fe94d2772d67eb7c4e1a9abf787eaa"
179
- },
180
- {
181
- "path": "kernels/softmax.rules.json",
182
- "digest": "sha256:a71d5119bde8e08096920558a2e49a167aa5916524a567c5822c3d78a1abee7b"
183
- },
184
- {
185
- "path": "kernels/split-qg.rules.json",
186
- "digest": "sha256:d05077d4fc6cd001b956ca3fa8cc060c9e58ad4525d4db1e8c06860277e0d748"
187
- },
188
- {
189
- "path": "kernels/split-qkv.rules.json",
190
- "digest": "sha256:d05077d4fc6cd001b956ca3fa8cc060c9e58ad4525d4db1e8c06860277e0d748"
191
- },
192
- {
193
- "path": "kernels/upsample2d.rules.json",
194
- "digest": "sha256:fa13daf4856f2feb0175779aaf921da6870bda64143c6f4d728d3a72d4bfc544"
195
- },
196
- {
197
- "path": "kernels/vision-average-pool.rules.json",
198
- "digest": "sha256:4ec49dcbfa1e3eb8660ec4424bafb348a7d036df5c60be5c860197e186bd64c2"
199
- },
200
- {
201
- "path": "kernels/vision-patch-embed.rules.json",
202
- "digest": "sha256:6f845793e46ce0b9917719c418e81d84a7e26b319ca4feffd9a482548dcb40f4"
203
- },
204
- {
205
- "path": "kernels/vision-position-embedding.rules.json",
206
- "digest": "sha256:7e48caf1cdef316b14b2e63f6adad31c385b985455eb66aa3c7f5805f7bb75f2"
207
- },
208
- {
209
- "path": "kernels/vision-rope-2d.rules.json",
210
- "digest": "sha256:4ec49dcbfa1e3eb8660ec4424bafb348a7d036df5c60be5c860197e186bd64c2"
211
- },
212
- {
213
- "path": "kernels/vision-spatial-merge.rules.json",
214
- "digest": "sha256:4ec49dcbfa1e3eb8660ec4424bafb348a7d036df5c60be5c860197e186bd64c2"
215
- },
216
- {
217
- "path": "loader/tensor-loader.rules.json",
218
- "digest": "sha256:61bafd04ae60d45f478976f09df6a910b0ed750877008d2edb3b23659c972ead"
219
- },
220
- {
221
- "path": "loader/weights.rules.json",
222
- "digest": "sha256:121e76226c214d8aa30a2f4e1076488b207a31e8d5be86d8c08a2ae1df939ca3"
223
- },
224
- {
225
- "path": "tooling/command-runtime.rules.json",
226
- "digest": "sha256:4e191b70019913dc315ae18fa408ea729675dfca48c4815989475c52a64ea2b0"
227
- }
228
- ],
229
- "files": {
230
- "converter/execution.rules.json": {
231
- "jobMode": [
232
- {
233
- "match": {
234
- "workers": {
235
- "lte": 1
236
- }
237
- },
238
- "value": "main"
239
- },
240
- {
241
- "match": {
242
- "canChunkRows": true
243
- },
244
- "value": "row_chunks"
245
- },
246
- {
247
- "match": {},
248
- "value": "tensor"
249
- }
250
- ],
251
- "rowChunkRows": [
252
- {
253
- "match": {
254
- "canChunkRows": false
255
- },
256
- "value": 0
257
- },
258
- {
259
- "match": {
260
- "workers": {
261
- "lte": 2
262
- }
263
- },
264
- "value": 256
265
- },
266
- {
267
- "match": {
268
- "workers": {
269
- "lte": 16
270
- }
271
- },
272
- "value": 512
273
- },
274
- {
275
- "match": {},
276
- "value": 768
277
- }
278
- ],
279
- "maxInFlightJobs": [
280
- {
281
- "match": {
282
- "workers": {
283
- "lte": 2
284
- }
285
- },
286
- "value": 4
287
- },
288
- {
289
- "match": {
290
- "workers": {
291
- "lte": 4
292
- }
293
- },
294
- "value": 8
295
- },
296
- {
297
- "match": {
298
- "workers": {
299
- "lte": 8
300
- }
301
- },
302
- "value": 16
303
- },
304
- {
305
- "match": {
306
- "workers": {
307
- "lte": 16
308
- }
309
- },
310
- "value": 24
311
- },
312
- {
313
- "match": {},
314
- "value": 32
315
- }
316
- ]
317
- },
318
- "converter/tensor-roles.rules.json": {
319
- "shouldQuantize": [
320
- {
321
- "match": {
322
- "numElements": {
323
- "lt": 1024
324
- }
325
- },
326
- "value": false
327
- },
328
- {
329
- "match": {
330
- "role": "embedding",
331
- "quantizeEmbeddings": true
332
- },
333
- "value": true
334
- },
335
- {
336
- "match": {
337
- "role": "embedding"
338
- },
339
- "value": false
340
- },
341
- {
342
- "match": {
343
- "role": "lm_head",
344
- "quantizeEmbeddings": true
345
- },
346
- "value": true
347
- },
348
- {
349
- "match": {
350
- "role": "lm_head"
351
- },
352
- "value": false
353
- },
354
- {
355
- "match": {
356
- "role": "norm"
357
- },
358
- "value": false
359
- },
360
- {
361
- "match": {
362
- "role": "router"
363
- },
364
- "value": false
365
- },
366
- {
367
- "match": {
368
- "isBias": true
369
- },
370
- "value": false
371
- },
372
- {
373
- "match": {},
374
- "value": true
375
- }
376
- ]
377
- },
378
- "converter/tokenizer.rules.json": {
379
- "type": [
380
- {
381
- "match": {
382
- "isLiteRTPieceList": true
383
- },
384
- "value": "bpe"
385
- },
386
- {
387
- "match": {
388
- "hasMerges": true
389
- },
390
- "value": "bpe"
391
- },
392
- {
393
- "match": {
394
- "hasScores": true
395
- },
396
- "value": "unigram"
397
- },
398
- {
399
- "match": {},
400
- "value": "bpe"
401
- }
402
- ],
403
- "addDummyPrefix": [
404
- {
405
- "match": {
406
- "isLiteRTPieceList": true
407
- },
408
- "value": false
409
- },
410
- {
411
- "match": {},
412
- "value": true
413
- }
414
- ]
415
- },
416
- "inference/attention.rules.json": {
417
- "useFusedQkv": [
418
- {
419
- "match": {
420
- "hasQkvProj": true,
421
- "hasQkvSizes": true,
422
- "hasLoRA": false
423
- },
424
- "value": true
425
- },
426
- {
427
- "match": {},
428
- "value": false
429
- }
430
- ],
431
- "useFusedOProjResidual": [
432
- {
433
- "match": {
434
- "allowFusedResidual": true,
435
- "hasResidual": true,
436
- "residualMatches": true,
437
- "attnIsF32": true,
438
- "hasLoRA": false,
439
- "oProjIsF16": true
440
- },
441
- "value": true
442
- },
443
- {
444
- "match": {
445
- "allowFusedResidual": true,
446
- "hasResidual": true,
447
- "residualMatches": true,
448
- "attnIsF16": true,
449
- "hasLoRA": false,
450
- "oProjIsF16": true
451
- },
452
- "value": true
453
- },
454
- {
455
- "match": {},
456
- "value": false
457
- }
458
- ],
459
- "attentionKernelVariant": [
460
- {
461
- "match": {
462
- "kvLayout": "tiered",
463
- "numTokens": {
464
- "gt": 1
465
- }
466
- },
467
- "value": "contiguous"
468
- },
469
- {
470
- "match": {
471
- "kvLayout": "bdpa"
472
- },
473
- "value": "bdpa"
474
- },
475
- {
476
- "match": {
477
- "kvLayout": "contiguous_quantized",
478
- "numTokens": {
479
- "gt": 1
480
- }
481
- },
482
- "value": "contiguous"
483
- },
484
- {
485
- "match": {
486
- "kvLayout": "contiguous_quantized"
487
- },
488
- "value": "contiguousQuant"
489
- },
490
- {
491
- "match": {
492
- "kvLayout": "tiered",
493
- "coldQuantMode": {
494
- "neq": "none"
495
- }
496
- },
497
- "value": "tieredQuant"
498
- },
499
- {
500
- "match": {
501
- "kvLayout": "tiered"
502
- },
503
- "value": "tiered"
504
- },
505
- {
506
- "match": {},
507
- "value": "contiguous"
508
- }
509
- ]
510
- },
511
- "inference/config.rules.json": {
512
- "hiddenActivation": [
513
- {
514
- "match": {
515
- "activation": {
516
- "in": [
517
- "silu",
518
- "swiglu"
519
- ]
520
- }
521
- },
522
- "value": "silu"
523
- },
524
- {
525
- "match": {
526
- "activation": {
527
- "in": [
528
- "gelu",
529
- "geglu"
530
- ]
531
- }
532
- },
533
- "value": "gelu"
534
- },
535
- {
536
- "match": {},
537
- "value": "silu"
538
- }
539
- ],
540
- "tracePath": [
541
- {
542
- "match": {
543
- "useRecorder": true
544
- },
545
- "value": "fused"
546
- },
547
- {
548
- "match": {},
549
- "value": "debug-sync"
550
- }
551
- ],
552
- "pipelineModules": [
553
- {
554
- "match": {
555
- "modelTypeLower": {
556
- "in": [
557
- "diffusion_gemma"
558
- ]
559
- }
560
- },
561
- "value": [
562
- "./diffusion-gemma/pipeline.js"
563
- ]
564
- },
565
- {
566
- "match": {
567
- "modelTypeLower": {
568
- "in": [
569
- "diffusion"
570
- ]
571
- }
572
- },
573
- "value": [
574
- "./diffusion/pipeline.js"
575
- ]
576
- },
577
- {
578
- "match": {
579
- "modelTypeLower": {
580
- "in": [
581
- "energy"
582
- ]
583
- }
584
- },
585
- "value": [
586
- "./energy/pipeline.js"
587
- ]
588
- },
589
- {
590
- "match": {
591
- "modelTypeLower": {
592
- "in": [
593
- "dream_structured",
594
- "dream_intent_posterior_head",
595
- "dream_d1_to2_bridge",
596
- "dream_synthesis",
597
- "dream_energy_compose",
598
- "structured_json_head",
599
- "structured-json-head",
600
- "dream-intent-posterior-head",
601
- "dream-d1-to2-bridge",
602
- "dream-synthesis",
603
- "dream-energy-compose"
604
- ]
605
- }
606
- },
607
- "value": [
608
- "./structured/json-head-pipeline.js"
609
- ]
610
- },
611
- {
612
- "match": {
613
- "modelTypeLower": {
614
- "in": [
615
- "energy_row_head",
616
- "energy-row-head",
617
- "dream_energy_head",
618
- "dream-energy-head",
619
- "d1-to2-bridge-diffusion",
620
- "synthesis-mixer-diffusion",
621
- "ebrm-diffusion"
622
- ]
623
- }
624
- },
625
- "value": [
626
- "./energy-head/row-head-pipeline.js"
627
- ]
628
- },
629
- {
630
- "match": {},
631
- "value": []
632
- }
633
- ],
634
- "embeddingSemanticStyle": [
635
- {
636
- "match": {
637
- "manifestModelType": "embeddinggemma"
638
- },
639
- "value": "embeddinggemma"
640
- },
641
- {
642
- "match": {
643
- "modelType": "embedding",
644
- "sourceCheckpointId": "Qwen/Qwen3-Embedding-0.6B"
645
- },
646
- "value": "qwen3_embedding"
647
- },
648
- {
649
- "match": {},
650
- "value": "default"
651
- }
652
- ],
653
- "stableF32Logits": [
654
- {
655
- "match": {
656
- "inputDtype": "f16",
657
- "finalLogitSoftcapping": {
658
- "gt": 0
659
- }
660
- },
661
- "value": true
662
- },
663
- {
664
- "match": {
665
- "inputDtype": "f16",
666
- "rmsNormWeightOffset": true,
667
- "hiddenSize": {
668
- "lte": 768
669
- }
670
- },
671
- "value": true
672
- },
673
- {
674
- "match": {},
675
- "value": false
676
- }
677
- ]
678
- },
679
- "inference/dtype.rules.json": {
680
- "f16OrF32": [
681
- {
682
- "match": {
683
- "useF16": true
684
- },
685
- "value": "f16"
686
- },
687
- {
688
- "match": {},
689
- "value": "f32"
690
- }
691
- ],
692
- "dtypeFromAlias": [
693
- {
694
- "match": {
695
- "dtype": "bf16"
696
- },
697
- "value": "bf16"
698
- },
699
- {
700
- "match": {
701
- "dtype": "f16"
702
- },
703
- "value": "f16"
704
- },
705
- {
706
- "match": {
707
- "dtype": "fp16"
708
- },
709
- "value": "f16"
710
- },
711
- {
712
- "match": {
713
- "dtype": "float16"
714
- },
715
- "value": "f16"
716
- },
717
- {
718
- "match": {
719
- "dtype": "f32"
720
- },
721
- "value": "f32"
722
- },
723
- {
724
- "match": {
725
- "dtype": "fp32"
726
- },
727
- "value": "f32"
728
- },
729
- {
730
- "match": {
731
- "dtype": "float32"
732
- },
733
- "value": "f32"
734
- },
735
- {
736
- "match": {},
737
- "value": {
738
- "context": "fallback"
739
- }
740
- }
741
- ],
742
- "f16OrF32FromDtype": [
743
- {
744
- "match": {
745
- "dtype": "f16"
746
- },
747
- "value": "f16"
748
- },
749
- {
750
- "match": {
751
- "dtype": "f32"
752
- },
753
- "value": "f32"
754
- },
755
- {
756
- "match": {},
757
- "value": {
758
- "context": "fallback"
759
- }
760
- }
761
- ],
762
- "embeddingDtype": [
763
- {
764
- "match": {
765
- "dtype": "litert_int4"
766
- },
767
- "value": "litert_int4"
768
- },
769
- {
770
- "match": {
771
- "dtype": "bf16"
772
- },
773
- "value": "bf16"
774
- },
775
- {
776
- "match": {
777
- "dtype": "f16"
778
- },
779
- "value": "f16"
780
- },
781
- {
782
- "match": {},
783
- "value": "f32"
784
- }
785
- ],
786
- "f16OrF32FromDtypeAlias": [
787
- {
788
- "match": {
789
- "dtype": "f16"
790
- },
791
- "value": "f16"
792
- },
793
- {
794
- "match": {
795
- "dtype": "bf16"
796
- },
797
- "value": "f16"
798
- },
799
- {
800
- "match": {
801
- "dtype": "fp16"
802
- },
803
- "value": "f16"
804
- },
805
- {
806
- "match": {
807
- "dtype": "float16"
808
- },
809
- "value": "f16"
810
- },
811
- {
812
- "match": {
813
- "dtype": "f32"
814
- },
815
- "value": "f32"
816
- },
817
- {
818
- "match": {
819
- "dtype": "fp32"
820
- },
821
- "value": "f32"
822
- },
823
- {
824
- "match": {
825
- "dtype": "float32"
826
- },
827
- "value": "f32"
828
- },
829
- {
830
- "match": {},
831
- "value": {
832
- "context": "fallback"
833
- }
834
- }
835
- ],
836
- "f16OrF32FromBytes": [
837
- {
838
- "match": {
839
- "bytesPerElement": {
840
- "lte": 2
841
- }
842
- },
843
- "value": "f16"
844
- },
845
- {
846
- "match": {},
847
- "value": "f32"
848
- }
849
- ],
850
- "f16OrF32FromBytesOrFallback": [
851
- {
852
- "match": {
853
- "bytesPerElement": {
854
- "lt": 3
855
- }
856
- },
857
- "value": "f16"
858
- },
859
- {
860
- "match": {},
861
- "value": {
862
- "context": "fallback"
863
- }
864
- }
865
- ],
866
- "f16OrF32FromToken": [
867
- {
868
- "match": {
869
- "token": "F16"
870
- },
871
- "value": "f16"
872
- },
873
- {
874
- "match": {},
875
- "value": "f32"
876
- }
877
- ],
878
- "f16IfCap": [
879
- {
880
- "match": {
881
- "hasF16": true
882
- },
883
- "value": "f16"
884
- },
885
- {
886
- "match": {},
887
- "value": "f32"
888
- }
889
- ],
890
- "bothF16": [
891
- {
892
- "match": {
893
- "aDtype": "f16",
894
- "bDtype": "f16"
895
- },
896
- "value": "f16"
897
- },
898
- {
899
- "match": {},
900
- "value": "f32"
901
- }
902
- ],
903
- "diffusionActivationDtype": [
904
- {
905
- "match": {
906
- "requested": "f16",
907
- "hasF16": true
908
- },
909
- "value": "f16"
910
- },
911
- {
912
- "match": {},
913
- "value": "f32"
914
- }
915
- ],
916
- "f16OrFallback": [
917
- {
918
- "match": {
919
- "kvDtype": "f16"
920
- },
921
- "value": "f16"
922
- },
923
- {
924
- "match": {},
925
- "value": {
926
- "context": "fallback"
927
- }
928
- }
929
- ],
930
- "f16OrFallbackByFlag": [
931
- {
932
- "match": {
933
- "useF16": true
934
- },
935
- "value": "f16"
936
- },
937
- {
938
- "match": {},
939
- "value": {
940
- "context": "fallback"
941
- }
942
- }
943
- ],
944
- "attentionProjectionOutputDtype": [
945
- {
946
- "match": {
947
- "forceF32": true
948
- },
949
- "value": "f32"
950
- },
951
- {
952
- "match": {
953
- "useF16": true
954
- },
955
- "value": "f16"
956
- },
957
- {
958
- "match": {},
959
- "value": {
960
- "context": "fallback"
961
- }
962
- }
963
- ],
964
- "bytesPerElement": [
965
- {
966
- "match": {
967
- "dtype": "f16"
968
- },
969
- "value": 2
970
- },
971
- {
972
- "match": {
973
- "dtype": "bf16"
974
- },
975
- "value": 2
976
- },
977
- {
978
- "match": {
979
- "dtype": "f32"
980
- },
981
- "value": 4
982
- },
983
- {
984
- "match": {},
985
- "value": {
986
- "context": "fallback"
987
- }
988
- }
989
- ],
990
- "dtypeFromSize": [
991
- {
992
- "match": {
993
- "bytesPerElement": 2
994
- },
995
- "value": "f16"
996
- },
997
- {
998
- "match": {
999
- "bytesPerElement": 4
1000
- },
1001
- "value": "f32"
1002
- },
1003
- {
1004
- "match": {},
1005
- "value": {
1006
- "context": "fallback"
1007
- }
1008
- }
1009
- ],
1010
- "bytesFromDtype": [
1011
- {
1012
- "match": {
1013
- "dtype": "f16"
1014
- },
1015
- "value": 2
1016
- },
1017
- {
1018
- "match": {
1019
- "dtype": "bf16"
1020
- },
1021
- "value": 2
1022
- },
1023
- {
1024
- "match": {
1025
- "dtype": "f32"
1026
- },
1027
- "value": 4
1028
- },
1029
- {
1030
- "match": {},
1031
- "value": {
1032
- "context": "fallback"
1033
- }
1034
- }
1035
- ],
1036
- "matmulDtype": [
1037
- {
1038
- "match": {
1039
- "dtype": "bf16"
1040
- },
1041
- "value": "bf16"
1042
- },
1043
- {
1044
- "match": {
1045
- "dtype": "f16"
1046
- },
1047
- "value": "f16"
1048
- },
1049
- {
1050
- "match": {
1051
- "dtype": "f32"
1052
- },
1053
- "value": "f32"
1054
- },
1055
- {
1056
- "match": {
1057
- "dtype": "q4k"
1058
- },
1059
- "value": "q4k"
1060
- },
1061
- {
1062
- "match": {
1063
- "dtype": "litert_int4"
1064
- },
1065
- "value": "litert_int4"
1066
- },
1067
- {
1068
- "match": {
1069
- "dtype": "w4a16"
1070
- },
1071
- "value": "w4a16"
1072
- },
1073
- {
1074
- "match": {},
1075
- "value": {
1076
- "context": "fallback"
1077
- }
1078
- }
1079
- ],
1080
- "logitsDtype": [
1081
- {
1082
- "match": {
1083
- "logitsDtype": "f16"
1084
- },
1085
- "value": "f16"
1086
- },
1087
- {
1088
- "match": {},
1089
- "value": "f32"
1090
- }
1091
- ],
1092
- "kvCacheDtype": [
1093
- {
1094
- "match": {
1095
- "forceF32": true
1096
- },
1097
- "value": "f32"
1098
- },
1099
- {
1100
- "match": {
1101
- "requested": "f16",
1102
- "useGPU": true,
1103
- "hasF16": true
1104
- },
1105
- "value": "f16"
1106
- },
1107
- {
1108
- "match": {
1109
- "requested": "f16"
1110
- },
1111
- "value": "f32"
1112
- },
1113
- {
1114
- "match": {
1115
- "requested": "f32"
1116
- },
1117
- "value": "f32"
1118
- },
1119
- {
1120
- "match": {},
1121
- "value": "f32"
1122
- }
1123
- ],
1124
- "lmHeadChunkWeightDtype": [
1125
- {
1126
- "match": {
1127
- "preferF16": true,
1128
- "lmHeadDtype": "f16",
1129
- "hasF16": true
1130
- },
1131
- "value": "f16"
1132
- },
1133
- {
1134
- "match": {},
1135
- "value": "f32"
1136
- }
1137
- ]
1138
- },
1139
- "inference/execution.rules.json": {
1140
- "decodeRecorderEnabled": [
1141
- {
1142
- "match": {
1143
- "hasDevice": true,
1144
- "debug": false,
1145
- "disableCommandBatching": false,
1146
- "kvLayout": {
1147
- "neq": "bdpa_paged"
1148
- }
1149
- },
1150
- "value": true
1151
- },
1152
- {
1153
- "match": {},
1154
- "value": false
1155
- }
1156
- ],
1157
- "profileDecodeRecorderEnabled": [
1158
- {
1159
- "match": {
1160
- "hasDevice": true,
1161
- "debug": false,
1162
- "kvLayout": {
1163
- "neq": "bdpa_paged"
1164
- }
1165
- },
1166
- "value": true
1167
- },
1168
- {
1169
- "match": {},
1170
- "value": false
1171
- }
1172
- ],
1173
- "batchDecodeEnabled": [
1174
- {
1175
- "match": {
1176
- "batchSize": {
1177
- "gt": 1
1178
- },
1179
- "useGPU": true,
1180
- "gpuSamplingAvailable": true,
1181
- "disableMultiTokenDecode": {
1182
- "neq": true
1183
- },
1184
- "disableCommandBatching": false,
1185
- "isBdpaPagedLayout": false,
1186
- "finitenessFallbackWindowOpen": false,
1187
- "hasLinearAttentionLayers": false,
1188
- "hasRangeBackedPerLayerInputs": false
1189
- },
1190
- "value": true
1191
- },
1192
- {
1193
- "match": {
1194
- "batchSize": {
1195
- "gt": 1
1196
- },
1197
- "useGPU": true,
1198
- "gpuSamplingAvailable": true,
1199
- "disableMultiTokenDecode": {
1200
- "neq": true
1201
- },
1202
- "disableCommandBatching": false,
1203
- "isBdpaPagedLayout": false,
1204
- "finitenessFallbackWindowOpen": false,
1205
- "hasLinearAttentionLayers": false,
1206
- "hasRangeBackedPerLayerInputs": true,
1207
- "selfSpeculationEnabled": false
1208
- },
1209
- "value": true
1210
- },
1211
- {
1212
- "match": {
1213
- "batchSize": {
1214
- "gt": 1
1215
- },
1216
- "useGPU": true,
1217
- "gpuSamplingAvailable": true,
1218
- "disableMultiTokenDecode": {
1219
- "neq": true
1220
- },
1221
- "disableCommandBatching": false,
1222
- "isBdpaPagedLayout": false,
1223
- "finitenessFallbackWindowOpen": false,
1224
- "hasLinearAttentionLayers": true,
1225
- "hasRangeBackedPerLayerInputs": false
1226
- },
1227
- "value": true
1228
- },
1229
- {
1230
- "match": {},
1231
- "value": false
1232
- }
1233
- ],
1234
- "maxBatchDecodeTokens": [
1235
- {
1236
- "match": {
1237
- "hasHotVocabularyBatchDecode": true
1238
- },
1239
- "value": 1
1240
- },
1241
- {
1242
- "match": {
1243
- "hasLinearAttentionLayers": true
1244
- },
1245
- "value": 32
1246
- },
1247
- {
1248
- "match": {
1249
- "hasGpuSplitPerLayerInputs": true,
1250
- "currentSeqLen": {
1251
- "gte": 192
1252
- }
1253
- },
1254
- "value": 2
1255
- },
1256
- {
1257
- "match": {
1258
- "hasGpuSplitPerLayerInputs": true,
1259
- "maxDecodeTokens": {
1260
- "gt": 16
1261
- }
1262
- },
1263
- "value": 16
1264
- },
1265
- {
1266
- "match": {
1267
- "hasGpuSplitPerLayerInputs": true
1268
- },
1269
- "value": 8
1270
- },
1271
- {
1272
- "match": {
1273
- "modelId": {
1274
- "in": [
1275
- "gemma-4-12b-it-text-q4k-ehf16-af16",
1276
- "gemma-4-12b-it-text-q4k-ehf16-hq4k-af16",
1277
- "gemma-4-12b-it-text-w4a16-ct-ehf16-af16"
1278
- ]
1279
- },
1280
- "activationDtype": "f16",
1281
- "numLayers": {
1282
- "gte": 48
1283
- },
1284
- "hiddenSize": {
1285
- "gte": 3840
1286
- },
1287
- "maxDecodeTokens": {
1288
- "gt": 8
1289
- }
1290
- },
1291
- "value": 8
1292
- },
1293
- {
1294
- "match": {
1295
- "numLayers": {
1296
- "gte": 48
1297
- },
1298
- "hiddenSize": {
1299
- "gte": 3840
1300
- },
1301
- "maxDecodeTokens": {
1302
- "gt": 16
1303
- }
1304
- },
1305
- "value": 16
1306
- },
1307
- {
1308
- "match": {},
1309
- "value": null
1310
- }
1311
- ],
1312
- "prefillRecorderChunkLayers": [
1313
- {
1314
- "match": {
1315
- "hasGpuSplitPerLayerInputs": true,
1316
- "numTokens": {
1317
- "lte": 32
1318
- }
1319
- },
1320
- "value": 8
1321
- },
1322
- {
1323
- "match": {},
1324
- "value": 4
1325
- }
1326
- ],
1327
- "finitenessFallbackActivationDtype": [
1328
- {
1329
- "match": {},
1330
- "value": "f32"
1331
- }
1332
- ]
1333
- },
1334
- "inference/ffn.rules.json": {
1335
- "activationOp": [
1336
- {
1337
- "match": {
1338
- "hiddenActivation": "gelu"
1339
- },
1340
- "value": "gelu"
1341
- },
1342
- {
1343
- "match": {},
1344
- "value": "silu"
1345
- }
1346
- ],
1347
- "useFusedGateUp": [
1348
- {
1349
- "match": {
1350
- "hasGate": true,
1351
- "hasUp": true,
1352
- "hasDown": true,
1353
- "hasFusedWeights": false,
1354
- "inputIsSupported": true,
1355
- "hasLoRA": false,
1356
- "dtypeMatches": true,
1357
- "dtypeSupported": true,
1358
- "weightDtype": "f16",
1359
- "activationDtype": "f16",
1360
- "f16BatchSupported": true
1361
- },
1362
- "value": true
1363
- },
1364
- {
1365
- "match": {
1366
- "hasGate": true,
1367
- "hasUp": true,
1368
- "hasDown": true,
1369
- "hasFusedWeights": false,
1370
- "inputIsSupported": true,
1371
- "hasLoRA": false,
1372
- "dtypeMatches": true,
1373
- "dtypeSupported": true,
1374
- "weightDtype": "f16",
1375
- "activationDtype": "f32",
1376
- "useLargeBatchF16F32FusedGateUp": true,
1377
- "batchSize": {
1378
- "gt": 4
1379
- }
1380
- },
1381
- "value": true
1382
- },
1383
- {
1384
- "match": {
1385
- "hasGate": true,
1386
- "hasUp": true,
1387
- "hasDown": true,
1388
- "hasFusedWeights": false,
1389
- "inputIsSupported": true,
1390
- "hasLoRA": false,
1391
- "dtypeMatches": true,
1392
- "dtypeSupported": true,
1393
- "weightDtype": "f16",
1394
- "activationDtype": "f32",
1395
- "batchSize": {
1396
- "lte": 4
1397
- }
1398
- },
1399
- "value": true
1400
- },
1401
- {
1402
- "match": {
1403
- "hasGate": true,
1404
- "hasUp": true,
1405
- "hasDown": true,
1406
- "hasFusedWeights": false,
1407
- "inputIsSupported": true,
1408
- "hasLoRA": false,
1409
- "dtypeMatches": true,
1410
- "dtypeSupported": true,
1411
- "weightDtype": "q4k",
1412
- "activationDtype": "f16",
1413
- "hiddenSizeAligned32": true,
1414
- "batchSize": {
1415
- "lte": 4
1416
- },
1417
- "useDoubleWideMlp": false
1418
- },
1419
- "value": true
1420
- },
1421
- {
1422
- "match": {
1423
- "hasGate": true,
1424
- "hasUp": true,
1425
- "hasDown": true,
1426
- "hasFusedWeights": false,
1427
- "inputIsSupported": true,
1428
- "hasLoRA": false,
1429
- "dtypeMatches": true,
1430
- "dtypeSupported": true,
1431
- "weightDtype": "q4k",
1432
- "activationDtype": "f32",
1433
- "hiddenSizeAligned32": true,
1434
- "batchSize": {
1435
- "lte": 4
1436
- },
1437
- "useDoubleWideMlp": false
1438
- },
1439
- "value": true
1440
- },
1441
- {
1442
- "match": {
1443
- "hasGate": true,
1444
- "hasUp": true,
1445
- "hasDown": true,
1446
- "hasFusedWeights": false,
1447
- "inputIsSupported": true,
1448
- "hasLoRA": false,
1449
- "dtypeMatches": true,
1450
- "dtypeSupported": true,
1451
- "hasQ4KMaterialization": true,
1452
- "activationDtype": "f32",
1453
- "hiddenSizeAligned32": true,
1454
- "batchSize": {
1455
- "lte": 4
1456
- },
1457
- "useDoubleWideMlp": false
1458
- },
1459
- "value": true
1460
- },
1461
- {
1462
- "match": {},
1463
- "value": false
1464
- }
1465
- ]
1466
- },
1467
- "inference/layer-pattern.rules.json": {
1468
- "patternKind": [
1469
- {
1470
- "match": {
1471
- "patternType": "alternating",
1472
- "globalPattern": "even"
1473
- },
1474
- "value": "alternating_even"
1475
- },
1476
- {
1477
- "match": {
1478
- "patternType": "alternating",
1479
- "globalPattern": "odd"
1480
- },
1481
- "value": "alternating_odd"
1482
- },
1483
- {
1484
- "match": {
1485
- "patternType": "every_n"
1486
- },
1487
- "value": "every_n"
1488
- },
1489
- {
1490
- "match": {},
1491
- "value": null
1492
- }
1493
- ],
1494
- "layerType": [
1495
- {
1496
- "match": {
1497
- "patternKind": "alternating_even",
1498
- "isEven": true
1499
- },
1500
- "value": "full_attention"
1501
- },
1502
- {
1503
- "match": {
1504
- "patternKind": "alternating_even"
1505
- },
1506
- "value": "sliding_attention"
1507
- },
1508
- {
1509
- "match": {
1510
- "patternKind": "alternating_odd",
1511
- "isEven": false
1512
- },
1513
- "value": "full_attention"
1514
- },
1515
- {
1516
- "match": {
1517
- "patternKind": "alternating_odd"
1518
- },
1519
- "value": "sliding_attention"
1520
- },
1521
- {
1522
- "match": {
1523
- "patternKind": "every_n",
1524
- "isStride": true
1525
- },
1526
- "value": "full_attention"
1527
- },
1528
- {
1529
- "match": {
1530
- "patternKind": "every_n"
1531
- },
1532
- "value": "sliding_attention"
1533
- }
1534
- ]
1535
- },
1536
- "inference/layer.rules.json": {
1537
- "ffnMode": [
1538
- {
1539
- "match": {
1540
- "variant": "moe"
1541
- },
1542
- "value": true
1543
- },
1544
- {
1545
- "match": {
1546
- "variant": "auto",
1547
- "canAutoMoe": true
1548
- },
1549
- "value": true
1550
- },
1551
- {
1552
- "match": {},
1553
- "value": false
1554
- }
1555
- ]
1556
- },
1557
- "inference/moe.rules.json": {
1558
- "executionProfile": [
1559
- {
1560
- "match": {
1561
- "expertFormat": "gpt-oss"
1562
- },
1563
- "value": {
1564
- "id": "gpt-oss-mxfp4",
1565
- "label": "GPT-OSS MXFP4 experts",
1566
- "expertExecutor": "gpt-oss",
1567
- "intermediateSizeSource": "architecture",
1568
- "requiresShaderF16": true,
1569
- "routerScaleMode": "none",
1570
- "topkRouteExecutor": null,
1571
- "vendorProfile": {
1572
- "kind": "rule",
1573
- "domain": "kernels",
1574
- "group": "moeGptoss",
1575
- "name": "vendorQuirkProfile"
1576
- },
1577
- "kernelPathProfileResolver": "gpt-oss",
1578
- "kernelRuleModelType": "gpt-oss",
1579
- "shapePolicy": {
1580
- "kind": "rule",
1581
- "domain": "kernels",
1582
- "group": "moeGptoss",
1583
- "name": "shapePolicy"
1584
- }
1585
- }
1586
- },
1587
- {
1588
- "match": {
1589
- "expertFormat": "mixtral"
1590
- },
1591
- "value": {
1592
- "id": "mixtral-dense",
1593
- "label": "Mixtral dense experts",
1594
- "expertExecutor": "mixtral",
1595
- "intermediateSizeSource": "architecture",
1596
- "requiresShaderF16": false,
1597
- "routerScaleMode": "none",
1598
- "topkRouteExecutor": null,
1599
- "vendorProfile": {
1600
- "kind": "rule",
1601
- "domain": "kernels",
1602
- "group": "moeMixtral",
1603
- "name": "vendorQuirkProfile"
1604
- },
1605
- "kernelPathProfileResolver": "mixtral",
1606
- "kernelRuleModelType": "mixtral",
1607
- "shapePolicy": null
1608
- }
1609
- },
1610
- {
1611
- "match": {
1612
- "modelType": "diffusion_gemma",
1613
- "expertFormat": "gemma4"
1614
- },
1615
- "value": {
1616
- "id": "diffusion-gemma-packed",
1617
- "label": "DiffusionGemma packed experts",
1618
- "expertExecutor": "gemma4-packed",
1619
- "intermediateSizeSource": "expert",
1620
- "requiresShaderF16": false,
1621
- "routerScaleMode": "required",
1622
- "topkRouteExecutor": "gemma4-route",
1623
- "vendorProfile": {
1624
- "kind": "static",
1625
- "value": {
1626
- "preferVec4Dequant": false,
1627
- "dequantTileShape": null,
1628
- "routerWorkgroupSize": 256,
1629
- "maxTokensPerExpertScale": 1
1630
- }
1631
- },
1632
- "kernelPathProfileResolver": null,
1633
- "kernelRuleModelType": null,
1634
- "shapePolicy": null
1635
- }
1636
- },
1637
- {
1638
- "match": {
1639
- "expertFormat": "gemma4"
1640
- },
1641
- "value": {
1642
- "id": "gemma4-packed",
1643
- "label": "Gemma packed experts",
1644
- "expertExecutor": "gemma4-packed",
1645
- "intermediateSizeSource": "expert",
1646
- "requiresShaderF16": false,
1647
- "routerScaleMode": "optional",
1648
- "topkRouteExecutor": "gemma4-route",
1649
- "vendorProfile": {
1650
- "kind": "static",
1651
- "value": {
1652
- "preferVec4Dequant": false,
1653
- "dequantTileShape": null,
1654
- "routerWorkgroupSize": 256,
1655
- "maxTokensPerExpertScale": 1
1656
- }
1657
- },
1658
- "kernelPathProfileResolver": null,
1659
- "kernelRuleModelType": null,
1660
- "shapePolicy": null
1661
- }
1662
- }
1663
- ],
1664
- "biasAddCode": [
1665
- {
1666
- "match": {
1667
- "logitsDtype": "f16",
1668
- "biasDtype": "f16"
1669
- },
1670
- "value": {
1671
- "shaderFile": "moe_router_bias_add_f16_f16.wgsl"
1672
- }
1673
- },
1674
- {
1675
- "match": {
1676
- "logitsDtype": "f16"
1677
- },
1678
- "value": {
1679
- "shaderFile": "moe_router_bias_add_f16_f32.wgsl"
1680
- }
1681
- },
1682
- {
1683
- "match": {
1684
- "biasDtype": "f16"
1685
- },
1686
- "value": {
1687
- "shaderFile": "moe_router_bias_add_f32_f16.wgsl"
1688
- }
1689
- },
1690
- {
1691
- "match": {},
1692
- "value": {
1693
- "shaderFile": "moe_router_bias_add_f32_f32.wgsl"
1694
- }
1695
- }
1696
- ]
1697
- },
1698
- "kernels/attention.rules.json": {
1699
- "tier": [
1700
- {
1701
- "match": {
1702
- "canSubgroup": true
1703
- },
1704
- "value": "subgroup"
1705
- },
1706
- {
1707
- "match": {
1708
- "canLarge": true
1709
- },
1710
- "value": "tiled_large"
1711
- },
1712
- {
1713
- "match": {
1714
- "canSmall": true
1715
- },
1716
- "value": "tiled_small"
1717
- },
1718
- {
1719
- "match": {
1720
- "isDecode": true
1721
- },
1722
- "value": "streaming"
1723
- },
1724
- {
1725
- "match": {},
1726
- "value": "streaming"
1727
- }
1728
- ],
1729
- "phase": [
1730
- {
1731
- "match": {
1732
- "isDecode": true
1733
- },
1734
- "value": "decode"
1735
- },
1736
- {
1737
- "match": {},
1738
- "value": "prefill"
1739
- }
1740
- ],
1741
- "suffix": [
1742
- {
1743
- "match": {
1744
- "useF16": true
1745
- },
1746
- "value": "_f16"
1747
- },
1748
- {
1749
- "match": {
1750
- "useF16KV": true
1751
- },
1752
- "value": "_f16kv"
1753
- },
1754
- {
1755
- "match": {},
1756
- "value": ""
1757
- }
1758
- ],
1759
- "chunkedVariant": [
1760
- {
1761
- "match": {
1762
- "useF16": true
1763
- },
1764
- "value": "decode_chunked_f16"
1765
- },
1766
- {
1767
- "match": {},
1768
- "value": "decode_chunked_f16kv"
1769
- }
1770
- ],
1771
- "pagedVariant": [
1772
- {
1773
- "match": {
1774
- "useF16": true
1775
- },
1776
- "value": "decode_paged_f16"
1777
- },
1778
- {
1779
- "match": {},
1780
- "value": "decode_paged_f16kv"
1781
- }
1782
- ],
1783
- "optimizedVariant": [
1784
- {
1785
- "match": {
1786
- "useF16": true
1787
- },
1788
- "value": "decode_online_f16"
1789
- },
1790
- {
1791
- "match": {},
1792
- "value": "decode_online_f16kv"
1793
- }
1794
- ],
1795
- "tieredVariant": [
1796
- {
1797
- "match": {
1798
- "useF16": true
1799
- },
1800
- "value": "decode_tiered_f16"
1801
- },
1802
- {
1803
- "match": {},
1804
- "value": "decode_tiered_f16kv"
1805
- }
1806
- ],
1807
- "tieredQuantVariant": [
1808
- {
1809
- "match": {
1810
- "mode": "turboquant"
1811
- },
1812
- "value": "decode_tiered_turboquant_f16kv"
1813
- },
1814
- {
1815
- "match": {
1816
- "mode": "turboquant_prod"
1817
- },
1818
- "value": "decode_tiered_turboquant_prod_f16kv"
1819
- },
1820
- {
1821
- "match": {
1822
- "mode": "int4"
1823
- },
1824
- "value": "decode_tiered_int4_f16kv"
1825
- },
1826
- {
1827
- "match": {
1828
- "mode": "int8"
1829
- },
1830
- "value": "decode_tiered_int8_f16kv"
1831
- },
1832
- {
1833
- "match": {},
1834
- "value": "decode_tiered_int8_f16kv"
1835
- }
1836
- ],
1837
- "contiguousQuantVariant": [
1838
- {
1839
- "match": {
1840
- "mode": "turboquant"
1841
- },
1842
- "value": "decode_contiguous_turboquant_f16kv"
1843
- },
1844
- {
1845
- "match": {
1846
- "mode": "turboquant_prod"
1847
- },
1848
- "value": "decode_contiguous_turboquant_prod_f16kv"
1849
- },
1850
- {
1851
- "match": {},
1852
- "value": "decode_contiguous_turboquant_f16kv"
1853
- }
1854
- ],
1855
- "variant": [
1856
- {
1857
- "match": {
1858
- "canUseDecodeOptimized": true
1859
- },
1860
- "value": {
1861
- "context": "optimizedVariant"
1862
- }
1863
- },
1864
- {
1865
- "match": {
1866
- "platformId": {
1867
- "in": [
1868
- "apple-m2",
1869
- "apple-m3",
1870
- "amd-rdna3",
1871
- "nvidia-rtx30",
1872
- "nvidia-rtx40"
1873
- ]
1874
- },
1875
- "isDecode": true,
1876
- "tier": "subgroup",
1877
- "canUseDecodeSubgroup": true
1878
- },
1879
- "value": "decode_subgroup"
1880
- },
1881
- {
1882
- "match": {
1883
- "isPaged": true,
1884
- "isDecode": true,
1885
- "canUseChunked": true
1886
- },
1887
- "value": {
1888
- "context": "pagedVariant"
1889
- }
1890
- },
1891
- {
1892
- "match": {
1893
- "tier": "subgroup",
1894
- "useF16KV": true,
1895
- "canUseChunked": true
1896
- },
1897
- "value": {
1898
- "context": "chunkedVariant"
1899
- }
1900
- },
1901
- {
1902
- "match": {
1903
- "tier": "subgroup",
1904
- "useF16KV": true
1905
- },
1906
- "value": {
1907
- "template": "prefill_streaming{suffix}"
1908
- }
1909
- },
1910
- {
1911
- "match": {
1912
- "tier": "subgroup",
1913
- "canUseDecodeSubgroup": true
1914
- },
1915
- "value": "decode_subgroup"
1916
- },
1917
- {
1918
- "match": {
1919
- "tier": "subgroup"
1920
- },
1921
- "value": "prefill_streaming"
1922
- },
1923
- {
1924
- "match": {
1925
- "tier": "tiled_large"
1926
- },
1927
- "value": {
1928
- "template": "{base}{suffix}"
1929
- }
1930
- },
1931
- {
1932
- "match": {
1933
- "tier": "tiled_small"
1934
- },
1935
- "value": {
1936
- "template": "prefill_small{suffix}"
1937
- }
1938
- },
1939
- {
1940
- "match": {
1941
- "tier": "streaming",
1942
- "canUseChunked": true
1943
- },
1944
- "value": {
1945
- "context": "chunkedVariant"
1946
- }
1947
- },
1948
- {
1949
- "match": {
1950
- "tier": "streaming"
1951
- },
1952
- "value": {
1953
- "template": "prefill_streaming{suffix}"
1954
- }
1955
- },
1956
- {
1957
- "match": {},
1958
- "value": {
1959
- "template": "prefill_streaming{suffix}"
1960
- }
1961
- }
1962
- ]
1963
- },
1964
- "kernels/conv2d.rules.json": {
1965
- "variant": [
1966
- {
1967
- "match": {
1968
- "isF16": true
1969
- },
1970
- "value": "default_f16"
1971
- },
1972
- {
1973
- "match": {},
1974
- "value": "default"
1975
- }
1976
- ]
1977
- },
1978
- "kernels/depthwise-conv2d.rules.json": {
1979
- "variant": [
1980
- {
1981
- "match": {
1982
- "isF16": true
1983
- },
1984
- "value": "default_f16"
1985
- },
1986
- {
1987
- "match": {},
1988
- "value": "default"
1989
- }
1990
- ]
1991
- },
1992
- "kernels/dequant.rules.json": {
1993
- "variant": [
1994
- {
1995
- "match": {
1996
- "platformId": {
1997
- "in": [
1998
- "apple-m2",
1999
- "apple-m3",
2000
- "nvidia-rtx30",
2001
- "nvidia-rtx40"
2002
- ]
2003
- },
2004
- "hasSubgroups": true,
2005
- "wantsF16Out": true
2006
- },
2007
- "value": "subgroup_f16out"
2008
- },
2009
- {
2010
- "match": {
2011
- "platformId": {
2012
- "in": [
2013
- "apple-m2",
2014
- "apple-m3",
2015
- "nvidia-rtx30",
2016
- "nvidia-rtx40"
2017
- ]
2018
- },
2019
- "hasSubgroups": true
2020
- },
2021
- "value": "subgroup"
2022
- },
2023
- {
2024
- "match": {
2025
- "hasSubgroups": true,
2026
- "wantsF16Out": true,
2027
- "useVec4": true
2028
- },
2029
- "value": "subgroup_vec4_f16out"
2030
- },
2031
- {
2032
- "match": {
2033
- "hasSubgroups": true,
2034
- "wantsF16Out": true
2035
- },
2036
- "value": "subgroup_f16out"
2037
- },
2038
- {
2039
- "match": {
2040
- "hasSubgroups": true,
2041
- "useVec4": true
2042
- },
2043
- "value": "subgroup_vec4"
2044
- },
2045
- {
2046
- "match": {
2047
- "hasSubgroups": true
2048
- },
2049
- "value": "subgroup"
2050
- },
2051
- {
2052
- "match": {
2053
- "wantsF16Out": true,
2054
- "useVec4": true
2055
- },
2056
- "value": "subgroup_vec4_f16out"
2057
- },
2058
- {
2059
- "match": {
2060
- "wantsF16Out": true
2061
- },
2062
- "value": "subgroup_f16out"
2063
- },
2064
- {
2065
- "match": {
2066
- "useVec4": true
2067
- },
2068
- "value": "shared"
2069
- },
2070
- {
2071
- "match": {},
2072
- "value": "shared"
2073
- }
2074
- ],
2075
- "rowwiseVariant": [
2076
- {
2077
- "match": {
2078
- "wantsF16Out": true
2079
- },
2080
- "value": "f16_rowwise"
2081
- },
2082
- {
2083
- "match": {},
2084
- "value": "f32_rowwise"
2085
- }
2086
- ],
2087
- "mxfp4ExpertVariant": [
2088
- {
2089
- "match": {
2090
- "modelType": "gpt-oss",
2091
- "hasF16": true,
2092
- "hasSubgroups": true,
2093
- "outputDtype": "f16",
2094
- "dequantTileShape": "vec4",
2095
- "groupSize": 32
2096
- },
2097
- "value": "mxfp4_expert_fused_f16"
2098
- },
2099
- {
2100
- "match": {
2101
- "modelType": "gpt-oss",
2102
- "hasF16": true,
2103
- "outputDtype": "f16"
2104
- },
2105
- "value": "mxfp4_expert_f16"
2106
- },
2107
- {
2108
- "match": {
2109
- "modelType": "gpt-oss"
2110
- },
2111
- "value": "mxfp4_expert"
2112
- },
2113
- {
2114
- "match": {
2115
- "outputDtype": "f16"
2116
- },
2117
- "value": "mxfp4_expert_f16"
2118
- },
2119
- {
2120
- "match": {},
2121
- "value": "mxfp4_expert"
2122
- }
2123
- ]
2124
- },
2125
- "kernels/energy.rules.json": {
2126
- "evalVariant": [
2127
- {
2128
- "match": {
2129
- "isF16": true
2130
- },
2131
- "value": "eval_f16"
2132
- },
2133
- {
2134
- "match": {},
2135
- "value": "eval"
2136
- }
2137
- ],
2138
- "updateVariant": [
2139
- {
2140
- "match": {
2141
- "isF16": true
2142
- },
2143
- "value": "update_f16"
2144
- },
2145
- {
2146
- "match": {},
2147
- "value": "update"
2148
- }
2149
- ],
2150
- "quintelUpdateVariant": [
2151
- {
2152
- "match": {
2153
- "isF16": true
2154
- },
2155
- "value": "quintel_update_f16"
2156
- },
2157
- {
2158
- "match": {},
2159
- "value": "quintel_update"
2160
- }
2161
- ],
2162
- "quintelReduceVariant": [
2163
- {
2164
- "match": {
2165
- "isF16": true
2166
- },
2167
- "value": "quintel_reduce_f16"
2168
- },
2169
- {
2170
- "match": {},
2171
- "value": "quintel_reduce"
2172
- }
2173
- ],
2174
- "quintelGradVariant": [
2175
- {
2176
- "match": {
2177
- "isF16": true
2178
- },
2179
- "value": "quintel_grad_f16"
2180
- },
2181
- {
2182
- "match": {},
2183
- "value": "quintel_grad"
2184
- }
2185
- ]
2186
- },
2187
- "kernels/fused-ffn.rules.json": {
2188
- "variant": [
2189
- {
2190
- "match": {
2191
- "isQ4K": true,
2192
- "fusedAllowed": true,
2193
- "hiddenSubblockAligned": true,
2194
- "hasF16": true,
2195
- "useF16Input": true,
2196
- "batchSize": {
2197
- "gt": 1
2198
- }
2199
- },
2200
- "value": "q4k_batched_f16a"
2201
- },
2202
- {
2203
- "match": {
2204
- "isQ4K": true,
2205
- "fusedAllowed": true,
2206
- "hiddenSubblockAligned": true,
2207
- "hasF16": true,
2208
- "useF16Input": true
2209
- },
2210
- "value": "q4k_f16a"
2211
- },
2212
- {
2213
- "match": {
2214
- "isQ4K": true,
2215
- "fusedAllowed": true,
2216
- "hiddenSubblockAligned": true,
2217
- "batchSize": {
2218
- "gt": 1
2219
- }
2220
- },
2221
- "value": "q4k_batched"
2222
- },
2223
- {
2224
- "match": {
2225
- "isQ4K": true,
2226
- "fusedAllowed": true,
2227
- "hiddenSubblockAligned": true
2228
- },
2229
- "value": "q4k"
2230
- },
2231
- {
2232
- "match": {
2233
- "weightDtype": "f16",
2234
- "hasF16": true,
2235
- "useF16Input": true,
2236
- "batchSize": {
2237
- "gt": 1
2238
- }
2239
- },
2240
- "value": "f16_native_batched"
2241
- },
2242
- {
2243
- "match": {
2244
- "weightDtype": "f16",
2245
- "hasF16": true,
2246
- "useF16Input": true
2247
- },
2248
- "value": "f16_native"
2249
- },
2250
- {
2251
- "match": {
2252
- "weightDtype": "f16",
2253
- "batchSize": {
2254
- "gt": 1
2255
- }
2256
- },
2257
- "value": "f16_batched"
2258
- },
2259
- {
2260
- "match": {
2261
- "weightDtype": "f16"
2262
- },
2263
- "value": "f16"
2264
- },
2265
- {
2266
- "match": {
2267
- "batchSize": {
2268
- "gt": 1
2269
- }
2270
- },
2271
- "value": "batched"
2272
- },
2273
- {
2274
- "match": {
2275
- "useMultiOutput": true
2276
- },
2277
- "value": "multi"
2278
- },
2279
- {
2280
- "match": {},
2281
- "value": "default"
2282
- }
2283
- ]
2284
- },
2285
- "kernels/fused-matmul-residual.rules.json": {
2286
- "variant": [
2287
- {
2288
- "match": {
2289
- "dtype": "f16"
2290
- },
2291
- "value": "f16"
2292
- },
2293
- {
2294
- "match": {},
2295
- "value": "default"
2296
- }
2297
- ]
2298
- },
2299
- "kernels/fused-matmul-rmsnorm.rules.json": {
2300
- "variant": [
2301
- {
2302
- "match": {
2303
- "isSmall": true,
2304
- "isF16": true
2305
- },
2306
- "value": "small_f16"
2307
- },
2308
- {
2309
- "match": {
2310
- "isSmall": true
2311
- },
2312
- "value": "small"
2313
- },
2314
- {
2315
- "match": {
2316
- "isF16": true
2317
- },
2318
- "value": "medium_f16"
2319
- },
2320
- {
2321
- "match": {},
2322
- "value": "medium"
2323
- }
2324
- ]
2325
- },
2326
- "kernels/gather.rules.json": {
2327
- "splitConfig": [
2328
- {
2329
- "match": {
2330
- "forcedSectionCount": 4
2331
- },
2332
- "value": {
2333
- "op": "gather_split4",
2334
- "label": "gather_split4",
2335
- "sectionCount": 4,
2336
- "variants": {
2337
- "f16": "f16_vec4_f16_out"
2338
- }
2339
- }
2340
- },
2341
- {
2342
- "match": {
2343
- "forcedSectionCount": 8
2344
- },
2345
- "value": {
2346
- "op": "gather_split8",
2347
- "label": "gather_split8",
2348
- "sectionCount": 8,
2349
- "variants": {
2350
- "f16": "f16_vec4_f16_out",
2351
- "f32": "f16_vec4_f32_out"
2352
- }
2353
- }
2354
- },
2355
- {
2356
- "match": {
2357
- "outputDtype": "f32",
2358
- "sectionCount": {
2359
- "lte": 8
2360
- }
2361
- },
2362
- "value": {
2363
- "op": "gather_split8",
2364
- "label": "gather_split8",
2365
- "sectionCount": 8,
2366
- "variants": {
2367
- "f16": "f16_vec4_f16_out",
2368
- "f32": "f16_vec4_f32_out"
2369
- }
2370
- }
2371
- },
2372
- {
2373
- "match": {
2374
- "outputDtype": "f16",
2375
- "sectionCount": {
2376
- "lte": 4
2377
- }
2378
- },
2379
- "value": {
2380
- "op": "gather_split4",
2381
- "label": "gather_split4",
2382
- "sectionCount": 4,
2383
- "variants": {
2384
- "f16": "f16_vec4_f16_out"
2385
- }
2386
- }
2387
- },
2388
- {
2389
- "match": {
2390
- "outputDtype": "f16",
2391
- "sectionCount": {
2392
- "lte": 8
2393
- }
2394
- },
2395
- "value": {
2396
- "op": "gather_split8",
2397
- "label": "gather_split8",
2398
- "sectionCount": 8,
2399
- "variants": {
2400
- "f16": "f16_vec4_f16_out",
2401
- "f32": "f16_vec4_f32_out"
2402
- }
2403
- }
2404
- }
2405
- ],
2406
- "variant": [
2407
- {
2408
- "match": {
2409
- "useBF16Input": true,
2410
- "useF16Output": false
2411
- },
2412
- "value": "bf16"
2413
- },
2414
- {
2415
- "match": {
2416
- "useLiteRTInt4Input": true,
2417
- "useF16Output": false,
2418
- "useVec4": true
2419
- },
2420
- "value": "litert_int4_vec4_f32_out"
2421
- },
2422
- {
2423
- "match": {
2424
- "useLiteRTInt4Input": true,
2425
- "useF16Output": true,
2426
- "useVec4": true
2427
- },
2428
- "value": "litert_int4_vec4_f16_out"
2429
- },
2430
- {
2431
- "match": {
2432
- "useF16Input": true,
2433
- "useF16Output": true,
2434
- "useVec4": true
2435
- },
2436
- "value": "f16_vec4_f16_out"
2437
- },
2438
- {
2439
- "match": {
2440
- "useF16Input": true,
2441
- "useF16Output": true
2442
- },
2443
- "value": "f16_f16_out"
2444
- },
2445
- {
2446
- "match": {
2447
- "useF16Input": true,
2448
- "useVec4": true
2449
- },
2450
- "value": "f16_vec4"
2451
- },
2452
- {
2453
- "match": {
2454
- "useF16Input": true
2455
- },
2456
- "value": "f16"
2457
- },
2458
- {
2459
- "match": {
2460
- "useF16Output": true,
2461
- "useVec4": true
2462
- },
2463
- "value": "vec4_f16_out"
2464
- },
2465
- {
2466
- "match": {
2467
- "useF16Output": true
2468
- },
2469
- "value": "f16_out"
2470
- },
2471
- {
2472
- "match": {
2473
- "useVec4": true
2474
- },
2475
- "value": "vec4"
2476
- },
2477
- {
2478
- "match": {},
2479
- "value": "default"
2480
- }
2481
- ]
2482
- },
2483
- "kernels/gelu.rules.json": {
2484
- "variant": [
2485
- {
2486
- "match": {
2487
- "isF16": true
2488
- },
2489
- "value": "gelu_f16"
2490
- },
2491
- {
2492
- "match": {},
2493
- "value": "gelu"
2494
- }
2495
- ],
2496
- "overrides": [
2497
- {
2498
- "match": {
2499
- "useRowsplit": true
2500
- },
2501
- "value": {
2502
- "USE_ROWSPLIT": true
2503
- }
2504
- },
2505
- {
2506
- "match": {
2507
- "hasGate": true
2508
- },
2509
- "value": {
2510
- "HAS_GATE": true
2511
- }
2512
- },
2513
- {
2514
- "match": {},
2515
- "value": {}
2516
- }
2517
- ]
2518
- },
2519
- "kernels/grouped-pointwise-conv2d.rules.json": {
2520
- "variant": [
2521
- {
2522
- "match": {
2523
- "isF16": true
2524
- },
2525
- "value": "default_f16"
2526
- },
2527
- {
2528
- "match": {},
2529
- "value": "default"
2530
- }
2531
- ]
2532
- },
2533
- "kernels/groupnorm.rules.json": {
2534
- "statsVariant": [
2535
- {
2536
- "match": {
2537
- "isF16": true
2538
- },
2539
- "value": "stats_f16"
2540
- },
2541
- {
2542
- "match": {},
2543
- "value": "stats"
2544
- }
2545
- ],
2546
- "applyVariant": [
2547
- {
2548
- "match": {
2549
- "isF16": true
2550
- },
2551
- "value": "apply_f16"
2552
- },
2553
- {
2554
- "match": {},
2555
- "value": "apply"
2556
- }
2557
- ]
2558
- },
2559
- "kernels/kv_quantize.rules.json": {
2560
- "variant": [
2561
- {
2562
- "match": {
2563
- "mode": "turboquant"
2564
- },
2565
- "value": "turboquant"
2566
- },
2567
- {
2568
- "match": {
2569
- "mode": "turboquant_prod"
2570
- },
2571
- "value": "turboquant_prod"
2572
- },
2573
- {
2574
- "match": {
2575
- "mode": "int4"
2576
- },
2577
- "value": "int4"
2578
- },
2579
- {
2580
- "match": {
2581
- "mode": "int8"
2582
- },
2583
- "value": "int8"
2584
- },
2585
- {
2586
- "match": {},
2587
- "value": "int8"
2588
- }
2589
- ]
2590
- },
2591
- "kernels/layernorm.rules.json": {
2592
- "variant": [
2593
- {
2594
- "match": {
2595
- "isF16": true
2596
- },
2597
- "value": "default_f16"
2598
- },
2599
- {
2600
- "match": {},
2601
- "value": "default"
2602
- }
2603
- ]
2604
- },
2605
- "kernels/linear-attention.rules.json": {
2606
- "variant": [
2607
- {
2608
- "match": {
2609
- "isF16": true
2610
- },
2611
- "value": "default_f16"
2612
- },
2613
- {
2614
- "match": {},
2615
- "value": "default"
2616
- }
2617
- ]
2618
- },
2619
- "kernels/lm-head-argmax.rules.json": {
2620
- "phase1Variant": [
2621
- {
2622
- "match": {
2623
- "weightDtype": "q4k"
2624
- },
2625
- "value": "phase1_q4k_f32a"
2626
- },
2627
- {
2628
- "match": {
2629
- "weightDtype": "f16"
2630
- },
2631
- "value": "phase1_f16w_f32a"
2632
- }
2633
- ],
2634
- "phase2Variant": [
2635
- {
2636
- "match": {
2637
- "weightDtype": "q4k"
2638
- },
2639
- "value": "phase2_q4k"
2640
- },
2641
- {
2642
- "match": {},
2643
- "value": "phase2"
2644
- }
2645
- ]
2646
- },
2647
- "kernels/matmul.rules.json": {
2648
- "litertInt4FusedVariant": [
2649
- {
2650
- "match": {
2651
- "activationDtype": "f16",
2652
- "outputDtype": "f16",
2653
- "transposeB": true
2654
- },
2655
- "value": "litert_int4_multicol_f16a"
2656
- },
2657
- {
2658
- "match": {
2659
- "activationDtype": "f16",
2660
- "outputDtype": "f32",
2661
- "transposeB": true
2662
- },
2663
- "value": "litert_int4_multicol_f16a_f32out"
2664
- },
2665
- {
2666
- "match": {
2667
- "activationDtype": "f32",
2668
- "outputDtype": "f32",
2669
- "transposeB": true
2670
- },
2671
- "value": "litert_int4_multicol_f32a_f32out"
2672
- },
2673
- {
2674
- "match": {},
2675
- "value": null
2676
- }
2677
- ],
2678
- "w4a16FusedVariant": [
2679
- {
2680
- "match": {
2681
- "activationDtype": "f16",
2682
- "outputDtype": "f16",
2683
- "transposeB": true,
2684
- "isPrefill": true
2685
- },
2686
- "value": "w4a16_batched_f16a"
2687
- },
2688
- {
2689
- "match": {
2690
- "activationDtype": "f16",
2691
- "outputDtype": "f32",
2692
- "transposeB": true,
2693
- "isPrefill": true
2694
- },
2695
- "value": "w4a16_batched_f16a_f32out"
2696
- },
2697
- {
2698
- "match": {
2699
- "activationDtype": "f16",
2700
- "outputDtype": "f16",
2701
- "transposeB": true
2702
- },
2703
- "value": "w4a16_multicol_f16a"
2704
- },
2705
- {
2706
- "match": {
2707
- "activationDtype": "f16",
2708
- "outputDtype": "f32",
2709
- "transposeB": true
2710
- },
2711
- "value": "w4a16_multicol_f16a_f32out"
2712
- },
2713
- {
2714
- "match": {},
2715
- "value": null
2716
- }
2717
- ],
2718
- "q4kFusedVariant": [
2719
- {
2720
- "match": {
2721
- "useF16A": true,
2722
- "isM1": true
2723
- },
2724
- "value": "q4_fused_multicol_f16a"
2725
- },
2726
- {
2727
- "match": {
2728
- "useF16A": true
2729
- },
2730
- "value": "q4_fused_batched_f16a"
2731
- },
2732
- {
2733
- "match": {
2734
- "useF16Out": true,
2735
- "isM1": true
2736
- },
2737
- "value": "q4_fused_multicol_f16"
2738
- },
2739
- {
2740
- "match": {
2741
- "useF16Out": true
2742
- },
2743
- "value": "q4_fused_batched_f16"
2744
- },
2745
- {
2746
- "match": {
2747
- "isM1": true
2748
- },
2749
- "value": "q4_fused_multicol"
2750
- },
2751
- {
2752
- "match": {},
2753
- "value": "q4_fused_batched"
2754
- }
2755
- ],
2756
- "matmulKernel": [
2757
- {
2758
- "match": {
2759
- "useF16Matmul": true,
2760
- "useTiled": true
2761
- },
2762
- "value": "f16_tiled"
2763
- },
2764
- {
2765
- "match": {
2766
- "useF16Matmul": true,
2767
- "useVec4": true
2768
- },
2769
- "value": "f16_vec4"
2770
- },
2771
- {
2772
- "match": {
2773
- "useF16Matmul": true
2774
- },
2775
- "value": "f16"
2776
- },
2777
- {
2778
- "match": {
2779
- "useF16wF32a": true,
2780
- "useF16wF32aTiled": true
2781
- },
2782
- "value": "f16w_f32a_tiled"
2783
- },
2784
- {
2785
- "match": {
2786
- "useF16wF32a": true
2787
- },
2788
- "value": "f16w_f32a"
2789
- },
2790
- {
2791
- "match": {},
2792
- "value": "f32"
2793
- }
2794
- ],
2795
- "gemvPathVariant": [
2796
- {
2797
- "match": {
2798
- "useF16GemvPath": true,
2799
- "useMulticol": true
2800
- },
2801
- "value": "gemv_subgroup_multicol_f16a"
2802
- },
2803
- {
2804
- "match": {
2805
- "useF16GemvPath": true
2806
- },
2807
- "value": "gemv_subgroup_f16a"
2808
- },
2809
- {
2810
- "match": {
2811
- "useF32GemvPath": true,
2812
- "useMulticol": true
2813
- },
2814
- "value": "gemv_subgroup_multicol"
2815
- },
2816
- {
2817
- "match": {
2818
- "useF32GemvPath": true
2819
- },
2820
- "value": "gemv_subgroup"
2821
- },
2822
- {
2823
- "match": {},
2824
- "value": {
2825
- "context": "pathVariant"
2826
- }
2827
- }
2828
- ],
2829
- "gemvVariant": [
2830
- {
2831
- "match": {
2832
- "platformId": {
2833
- "in": [
2834
- "apple-m2",
2835
- "apple-m3",
2836
- "amd-rdna3"
2837
- ]
2838
- },
2839
- "hasSubgroups": true,
2840
- "useF16Gemv": true
2841
- },
2842
- "value": "gemv_subgroup_f16a"
2843
- },
2844
- {
2845
- "match": {
2846
- "platformId": {
2847
- "in": [
2848
- "apple-m2",
2849
- "apple-m3",
2850
- "amd-rdna3"
2851
- ]
2852
- },
2853
- "hasSubgroups": true,
2854
- "useF32Gemv": true
2855
- },
2856
- "value": "gemv_subgroup"
2857
- },
2858
- {
2859
- "match": {
2860
- "hasSubgroups": true,
2861
- "useF16Gemv": true,
2862
- "useVec4": true,
2863
- "useMulticol": false
2864
- },
2865
- "value": "gemv_subgroup_vec4_f16a"
2866
- },
2867
- {
2868
- "match": {
2869
- "hasSubgroups": true,
2870
- "useF32Gemv": true,
2871
- "useVec4": true,
2872
- "useMulticol": false
2873
- },
2874
- "value": "gemv_subgroup_vec4"
2875
- },
2876
- {
2877
- "match": {
2878
- "hasSubgroups": true,
2879
- "useF16Gemv": true,
2880
- "useMulticol": true
2881
- },
2882
- "value": "gemv_subgroup_multicol_f16a"
2883
- },
2884
- {
2885
- "match": {
2886
- "hasSubgroups": true,
2887
- "useF16Gemv": true
2888
- },
2889
- "value": "gemv_subgroup_f16a"
2890
- },
2891
- {
2892
- "match": {
2893
- "hasSubgroups": true,
2894
- "useF32Gemv": true,
2895
- "useMulticol": true
2896
- },
2897
- "value": "gemv_subgroup_multicol"
2898
- },
2899
- {
2900
- "match": {
2901
- "hasSubgroups": true,
2902
- "useF32Gemv": true
2903
- },
2904
- "value": "gemv_subgroup"
2905
- },
2906
- {
2907
- "match": {
2908
- "useF16Gemv": true
2909
- },
2910
- "value": "gemv_f16a"
2911
- },
2912
- {
2913
- "match": {
2914
- "useF32Gemv": true
2915
- },
2916
- "value": "gemv"
2917
- },
2918
- {
2919
- "match": {},
2920
- "value": "f32"
2921
- }
2922
- ],
2923
- "matmulSelection": [
2924
- {
2925
- "match": {
2926
- "useLiteRTInt4Fused": true
2927
- },
2928
- "value": {
2929
- "variant": {
2930
- "context": "litertInt4Variant"
2931
- },
2932
- "useQ4KFused": false,
2933
- "useGemv": false,
2934
- "useLiteRTInt4Fused": true
2935
- }
2936
- },
2937
- {
2938
- "match": {
2939
- "useW4A16Fused": true
2940
- },
2941
- "value": {
2942
- "variant": {
2943
- "context": "w4a16Variant"
2944
- },
2945
- "useQ4KFused": false,
2946
- "useGemv": false,
2947
- "useLiteRTInt4Fused": false,
2948
- "useW4A16Fused": true
2949
- }
2950
- },
2951
- {
2952
- "match": {
2953
- "isQ4K": true,
2954
- "hasSubgroups": true,
2955
- "fusedAllowed": true
2956
- },
2957
- "value": {
2958
- "variant": {
2959
- "context": "q4kVariant"
2960
- },
2961
- "useQ4KFused": true,
2962
- "useGemv": false
2963
- }
2964
- },
2965
- {
2966
- "match": {
2967
- "useGemv": true
2968
- },
2969
- "value": {
2970
- "variant": {
2971
- "context": "gemvVariant"
2972
- },
2973
- "useQ4KFused": false,
2974
- "useGemv": true
2975
- }
2976
- },
2977
- {
2978
- "match": {},
2979
- "value": {
2980
- "variant": {
2981
- "context": "matmulVariant"
2982
- },
2983
- "useQ4KFused": false,
2984
- "useGemv": false
2985
- }
2986
- }
2987
- ],
2988
- "preferredWeightDtype": [
2989
- {
2990
- "match": {
2991
- "variantWeightDtype": "f16",
2992
- "hasQ4KMaterialization": true,
2993
- "hasSubgroups": true
2994
- },
2995
- "value": "q4k"
2996
- },
2997
- {
2998
- "match": {},
2999
- "value": {
3000
- "context": "variantWeightDtype"
3001
- }
3002
- }
3003
- ],
3004
- "weightDtypeMismatchPolicy": [
3005
- {
3006
- "match": {
3007
- "actualWeightDtype": "f16",
3008
- "requiredWeightDtype": "q4k"
3009
- },
3010
- "value": "fallthrough"
3011
- },
3012
- {
3013
- "match": {
3014
- "actualWeightDtype": "q4k",
3015
- "requiredWeightDtype": "f16",
3016
- "hasSubgroups": true
3017
- },
3018
- "value": "fallthrough"
3019
- },
3020
- {
3021
- "match": {
3022
- "actualWeightDtype": "q4k",
3023
- "requiredWeightDtype": "f32",
3024
- "hasSubgroups": true
3025
- },
3026
- "value": "fallthrough"
3027
- },
3028
- {
3029
- "match": {
3030
- "actualWeightDtype": "litert_int4",
3031
- "requiredWeightDtype": "f16"
3032
- },
3033
- "value": "fallthrough"
3034
- },
3035
- {
3036
- "match": {
3037
- "actualWeightDtype": "litert_int4",
3038
- "requiredWeightDtype": "f32"
3039
- },
3040
- "value": "fallthrough"
3041
- },
3042
- {
3043
- "match": {
3044
- "actualWeightDtype": "w4a16",
3045
- "requiredWeightDtype": "f16"
3046
- },
3047
- "value": "fallthrough"
3048
- },
3049
- {
3050
- "match": {
3051
- "actualWeightDtype": "w4a16",
3052
- "requiredWeightDtype": "f32"
3053
- },
3054
- "value": "fallthrough"
3055
- },
3056
- {
3057
- "match": {},
3058
- "value": "reject"
3059
- }
3060
- ],
3061
- "q4kMaterializationMode": [
3062
- {
3063
- "match": {
3064
- "hasFusedProjections": true,
3065
- "hasDenseProjections": true
3066
- },
3067
- "value": "mixed"
3068
- },
3069
- {
3070
- "match": {
3071
- "hasFusedProjections": true
3072
- },
3073
- "value": "fused"
3074
- },
3075
- {
3076
- "match": {},
3077
- "value": "dense"
3078
- }
3079
- ],
3080
- "phase": [
3081
- {
3082
- "match": {
3083
- "isDecode": true
3084
- },
3085
- "value": "decode"
3086
- },
3087
- {
3088
- "match": {},
3089
- "value": "prefill"
3090
- }
3091
- ]
3092
- },
3093
- "kernels/modulate.rules.json": {
3094
- "variant": [
3095
- {
3096
- "match": {
3097
- "inputDtype": "f16",
3098
- "modDtype": "f16"
3099
- },
3100
- "value": "f16"
3101
- },
3102
- {
3103
- "match": {},
3104
- "value": "default"
3105
- }
3106
- ]
3107
- },
3108
- "kernels/moe.rules.gptoss.json": {
3109
- "routerTopKVariant": [
3110
- {
3111
- "match": {
3112
- "modelType": "gpt-oss",
3113
- "hasF16": true,
3114
- "hasSubgroups": true,
3115
- "inputDtype": "f16",
3116
- "weightsDtype": "f16"
3117
- },
3118
- "value": "gptoss_router_topk"
3119
- },
3120
- {
3121
- "match": {
3122
- "modelType": "gpt-oss",
3123
- "hasF16": true,
3124
- "inputDtype": "f16",
3125
- "weightsDtype": "f16"
3126
- },
3127
- "value": "fused_f16_w16"
3128
- },
3129
- {
3130
- "match": {
3131
- "modelType": "gpt-oss",
3132
- "inputDtype": "f16"
3133
- },
3134
- "value": "fused_f16"
3135
- }
3136
- ],
3137
- "vendorQuirkProfile": [
3138
- {
3139
- "match": {
3140
- "vendor": {
3141
- "contains": [
3142
- "intel",
3143
- "amd"
3144
- ]
3145
- }
3146
- },
3147
- "value": {
3148
- "preferVec4Dequant": false,
3149
- "dequantTileShape": "scalar",
3150
- "routerWorkgroupSize": 128,
3151
- "maxTokensPerExpertScale": 0.85
3152
- }
3153
- },
3154
- {
3155
- "match": {
3156
- "vendor": {
3157
- "contains": [
3158
- "nvidia",
3159
- "apple",
3160
- "qualcomm"
3161
- ]
3162
- }
3163
- },
3164
- "value": {
3165
- "preferVec4Dequant": true,
3166
- "dequantTileShape": "vec4",
3167
- "routerWorkgroupSize": 256,
3168
- "maxTokensPerExpertScale": 1
3169
- }
3170
- },
3171
- {
3172
- "match": {},
3173
- "value": {
3174
- "preferVec4Dequant": false,
3175
- "dequantTileShape": "scalar",
3176
- "routerWorkgroupSize": 128,
3177
- "maxTokensPerExpertScale": 0.9
3178
- }
3179
- }
3180
- ],
3181
- "dequantVariant": [
3182
- {
3183
- "match": {
3184
- "modelType": "gpt-oss",
3185
- "outputDtype": "f16",
3186
- "hasF16": true,
3187
- "hasSubgroups": true,
3188
- "dequantTileShape": "vec4",
3189
- "groupSize": 32
3190
- },
3191
- "value": "mxfp4_expert_fused_f16"
3192
- },
3193
- {
3194
- "match": {
3195
- "modelType": "gpt-oss",
3196
- "outputDtype": "f16",
3197
- "hasF16": true
3198
- },
3199
- "value": "mxfp4_expert_f16"
3200
- },
3201
- {
3202
- "match": {
3203
- "modelType": "gpt-oss"
3204
- },
3205
- "value": "mxfp4_expert"
3206
- }
3207
- ],
3208
- "shapePolicy": [
3209
- {
3210
- "match": {
3211
- "modelType": "gpt-oss"
3212
- },
3213
- "value": {
3214
- "hiddenSizeDivisor": 32,
3215
- "intermediateSizeDivisor": 32,
3216
- "groupSize": 32,
3217
- "gateUpRowsplit": true
3218
- }
3219
- }
3220
- ]
3221
- },
3222
- "kernels/moe.rules.json": {
3223
- "variantSuffix": [
3224
- {
3225
- "match": {
3226
- "useF16": true
3227
- },
3228
- "value": "_f16"
3229
- },
3230
- {
3231
- "match": {},
3232
- "value": ""
3233
- }
3234
- ],
3235
- "scatterAddVariant": [
3236
- {
3237
- "match": {
3238
- "outputDtype": "f16",
3239
- "weightsDtype": "f16",
3240
- "hasExpertScale": true
3241
- },
3242
- "value": "dynamic_f16_w16_expert_scale"
3243
- },
3244
- {
3245
- "match": {
3246
- "outputDtype": "f16",
3247
- "hasExpertScale": true
3248
- },
3249
- "value": "dynamic_f16_expert_scale"
3250
- },
3251
- {
3252
- "match": {
3253
- "hasExpertScale": true
3254
- },
3255
- "value": "dynamic_expert_scale"
3256
- },
3257
- {
3258
- "match": {
3259
- "outputDtype": "f16",
3260
- "weightsDtype": "f16"
3261
- },
3262
- "value": "dynamic_f16_w16"
3263
- },
3264
- {
3265
- "match": {
3266
- "outputDtype": "f16"
3267
- },
3268
- "value": "dynamic_f16"
3269
- },
3270
- {
3271
- "match": {},
3272
- "value": "dynamic"
3273
- }
3274
- ]
3275
- },
3276
- "kernels/moe.rules.mixtral.json": {
3277
- "vendorQuirkProfile": [
3278
- {
3279
- "match": {
3280
- "vendor": {
3281
- "contains": [
3282
- "intel",
3283
- "amd"
3284
- ]
3285
- }
3286
- },
3287
- "value": {
3288
- "preferVec4Dequant": false,
3289
- "dequantTileShape": "scalar",
3290
- "routerWorkgroupSize": 128,
3291
- "maxTokensPerExpertScale": 0.85
3292
- }
3293
- },
3294
- {
3295
- "match": {
3296
- "vendor": {
3297
- "contains": [
3298
- "nvidia",
3299
- "apple",
3300
- "qualcomm"
3301
- ]
3302
- }
3303
- },
3304
- "value": {
3305
- "preferVec4Dequant": false,
3306
- "dequantTileShape": "scalar",
3307
- "routerWorkgroupSize": 256,
3308
- "maxTokensPerExpertScale": 1
3309
- }
3310
- },
3311
- {
3312
- "match": {},
3313
- "value": {
3314
- "preferVec4Dequant": false,
3315
- "dequantTileShape": "scalar",
3316
- "routerWorkgroupSize": 128,
3317
- "maxTokensPerExpertScale": 1
3318
- }
3319
- }
3320
- ],
3321
- "routerTopKVariant": [
3322
- {
3323
- "match": {
3324
- "modelType": "mixtral",
3325
- "hasF16": true,
3326
- "hasSubgroups": true,
3327
- "routerDtype": "f32"
3328
- },
3329
- "value": "softmax_topk_f32_subgroup"
3330
- },
3331
- {
3332
- "match": {
3333
- "modelType": "mixtral",
3334
- "routerDtype": "f32"
3335
- },
3336
- "value": "softmax_topk_f32"
3337
- },
3338
- {
3339
- "match": {
3340
- "modelType": "mixtral"
3341
- },
3342
- "value": "softmax_topk_f32"
3343
- }
3344
- ],
3345
- "dequantVariant": [
3346
- {
3347
- "match": {
3348
- "modelType": "mixtral",
3349
- "weightsDtype": "q4k",
3350
- "hasF16": true,
3351
- "hasSubgroups": true,
3352
- "outputDtype": "f32"
3353
- },
3354
- "value": "q4k_expert_dequant_f32_subgroup"
3355
- },
3356
- {
3357
- "match": {
3358
- "modelType": "mixtral",
3359
- "weightsDtype": "q4k",
3360
- "outputDtype": "f16",
3361
- "hasF16": true
3362
- },
3363
- "value": "q4k_expert_dequant_f16"
3364
- },
3365
- {
3366
- "match": {
3367
- "modelType": "mixtral",
3368
- "weightsDtype": "q4k"
3369
- },
3370
- "value": "q4k_expert_dequant_f32"
3371
- },
3372
- {
3373
- "match": {
3374
- "modelType": "mixtral",
3375
- "weightsDtype": "f16",
3376
- "outputDtype": "f16",
3377
- "hasF16": true
3378
- },
3379
- "value": "f16_expert_passthrough"
3380
- },
3381
- {
3382
- "match": {
3383
- "modelType": "mixtral"
3384
- },
3385
- "value": "f16_expert_upcast_f32"
3386
- }
3387
- ]
3388
- },
3389
- "kernels/pixel_shuffle.rules.json": {
3390
- "variant": [
3391
- {
3392
- "match": {
3393
- "dtype": "f16"
3394
- },
3395
- "value": "f16"
3396
- },
3397
- {
3398
- "match": {},
3399
- "value": "default"
3400
- }
3401
- ]
3402
- },
3403
- "kernels/relu.rules.json": {
3404
- "variant": [
3405
- {
3406
- "match": {
3407
- "dtype": "f16"
3408
- },
3409
- "value": "default_f16"
3410
- },
3411
- {
3412
- "match": {},
3413
- "value": "default"
3414
- }
3415
- ]
3416
- },
3417
- "kernels/rep-penalty.rules.json": {
3418
- "variant": [
3419
- {
3420
- "match": {
3421
- "useF16": true
3422
- },
3423
- "value": "default_f16"
3424
- },
3425
- {
3426
- "match": {},
3427
- "value": "default"
3428
- }
3429
- ]
3430
- },
3431
- "kernels/repeat-channels.rules.json": {
3432
- "variant": [
3433
- {
3434
- "match": {
3435
- "dtype": "f16"
3436
- },
3437
- "value": "default_f16"
3438
- },
3439
- {
3440
- "match": {},
3441
- "value": "default"
3442
- }
3443
- ]
3444
- },
3445
- "kernels/residual.rules.json": {
3446
- "residualVariant": [
3447
- {
3448
- "match": {
3449
- "useVec4": true,
3450
- "outputDtype": "f16"
3451
- },
3452
- "value": "vec4_f16"
3453
- },
3454
- {
3455
- "match": {
3456
- "useVec4": true
3457
- },
3458
- "value": "vec4"
3459
- },
3460
- {
3461
- "match": {
3462
- "outputDtype": "f16"
3463
- },
3464
- "value": "default_f16"
3465
- },
3466
- {
3467
- "match": {},
3468
- "value": "default"
3469
- }
3470
- ],
3471
- "biasAddVariant": [
3472
- {
3473
- "match": {
3474
- "dataDtype": "f16",
3475
- "biasDtype": "f16"
3476
- },
3477
- "value": "f16"
3478
- },
3479
- {
3480
- "match": {},
3481
- "value": "default"
3482
- }
3483
- ]
3484
- },
3485
- "kernels/rmsnorm-qk.rules.json": {
3486
- "variant": [
3487
- {
3488
- "match": {
3489
- "isF16": true
3490
- },
3491
- "value": "default_f16"
3492
- },
3493
- {
3494
- "match": {},
3495
- "value": "default"
3496
- }
3497
- ]
3498
- },
3499
- "kernels/rmsnorm.rules.json": {
3500
- "variant": [
3501
- {
3502
- "match": {
3503
- "isF16": true,
3504
- "isSmall": true
3505
- },
3506
- "value": "small_f16"
3507
- },
3508
- {
3509
- "match": {
3510
- "isF16": true
3511
- },
3512
- "value": "default_f16"
3513
- },
3514
- {
3515
- "match": {
3516
- "residual": true
3517
- },
3518
- "value": "residual"
3519
- },
3520
- {
3521
- "match": {
3522
- "hasSubgroups": true,
3523
- "isSmall": true
3524
- },
3525
- "value": "small_subgroup"
3526
- },
3527
- {
3528
- "match": {
3529
- "hasSubgroups": true
3530
- },
3531
- "value": "subgroup"
3532
- },
3533
- {
3534
- "match": {
3535
- "isSmall": true
3536
- },
3537
- "value": "small"
3538
- },
3539
- {
3540
- "match": {},
3541
- "value": "default"
3542
- }
3543
- ]
3544
- },
3545
- "kernels/rope-qk.rules.json": {
3546
- "variant": [
3547
- {
3548
- "match": {
3549
- "useF16": true
3550
- },
3551
- "value": "default_f16"
3552
- },
3553
- {
3554
- "match": {},
3555
- "value": "default"
3556
- }
3557
- ]
3558
- },
3559
- "kernels/rope.rules.json": {
3560
- "variant": [
3561
- {
3562
- "match": {
3563
- "useF16": true
3564
- },
3565
- "value": "default_f16"
3566
- },
3567
- {
3568
- "match": {},
3569
- "value": "default"
3570
- }
3571
- ]
3572
- },
3573
- "kernels/sample.rules.json": {
3574
- "suffix": [
3575
- {
3576
- "match": {
3577
- "useF16": true
3578
- },
3579
- "value": "_f16"
3580
- },
3581
- {
3582
- "match": {},
3583
- "value": ""
3584
- }
3585
- ]
3586
- },
3587
- "kernels/scale.rules.json": {
3588
- "variant": [
3589
- {
3590
- "match": {
3591
- "isF16": true,
3592
- "inplace": true
3593
- },
3594
- "value": "inplace_f16"
3595
- },
3596
- {
3597
- "match": {
3598
- "isF16": true
3599
- },
3600
- "value": "default_f16"
3601
- },
3602
- {
3603
- "match": {
3604
- "inplace": true
3605
- },
3606
- "value": "inplace"
3607
- },
3608
- {
3609
- "match": {},
3610
- "value": "default"
3611
- }
3612
- ]
3613
- },
3614
- "kernels/silu.rules.json": {
3615
- "variant": [
3616
- {
3617
- "match": {
3618
- "isF16": true
3619
- },
3620
- "value": "default_f16"
3621
- },
3622
- {
3623
- "match": {},
3624
- "value": "default"
3625
- }
3626
- ],
3627
- "overrides": [
3628
- {
3629
- "match": {
3630
- "useRowsplit": true
3631
- },
3632
- "value": {
3633
- "USE_ROWSPLIT": true
3634
- }
3635
- },
3636
- {
3637
- "match": {
3638
- "useSplit": true
3639
- },
3640
- "value": {
3641
- "USE_SPLIT": true
3642
- }
3643
- },
3644
- {
3645
- "match": {
3646
- "hasGate": true,
3647
- "useVec4": true
3648
- },
3649
- "value": {
3650
- "HAS_GATE": true,
3651
- "USE_VEC4": true
3652
- }
3653
- },
3654
- {
3655
- "match": {
3656
- "hasGate": true
3657
- },
3658
- "value": {
3659
- "HAS_GATE": true
3660
- }
3661
- },
3662
- {
3663
- "match": {
3664
- "useVec4": true
3665
- },
3666
- "value": {
3667
- "USE_VEC4": true
3668
- }
3669
- },
3670
- {
3671
- "match": {},
3672
- "value": {}
3673
- }
3674
- ],
3675
- "activationOp": [
3676
- {
3677
- "match": {
3678
- "activation": "gelu"
3679
- },
3680
- "value": "gelu"
3681
- },
3682
- {
3683
- "match": {},
3684
- "value": "silu"
3685
- }
3686
- ],
3687
- "swigluRowsplitBiasVariant": [
3688
- {
3689
- "match": {
3690
- "isF16": true
3691
- },
3692
- "value": "rowsplit_bias_f16"
3693
- },
3694
- {
3695
- "match": {},
3696
- "value": "rowsplit_bias"
3697
- }
3698
- ]
3699
- },
3700
- "kernels/softmax.rules.json": {
3701
- "variant": [
3702
- {
3703
- "match": {
3704
- "hasSubgroups": true,
3705
- "isSmall": true
3706
- },
3707
- "value": "small_subgroup"
3708
- },
3709
- {
3710
- "match": {
3711
- "hasSubgroups": true
3712
- },
3713
- "value": "subgroup"
3714
- },
3715
- {
3716
- "match": {
3717
- "isSmall": true
3718
- },
3719
- "value": "small"
3720
- },
3721
- {
3722
- "match": {},
3723
- "value": "default"
3724
- }
3725
- ],
3726
- "topkVariant": [
3727
- {
3728
- "match": {
3729
- "modelType": "gpt-oss",
3730
- "hasF16": true,
3731
- "hasSubgroups": true,
3732
- "inputDtype": "f16",
3733
- "weightsDtype": "f16"
3734
- },
3735
- "value": "gptoss_router_topk"
3736
- },
3737
- {
3738
- "match": {
3739
- "modelType": "mixtral",
3740
- "inputDtype": "f16",
3741
- "weightsDtype": "f16"
3742
- },
3743
- "value": "fused_f16_w16"
3744
- },
3745
- {
3746
- "match": {
3747
- "modelType": "mixtral"
3748
- },
3749
- "value": "fused"
3750
- },
3751
- {
3752
- "match": {
3753
- "inputDtype": "f16",
3754
- "weightsDtype": "f16"
3755
- },
3756
- "value": "fused_f16_w16"
3757
- },
3758
- {
3759
- "match": {
3760
- "inputDtype": "f16"
3761
- },
3762
- "value": "fused_f16"
3763
- },
3764
- {
3765
- "match": {},
3766
- "value": "fused"
3767
- }
3768
- ]
3769
- },
3770
- "kernels/split-qg.rules.json": {
3771
- "variant": [
3772
- {
3773
- "match": {
3774
- "outputDtype": "f16"
3775
- },
3776
- "value": "f16"
3777
- },
3778
- {
3779
- "match": {},
3780
- "value": "default"
3781
- }
3782
- ]
3783
- },
3784
- "kernels/split-qkv.rules.json": {
3785
- "variant": [
3786
- {
3787
- "match": {
3788
- "outputDtype": "f16"
3789
- },
3790
- "value": "f16"
3791
- },
3792
- {
3793
- "match": {},
3794
- "value": "default"
3795
- }
3796
- ]
3797
- },
3798
- "kernels/upsample2d.rules.json": {
3799
- "variant": [
3800
- {
3801
- "match": {
3802
- "isF16": true
3803
- },
3804
- "value": "default_f16"
3805
- },
3806
- {
3807
- "match": {},
3808
- "value": "default"
3809
- }
3810
- ]
3811
- },
3812
- "kernels/vision-average-pool.rules.json": {
3813
- "variant": [
3814
- {
3815
- "match": {
3816
- "inputDtype": "f32"
3817
- },
3818
- "value": "default"
3819
- }
3820
- ]
3821
- },
3822
- "kernels/vision-patch-embed.rules.json": {
3823
- "variant": [
3824
- {
3825
- "match": {
3826
- "weightDtype": "f16"
3827
- },
3828
- "value": "f16w"
3829
- },
3830
- {
3831
- "match": {
3832
- "weightDtype": "f32"
3833
- },
3834
- "value": "f32w"
3835
- }
3836
- ]
3837
- },
3838
- "kernels/vision-position-embedding.rules.json": {
3839
- "variant": [
3840
- {
3841
- "match": {
3842
- "tableDtype": "f16"
3843
- },
3844
- "value": "f16"
3845
- },
3846
- {
3847
- "match": {
3848
- "tableDtype": "f32"
3849
- },
3850
- "value": "f32"
3851
- }
3852
- ]
3853
- },
3854
- "kernels/vision-rope-2d.rules.json": {
3855
- "variant": [
3856
- {
3857
- "match": {
3858
- "inputDtype": "f32"
3859
- },
3860
- "value": "default"
3861
- }
3862
- ]
3863
- },
3864
- "kernels/vision-spatial-merge.rules.json": {
3865
- "variant": [
3866
- {
3867
- "match": {
3868
- "inputDtype": "f32"
3869
- },
3870
- "value": "default"
3871
- }
3872
- ]
3873
- },
3874
- "loader/tensor-loader.rules.json": {
3875
- "gpuLoaderPath": [
3876
- {
3877
- "match": {
3878
- "dtype": "FUNCTIONAL_DESCRIPTOR"
3879
- },
3880
- "value": "functional_descriptor"
3881
- },
3882
- {
3883
- "match": {
3884
- "litertAffineInt4FusedEligible": true
3885
- },
3886
- "value": "litert_int4_fused"
3887
- },
3888
- {
3889
- "match": {
3890
- "w4a16FusedEligible": true
3891
- },
3892
- "value": "w4a16_fused"
3893
- },
3894
- {
3895
- "match": {
3896
- "dtype": {
3897
- "in": [
3898
- "Q4_K_M",
3899
- "Q4_K"
3900
- ]
3901
- },
3902
- "q4kDenseExceedsBindingLimit": true,
3903
- "q4kLimitFallbackEligible": true
3904
- },
3905
- "value": "q4k_fused"
3906
- },
3907
- {
3908
- "match": {
3909
- "dtype": {
3910
- "in": [
3911
- "Q4_K_M",
3912
- "Q4_K"
3913
- ]
3914
- },
3915
- "q4kMaterializationMode": "mixed"
3916
- },
3917
- "value": "q4k_mixed"
3918
- },
3919
- {
3920
- "match": {
3921
- "dtype": {
3922
- "in": [
3923
- "Q4_K_M",
3924
- "Q4_K"
3925
- ]
3926
- },
3927
- "requiresFusedQ4KRole": true
3928
- },
3929
- "value": "q4k_fused"
3930
- },
3931
- {
3932
- "match": {
3933
- "dtype": {
3934
- "in": [
3935
- "Q4_K_M",
3936
- "Q4_K"
3937
- ]
3938
- },
3939
- "useFusedQ4K": true
3940
- },
3941
- "value": "q4k_fused"
3942
- },
3943
- {
3944
- "match": {
3945
- "dtype": {
3946
- "in": [
3947
- "Q4_K_M",
3948
- "Q4_K"
3949
- ]
3950
- },
3951
- "useFusedQ4K": false,
3952
- "q4kCpuReferenceEligible": true,
3953
- "q4kBasicBackendClass": true
3954
- },
3955
- "value": "q4k_dequant_reference"
3956
- },
3957
- {
3958
- "match": {
3959
- "dtype": {
3960
- "in": [
3961
- "Q4_K_M",
3962
- "Q4_K"
3963
- ]
3964
- }
3965
- },
3966
- "value": "q4k_dequant"
3967
- },
3968
- {
3969
- "match": {
3970
- "dtype": "W4A16"
3971
- },
3972
- "value": "w4a16_dequant_reference"
3973
- },
3974
- {
3975
- "match": {
3976
- "dtype": {
3977
- "in": [
3978
- "Q4_0",
3979
- "WNA8O8"
3980
- ]
3981
- }
3982
- },
3983
- "value": "unsupported_packed_quantization"
3984
- },
3985
- {
3986
- "match": {
3987
- "dtype": "Q6_K"
3988
- },
3989
- "value": "q6k"
3990
- },
3991
- {
3992
- "match": {
3993
- "dtype": "BF16"
3994
- },
3995
- "value": "bf16"
3996
- },
3997
- {
3998
- "match": {},
3999
- "value": "float"
4000
- }
4001
- ],
4002
- "cpuLoaderPath": [
4003
- {
4004
- "match": {
4005
- "dtype": "FUNCTIONAL_DESCRIPTOR"
4006
- },
4007
- "value": "unsupported_functional_descriptor"
4008
- },
4009
- {
4010
- "match": {
4011
- "dtype": {
4012
- "in": [
4013
- "Q4_K_M",
4014
- "Q4_K",
4015
- "Q6_K"
4016
- ]
4017
- }
4018
- },
4019
- "value": "raw"
4020
- },
4021
- {
4022
- "match": {
4023
- "dtype": "W4A16"
4024
- },
4025
- "value": "w4a16_dequant_reference"
4026
- },
4027
- {
4028
- "match": {
4029
- "dtype": {
4030
- "in": [
4031
- "Q4_0",
4032
- "WNA8O8"
4033
- ]
4034
- }
4035
- },
4036
- "value": "unsupported_packed_quantization"
4037
- },
4038
- {
4039
- "match": {
4040
- "dtype": "BF16"
4041
- },
4042
- "value": "bf16_to_f32"
4043
- },
4044
- {
4045
- "match": {
4046
- "dtype": "F16"
4047
- },
4048
- "value": "f16_to_f32"
4049
- },
4050
- {
4051
- "match": {},
4052
- "value": "f32"
4053
- }
4054
- ]
4055
- },
4056
- "loader/weights.rules.json": {
4057
- "normWeightDtype": [
4058
- {
4059
- "match": {
4060
- "normWeightDtype": "f16"
4061
- },
4062
- "value": "f16"
4063
- },
4064
- {
4065
- "match": {
4066
- "normWeightDtype": "f32"
4067
- },
4068
- "value": "f32"
4069
- },
4070
- {
4071
- "match": {},
4072
- "value": "f32"
4073
- }
4074
- ],
4075
- "normWeightDtypeFromSize": [
4076
- {
4077
- "match": {
4078
- "sizeMatchesF32": true
4079
- },
4080
- "value": "f32"
4081
- },
4082
- {
4083
- "match": {
4084
- "sizeMatchesF16": true
4085
- },
4086
- "value": "f16"
4087
- },
4088
- {
4089
- "match": {},
4090
- "value": "f32"
4091
- }
4092
- ],
4093
- "matmulWeightDtype": [
4094
- {
4095
- "match": {
4096
- "locationDtype": "F16",
4097
- "hasF16": false,
4098
- "isMatmulWeight": true
4099
- },
4100
- "value": "f32"
4101
- },
4102
- {
4103
- "match": {
4104
- "locationDtype": "F16"
4105
- },
4106
- "value": "f16"
4107
- },
4108
- {
4109
- "match": {
4110
- "locationDtype": "BF16",
4111
- "hasF16": true,
4112
- "isMatmulWeight": true
4113
- },
4114
- "value": "f16"
4115
- },
4116
- {
4117
- "match": {
4118
- "locationDtype": "BF16"
4119
- },
4120
- "value": "f32"
4121
- },
4122
- {
4123
- "match": {
4124
- "locationDtype": {
4125
- "in": [
4126
- "Q4_K",
4127
- "Q4_K_M"
4128
- ]
4129
- },
4130
- "hasF16": true,
4131
- "isMatmulWeight": true,
4132
- "keepF32Weights": false
4133
- },
4134
- "value": "f16"
4135
- },
4136
- {
4137
- "match": {
4138
- "locationDtype": {
4139
- "in": [
4140
- "Q4_K",
4141
- "Q4_K_M"
4142
- ]
4143
- }
4144
- },
4145
- "value": "f32"
4146
- },
4147
- {
4148
- "match": {
4149
- "locationDtype": "Q6_K"
4150
- },
4151
- "value": "f16"
4152
- },
4153
- {
4154
- "match": {},
4155
- "value": "f32"
4156
- }
4157
- ],
4158
- "dequantizeToF16": [
4159
- {
4160
- "match": {
4161
- "role": {
4162
- "in": [
4163
- "matmul",
4164
- "embedding",
4165
- "lm_head",
4166
- "router",
4167
- "expert"
4168
- ]
4169
- }
4170
- },
4171
- "value": true
4172
- },
4173
- {
4174
- "match": {},
4175
- "value": false
4176
- }
4177
- ],
4178
- "floatLocationDtype": [
4179
- {
4180
- "match": {
4181
- "locationDtype": "F16"
4182
- },
4183
- "value": "f16"
4184
- },
4185
- {
4186
- "match": {},
4187
- "value": "f32"
4188
- }
4189
- ],
4190
- "weightLayout": [
4191
- {
4192
- "match": {
4193
- "layout": "column"
4194
- },
4195
- "value": "column"
4196
- },
4197
- {
4198
- "match": {
4199
- "layout": "row"
4200
- },
4201
- "value": "row"
4202
- },
4203
- {
4204
- "match": {
4205
- "useColumnWise": true
4206
- },
4207
- "value": "column"
4208
- },
4209
- {
4210
- "match": {},
4211
- "value": "row"
4212
- }
4213
- ],
4214
- "q4kOutputDtype": [
4215
- {
4216
- "match": {
4217
- "isMatmulWeight": false
4218
- },
4219
- "value": "f32"
4220
- },
4221
- {
4222
- "match": {
4223
- "keepF32Weights": true
4224
- },
4225
- "value": "f32"
4226
- },
4227
- {
4228
- "match": {
4229
- "hasF16": true
4230
- },
4231
- "value": "f16"
4232
- },
4233
- {
4234
- "match": {},
4235
- "value": "f32"
4236
- }
4237
- ]
4238
- },
4239
- "tooling/command-runtime.rules.json": {
4240
- "runtimeContract": [
4241
- {
4242
- "match": {
4243
- "command": "debug"
4244
- },
4245
- "value": {
4246
- "workload": null,
4247
- "intent": "investigate"
4248
- }
4249
- },
4250
- {
4251
- "match": {
4252
- "command": "bench"
4253
- },
4254
- "value": {
4255
- "workload": null,
4256
- "intent": "calibrate"
4257
- }
4258
- },
4259
- {
4260
- "match": {
4261
- "command": "verify"
4262
- },
4263
- "value": {
4264
- "workload": null,
4265
- "intent": "verify"
4266
- }
4267
- },
4268
- {
4269
- "match": {
4270
- "command": "lora"
4271
- },
4272
- "value": {
4273
- "workload": null,
4274
- "intent": null
4275
- }
4276
- },
4277
- {
4278
- "match": {
4279
- "command": "distill"
4280
- },
4281
- "value": {
4282
- "workload": null,
4283
- "intent": null
4284
- }
4285
- },
4286
- {
4287
- "match": {
4288
- "command": "diagnose"
4289
- },
4290
- "value": {
4291
- "workload": null,
4292
- "intent": "investigate"
4293
- }
4294
- },
4295
- {
4296
- "match": {},
4297
- "value": {
4298
- "workload": null,
4299
- "intent": null
4300
- }
4301
- }
4302
- ]
4303
- }
4304
- }
4305
- }
1
+ {"schema":"doppler.rule-bundle/v1","sources":[{"path":"converter/execution.rules.json","digest":"sha256:ae259e6ea2ed52fa20b76f899de7f78c239cf23c261cc11c8540c3f1b070a4c0"},{"path":"converter/tensor-roles.rules.json","digest":"sha256:5eed33348fe59c55d779fad81e87d045337e75c678e54da64a240d8b589e2f57"},{"path":"converter/tokenizer.rules.json","digest":"sha256:5985376bfa9bfacc3bba877407e7be1c10554fda74ea73c2dc18b96ca4827a15"},{"path":"inference/attention.rules.json","digest":"sha256:e7801f7929fb43fac2a11ad1b0bb3ce2281092e56c1a516c023985ec833d5713"},{"path":"inference/config.rules.json","digest":"sha256:b9a654366b6c25de0c37a27c0b0b7c671ef3d0ed2f9c744c5fa95b1fc4c95b3a"},{"path":"inference/dtype.rules.json","digest":"sha256:6105bfc2e0463ad6755575623eba1562e244457618232c739760cd2083d0894e"},{"path":"inference/execution.rules.json","digest":"sha256:269ba92d1615f607b94a7b8034ed9cb41561fb046aa03d96ad3ffb81c39c7162"},{"path":"inference/ffn.rules.json","digest":"sha256:3aa3c66dcc3d154158d2fc59dc94165bbb47955c7c017612568f6825a995b260"},{"path":"inference/layer-pattern.rules.json","digest":"sha256:c3fe086f991b2c89d0eacf6f21c169c97f30ef87a669e1fed83729da4f7f7c7e"},{"path":"inference/layer.rules.json","digest":"sha256:4cd14673e534ed8f03779ee7396c637225f5cf4183977269526ac887d918b70a"},{"path":"inference/moe.rules.json","digest":"sha256:893d478da0dcbf29a8d2eab1bb8d1b70122ed794fe4fbbba60cd011db7f9a487"},{"path":"kernels/attention.rules.json","digest":"sha256:fc948d10ae33ca49327ab4efcca1a0383eac9c483287cf595da5eb584360795e"},{"path":"kernels/conv2d.rules.json","digest":"sha256:fa13daf4856f2feb0175779aaf921da6870bda64143c6f4d728d3a72d4bfc544"},{"path":"kernels/depthwise-conv2d.rules.json","digest":"sha256:fa13daf4856f2feb0175779aaf921da6870bda64143c6f4d728d3a72d4bfc544"},{"path":"kernels/dequant.rules.json","digest":"sha256:04922fcbed3d2886973123452f4f35987f614272b9c216574c2cdd5838bfd0ce"},{"path":"kernels/energy.rules.json","digest":"sha256:6a3e6975064228896abd1abd3500e2e4f05d87cb7a54f447456f7acddcc60e50"},{"path":"kernels/fused-ffn.rules.json","digest":"sha256:cd5d0b36d51b3f036eb62596b039103307d27acc5447933632d99e3aa9bf8c79"},{"path":"kernels/fused-matmul-residual.rules.json","digest":"sha256:cf5433a5d416705d3f04b9321e560d959a37b40c3f282e1ff058134244605ba7"},{"path":"kernels/fused-matmul-rmsnorm.rules.json","digest":"sha256:6a5aca1f92300e35f8371fb13a05963c54ac56730cc4bedc93b2bc5d8d9b2e16"},{"path":"kernels/gated-delta-fused-decode.rules.json","digest":"sha256:567ae61a46b0bbc7a852de6a4e478a9de215e7f902ace80953dd0fff2d84985a"},{"path":"kernels/gated-delta-recurrent.rules.json","digest":"sha256:309db6ed8f1ab5a1d32e6d5ba2df42a65a766c6c61c28f27074b926bad3bb60d"},{"path":"kernels/gather.rules.json","digest":"sha256:23452a498c0e5263c2e663246055bf0b50d6fd6ea1eebbe560017892239e1421"},{"path":"kernels/gelu.rules.json","digest":"sha256:ead4f5f4216c9c0eeaf3e01d084d501bc66f314a956ffad442ca84160ee48d99"},{"path":"kernels/grouped-pointwise-conv2d.rules.json","digest":"sha256:fa13daf4856f2feb0175779aaf921da6870bda64143c6f4d728d3a72d4bfc544"},{"path":"kernels/groupnorm.rules.json","digest":"sha256:019810e2473fdeb748c04aa92ffb247a3cac7b0bba890ed7fefb5f3061168040"},{"path":"kernels/kv_quantize.rules.json","digest":"sha256:f0a56bea79a43bad2fd257aa36aa38a2afc16b583b20ed28fa7819e65120fece"},{"path":"kernels/layernorm.rules.json","digest":"sha256:fa13daf4856f2feb0175779aaf921da6870bda64143c6f4d728d3a72d4bfc544"},{"path":"kernels/linear-attention.rules.json","digest":"sha256:0f7fb417357e303c9e9ee7f0730c1cc7d738958bc0c4309fda8b5093d6e98fea"},{"path":"kernels/lm-head-argmax.rules.json","digest":"sha256:a265a2cb85f96b869110fe1761798c8c9b274c9a4d0c73ec452743dfcdad176d"},{"path":"kernels/matmul.rules.json","digest":"sha256:55995d8f7ed39c812de426026d7c1d19f6ddb380e767df209ae91d3cb7c3ca65"},{"path":"kernels/modulate.rules.json","digest":"sha256:29b89188774997a0c32e4722d104a6a90c64fac88a89d623a86103df40321213"},{"path":"kernels/moe.rules.gptoss.json","digest":"sha256:8471e2a19890e45d8be6431491e98c11520598f5e98b8ac8a28977bfbeec7966"},{"path":"kernels/moe.rules.json","digest":"sha256:ef6bda6b2e6ef8f889c34d99c157295297375a5845f40cf7b90ea67daec36ae2"},{"path":"kernels/moe.rules.mixtral.json","digest":"sha256:16454ff88c7bf99d0f66cb704b6d60b7f63850e378acda3cef6c2ffde21c2def"},{"path":"kernels/pixel_shuffle.rules.json","digest":"sha256:cf5433a5d416705d3f04b9321e560d959a37b40c3f282e1ff058134244605ba7"},{"path":"kernels/relu.rules.json","digest":"sha256:87256e54451a2834f42dcc4aa392dfdabfcdaf694fb8d01e10dcc661bbc8526c"},{"path":"kernels/rep-penalty.rules.json","digest":"sha256:a8eba10370f282536e6b741895ea481f0c8ae33a7379e03a4f40812f26652f08"},{"path":"kernels/repeat-channels.rules.json","digest":"sha256:87256e54451a2834f42dcc4aa392dfdabfcdaf694fb8d01e10dcc661bbc8526c"},{"path":"kernels/residual.rules.json","digest":"sha256:f801dc9c88e34086261dfeb7c5dc74c8c1d7b18085e9b6fdb2ede597e5827a5e"},{"path":"kernels/rmsnorm-qk.rules.json","digest":"sha256:fa13daf4856f2feb0175779aaf921da6870bda64143c6f4d728d3a72d4bfc544"},{"path":"kernels/rmsnorm.rules.json","digest":"sha256:598cfe8c97bb3787ebf73572b5f918507739286437c0e426ff3e3bac3e7f5176"},{"path":"kernels/rope-qk.rules.json","digest":"sha256:6a65ee51e5a9f54e86adcb63a7b4fdeacc0c735311054778289674231782e37e"},{"path":"kernels/rope.rules.json","digest":"sha256:a8eba10370f282536e6b741895ea481f0c8ae33a7379e03a4f40812f26652f08"},{"path":"kernels/sample.rules.json","digest":"sha256:3268afa548007ab4ff98af8948c4b79d3fa680526cf6bafb230bb1da251cf1d2"},{"path":"kernels/scale.rules.json","digest":"sha256:53ce216b17a6a8d5866b48afaf09c7c307258121d6e4d37910f4ddb9bbb11d08"},{"path":"kernels/silu.rules.json","digest":"sha256:2d3d02dcfa061a0b4fd36a0406bcf6a512479182ea246a5c4b6315e618d74c69"},{"path":"kernels/softmax.rules.json","digest":"sha256:1c8b5ac794ad74fd179e281c19cfb3da809d8ccf33e268a03d36c65441016eef"},{"path":"kernels/split-qg.rules.json","digest":"sha256:ce44a93d37d84c72f7f81359f788da92badb0b9a1180fa62c76181c04cb10a7a"},{"path":"kernels/split-qkv.rules.json","digest":"sha256:ce44a93d37d84c72f7f81359f788da92badb0b9a1180fa62c76181c04cb10a7a"},{"path":"kernels/upsample2d.rules.json","digest":"sha256:fa13daf4856f2feb0175779aaf921da6870bda64143c6f4d728d3a72d4bfc544"},{"path":"kernels/vision-average-pool.rules.json","digest":"sha256:4ec49dcbfa1e3eb8660ec4424bafb348a7d036df5c60be5c860197e186bd64c2"},{"path":"kernels/vision-patch-embed.rules.json","digest":"sha256:6f845793e46ce0b9917719c418e81d84a7e26b319ca4feffd9a482548dcb40f4"},{"path":"kernels/vision-position-embedding.rules.json","digest":"sha256:7e48caf1cdef316b14b2e63f6adad31c385b985455eb66aa3c7f5805f7bb75f2"},{"path":"kernels/vision-rope-2d.rules.json","digest":"sha256:4ec49dcbfa1e3eb8660ec4424bafb348a7d036df5c60be5c860197e186bd64c2"},{"path":"kernels/vision-spatial-merge.rules.json","digest":"sha256:4ec49dcbfa1e3eb8660ec4424bafb348a7d036df5c60be5c860197e186bd64c2"},{"path":"loader/tensor-loader.rules.json","digest":"sha256:96b5e6df17d9724f5fa8264c71fddcfc29d3565095899370e6af9638139f4364"},{"path":"loader/weights.rules.json","digest":"sha256:b1f9abb0897d19102a993fd565ca4b62a3ff7339a669efa2810e24b61f877719"},{"path":"tooling/command-runtime.rules.json","digest":"sha256:4e191b70019913dc315ae18fa408ea729675dfca48c4815989475c52a64ea2b0"}],"files":{"converter/execution.rules.json":{"jobMode":[{"match":{"workers":{"lte":1}},"value":"main"},{"match":{"canChunkRows":true},"value":"row_chunks"},{"match":{},"value":"tensor"}],"rowChunkRows":[{"match":{"canChunkRows":false},"value":0},{"match":{"workers":{"lte":2}},"value":256},{"match":{"workers":{"lte":16}},"value":512},{"match":{},"value":768}],"maxInFlightJobs":[{"match":{"workers":{"lte":2}},"value":4},{"match":{"workers":{"lte":4}},"value":8},{"match":{"workers":{"lte":8}},"value":16},{"match":{"workers":{"lte":16}},"value":24},{"match":{},"value":32}]},"converter/tensor-roles.rules.json":{"shouldQuantize":[{"match":{"numElements":{"lt":1024}},"value":false},{"match":{"role":"embedding","quantizeEmbeddings":true},"value":true},{"match":{"role":"embedding"},"value":false},{"match":{"role":"lm_head","quantizeEmbeddings":true},"value":true},{"match":{"role":"lm_head"},"value":false},{"match":{"role":"norm"},"value":false},{"match":{"role":"router"},"value":false},{"match":{"isBias":true},"value":false},{"match":{},"value":true}]},"converter/tokenizer.rules.json":{"type":[{"match":{"isLiteRTPieceList":true},"value":"bpe"},{"match":{"hasMerges":true},"value":"bpe"},{"match":{"hasScores":true},"value":"unigram"},{"match":{},"value":"bpe"}],"addDummyPrefix":[{"match":{"isLiteRTPieceList":true},"value":false},{"match":{},"value":true}]},"inference/attention.rules.json":{"useFusedQkv":[{"match":{"hasQkvProj":true,"hasQkvSizes":true,"hasLoRA":false},"value":true},{"match":{},"value":false}],"useFusedOProjResidual":[{"match":{"allowFusedResidual":true,"hasResidual":true,"residualMatches":true,"attnIsF32":true,"hasLoRA":false,"oProjIsF16":true},"value":true},{"match":{"allowFusedResidual":true,"hasResidual":true,"residualMatches":true,"attnIsF16":true,"hasLoRA":false,"oProjIsF16":true},"value":true},{"match":{},"value":false}],"attentionKernelVariant":[{"match":{"indexedSelection":true,"kvLayout":"contiguous"},"value":"qsaIndexed"},{"match":{"indexedSelection":true},"value":"qsaIndexedRequiresContiguousKV"},{"match":{"kvLayout":"tiered","numTokens":{"gt":1}},"value":"contiguous"},{"match":{"kvLayout":"bdpa"},"value":"bdpa"},{"match":{"kvLayout":"contiguous_quantized","numTokens":{"gt":1}},"value":"contiguous"},{"match":{"kvLayout":"contiguous_quantized"},"value":"contiguousQuant"},{"match":{"kvLayout":"tiered","coldQuantMode":{"neq":"none"}},"value":"tieredQuant"},{"match":{"kvLayout":"tiered"},"value":"tiered"},{"match":{},"value":"contiguous"}]},"inference/config.rules.json":{"hiddenActivation":[{"match":{"activation":{"in":["silu","swiglu"]}},"value":"silu"},{"match":{"activation":{"in":["gelu","geglu"]}},"value":"gelu"},{"match":{},"value":"silu"}],"tracePath":[{"match":{"useRecorder":true},"value":"fused"},{"match":{},"value":"debug-sync"}],"pipelineModules":[{"match":{"modelTypeLower":{"in":["diffusion_gemma"]}},"value":["./diffusion-gemma/pipeline.js"]},{"match":{"modelTypeLower":{"in":["diffusion"]}},"value":["./diffusion/index.js"]},{"match":{"modelTypeLower":{"in":["energy"]}},"value":["./energy/index.js"]},{"match":{"modelTypeLower":{"in":["dream_structured","dream_intent_posterior_head","dream_d1_to2_bridge","dream_synthesis","dream_energy_compose","structured_json_head","structured-json-head","dream-intent-posterior-head","dream-d1-to2-bridge","dream-synthesis","dream-energy-compose"]}},"value":["./structured/json-head-pipeline.js"]},{"match":{"modelTypeLower":{"in":["energy_row_head","energy-row-head","dream_energy_head","dream-energy-head","d1-to2-bridge-diffusion","synthesis-mixer-diffusion","ebrm-diffusion"]}},"value":["./energy-head/row-head-pipeline.js"]},{"match":{},"value":[]}],"embeddingSemanticStyle":[{"match":{"manifestModelType":"embeddinggemma"},"value":"embeddinggemma"},{"match":{"modelType":"embedding","sourceCheckpointId":"Qwen/Qwen3-Embedding-0.6B"},"value":"qwen3_embedding"},{"match":{},"value":"default"}],"stableF32Logits":[{"match":{"inputDtype":"f16","finalLogitSoftcapping":{"gt":0}},"value":true},{"match":{"inputDtype":"f16","rmsNormWeightOffset":true,"hiddenSize":{"lte":768}},"value":true},{"match":{},"value":false}]},"inference/dtype.rules.json":{"f16OrF32":[{"match":{"useF16":true},"value":"f16"},{"match":{},"value":"f32"}],"dtypeFromAlias":[{"match":{"dtype":"bf16"},"value":"bf16"},{"match":{"dtype":"f16"},"value":"f16"},{"match":{"dtype":"fp16"},"value":"f16"},{"match":{"dtype":"float16"},"value":"f16"},{"match":{"dtype":"f32"},"value":"f32"},{"match":{"dtype":"fp32"},"value":"f32"},{"match":{"dtype":"float32"},"value":"f32"},{"match":{},"value":{"context":"fallback"}}],"f16OrF32FromDtype":[{"match":{"dtype":"f16"},"value":"f16"},{"match":{"dtype":"f32"},"value":"f32"},{"match":{},"value":{"context":"fallback"}}],"embeddingDtype":[{"match":{"dtype":{"in":["q4_1","q5_0","q8_0","q6k"]}},"value":{"context":"dtype"}},{"match":{"dtype":"q4_0"},"value":"q4_0"},{"match":{"dtype":"litert_int4"},"value":"litert_int4"},{"match":{"dtype":"bf16"},"value":"bf16"},{"match":{"dtype":"f16"},"value":"f16"},{"match":{},"value":"f32"}],"f16OrF32FromDtypeAlias":[{"match":{"dtype":"f16"},"value":"f16"},{"match":{"dtype":"bf16"},"value":"f16"},{"match":{"dtype":"fp16"},"value":"f16"},{"match":{"dtype":"float16"},"value":"f16"},{"match":{"dtype":"f32"},"value":"f32"},{"match":{"dtype":"fp32"},"value":"f32"},{"match":{"dtype":"float32"},"value":"f32"},{"match":{},"value":{"context":"fallback"}}],"f16OrF32FromBytes":[{"match":{"bytesPerElement":{"lte":2}},"value":"f16"},{"match":{},"value":"f32"}],"f16OrF32FromBytesOrFallback":[{"match":{"bytesPerElement":{"lt":3}},"value":"f16"},{"match":{},"value":{"context":"fallback"}}],"f16OrF32FromToken":[{"match":{"token":"F16"},"value":"f16"},{"match":{},"value":"f32"}],"f16IfCap":[{"match":{"hasF16":true},"value":"f16"},{"match":{},"value":"f32"}],"bothF16":[{"match":{"aDtype":"f16","bDtype":"f16"},"value":"f16"},{"match":{},"value":"f32"}],"diffusionActivationDtype":[{"match":{"requested":"f16","hasF16":true},"value":"f16"},{"match":{},"value":"f32"}],"f16OrFallback":[{"match":{"kvDtype":"f16"},"value":"f16"},{"match":{},"value":{"context":"fallback"}}],"f16OrFallbackByFlag":[{"match":{"useF16":true},"value":"f16"},{"match":{},"value":{"context":"fallback"}}],"attentionProjectionOutputDtype":[{"match":{"forceF32":true},"value":"f32"},{"match":{"useF16":true},"value":"f16"},{"match":{},"value":{"context":"fallback"}}],"bytesPerElement":[{"match":{"dtype":"f16"},"value":2},{"match":{"dtype":"bf16"},"value":2},{"match":{"dtype":"f32"},"value":4},{"match":{},"value":{"context":"fallback"}}],"dtypeFromSize":[{"match":{"bytesPerElement":2},"value":"f16"},{"match":{"bytesPerElement":4},"value":"f32"},{"match":{},"value":{"context":"fallback"}}],"bytesFromDtype":[{"match":{"dtype":"f16"},"value":2},{"match":{"dtype":"bf16"},"value":2},{"match":{"dtype":"f32"},"value":4},{"match":{},"value":{"context":"fallback"}}],"matmulDtype":[{"match":{"dtype":"q5k"},"value":"q5k"},{"match":{"dtype":"w8a8"},"value":"w8a8"},{"match":{"dtype":"bf16"},"value":"bf16"},{"match":{"dtype":"f16"},"value":"f16"},{"match":{"dtype":"f32"},"value":"f32"},{"match":{"dtype":"q4k"},"value":"q4k"},{"match":{"dtype":"litert_int4"},"value":"litert_int4"},{"match":{"dtype":"w4a16"},"value":"w4a16"},{"match":{},"value":{"context":"fallback"}}],"logitsDtype":[{"match":{"logitsDtype":"f16"},"value":"f16"},{"match":{},"value":"f32"}],"kvCacheDtype":[{"match":{"forceF32":true},"value":"f32"},{"match":{"requested":"f16","useGPU":true,"hasF16":true},"value":"f16"},{"match":{"requested":"f16"},"value":"f32"},{"match":{"requested":"f32"},"value":"f32"},{"match":{},"value":"f32"}],"lmHeadChunkWeightDtype":[{"match":{"preferF16":true,"lmHeadDtype":"f16","hasF16":true},"value":"f16"},{"match":{},"value":"f32"}]},"inference/execution.rules.json":{"decodeRecorderEnabled":[{"match":{"hasDevice":true,"debug":false,"disableCommandBatching":false,"kvLayout":{"neq":"bdpa_paged"}},"value":true},{"match":{},"value":false}],"profileDecodeRecorderEnabled":[{"match":{"hasDevice":true,"debug":false,"kvLayout":{"neq":"bdpa_paged"}},"value":true},{"match":{},"value":false}],"batchDecodeEnabled":[{"match":{"batchSize":{"gt":1},"useGPU":true,"gpuSamplingAvailable":true,"disableMultiTokenDecode":{"neq":true},"disableCommandBatching":false,"isBdpaPagedLayout":false,"finitenessFallbackWindowOpen":false,"hasLinearAttentionLayers":false,"hasRangeBackedPerLayerInputs":false},"value":true},{"match":{"batchSize":{"gt":1},"useGPU":true,"gpuSamplingAvailable":true,"disableMultiTokenDecode":{"neq":true},"disableCommandBatching":false,"isBdpaPagedLayout":false,"finitenessFallbackWindowOpen":false,"hasLinearAttentionLayers":false,"hasRangeBackedPerLayerInputs":true,"selfSpeculationEnabled":false},"value":true},{"match":{"batchSize":{"gt":1},"useGPU":true,"gpuSamplingAvailable":true,"disableMultiTokenDecode":{"neq":true},"disableCommandBatching":false,"isBdpaPagedLayout":false,"finitenessFallbackWindowOpen":false,"hasLinearAttentionLayers":true,"hasRangeBackedPerLayerInputs":false},"value":true},{"match":{},"value":false}],"maxBatchDecodeTokens":[{"match":{"hasHotVocabularyBatchDecode":true},"value":1},{"match":{"hasLinearAttentionLayers":true},"value":32},{"match":{"hasGpuSplitPerLayerInputs":true,"currentSeqLen":{"gte":192}},"value":2},{"match":{"hasGpuSplitPerLayerInputs":true,"maxDecodeTokens":{"gt":16}},"value":16},{"match":{"hasGpuSplitPerLayerInputs":true},"value":8},{"match":{"modelId":{"in":["gemma-4-12b-it-text-q4k-ehf16-af16","gemma-4-12b-it-text-q4k-ehf16-hq4k-af16","gemma-4-12b-it-text-w4a16-ct-ehf16-af16"]},"activationDtype":"f16","numLayers":{"gte":48},"hiddenSize":{"gte":3840},"maxDecodeTokens":{"gt":8}},"value":8},{"match":{"numLayers":{"gte":48},"hiddenSize":{"gte":3840},"maxDecodeTokens":{"gt":16}},"value":16},{"match":{},"value":null}],"prefillRecorderChunkLayers":[{"match":{"hasGpuSplitPerLayerInputs":true,"numTokens":{"lte":32}},"value":8},{"match":{},"value":4}],"finitenessFallbackActivationDtype":[{"match":{},"value":"f32"}]},"inference/ffn.rules.json":{"activationOp":[{"match":{"hiddenActivation":"gelu"},"value":"gelu"},{"match":{},"value":"silu"}],"useFusedGateUp":[{"match":{"hasGate":true,"hasUp":true,"hasDown":true,"hasFusedWeights":false,"inputIsSupported":true,"hasLoRA":false,"dtypeMatches":true,"dtypeSupported":true,"weightDtype":"f16","activationDtype":"f16","f16BatchSupported":true},"value":true},{"match":{"hasGate":true,"hasUp":true,"hasDown":true,"hasFusedWeights":false,"inputIsSupported":true,"hasLoRA":false,"dtypeMatches":true,"dtypeSupported":true,"weightDtype":"f16","activationDtype":"f32","useLargeBatchF16F32FusedGateUp":true,"batchSize":{"gt":4}},"value":true},{"match":{"hasGate":true,"hasUp":true,"hasDown":true,"hasFusedWeights":false,"inputIsSupported":true,"hasLoRA":false,"dtypeMatches":true,"dtypeSupported":true,"weightDtype":"f16","activationDtype":"f32","batchSize":{"lte":4}},"value":true},{"match":{"hasGate":true,"hasUp":true,"hasDown":true,"hasFusedWeights":false,"inputIsSupported":true,"hasLoRA":false,"dtypeMatches":true,"dtypeSupported":true,"weightDtype":"q4k","activationDtype":"f16","hiddenSizeAligned32":true,"batchSize":{"lte":4},"useDoubleWideMlp":false},"value":true},{"match":{"hasGate":true,"hasUp":true,"hasDown":true,"hasFusedWeights":false,"inputIsSupported":true,"hasLoRA":false,"dtypeMatches":true,"dtypeSupported":true,"weightDtype":"q4k","activationDtype":"f32","hiddenSizeAligned32":true,"batchSize":{"lte":4},"useDoubleWideMlp":false},"value":true},{"match":{"hasGate":true,"hasUp":true,"hasDown":true,"hasFusedWeights":false,"inputIsSupported":true,"hasLoRA":false,"dtypeMatches":true,"dtypeSupported":true,"hasQ4KMaterialization":true,"activationDtype":"f32","hiddenSizeAligned32":true,"batchSize":{"lte":4},"useDoubleWideMlp":false},"value":true},{"match":{},"value":false}]},"inference/layer-pattern.rules.json":{"patternKind":[{"match":{"patternType":"alternating","globalPattern":"even"},"value":"alternating_even"},{"match":{"patternType":"alternating","globalPattern":"odd"},"value":"alternating_odd"},{"match":{"patternType":"every_n"},"value":"every_n"},{"match":{},"value":null}],"layerType":[{"match":{"patternKind":"alternating_even","isEven":true},"value":"full_attention"},{"match":{"patternKind":"alternating_even"},"value":"sliding_attention"},{"match":{"patternKind":"alternating_odd","isEven":false},"value":"full_attention"},{"match":{"patternKind":"alternating_odd"},"value":"sliding_attention"},{"match":{"patternKind":"every_n","isStride":true},"value":"full_attention"},{"match":{"patternKind":"every_n"},"value":"sliding_attention"}]},"inference/layer.rules.json":{"ffnMode":[{"match":{"variant":"moe"},"value":true},{"match":{"variant":"auto","canAutoMoe":true},"value":true},{"match":{},"value":false}]},"inference/moe.rules.json":{"executionProfile":[{"match":{"expertFormat":"gpt-oss"},"value":{"id":"gpt-oss-mxfp4","label":"GPT-OSS MXFP4 experts","expertExecutor":"gpt-oss","intermediateSizeSource":"architecture","requiresShaderF16":true,"routerScaleMode":"none","topkRouteExecutor":null,"supportsPreparedDecode":false,"vendorProfile":{"kind":"rule","domain":"kernels","group":"moeGptoss","name":"vendorQuirkProfile"},"kernelPathProfileResolver":"gpt-oss","kernelRuleModelType":"gpt-oss","shapePolicy":{"kind":"rule","domain":"kernels","group":"moeGptoss","name":"shapePolicy"}}},{"match":{"expertFormat":"mixtral"},"value":{"id":"mixtral-dense","label":"Mixtral dense experts","expertExecutor":"mixtral","intermediateSizeSource":"architecture","requiresShaderF16":false,"routerScaleMode":"none","topkRouteExecutor":null,"supportsPreparedDecode":false,"vendorProfile":{"kind":"rule","domain":"kernels","group":"moeMixtral","name":"vendorQuirkProfile"},"kernelPathProfileResolver":"mixtral","kernelRuleModelType":"mixtral","shapePolicy":null}},{"match":{"modelType":"diffusion_gemma","expertFormat":"gemma4"},"value":{"id":"diffusion-gemma-packed","label":"DiffusionGemma packed experts","expertExecutor":"gemma4-packed","intermediateSizeSource":"expert","requiresShaderF16":false,"routerScaleMode":"required","topkRouteExecutor":"gemma4-route","supportsPreparedDecode":false,"vendorProfile":{"kind":"static","value":{"preferVec4Dequant":false,"dequantTileShape":null,"routerWorkgroupSize":256,"maxTokensPerExpertScale":1}},"kernelPathProfileResolver":null,"kernelRuleModelType":null,"shapePolicy":null,"matmulRoles":{"gateUp":"moe_gate_up","down":"moe_down"}}},{"match":{"expertFormat":"gemma4"},"value":{"id":"gemma4-packed","label":"Gemma packed experts","expertExecutor":"gemma4-packed","intermediateSizeSource":"expert","requiresShaderF16":false,"routerScaleMode":"optional","topkRouteExecutor":"gemma4-route","supportsPreparedDecode":false,"vendorProfile":{"kind":"static","value":{"preferVec4Dequant":false,"dequantTileShape":null,"routerWorkgroupSize":256,"maxTokensPerExpertScale":1}},"kernelPathProfileResolver":null,"kernelRuleModelType":null,"shapePolicy":null,"matmulRoles":{"gateUp":"moe_gate_up","down":"moe_down"}}},{"match":{"expertFormat":"qwen3_5"},"value":{"id":"qwen35-packed","label":"Qwen3.5 packed experts","expertExecutor":"qwen35-packed","intermediateSizeSource":"expert","requiresShaderF16":false,"routerScaleMode":"none","topkRouteExecutor":"qwen35-route","supportsPreparedDecode":true,"vendorProfile":{"kind":"static","value":{"preferVec4Dequant":false,"dequantTileShape":null,"routerWorkgroupSize":256,"maxTokensPerExpertScale":1}},"kernelPathProfileResolver":null,"kernelRuleModelType":null,"shapePolicy":null,"matmulRoles":{"gateUp":"ffn_gate","down":"ffn_down"},"requiresNormalizedTopK":true}}],"biasAddCode":[{"match":{"logitsDtype":"f16","biasDtype":"f16"},"value":{"shaderFile":"moe_router_bias_add_f16_f16.wgsl"}},{"match":{"logitsDtype":"f16"},"value":{"shaderFile":"moe_router_bias_add_f16_f32.wgsl"}},{"match":{"biasDtype":"f16"},"value":{"shaderFile":"moe_router_bias_add_f32_f16.wgsl"}},{"match":{},"value":{"shaderFile":"moe_router_bias_add_f32_f32.wgsl"}}],"qwenRouteWeightDtype":[{"match":{"dtype":"q4k"},"value":"q4k"},{"match":{"dtype":"q4_0"},"value":"q4_0"},{"match":{"dtype":"q4_1"},"value":"q4_1"},{"match":{"dtype":"q8_0"},"value":"q8_0"},{"match":{"dtype":"q6k"},"value":"q6k"}]},"kernels/attention.rules.json":{"indexedStorage":[{"match":{"kvDtype":"f16"},"value":{"variant":"f16kv","bytesPerElement":2}},{"match":{"kvDtype":"f32"},"value":{"variant":"f32kv","bytesPerElement":4}}],"tier":[{"match":{"canSubgroup":true},"value":"subgroup"},{"match":{"canLarge":true},"value":"tiled_large"},{"match":{"canSmall":true},"value":"tiled_small"},{"match":{"isDecode":true},"value":"streaming"},{"match":{},"value":"streaming"}],"phase":[{"match":{"isDecode":true},"value":"decode"},{"match":{},"value":"prefill"}],"suffix":[{"match":{"useF16":true},"value":"_f16"},{"match":{"useF16KV":true},"value":"_f16kv"},{"match":{},"value":""}],"chunkedVariant":[{"match":{"useF16":true},"value":"decode_chunked_f16"},{"match":{},"value":"decode_chunked_f16kv"}],"pagedVariant":[{"match":{"useF16":true},"value":"decode_paged_f16"},{"match":{},"value":"decode_paged_f16kv"}],"optimizedVariant":[{"match":{"useF16":true},"value":"decode_online_f16"},{"match":{},"value":"decode_online_f16kv"}],"tieredVariant":[{"match":{"useF16":true},"value":"decode_tiered_f16"},{"match":{},"value":"decode_tiered_f16kv"}],"tieredQuantVariant":[{"match":{"mode":"turboquant"},"value":"decode_tiered_turboquant_f16kv"},{"match":{"mode":"turboquant_prod"},"value":"decode_tiered_turboquant_prod_f16kv"},{"match":{"mode":"int4"},"value":"decode_tiered_int4_f16kv"},{"match":{"mode":"int8"},"value":"decode_tiered_int8_f16kv"},{"match":{},"value":"decode_tiered_int8_f16kv"}],"contiguousQuantVariant":[{"match":{"mode":"turboquant"},"value":"decode_contiguous_turboquant_f16kv"},{"match":{"mode":"turboquant_prod"},"value":"decode_contiguous_turboquant_prod_f16kv"},{"match":{},"value":"decode_contiguous_turboquant_f16kv"}],"variant":[{"match":{"canUseDecodeOptimized":true},"value":{"context":"optimizedVariant"}},{"match":{"platformId":{"in":["apple-m2","apple-m3","amd-rdna3","nvidia-rtx30","nvidia-rtx40"]},"isDecode":true,"tier":"subgroup","canUseDecodeSubgroup":true},"value":"decode_subgroup"},{"match":{"isPaged":true,"isDecode":true,"canUseChunked":true},"value":{"context":"pagedVariant"}},{"match":{"tier":"subgroup","useF16KV":true,"canUseChunked":true},"value":{"context":"chunkedVariant"}},{"match":{"tier":"subgroup","useF16KV":true},"value":{"template":"prefill_streaming{suffix}"}},{"match":{"tier":"subgroup","canUseDecodeSubgroup":true},"value":"decode_subgroup"},{"match":{"tier":"subgroup"},"value":"prefill_streaming"},{"match":{"tier":"tiled_large"},"value":{"template":"{base}{suffix}"}},{"match":{"tier":"tiled_small"},"value":{"template":"prefill_small{suffix}"}},{"match":{"tier":"streaming","canUseChunked":true},"value":{"context":"chunkedVariant"}},{"match":{"tier":"streaming"},"value":{"template":"prefill_streaming{suffix}"}},{"match":{},"value":{"template":"prefill_streaming{suffix}"}}]},"kernels/conv2d.rules.json":{"variant":[{"match":{"isF16":true},"value":"default_f16"},{"match":{},"value":"default"}]},"kernels/depthwise-conv2d.rules.json":{"variant":[{"match":{"isF16":true},"value":"default_f16"},{"match":{},"value":"default"}]},"kernels/dequant.rules.json":{"variant":[{"match":{"hasSubgroups":true,"wantsF16Out":true,"useVec4":true},"value":"subgroup_vec4_f16out"},{"match":{"hasSubgroups":true,"wantsF16Out":true},"value":"subgroup_f16out"},{"match":{"hasSubgroups":true,"useVec4":true},"value":"subgroup_vec4"},{"match":{"hasSubgroups":true},"value":"subgroup"},{"match":{"wantsF16Out":true,"useVec4":true},"value":"subgroup_vec4_f16out"},{"match":{"wantsF16Out":true},"value":"subgroup_f16out"},{"match":{"useVec4":true},"value":"shared"},{"match":{},"value":"shared"}],"rowwiseVariant":[{"match":{"wantsF16Out":true},"value":"f16_rowwise"},{"match":{},"value":"f32_rowwise"}],"mxfp4ExpertVariant":[{"match":{"modelType":"gpt-oss","hasF16":true,"hasSubgroups":true,"outputDtype":"f16","dequantTileShape":"vec4","groupSize":32},"value":"mxfp4_expert_fused_f16"},{"match":{"modelType":"gpt-oss","hasF16":true,"outputDtype":"f16"},"value":"mxfp4_expert_f16"},{"match":{"modelType":"gpt-oss"},"value":"mxfp4_expert"},{"match":{"outputDtype":"f16"},"value":"mxfp4_expert_f16"},{"match":{},"value":"mxfp4_expert"}]},"kernels/energy.rules.json":{"evalVariant":[{"match":{"isF16":true},"value":"eval_f16"},{"match":{},"value":"eval"}],"updateVariant":[{"match":{"isF16":true},"value":"update_f16"},{"match":{},"value":"update"}],"quintelUpdateVariant":[{"match":{"isF16":true},"value":"quintel_update_f16"},{"match":{},"value":"quintel_update"}],"quintelReduceVariant":[{"match":{"isF16":true},"value":"quintel_reduce_f16"},{"match":{},"value":"quintel_reduce"}],"quintelGradVariant":[{"match":{"isF16":true},"value":"quintel_grad_f16"},{"match":{},"value":"quintel_grad"}]},"kernels/fused-ffn.rules.json":{"variant":[{"match":{"isQ4K":true,"fusedAllowed":true,"hiddenSubblockAligned":true,"hasF16":true,"useF16Input":true,"batchSize":{"gt":1}},"value":"q4k_batched_f16a"},{"match":{"isQ4K":true,"fusedAllowed":true,"hiddenSubblockAligned":true,"hasF16":true,"useF16Input":true},"value":"q4k_f16a"},{"match":{"isQ4K":true,"fusedAllowed":true,"hiddenSubblockAligned":true,"batchSize":{"gt":1}},"value":"q4k_batched"},{"match":{"isQ4K":true,"fusedAllowed":true,"hiddenSubblockAligned":true},"value":"q4k"},{"match":{"weightDtype":"f16","hasF16":true,"useF16Input":true,"batchSize":{"gt":1}},"value":"f16_native_batched"},{"match":{"weightDtype":"f16","hasF16":true,"useF16Input":true},"value":"f16_native"},{"match":{"weightDtype":"f16","batchSize":{"gt":1}},"value":"f16_batched"},{"match":{"weightDtype":"f16"},"value":"f16"},{"match":{"batchSize":{"gt":1}},"value":"batched"},{"match":{"useMultiOutput":true},"value":"multi"},{"match":{},"value":"default"}]},"kernels/fused-matmul-residual.rules.json":{"variant":[{"match":{"dtype":"f16"},"value":"f16"},{"match":{},"value":"default"}]},"kernels/fused-matmul-rmsnorm.rules.json":{"variant":[{"match":{"isSmall":true,"isF16":true},"value":"small_f16"},{"match":{"isSmall":true},"value":"small"},{"match":{"isF16":true},"value":"medium_f16"},{"match":{},"value":"medium"}]},"kernels/gated-delta-fused-decode.rules.json":{"scalarVariant":[{"match":{"inputDtype":"f32","normGateActivation":"silu","stateComponents":1,"useRegisterDecode":true},"value":"register_decode"},{"match":{"inputDtype":"f32","normGateActivation":"silu","stateComponents":2},"value":"paired_default"},{"match":{"inputDtype":"f16","normGateActivation":"silu","stateComponents":2},"value":"paired_default_f16"},{"match":{"inputDtype":"f32","normGateActivation":"sigmoid","stateComponents":2},"value":"paired_sigmoid_gate"},{"match":{"inputDtype":"f16","normGateActivation":"sigmoid","stateComponents":2},"value":"paired_sigmoid_gate_f16"},{"match":{"inputDtype":"f32","normGateActivation":"silu"},"value":"default"},{"match":{"inputDtype":"f16","normGateActivation":"silu"},"value":"default_f16"},{"match":{"inputDtype":"f32","normGateActivation":"sigmoid"},"value":"sigmoid_gate"},{"match":{"inputDtype":"f16","normGateActivation":"sigmoid"},"value":"sigmoid_gate_f16"}]},"kernels/gated-delta-recurrent.rules.json":{"scalarVariant":[{"match":{"sourceLayout":"gguf-v1","inputDtype":"f32","normGateActivation":"silu","useRegisterPrefill":true},"value":"gguf_register_prefill"},{"match":{"sourceLayout":"gguf-v1","inputDtype":"f32","normGateActivation":"silu"},"value":"gguf_f32"},{"match":{"inputDtype":"f32","normGateActivation":"silu","useRegisterPrefill":true},"value":"register_prefill"},{"match":{"inputDtype":"f32","normGateActivation":"silu"},"value":"default"},{"match":{"inputDtype":"f16","normGateActivation":"silu"},"value":"default_f16"},{"match":{"inputDtype":"f32","normGateActivation":"sigmoid"},"value":"sigmoid_gate"},{"match":{"inputDtype":"f16","normGateActivation":"sigmoid"},"value":"sigmoid_gate_f16"}],"pairedGateVariant":[{"match":{"normGateActivation":"silu"},"value":"paired_gate"},{"match":{"normGateActivation":"sigmoid"},"value":"paired_gate_sigmoid"}],"pairedClosureAnchorVariant":[{"match":{"normGateActivation":"silu"},"value":"paired"},{"match":{"normGateActivation":"sigmoid"},"value":null}]},"kernels/gather.rules.json":{"splitConfig":[{"match":{"forcedSectionCount":4},"value":{"op":"gather_split4","label":"gather_split4","sectionCount":4,"variants":{"f16":"f16_vec4_f16_out","f32":"f16_vec4_f32_out"}}},{"match":{"forcedSectionCount":8},"value":{"op":"gather_split8","label":"gather_split8","sectionCount":8,"variants":{"f16":"f16_vec4_f16_out","f32":"f16_vec4_f32_out"}}},{"match":{"outputDtype":"f32","sectionCount":{"lte":4}},"value":{"op":"gather_split4","label":"gather_split4","sectionCount":4,"variants":{"f16":"f16_vec4_f16_out","f32":"f16_vec4_f32_out"}}},{"match":{"outputDtype":"f32","sectionCount":{"lte":8}},"value":{"op":"gather_split8","label":"gather_split8","sectionCount":8,"variants":{"f16":"f16_vec4_f16_out","f32":"f16_vec4_f32_out"}}},{"match":{"outputDtype":"f16","sectionCount":{"lte":4}},"value":{"op":"gather_split4","label":"gather_split4","sectionCount":4,"variants":{"f16":"f16_vec4_f16_out","f32":"f16_vec4_f32_out"}}},{"match":{"outputDtype":"f16","sectionCount":{"lte":8}},"value":{"op":"gather_split8","label":"gather_split8","sectionCount":8,"variants":{"f16":"f16_vec4_f16_out","f32":"f16_vec4_f32_out"}}}],"variant":[{"match":{"useBF16Input":true,"useF16Output":false},"value":"bf16"},{"match":{"useLiteRTInt4Input":true,"useF16Output":false,"useVec4":true},"value":"litert_int4_vec4_f32_out"},{"match":{"useLiteRTInt4Input":true,"useF16Output":true,"useVec4":true},"value":"litert_int4_vec4_f16_out"},{"match":{"useF16Input":true,"useF16Output":true,"useVec4":true},"value":"f16_vec4_f16_out"},{"match":{"useF16Input":true,"useF16Output":true},"value":"f16_f16_out"},{"match":{"useF16Input":true,"useVec4":true},"value":"f16_vec4"},{"match":{"useF16Input":true},"value":"f16"},{"match":{"useF16Output":true,"useVec4":true},"value":"vec4_f16_out"},{"match":{"useF16Output":true},"value":"f16_out"},{"match":{"useVec4":true},"value":"vec4"},{"match":{},"value":"default"}],"q40Variant":[{"match":{"weightDtype":"q4_0","outputDtype":"f32"},"value":"q4_0"},{"match":{"weightDtype":"q4_1","outputDtype":"f32"},"value":"q4_1"},{"match":{"weightDtype":"q5_0","outputDtype":"f32"},"value":"q5_0"},{"match":{"weightDtype":"q8_0","outputDtype":"f32"},"value":"q8_0"},{"match":{"weightDtype":"q6k","outputDtype":"f32"},"value":"q6k"}]},"kernels/gelu.rules.json":{"variant":[{"match":{"isF16":true},"value":"gelu_f16"},{"match":{},"value":"gelu"}],"overrides":[{"match":{"useRowsplit":true},"value":{"USE_ROWSPLIT":true}},{"match":{"hasGate":true},"value":{"HAS_GATE":true}},{"match":{},"value":{}}]},"kernels/grouped-pointwise-conv2d.rules.json":{"variant":[{"match":{"isF16":true},"value":"default_f16"},{"match":{},"value":"default"}]},"kernels/groupnorm.rules.json":{"statsVariant":[{"match":{"isF16":true},"value":"stats_f16"},{"match":{},"value":"stats"}],"applyVariant":[{"match":{"isF16":true},"value":"apply_f16"},{"match":{},"value":"apply"}]},"kernels/kv_quantize.rules.json":{"variant":[{"match":{"mode":"turboquant"},"value":"turboquant"},{"match":{"mode":"turboquant_prod"},"value":"turboquant_prod"},{"match":{"mode":"int4"},"value":"int4"},{"match":{"mode":"int8"},"value":"int8"},{"match":{},"value":"int8"}]},"kernels/layernorm.rules.json":{"variant":[{"match":{"isF16":true},"value":"default_f16"},{"match":{},"value":"default"}]},"kernels/linear-attention.rules.json":{"variant":[{"match":{"isF16":true},"value":"default_f16"},{"match":{},"value":"default"}],"stateComponents":[{"match":{"precision":"f32"},"value":1},{"match":{"precision":"two-f32"},"value":2}]},"kernels/lm-head-argmax.rules.json":{"phase1Variant":[{"match":{"weightDtype":"q4k"},"value":"phase1_q4k_f32a"},{"match":{"weightDtype":"f16"},"value":"phase1_f16w_f32a"}],"phase2Variant":[{"match":{"weightDtype":"q4k"},"value":"phase2_q4k"},{"match":{},"value":"phase2"}]},"kernels/matmul.rules.json":{"fp8Variant":[{"match":{"weightDtype":"fp8e4"},"value":"fp8_e4m3fn_f32"},{"match":{"weightDtype":"fp8e5"},"value":"fp8_e5m2_f32"}],"litertInt4FusedVariant":[{"match":{"activationDtype":"f16","outputDtype":"f16","transposeB":true},"value":"litert_int4_multicol_f16a"},{"match":{"activationDtype":"f16","outputDtype":"f32","transposeB":true},"value":"litert_int4_multicol_f16a_f32out"},{"match":{"activationDtype":"f32","outputDtype":"f32","transposeB":true},"value":"litert_int4_multicol_f32a_f32out"},{"match":{},"value":null}],"w4a16FusedVariant":[{"match":{"activationDtype":"f16","outputDtype":"f16","transposeB":true,"isPrefill":true},"value":"w4a16_batched_f16a"},{"match":{"activationDtype":"f16","outputDtype":"f32","transposeB":true,"isPrefill":true},"value":"w4a16_batched_f16a_f32out"},{"match":{"activationDtype":"f16","outputDtype":"f16","transposeB":true},"value":"w4a16_multicol_f16a"},{"match":{"activationDtype":"f16","outputDtype":"f32","transposeB":true},"value":"w4a16_multicol_f16a_f32out"},{"match":{},"value":null}],"q4kFusedVariant":[{"match":{"useF16A":true,"isM1":true},"value":"q4_fused_multicol_f16a"},{"match":{"useF16A":true},"value":"q4_fused_batched_f16a"},{"match":{"useF16Out":true,"isM1":true},"value":"q4_fused_multicol_f16"},{"match":{"useF16Out":true},"value":"q4_fused_batched_f16"},{"match":{"isM1":true},"value":"q4_fused_multicol"},{"match":{},"value":"q4_fused_batched"}],"matmulKernel":[{"match":{"useF16Matmul":true,"useTiled":true},"value":"f16_tiled"},{"match":{"useF16Matmul":true,"useVec4":true},"value":"f16_vec4"},{"match":{"useF16Matmul":true},"value":"f16"},{"match":{"useF16wF32a":true,"useF16wF32aTiled":true},"value":"f16w_f32a_tiled"},{"match":{"useF16wF32a":true},"value":"f16w_f32a"},{"match":{},"value":"f32"}],"gemvPathVariant":[{"match":{"useF16GemvPath":true,"useMulticol":true},"value":"gemv_subgroup_multicol_f16a"},{"match":{"useF16GemvPath":true},"value":"gemv_subgroup_f16a"},{"match":{"useF32GemvPath":true,"useMulticol":true},"value":"gemv_subgroup_multicol"},{"match":{"useF32GemvPath":true},"value":"gemv_subgroup"},{"match":{},"value":{"context":"pathVariant"}}],"gemvVariant":[{"match":{"platformId":{"in":["apple-m2","apple-m3","amd-rdna3"]},"hasSubgroups":true,"useF16Gemv":true},"value":"gemv_subgroup_f16a"},{"match":{"platformId":{"in":["apple-m2","apple-m3","amd-rdna3"]},"hasSubgroups":true,"useF32Gemv":true},"value":"gemv_subgroup"},{"match":{"hasSubgroups":true,"useF16Gemv":true,"useVec4":true,"useMulticol":false},"value":"gemv_subgroup_vec4_f16a"},{"match":{"hasSubgroups":true,"useF32Gemv":true,"useVec4":true,"useMulticol":false},"value":"gemv_subgroup_vec4"},{"match":{"hasSubgroups":true,"useF16Gemv":true,"useMulticol":true},"value":"gemv_subgroup_multicol_f16a"},{"match":{"hasSubgroups":true,"useF16Gemv":true},"value":"gemv_subgroup_f16a"},{"match":{"hasSubgroups":true,"useF32Gemv":true,"useMulticol":true},"value":"gemv_subgroup_multicol"},{"match":{"hasSubgroups":true,"useF32Gemv":true},"value":"gemv_subgroup"},{"match":{"useF16Gemv":true},"value":"gemv_f16a"},{"match":{"useF32Gemv":true},"value":"gemv"},{"match":{},"value":"f32"}],"matmulSelection":[{"match":{"useLiteRTInt4Fused":true},"value":{"variant":{"context":"litertInt4Variant"},"useQ4KFused":false,"useGemv":false,"useLiteRTInt4Fused":true}},{"match":{"useW4A16Fused":true},"value":{"variant":{"context":"w4a16Variant"},"useQ4KFused":false,"useGemv":false,"useLiteRTInt4Fused":false,"useW4A16Fused":true}},{"match":{"isQ4K":true,"hasSubgroups":true,"fusedAllowed":true},"value":{"variant":{"context":"q4kVariant"},"useQ4KFused":true,"useGemv":false}},{"match":{"useGemv":true},"value":{"variant":{"context":"gemvVariant"},"useQ4KFused":false,"useGemv":true}},{"match":{},"value":{"variant":{"context":"matmulVariant"},"useQ4KFused":false,"useGemv":false}}],"preferredWeightDtype":[{"match":{"variantWeightDtype":"f16","hasQ4KMaterialization":true,"hasSubgroups":true},"value":"q4k"},{"match":{},"value":{"context":"variantWeightDtype"}}],"weightDtypeMismatchPolicy":[{"match":{"actualWeightDtype":{"in":["f16","f32","bf16"]},"requiredWeightDtype":"q4_0"},"value":"fallthrough"},{"match":{"actualWeightDtype":"f16","requiredWeightDtype":"q4k"},"value":"fallthrough"},{"match":{"actualWeightDtype":"q4k","requiredWeightDtype":"f16","hasSubgroups":true},"value":"fallthrough"},{"match":{"actualWeightDtype":"q4k","requiredWeightDtype":"f32","hasSubgroups":true},"value":"fallthrough"},{"match":{"actualWeightDtype":"litert_int4","requiredWeightDtype":"f16"},"value":"fallthrough"},{"match":{"actualWeightDtype":"litert_int4","requiredWeightDtype":"f32"},"value":"fallthrough"},{"match":{"actualWeightDtype":"w4a16","requiredWeightDtype":"f16"},"value":"fallthrough"},{"match":{"actualWeightDtype":"w4a16","requiredWeightDtype":"f32"},"value":"fallthrough"},{"match":{},"value":"reject"}],"q4kMaterializationMode":[{"match":{"hasFusedProjections":true,"hasDenseProjections":true},"value":"mixed"},{"match":{"hasFusedProjections":true},"value":"fused"},{"match":{},"value":"dense"}],"phase":[{"match":{"isDecode":true},"value":"decode"},{"match":{},"value":"prefill"}],"pairedVariant":[{"match":{"weightDtype":"f32","scalarOutput":false},"value":"paired_f32"},{"match":{"weightDtype":"f32","scalarOutput":true},"value":"paired_f32_scalar"},{"match":{"weightDtype":"f16","scalarOutput":false},"value":"paired_f16"},{"match":{"weightDtype":"f16","scalarOutput":true},"value":"paired_f16_scalar"},{"match":{"weightDtype":"q4k","scalarOutput":false},"value":"paired_q4k"},{"match":{"weightDtype":"q4k","scalarOutput":true},"value":"paired_q4k_scalar"}],"q40Variant":[{"match":{"weightDtype":"q5k","M":1},"value":"q5k_gemv"},{"match":{"weightDtype":"q5k"},"value":"q5k_prefill"},{"match":{"weightDtype":"q4_0","M":1},"value":"q4_0_gemv"},{"match":{"weightDtype":"q4_1","M":1},"value":"q4_1_gemv"},{"match":{"weightDtype":"q5_0","M":1},"value":"q5_0_gemv"},{"match":{"weightDtype":"q8_0","M":1},"value":"q8_0_gemv"},{"match":{"weightDtype":"q6k","M":1},"value":"q6k_gemv"},{"match":{"weightDtype":"q4_0"},"value":"q4_0_prefill"},{"match":{"weightDtype":"q4_1"},"value":"q4_1_prefill"},{"match":{"weightDtype":"q5_0"},"value":"q5_0_prefill"},{"match":{"weightDtype":"q8_0"},"value":"q8_0_prefill"},{"match":{"weightDtype":"q6k"},"value":"q6k_prefill"}],"routeQ4Variant":[{"match":{"weightDtype":"q4_0","split":true},"value":"q4_0_split_f32"},{"match":{"weightDtype":"q4_1","split":true},"value":"q4_1_split_f32"},{"match":{"weightDtype":"q8_0","split":true},"value":"q8_0_split_f32"},{"match":{"weightDtype":"q6k","split":true},"value":"q6k_split_f32"},{"match":{"weightDtype":"q4_0"},"value":"q4_0_f32"},{"match":{"weightDtype":"q4_1"},"value":"q4_1_f32"},{"match":{"weightDtype":"q8_0"},"value":"q8_0_f32"},{"match":{"weightDtype":"q6k"},"value":"q6k_f32"},{"match":{"weightDtype":"q4k"},"value":"q4k_f32"}],"denseDecodeCandidate":[{"match":{"M":1,"activationDtype":"f32","outputDtype":"f32","transposeB":true,"hasSubgroups":true,"sourceVariant":"f32","weightDtype":"f32","hasSubgroupId":true},"value":{"variant":"gemv_f32_subgroup","reason":"explicit-candidate:single-row-F32-storage-subgroup-GEMV"}},{"match":{"M":1,"activationDtype":"f32","outputDtype":"f32","transposeB":true,"hasSubgroups":true,"sourceVariant":"f16w_f32a","weightDtype":"f16","hasF16":true},"value":{"variant":"gemv_subgroup_multicol","reason":"explicit-candidate:single-row-F16-storage-F32-activation-GEMV"}},{"match":{},"value":{"variant":null,"reason":"retain-declared-kernel:shape-storage-or-capability-not-qualified"}}]},"kernels/modulate.rules.json":{"variant":[{"match":{"inputDtype":"f16","modDtype":"f16"},"value":"f16"},{"match":{},"value":"default"}]},"kernels/moe.rules.gptoss.json":{"routerTopKVariant":[{"match":{"modelType":"gpt-oss","hasF16":true,"hasSubgroups":true,"inputDtype":"f16","weightsDtype":"f16"},"value":"gptoss_router_topk"},{"match":{"modelType":"gpt-oss","hasF16":true,"inputDtype":"f16","weightsDtype":"f16"},"value":"fused_f16_w16"},{"match":{"modelType":"gpt-oss","inputDtype":"f16"},"value":"fused_f16"}],"vendorQuirkProfile":[{"match":{"vendor":{"contains":["intel","amd"]}},"value":{"preferVec4Dequant":false,"dequantTileShape":"scalar","routerWorkgroupSize":128,"maxTokensPerExpertScale":0.85}},{"match":{"vendor":{"contains":["nvidia","apple","qualcomm"]}},"value":{"preferVec4Dequant":true,"dequantTileShape":"vec4","routerWorkgroupSize":256,"maxTokensPerExpertScale":1}},{"match":{},"value":{"preferVec4Dequant":false,"dequantTileShape":"scalar","routerWorkgroupSize":128,"maxTokensPerExpertScale":0.9}}],"dequantVariant":[{"match":{"modelType":"gpt-oss","outputDtype":"f16","hasF16":true,"hasSubgroups":true,"dequantTileShape":"vec4","groupSize":32},"value":"mxfp4_expert_fused_f16"},{"match":{"modelType":"gpt-oss","outputDtype":"f16","hasF16":true},"value":"mxfp4_expert_f16"},{"match":{"modelType":"gpt-oss"},"value":"mxfp4_expert"}],"shapePolicy":[{"match":{"modelType":"gpt-oss"},"value":{"hiddenSizeDivisor":32,"intermediateSizeDivisor":32,"groupSize":32,"gateUpRowsplit":true}}]},"kernels/moe.rules.json":{"variantSuffix":[{"match":{"useF16":true},"value":"_f16"},{"match":{},"value":""}],"scatterAddVariant":[{"match":{"outputDtype":"f16","weightsDtype":"f16","hasExpertScale":true},"value":"dynamic_f16_w16_expert_scale"},{"match":{"outputDtype":"f16","hasExpertScale":true},"value":"dynamic_f16_expert_scale"},{"match":{"hasExpertScale":true},"value":"dynamic_expert_scale"},{"match":{"outputDtype":"f16","weightsDtype":"f16"},"value":"dynamic_f16_w16"},{"match":{"outputDtype":"f16"},"value":"dynamic_f16"},{"match":{},"value":"dynamic"}]},"kernels/moe.rules.mixtral.json":{"vendorQuirkProfile":[{"match":{"vendor":{"contains":["intel","amd"]}},"value":{"preferVec4Dequant":false,"dequantTileShape":"scalar","routerWorkgroupSize":128,"maxTokensPerExpertScale":0.85}},{"match":{"vendor":{"contains":["nvidia","apple","qualcomm"]}},"value":{"preferVec4Dequant":false,"dequantTileShape":"scalar","routerWorkgroupSize":256,"maxTokensPerExpertScale":1}},{"match":{},"value":{"preferVec4Dequant":false,"dequantTileShape":"scalar","routerWorkgroupSize":128,"maxTokensPerExpertScale":1}}],"routerTopKVariant":[{"match":{"modelType":"mixtral","hasF16":true,"hasSubgroups":true,"routerDtype":"f32"},"value":"softmax_topk_f32_subgroup"},{"match":{"modelType":"mixtral","routerDtype":"f32"},"value":"softmax_topk_f32"},{"match":{"modelType":"mixtral"},"value":"softmax_topk_f32"}],"dequantVariant":[{"match":{"modelType":"mixtral","weightsDtype":"q4k","hasF16":true,"hasSubgroups":true,"outputDtype":"f32"},"value":"q4k_expert_dequant_f32_subgroup"},{"match":{"modelType":"mixtral","weightsDtype":"q4k","outputDtype":"f16","hasF16":true},"value":"q4k_expert_dequant_f16"},{"match":{"modelType":"mixtral","weightsDtype":"q4k"},"value":"q4k_expert_dequant_f32"},{"match":{"modelType":"mixtral","weightsDtype":"f16","outputDtype":"f16","hasF16":true},"value":"f16_expert_passthrough"},{"match":{"modelType":"mixtral"},"value":"f16_expert_upcast_f32"}]},"kernels/pixel_shuffle.rules.json":{"variant":[{"match":{"dtype":"f16"},"value":"f16"},{"match":{},"value":"default"}]},"kernels/relu.rules.json":{"variant":[{"match":{"dtype":"f16"},"value":"default_f16"},{"match":{},"value":"default"}]},"kernels/rep-penalty.rules.json":{"variant":[{"match":{"useF16":true},"value":"default_f16"},{"match":{},"value":"default"}]},"kernels/repeat-channels.rules.json":{"variant":[{"match":{"dtype":"f16"},"value":"default_f16"},{"match":{},"value":"default"}]},"kernels/residual.rules.json":{"residualVariant":[{"match":{"useVec4":true,"outputDtype":"f16"},"value":"vec4_f16"},{"match":{"useVec4":true},"value":"vec4"},{"match":{"outputDtype":"f16"},"value":"default_f16"},{"match":{},"value":"default"}],"biasAddVariant":[{"match":{"dataDtype":"f16","biasDtype":"f16"},"value":"f16"},{"match":{},"value":"default"}]},"kernels/rmsnorm-qk.rules.json":{"variant":[{"match":{"isF16":true},"value":"default_f16"},{"match":{},"value":"default"}]},"kernels/rmsnorm.rules.json":{"variant":[{"match":{"isF16":true,"isSmall":true},"value":"small_f16"},{"match":{"isF16":true},"value":"default_f16"},{"match":{"residual":true},"value":"residual"},{"match":{"hasSubgroups":true,"isSmall":true},"value":"small_subgroup"},{"match":{"hasSubgroups":true},"value":"subgroup"},{"match":{"isSmall":true},"value":"small"},{"match":{},"value":"default"}],"statsVariant":[{"match":{"canUseSubgroups":true},"value":"subgroups"},{"match":{},"value":"workgroup"}]},"kernels/rope-qk.rules.json":{"variant":[{"match":{"precision":"two-f32"},"value":"paired"},{"match":{"useF16":true},"value":"default_f16"},{"match":{},"value":"default"}]},"kernels/rope.rules.json":{"variant":[{"match":{"useF16":true},"value":"default_f16"},{"match":{},"value":"default"}]},"kernels/sample.rules.json":{"greedy":[{"match":{"temperature":0},"value":true},{"match":{"topK":1},"value":true},{"match":{"belowThreshold":true},"value":true},{"match":{},"value":false}],"suffix":[{"match":{"useF16":true},"value":"_f16"},{"match":{},"value":""}]},"kernels/scale.rules.json":{"variant":[{"match":{"isF16":true,"inplace":true},"value":"inplace_f16"},{"match":{"isF16":true},"value":"default_f16"},{"match":{"inplace":true},"value":"inplace"},{"match":{},"value":"default"}]},"kernels/silu.rules.json":{"variant":[{"match":{"isF16":true},"value":"default_f16"},{"match":{},"value":"default"}],"overrides":[{"match":{"useRowsplit":true},"value":{"USE_ROWSPLIT":true}},{"match":{"useSplit":true},"value":{"USE_SPLIT":true}},{"match":{"hasGate":true,"useVec4":true},"value":{"HAS_GATE":true,"USE_VEC4":true}},{"match":{"hasGate":true},"value":{"HAS_GATE":true}},{"match":{"useVec4":true},"value":{"USE_VEC4":true}},{"match":{},"value":{}}],"activationOp":[{"match":{"activation":"gelu"},"value":"gelu"},{"match":{},"value":"silu"}],"swigluRowsplitBiasVariant":[{"match":{"isF16":true},"value":"rowsplit_bias_f16"},{"match":{},"value":"rowsplit_bias"}],"pairedVariant":[{"match":{"operation":"scale","inplace":true},"value":"scale_inplace"},{"match":{"operation":"add"},"value":"add"},{"match":{"operation":"scale"},"value":"scale"},{"match":{"operation":"multiply"},"value":"multiply"},{"match":{"operation":"silu"},"value":"silu"},{"match":{"operation":"sigmoid"},"value":"sigmoid"},{"match":{"operation":"silu_unary"},"value":"silu_unary"}]},"kernels/softmax.rules.json":{"variant":[{"match":{"hasSubgroups":true,"isSmall":true},"value":"small_subgroup"},{"match":{"hasSubgroups":true},"value":"subgroup"},{"match":{"isSmall":true},"value":"small"},{"match":{},"value":"default"}],"topkVariant":[{"match":{"modelType":"gpt-oss","hasF16":true,"hasSubgroups":true,"inputDtype":"f16","weightsDtype":"f16"},"value":"gptoss_router_topk"},{"match":{"modelType":"mixtral","inputDtype":"f16","weightsDtype":"f16"},"value":"fused_f16_w16"},{"match":{"modelType":"mixtral"},"value":"fused"},{"match":{"inputDtype":"f16","weightsDtype":"f16"},"value":"fused_f16_w16"},{"match":{"inputDtype":"f16"},"value":"fused_f16"},{"match":{},"value":"fused_ranked"}]},"kernels/split-qg.rules.json":{"variant":[{"match":{"precision":"two-f32"},"value":"paired"},{"match":{"outputDtype":"f16"},"value":"f16"},{"match":{},"value":"default"}]},"kernels/split-qkv.rules.json":{"variant":[{"match":{"precision":"two-f32"},"value":"paired"},{"match":{"outputDtype":"f16"},"value":"f16"},{"match":{},"value":"default"}]},"kernels/upsample2d.rules.json":{"variant":[{"match":{"isF16":true},"value":"default_f16"},{"match":{},"value":"default"}]},"kernels/vision-average-pool.rules.json":{"variant":[{"match":{"inputDtype":"f32"},"value":"default"}]},"kernels/vision-patch-embed.rules.json":{"variant":[{"match":{"weightDtype":"f16"},"value":"f16w"},{"match":{"weightDtype":"f32"},"value":"f32w"}]},"kernels/vision-position-embedding.rules.json":{"variant":[{"match":{"tableDtype":"f16"},"value":"f16"},{"match":{"tableDtype":"f32"},"value":"f32"}]},"kernels/vision-rope-2d.rules.json":{"variant":[{"match":{"inputDtype":"f32"},"value":"default"}]},"kernels/vision-spatial-merge.rules.json":{"variant":[{"match":{"inputDtype":"f32"},"value":"default"}]},"loader/tensor-loader.rules.json":{"gpuLoaderPath":[{"match":{"dtype":"Q5_K"},"value":"q40_packed"},{"match":{"dtype":"Q6_K","representationMode":"packed-only"},"value":"q40_packed"},{"match":{"dtype":{"in":["Q4_0","Q4_1","Q5_0","Q8_0"]}},"value":"q40_packed"},{"match":{"dtype":{"in":["FP8_E4M3FN","FP8_E5M2"]}},"value":"fp8_packed"},{"match":{"dtype":{"in":["Q4_K_M","Q4_K"]},"representationMode":"packed-only"},"value":"q4k_fused"},{"match":{"dtype":{"in":["Q4_K_M","Q4_K"]},"representationMode":"both"},"value":"q4k_mixed"},{"match":{"dtype":{"in":["Q4_K_M","Q4_K"]},"representationMode":"dense-only"},"value":"q4k_dequant"},{"match":{"dtype":"W8A8"},"value":"w8a8_packed"},{"match":{"dtype":"FUNCTIONAL_DESCRIPTOR"},"value":"functional_descriptor"},{"match":{"litertAffineInt4FusedEligible":true},"value":"litert_int4_fused"},{"match":{"w4a16FusedEligible":true},"value":"w4a16_fused"},{"match":{"dtype":{"in":["Q4_K_M","Q4_K"]},"q4kDenseExceedsBindingLimit":true,"q4kLimitFallbackEligible":true},"value":"q4k_fused"},{"match":{"dtype":{"in":["Q4_K_M","Q4_K"]},"requiresPackedOnlyQ4KRole":true},"value":"q4k_fused"},{"match":{"dtype":{"in":["Q4_K_M","Q4_K"]},"q4kMaterializationMode":"mixed"},"value":"q4k_mixed"},{"match":{"dtype":{"in":["Q4_K_M","Q4_K"]},"requiresFusedQ4KRole":true},"value":"q4k_fused"},{"match":{"dtype":{"in":["Q4_K_M","Q4_K"]},"useFusedQ4K":true},"value":"q4k_fused"},{"match":{"dtype":{"in":["Q4_K_M","Q4_K"]},"useFusedQ4K":false,"q4kCpuReferenceEligible":true,"q4kBasicBackendClass":true},"value":"q4k_dequant_reference"},{"match":{"dtype":{"in":["Q4_K_M","Q4_K"]}},"value":"q4k_dequant"},{"match":{"dtype":"W4A16"},"value":"w4a16_dequant_reference"},{"match":{"dtype":"WNA8O8"},"value":"unsupported_packed_quantization"},{"match":{"dtype":"Q6_K"},"value":"q6k"},{"match":{"dtype":"BF16"},"value":"bf16"},{"match":{},"value":"float"}],"cpuLoaderPath":[{"match":{"dtype":"Q5_K"},"value":"unsupported_packed_quantization"},{"match":{"dtype":{"in":["FP8_E4M3FN","FP8_E5M2"]}},"value":"unsupported_packed_quantization"},{"match":{"dtype":"W8A8"},"value":"unsupported_packed_quantization"},{"match":{"dtype":"FUNCTIONAL_DESCRIPTOR"},"value":"unsupported_functional_descriptor"},{"match":{"dtype":{"in":["Q4_K_M","Q4_K","Q6_K"]}},"value":"raw"},{"match":{"dtype":"W4A16"},"value":"w4a16_dequant_reference"},{"match":{"dtype":{"in":["Q4_0","WNA8O8"]}},"value":"unsupported_packed_quantization"},{"match":{"dtype":"BF16"},"value":"bf16_to_f32"},{"match":{"dtype":"F16"},"value":"f16_to_f32"},{"match":{},"value":"f32"}]},"loader/weights.rules.json":{"normWeightDtype":[{"match":{"normWeightDtype":"f16"},"value":"f16"},{"match":{"normWeightDtype":"f32"},"value":"f32"},{"match":{},"value":"f32"}],"normWeightDtypeFromSize":[{"match":{"sizeMatchesF32":true},"value":"f32"},{"match":{"sizeMatchesF16":true},"value":"f16"},{"match":{},"value":"f32"}],"matmulWeightDtype":[{"match":{"locationDtype":"Q4_0"},"value":"q4_0"},{"match":{"locationDtype":"Q4_1"},"value":"q4_1"},{"match":{"locationDtype":"Q5_0"},"value":"q5_0"},{"match":{"locationDtype":"Q8_0"},"value":"q8_0"},{"match":{"locationDtype":"Q5_K"},"value":"q5k"},{"match":{"locationDtype":"FP8_E4M3FN"},"value":"fp8e4"},{"match":{"locationDtype":"FP8_E5M2"},"value":"fp8e5"},{"match":{"locationDtype":"W8A8"},"value":"w8a8"},{"match":{"locationDtype":"F16","hasF16":false,"isMatmulWeight":true},"value":"f32"},{"match":{"locationDtype":"F16"},"value":"f16"},{"match":{"locationDtype":"BF16","hasF16":true,"isMatmulWeight":true},"value":"f16"},{"match":{"locationDtype":"BF16"},"value":"f32"},{"match":{"locationDtype":{"in":["Q4_K","Q4_K_M"]},"hasF16":true,"isMatmulWeight":true,"keepF32Weights":false},"value":"f16"},{"match":{"locationDtype":{"in":["Q4_K","Q4_K_M"]}},"value":"f32"},{"match":{"locationDtype":"Q6_K"},"value":"f16"},{"match":{},"value":"f32"}],"dequantizeToF16":[{"match":{"role":{"in":["matmul","embedding","lm_head","router","expert"]}},"value":true},{"match":{},"value":false}],"floatLocationDtype":[{"match":{"locationDtype":"F16"},"value":"f16"},{"match":{},"value":"f32"}],"q4kRowPadding":[{"match":{"rank":2,"partialRow":true},"value":true},{"match":{"explicitRowPacking":true,"partialRow":true},"value":true},{"match":{},"value":false}],"weightLayout":[{"match":{"layout":"column"},"value":"column"},{"match":{"layout":"row"},"value":"row"},{"match":{"useColumnWise":true},"value":"column"},{"match":{},"value":"row"}],"q4kOutputDtype":[{"match":{"isMatmulWeight":false},"value":"f32"},{"match":{"keepF32Weights":true},"value":"f32"},{"match":{"hasF16":true},"value":"f16"},{"match":{},"value":"f32"}]},"tooling/command-runtime.rules.json":{"runtimeContract":[{"match":{"command":"debug"},"value":{"workload":null,"intent":"investigate"}},{"match":{"command":"bench"},"value":{"workload":null,"intent":"calibrate"}},{"match":{"command":"verify"},"value":{"workload":null,"intent":"verify"}},{"match":{"command":"lora"},"value":{"workload":null,"intent":null}},{"match":{"command":"distill"},"value":{"workload":null,"intent":null}},{"match":{"command":"diagnose"},"value":{"workload":null,"intent":"investigate"}},{"match":{},"value":{"workload":null,"intent":null}}]}}}