doppler-gpu 0.4.3 → 0.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +28 -0
- package/README.md +67 -34
- package/assets/doppler.svg +57 -1601
- package/package.json +36 -5
- package/src/cli/cli-output.js +34 -1
- package/src/cli/doppler-cli.d.ts +18 -0
- package/src/cli/doppler-cli.js +68 -35
- package/src/cli/doppler-serve.d.ts +210 -0
- package/src/cli/doppler-serve.js +468 -42
- package/src/client/doppler-registry.json +3 -5
- package/src/client/provider.d.ts +1 -1
- package/src/client/provider.js +1 -1
- package/src/client/runtime/index.js +13 -0
- package/src/client/runtime/lora.d.ts +11 -1
- package/src/client/runtime/lora.js +28 -7
- package/src/client/runtime/model-manager.js +35 -11
- package/src/client/runtime/model-session.d.ts +2 -1
- package/src/client/runtime/model-session.js +2 -2
- package/src/client/runtime/model-source.js +20 -1
- package/src/client/runtime/types.d.ts +8 -0
- package/src/client/wrap-pipeline-handle.d.ts +62 -0
- package/src/client/wrap-pipeline-handle.js +188 -13
- package/src/config/conversion/README.md +5 -0
- package/src/config/conversion/diffusiongemma/diffusiongemma-26b-a4b-it-q4k-ehf16-af16.json +646 -0
- package/src/config/conversion/embeddinggemma/google-embeddinggemma-300m-q4k-ehf16-af32.json +3 -3
- package/src/config/conversion/gemma3/gemma-3-1b-it-f16-af32.json +4 -4
- package/src/config/conversion/gemma3/gemma-3-1b-it-q4k-ehf16-af32.json +4 -4
- package/src/config/conversion/gemma3/gemma-3-270m-it-f16-af32.json +393 -0
- package/src/config/conversion/gemma3/gemma-3-270m-it-q4k-ehf16-af16.json +425 -0
- package/src/config/conversion/gemma3/gemma-3-270m-it-q4k-ehf16-af32.json +17 -9
- package/src/config/conversion/gemma3/translategemma-4b-1b-enes-q4k-ehf16-af32.json +4 -4
- package/src/config/conversion/gemma3/translategemma-4b-it-q4k-ehf16-af32.json +4 -4
- package/src/config/conversion/gemma4/gemma-4-12b-it-text-q4k-ehf16-af16.json +737 -0
- package/src/config/conversion/gemma4/gemma-4-12b-it-text-q4k-ehf16-af32.json +730 -0
- package/src/config/conversion/gemma4/gemma-4-12b-it-text-q4k-ehf16-hq4k-af16.json +780 -0
- package/src/config/conversion/gemma4/gemma-4-12b-it-text-w4a16-ct-ehf16-af16.json +716 -0
- package/src/config/conversion/gemma4/gemma-4-31b-it-text-q4k-ehf16-af16.json +5 -5
- package/src/config/conversion/gemma4/gemma-4-31b-it-text-q4k-ehf16-af32.json +4 -4
- package/src/config/conversion/gemma4/gemma-4-e2b-it-q4k-ehf16-af16-int4ple.json +14 -12
- package/src/config/conversion/gemma4/gemma-4-e2b-it-q4k-ehf16-af32-int4ple.json +7 -7
- package/src/config/conversion/gemma4/gemma-4-e2b-it-q4k-ehf16-af32.json +7 -7
- package/src/config/conversion/gemma4/gemma-4-moe-q4k-ehf16-af32.json +3 -3
- package/src/config/conversion/gpt-oss-20b-f16-xmxfp4.json +3 -3
- package/src/config/conversion/janus/janus-pro-1b-text-q4k-ehaf16.json +3 -3
- package/src/config/conversion/lfm2/lfm2.5-1.2b-instruct-q4k-ehf16-af32.json +3 -3
- package/src/config/conversion/qwen3/qwen-3-5-0-8b-q4k-ehaf16.json +8 -4
- package/src/config/conversion/qwen3/qwen-3-5-2b-q4k-ehaf16.json +8 -4
- package/src/config/conversion/qwen3/qwen-3-6-27b-q4k-eaf16.json +9 -5
- package/src/config/conversion/qwen3/qwen-3-6-27b-q4k-ehaf16.json +8 -4
- package/src/config/goal-completion-matrix.json +552 -0
- package/src/config/kernel-path-loader.js +192 -38
- package/src/config/kernels/kernel-ref-digests.js +52 -18
- package/src/config/kernels/registry.json +3017 -744
- package/src/config/merge-contract-check.js +7 -3
- package/src/config/merge-helpers.d.ts +2 -0
- package/src/config/merge-helpers.js +1 -0
- package/src/config/merge.d.ts +1 -0
- package/src/config/merge.js +30 -0
- package/src/config/model-lanes/catalog-lane-resolver.d.ts +66 -0
- package/src/config/model-lanes/catalog-lane-resolver.js +170 -0
- package/src/config/param-validator.js +4 -0
- package/src/config/runtime/experiments/verify/lfm2-verify.json +3 -3
- package/src/config/runtime/profiles/diffusiongemma-26b-a4b-throughput.json +26 -0
- package/src/config/runtime/profiles/gemma3-270m-q4k-throughput-overlapped-probe.json +42 -0
- package/src/config/runtime/profiles/gemma3-270m-q4k-throughput-probe.json +39 -0
- package/src/config/runtime/profiles/gemma4-12b-rdrr-safe-b4.json +48 -0
- package/src/config/runtime/profiles/gemma4-12b-rdrr-safe-single.json +46 -0
- package/src/config/schema/buffer-pool.schema.js +3 -3
- package/src/config/schema/claim-evidence-contract.schema.json +93 -0
- package/src/config/schema/command-surface-contract.schema.json +81 -0
- package/src/config/schema/converter.schema.d.ts +11 -0
- package/src/config/schema/converter.schema.js +8 -0
- package/src/config/schema/doppler.schema.d.ts +1 -0
- package/src/config/schema/doppler.schema.js +38 -6
- package/src/config/schema/execution-v1.schema.d.ts +27 -0
- package/src/config/schema/execution-v1.schema.js +28 -19
- package/src/config/schema/goal-completion-matrix.schema.json +223 -0
- package/src/config/schema/inference.schema.d.ts +11 -0
- package/src/config/schema/manifest.schema.d.ts +107 -1
- package/src/config/schema/manifest.schema.js +10 -1
- package/src/config/schema/model-artifact-contract.schema.json +119 -0
- package/src/config/schema/moe.schema.d.ts +13 -0
- package/src/config/schema/moe.schema.js +1 -1
- package/src/config/schema/policy-schema-registry.json +26 -0
- package/src/config/schema/subsystem-support-contract.schema.json +48 -0
- package/src/config/schema/training-metrics.schema.d.ts +1 -1
- package/src/config/schema/training-metrics.schema.js +4 -3
- package/src/config/source-packages/litert/gemma-4-12b-it.json +390 -0
- package/src/config/source-packages/litert/gemma-4-e2b-it.json +7 -7
- package/src/config/source-packages/litert/gemma-4-e4b-it.json +370 -0
- package/src/config/source-packages/registry.json +25 -0
- package/src/config/supported-operations.json +5 -0
- package/src/config/transforms/capability-transform-resolver.d.ts +13 -2
- package/src/config/transforms/execution-graph-transforms.d.ts +42 -0
- package/src/config/transforms/execution-graph-transforms.js +227 -230
- package/src/converter/conversion-plan.d.ts +2 -0
- package/src/converter/conversion-plan.js +18 -4
- package/src/converter/core.d.ts +8 -0
- package/src/converter/core.js +574 -12
- package/src/converter/quantization-info.js +179 -2
- package/src/converter/quantizer.d.ts +5 -4
- package/src/converter/quantizer.js +16 -2
- package/src/experimental/adapters/lora-loader.js +109 -24
- package/src/experimental/diffusion/index.d.ts +24 -0
- package/src/experimental/diffusion/index.js +10 -0
- package/src/experimental/distribution/descriptor-transport.d.ts +117 -0
- package/src/experimental/distribution/descriptor-transport.js +342 -0
- package/src/experimental/training/README.md +11 -0
- package/src/experimental/training/autograd.js +33 -8
- package/src/experimental/training/datasets/gepa-frontier.d.ts +41 -0
- package/src/experimental/training/datasets/gepa-frontier.js +220 -0
- package/src/experimental/training/datasets/index.d.ts +13 -1
- package/src/experimental/training/datasets/index.js +8 -1
- package/src/experimental/training/datasets/teacher-traces.d.ts +51 -0
- package/src/experimental/training/datasets/teacher-traces.js +279 -0
- package/src/experimental/training/datasets/text-pairs.d.ts +45 -0
- package/src/experimental/training/datasets/text-pairs.js +82 -5
- package/src/experimental/training/distillation/student-fixture.d.ts +5 -0
- package/src/experimental/training/distillation/student-fixture.js +290 -32
- package/src/experimental/training/export.d.ts +9 -0
- package/src/experimental/training/export.js +113 -7
- package/src/experimental/training/index.d.ts +13 -1
- package/src/experimental/training/index.js +13 -1
- package/src/experimental/training/lora-pipeline.d.ts +143 -0
- package/src/experimental/training/lora-pipeline.js +1737 -49
- package/src/experimental/training/lora.js +23 -1
- package/src/experimental/training/loss.js +1 -1
- package/src/experimental/training/operator-agent-eval.d.ts +65 -0
- package/src/experimental/training/operator-agent-eval.js +326 -0
- package/src/experimental/training/operator-command.js +310 -51
- package/src/experimental/training/runner.d.ts +1 -0
- package/src/experimental/training/runner.js +4 -0
- package/src/experimental/training/workload-packs/distill-glm52-doppler-agent-harness-gemma270m-f16-sft-tiny.json +160 -0
- package/src/experimental/training/workload-packs/distill-glm52-doppler-code-agent-gemma270m-f16-sft-tiny.json +175 -0
- package/src/experimental/training/workload-packs/distill-glm52-doppler-code-agent-sft-tiny.json +175 -0
- package/src/experimental/training/workload-packs/distill-glm52-doppler-js-json-gemma270m-f16-sft-tiny.json +160 -0
- package/src/experimental/training/workload-packs/distill-glm52-doppler-review-gemma270m-f16-sft-tiny.json +162 -0
- package/src/experimental/training/workload-packs/distill-glm52-doppler-wgsl-gemma270m-f16-sft-tiny.json +160 -0
- package/src/experimental/training/workload-packs/lora-doppler-agent-harness-gemma270m-f16-tiny.json +137 -0
- package/src/experimental/training/workload-packs/lora-doppler-code-agent-gemma270m-f16-tiny.json +152 -0
- package/src/experimental/training/workload-packs/lora-doppler-code-agent-tiny.json +152 -0
- package/src/experimental/training/workload-packs/lora-doppler-js-json-gemma270m-f16-tiny.json +137 -0
- package/src/experimental/training/workload-packs/lora-doppler-review-gemma270m-f16-tiny.json +139 -0
- package/src/experimental/training/workload-packs/lora-doppler-wgsl-gemma270m-f16-tiny.json +137 -0
- package/src/experimental/training/workload-packs/registry.json +186 -6
- package/src/experimental/training/workloads.d.ts +37 -0
- package/src/experimental/training/workloads.js +110 -1
- package/src/formats/rdrr/functional-descriptor.d.ts +73 -0
- package/src/formats/rdrr/functional-descriptor.js +230 -0
- package/src/formats/rdrr/index.d.ts +1 -0
- package/src/formats/rdrr/index.js +1 -0
- package/src/formats/rdrr/parsing.js +22 -6
- package/src/formats/rdrr/source-transform-contract.js +10 -1
- package/src/formats/rdrr/storage-descriptor.js +9 -2
- package/src/formats/rdrr/types.d.ts +5 -3
- package/src/formats/rdrr/validation.js +15 -1
- package/src/gpu/command-recorder.d.ts +43 -3
- package/src/gpu/command-recorder.js +122 -25
- package/src/gpu/device.js +111 -11
- package/src/gpu/kernel-tuner/cache.js +1 -5
- package/src/gpu/kernels/attention.js +17 -9
- package/src/gpu/kernels/attention_decode_online_head256_f16kv.wgsl +236 -0
- package/src/gpu/kernels/attention_streaming_f16.wgsl +7 -5
- package/src/gpu/kernels/backward/cross_entropy_backward.js +72 -3
- package/src/gpu/kernels/backward/cross_entropy_backward.wgsl +2 -2
- package/src/gpu/kernels/cast.js +74 -67
- package/src/gpu/kernels/codegen/patches/attention_streaming_f16.from.attention_streaming.diff +46 -1
- package/src/gpu/kernels/codegen/patches/gelu_f16.from.gelu.diff +0 -20
- package/src/gpu/kernels/codegen/patches/residual_f16.from.residual.diff +15 -12
- package/src/gpu/kernels/codegen/patches/rmsnorm_f16.from.rmsnorm.diff +59 -44
- package/src/gpu/kernels/diffusion-gemma-sampling.d.ts +19 -0
- package/src/gpu/kernels/diffusion-gemma-sampling.js +104 -0
- package/src/gpu/kernels/diffusion_gemma_sampling.wgsl +130 -0
- package/src/gpu/kernels/dispatch.js +13 -3
- package/src/gpu/kernels/fused_ffn.js +3 -4
- package/src/gpu/kernels/fused_matmul_litert_int4_f16a.wgsl +78 -0
- package/src/gpu/kernels/fused_matmul_litert_int4_f16a_f32out.wgsl +78 -0
- package/src/gpu/kernels/fused_matmul_litert_int4_f32a_f32out.wgsl +76 -0
- package/src/gpu/kernels/fused_matmul_rmsnorm.js +101 -80
- package/src/gpu/kernels/fused_matmul_w4a16_batched_f16a.wgsl +116 -0
- package/src/gpu/kernels/fused_matmul_w4a16_batched_f16a_f32out.wgsl +116 -0
- package/src/gpu/kernels/fused_matmul_w4a16_f16a.wgsl +95 -0
- package/src/gpu/kernels/fused_matmul_w4a16_f16a_f32out.wgsl +95 -0
- package/src/gpu/kernels/gather.d.ts +84 -1
- package/src/gpu/kernels/gather.js +353 -5
- package/src/gpu/kernels/gather_litert_int4_vec4_f16_out.wgsl +75 -0
- package/src/gpu/kernels/gather_litert_int4_vec4_f32_out.wgsl +72 -0
- package/src/gpu/kernels/gather_split4_f16_vec4_f16_out.wgsl +103 -0
- package/src/gpu/kernels/gather_split8_f16_vec4_f16_out.wgsl +143 -0
- package/src/gpu/kernels/gather_split8_f16_vec4_f32_out.wgsl +143 -0
- package/src/gpu/kernels/gelu.wgsl +11 -7
- package/src/gpu/kernels/gelu_f16.wgsl +11 -7
- package/src/gpu/kernels/gemma4-route-expert.d.ts +35 -0
- package/src/gpu/kernels/gemma4-route-expert.js +126 -0
- package/src/gpu/kernels/gemma4_route_q4_matmul_f16a.wgsl +210 -0
- package/src/gpu/kernels/index.d.ts +71 -0
- package/src/gpu/kernels/index.js +52 -0
- package/src/gpu/kernels/kv-cache-write.d.ts +22 -0
- package/src/gpu/kernels/kv-cache-write.js +126 -0
- package/src/gpu/kernels/kv_cache_write_f32_to_f16.wgsl +32 -0
- package/src/gpu/kernels/lm-head-argmax.d.ts +19 -0
- package/src/gpu/kernels/lm-head-argmax.js +218 -0
- package/src/gpu/kernels/lm_head_argmax_f16.wgsl +189 -0
- package/src/gpu/kernels/matmul-dispatch.d.ts +11 -0
- package/src/gpu/kernels/matmul-dispatch.js +37 -1
- package/src/gpu/kernels/matmul-selection.d.ts +5 -5
- package/src/gpu/kernels/matmul-selection.js +104 -9
- package/src/gpu/kernels/matmul.d.ts +1 -1
- package/src/gpu/kernels/matmul.js +151 -43
- package/src/gpu/kernels/moe.d.ts +1 -0
- package/src/gpu/kernels/moe.js +46 -18
- package/src/gpu/kernels/pipeline-cache.d.ts +8 -0
- package/src/gpu/kernels/pipeline-cache.js +24 -0
- package/src/gpu/kernels/rep-penalty.d.ts +21 -0
- package/src/gpu/kernels/rep-penalty.js +17 -9
- package/src/gpu/kernels/residual.d.ts +1 -0
- package/src/gpu/kernels/residual.js +13 -1
- package/src/gpu/kernels/residual.wgsl +3 -3
- package/src/gpu/kernels/residual_f16.wgsl +5 -3
- package/src/gpu/kernels/residual_f16_vec4.wgsl +6 -6
- package/src/gpu/kernels/residual_vec4.wgsl +6 -6
- package/src/gpu/kernels/rmsnorm-pair.d.ts +39 -0
- package/src/gpu/kernels/rmsnorm-pair.js +152 -0
- package/src/gpu/kernels/rmsnorm-qk.d.ts +41 -0
- package/src/gpu/kernels/rmsnorm-qk.js +128 -0
- package/src/gpu/kernels/rmsnorm.d.ts +31 -0
- package/src/gpu/kernels/rmsnorm.js +32 -7
- package/src/gpu/kernels/rmsnorm.wgsl +10 -6
- package/src/gpu/kernels/rmsnorm_f16.wgsl +7 -3
- package/src/gpu/kernels/rmsnorm_pair.wgsl +224 -0
- package/src/gpu/kernels/rmsnorm_qk.wgsl +118 -0
- package/src/gpu/kernels/rmsnorm_qk_f16.wgsl +143 -0
- package/src/gpu/kernels/rope-qk.d.ts +41 -0
- package/src/gpu/kernels/rope-qk.js +143 -0
- package/src/gpu/kernels/rope_qk.wgsl +95 -0
- package/src/gpu/kernels/rope_qk_f16.wgsl +97 -0
- package/src/gpu/kernels/rule-registry.js +50 -10
- package/src/gpu/kernels/sample.js +212 -187
- package/src/gpu/kernels/scatter_add_dynamic_expert_scale.wgsl +47 -0
- package/src/gpu/kernels/scatter_add_dynamic_f16_expert_scale.wgsl +49 -0
- package/src/gpu/kernels/scatter_add_dynamic_f16_weights_expert_scale.wgsl +49 -0
- package/src/gpu/kernels/scatter_add_routes_f16_weights_expert_scale.wgsl +45 -0
- package/src/gpu/kernels/shader-cache.js +1 -21
- package/src/gpu/kernels/soft-embedding.d.ts +28 -0
- package/src/gpu/kernels/soft-embedding.js +447 -0
- package/src/gpu/kernels/soft_embedding_logits_f16.wgsl +107 -0
- package/src/gpu/kernels/soft_embedding_split_f16.wgsl +46 -0
- package/src/gpu/kernels/softmax.wgsl +5 -80
- package/src/gpu/kernels/split-qkv-rmsnorm-qk.d.ts +44 -0
- package/src/gpu/kernels/split-qkv-rmsnorm-qk.js +154 -0
- package/src/gpu/kernels/split-qkv-rmsnorm-rope-qk.d.ts +59 -0
- package/src/gpu/kernels/split-qkv-rmsnorm-rope-qk.js +245 -0
- package/src/gpu/kernels/split_qkv_rmsnorm_qk.wgsl +146 -0
- package/src/gpu/kernels/split_qkv_rmsnorm_rope_qk.wgsl +185 -0
- package/src/gpu/kernels/split_qkv_rmsnorm_rope_qk_f16kv_cache.wgsl +187 -0
- package/src/gpu/kernels/uniform-utils.js +2 -5
- package/src/gpu/kernels/utils.d.ts +16 -1
- package/src/gpu/kernels/utils.js +42 -13
- package/src/gpu/readback-utils.js +10 -2
- package/src/gpu/uniform-cache.d.ts +10 -1
- package/src/gpu/uniform-cache.js +25 -7
- package/src/gpu/weight-buffer.d.ts +76 -7
- package/src/gpu/weight-buffer.js +85 -1
- package/src/inference/browser-harness-diffusion-energy-suites.js +269 -1
- package/src/inference/browser-harness-suite-helpers.d.ts +9 -0
- package/src/inference/browser-harness-suite-helpers.js +438 -2
- package/src/inference/browser-harness-text-helpers.d.ts +77 -0
- package/src/inference/browser-harness-text-helpers.js +236 -11
- package/src/inference/browser-harness.d.ts +8 -0
- package/src/inference/browser-harness.js +292 -8
- package/src/inference/decode-ring.d.ts +1 -0
- package/src/inference/decode-ring.js +7 -5
- package/src/inference/kv-cache/base.d.ts +25 -0
- package/src/inference/kv-cache/base.js +109 -1
- package/src/inference/kv-cache/mixed-geometry.d.ts +10 -0
- package/src/inference/kv-cache/mixed-geometry.js +109 -2
- package/src/inference/kv-cache/sliding-window.d.ts +14 -0
- package/src/inference/kv-cache/sliding-window.js +88 -0
- package/src/inference/model-lanes/execution-lane-resolver.d.ts +61 -0
- package/src/inference/model-lanes/execution-lane-resolver.js +126 -0
- package/src/inference/moe-router.d.ts +14 -1
- package/src/inference/moe-router.js +24 -1
- package/src/inference/pipelines/audio/gemma4.js +52 -1
- package/src/inference/pipelines/diffusion-gemma/config.d.ts +27 -0
- package/src/inference/pipelines/diffusion-gemma/config.js +149 -0
- package/src/inference/pipelines/diffusion-gemma/index.d.ts +31 -0
- package/src/inference/pipelines/diffusion-gemma/index.js +12 -0
- package/src/inference/pipelines/diffusion-gemma/pipeline.d.ts +69 -0
- package/src/inference/pipelines/diffusion-gemma/pipeline.js +380 -0
- package/src/inference/pipelines/diffusion-gemma/sampling.d.ts +128 -0
- package/src/inference/pipelines/diffusion-gemma/sampling.js +395 -0
- package/src/inference/pipelines/text/attention/dispatch-params.d.ts +28 -4
- package/src/inference/pipelines/text/attention/dispatch-params.js +176 -2
- package/src/inference/pipelines/text/attention/projections.d.ts +71 -2
- package/src/inference/pipelines/text/attention/projections.js +329 -49
- package/src/inference/pipelines/text/attention/quant-options.d.ts +38 -0
- package/src/inference/pipelines/text/attention/record.js +446 -73
- package/src/inference/pipelines/text/attention/run.js +251 -49
- package/src/inference/pipelines/text/attention/types.d.ts +5 -1
- package/src/inference/pipelines/text/config.d.ts +22 -1
- package/src/inference/pipelines/text/config.js +199 -22
- package/src/inference/pipelines/text/dtype-contract.d.ts +1 -1
- package/src/inference/pipelines/text/dtype-contract.js +4 -1
- package/src/inference/pipelines/text/embed.d.ts +4 -3
- package/src/inference/pipelines/text/embed.js +16 -6
- package/src/inference/pipelines/text/execution-plan.d.ts +8 -0
- package/src/inference/pipelines/text/execution-plan.js +6 -0
- package/src/inference/pipelines/text/execution-runtime-builders.d.ts +4 -0
- package/src/inference/pipelines/text/execution-runtime-builders.js +44 -28
- package/src/inference/pipelines/text/execution-v1.d.ts +2 -0
- package/src/inference/pipelines/text/execution-v1.js +373 -139
- package/src/inference/pipelines/text/ffn/dense.js +44 -13
- package/src/inference/pipelines/text/ffn/moe.d.ts +4 -1
- package/src/inference/pipelines/text/ffn/moe.js +9 -2
- package/src/inference/pipelines/text/ffn/sandwich.d.ts +3 -1
- package/src/inference/pipelines/text/ffn/sandwich.js +237 -15
- package/src/inference/pipelines/text/ffn/standard.d.ts +3 -1
- package/src/inference/pipelines/text/ffn/standard.js +44 -4
- package/src/inference/pipelines/text/generator-decode-policy.d.ts +81 -0
- package/src/inference/pipelines/text/generator-decode-policy.js +2 -12
- package/src/inference/pipelines/text/generator-helpers.js +5 -2
- package/src/inference/pipelines/text/generator-prefill-helpers.d.ts +84 -0
- package/src/inference/pipelines/text/generator-prefill-helpers.js +67 -1
- package/src/inference/pipelines/text/generator-runtime.d.ts +1 -0
- package/src/inference/pipelines/text/generator-steps.d.ts +38 -3
- package/src/inference/pipelines/text/generator-steps.js +268 -77
- package/src/inference/pipelines/text/generator.d.ts +39 -0
- package/src/inference/pipelines/text/generator.js +1105 -18
- package/src/inference/pipelines/text/init.d.ts +8 -1
- package/src/inference/pipelines/text/init.js +30 -1
- package/src/inference/pipelines/text/layer-plan-gpu.js +62 -14
- package/src/inference/pipelines/text/layer.js +272 -25
- package/src/inference/pipelines/text/linear-attention.js +6 -4
- package/src/inference/pipelines/text/logits/gpu.d.ts +49 -2
- package/src/inference/pipelines/text/logits/gpu.js +417 -66
- package/src/inference/pipelines/text/logits/index.d.ts +2 -2
- package/src/inference/pipelines/text/logits/index.js +96 -42
- package/src/inference/pipelines/text/logits/types.d.ts +2 -2
- package/src/inference/pipelines/text/lora-apply.js +17 -0
- package/src/inference/pipelines/text/model-load.js +5 -1
- package/src/inference/pipelines/text/moe-gpu.d.ts +13 -0
- package/src/inference/pipelines/text/moe-gpu.js +445 -16
- package/src/inference/pipelines/text/moe-impl.d.ts +13 -3
- package/src/inference/pipelines/text/moe-shape-validator.js +13 -1
- package/src/inference/pipelines/text/ops.d.ts +29 -2
- package/src/inference/pipelines/text/ops.js +19 -0
- package/src/inference/pipelines/text/per-layer-inputs.js +5 -0
- package/src/inference/pipelines/text/probes.js +4 -5
- package/src/inference/pipelines/text/sampling-config.d.ts +4 -10
- package/src/inference/pipelines/text/sampling-config.js +103 -64
- package/src/inference/pipelines/text/sampling.js +13 -9
- package/src/inference/pipelines/text/state.js +17 -0
- package/src/inference/pipelines/text/tsir-fixture-writer.d.ts +57 -0
- package/src/inference/pipelines/text/tsir-fixture-writer.js +8 -9
- package/src/inference/pipelines/text/types.d.ts +84 -3
- package/src/inference/pipelines/text/weights.d.ts +4 -2
- package/src/inference/pipelines/text/weights.js +4 -5
- package/src/inference/pipelines/text.d.ts +24 -0
- package/src/inference/pipelines/text.js +162 -38
- package/src/inference/pipelines/vision/gemma4.js +20 -9
- package/src/inference/tokenizer.d.ts +30 -0
- package/src/inference/tokenizer.js +340 -164
- package/src/inference/tokenizers/bundled.js +71 -49
- package/src/loader/doppler-loader.d.ts +11 -0
- package/src/loader/doppler-loader.js +290 -15
- package/src/loader/embedding-limit-preflight.d.ts +31 -0
- package/src/loader/embedding-limit-preflight.js +216 -0
- package/src/loader/embedding-loader.d.ts +8 -2
- package/src/loader/embedding-loader.js +263 -8
- package/src/loader/experts/expert-loader.d.ts +4 -1
- package/src/loader/experts/expert-loader.js +174 -5
- package/src/loader/final-weights-loader.d.ts +5 -0
- package/src/loader/final-weights-loader.js +167 -4
- package/src/loader/layer-loader.d.ts +2 -0
- package/src/loader/layer-loader.js +74 -6
- package/src/loader/loader-types.d.ts +59 -2
- package/src/loader/manifest-config.d.ts +8 -0
- package/src/loader/shard-resolver.js +37 -4
- package/src/loader/tensors/functional-descriptor-loader.d.ts +9 -0
- package/src/loader/tensors/functional-descriptor-loader.js +377 -0
- package/src/loader/tensors/tensor-loader.d.ts +36 -1
- package/src/loader/tensors/tensor-loader.js +437 -21
- package/src/loader/tensors/tensor-reader.d.ts +4 -1
- package/src/loader/tensors/tensor-reader.js +11 -4
- package/src/loader/weights.d.ts +3 -1
- package/src/memory/buffer-pool.js +12 -9
- package/src/models/diffusiongemma.d.ts +7 -0
- package/src/models/diffusiongemma.js +25 -0
- package/src/models/gemma4.js +24 -0
- package/src/models/qwen3.js +2 -2
- package/src/rules/execution-rules-contract-check.js +93 -10
- package/src/rules/inference/capability-transforms.rules.json +26 -2
- package/src/rules/inference/config.rules.json +1 -0
- package/src/rules/inference/dtype.rules.json +7 -0
- package/src/rules/inference/execution.rules.json +108 -17
- package/src/rules/inference/ffn.rules.json +18 -0
- package/src/rules/kernels/gather.rules.json +81 -0
- package/src/rules/kernels/matmul.rules.json +19 -0
- package/src/rules/kernels/moe.rules.json +3 -0
- package/src/rules/kernels/rep-penalty.rules.json +6 -0
- package/src/rules/kernels/rmsnorm-qk.rules.json +6 -0
- package/src/rules/kernels/rmsnorm.rules.json +42 -7
- package/src/rules/kernels/rope-qk.rules.json +6 -0
- package/src/rules/loader/tensor-loader.rules.json +8 -0
- package/src/rules/rule-registry.js +6 -0
- package/src/storage/artifact-storage-context.d.ts +1 -0
- package/src/storage/artifact-storage-context.js +10 -0
- package/src/tooling/browser-command-runner.d.ts +0 -3
- package/src/tooling/browser-command-runner.js +2 -14
- package/src/tooling/command-api-family-normalizers.js +4 -2
- package/src/tooling/command-api-helpers.js +2 -1
- package/src/tooling/command-api.d.ts +2 -0
- package/src/tooling/command-api.js +1 -0
- package/src/tooling/command-runner-shared.d.ts +4 -0
- package/src/tooling/command-runner-shared.js +2 -1
- package/src/tooling/diagnose-runner.js +2 -0
- package/src/tooling/litert-package-runtime.js +553 -16
- package/src/tooling/node-browser-command-runner.js +10 -4
- package/src/tooling/node-command-runner.js +7 -2
- package/src/tooling/node-convert-worker-pool.js +3 -0
- package/src/tooling/node-convert-worker.js +1 -0
- package/src/tooling/node-converter.js +12 -0
- package/src/tooling/node-webgpu.d.ts +1 -0
- package/src/tooling/node-webgpu.js +23 -11
- package/src/tooling/program-bundle.d.ts +52 -1
- package/src/tooling/rdrr-integrity-refresh.d.ts +18 -0
- package/src/tooling/source-artifact-adapter.js +7 -2
- package/src/tooling/source-package-profiles.d.ts +18 -1
- package/src/tooling/source-package-profiles.js +109 -1
- package/src/tooling/source-runtime-bundle.d.ts +1 -0
- package/src/tooling/source-runtime-bundle.js +27 -0
- package/src/tooling/source-runtime-converter-config.js +12 -3
- package/src/tooling-experimental-exports.shared.d.ts +10 -0
- package/src/tooling-experimental-exports.shared.js +10 -0
- package/src/version.js +1 -1
|
@@ -0,0 +1,646 @@
|
|
|
1
|
+
{
|
|
2
|
+
"output": {
|
|
3
|
+
"baseDir": "models/local",
|
|
4
|
+
"modelBaseId": "diffusiongemma-26b-a4b-it-q4k-ehf16-af16",
|
|
5
|
+
"textOnly": true,
|
|
6
|
+
"fast": false
|
|
7
|
+
},
|
|
8
|
+
"quantization": {
|
|
9
|
+
"weights": "q4k",
|
|
10
|
+
"embeddings": "f16",
|
|
11
|
+
"lmHead": "f16",
|
|
12
|
+
"computePrecision": "f16",
|
|
13
|
+
"q4kLayout": "row"
|
|
14
|
+
},
|
|
15
|
+
"moeConfig": {
|
|
16
|
+
"numExperts": 128,
|
|
17
|
+
"numExpertsPerToken": 8,
|
|
18
|
+
"expertFormat": "gemma4",
|
|
19
|
+
"expertIntermediateSize": 704
|
|
20
|
+
},
|
|
21
|
+
"inference": {
|
|
22
|
+
"attention": {
|
|
23
|
+
"queryPreAttnScalar": 1,
|
|
24
|
+
"attnLogitSoftcapping": null,
|
|
25
|
+
"slidingWindow": 1024,
|
|
26
|
+
"queryKeyNorm": true,
|
|
27
|
+
"valueNorm": true,
|
|
28
|
+
"causal": true,
|
|
29
|
+
"attentionBias": false,
|
|
30
|
+
"attentionOutputGate": false
|
|
31
|
+
},
|
|
32
|
+
"normalization": {
|
|
33
|
+
"rmsNormEps": 0.000001,
|
|
34
|
+
"rmsNormWeightOffset": false,
|
|
35
|
+
"postAttentionNorm": true,
|
|
36
|
+
"preFeedforwardNorm": true,
|
|
37
|
+
"postFeedforwardNorm": true
|
|
38
|
+
},
|
|
39
|
+
"ffn": {
|
|
40
|
+
"activation": "gelu",
|
|
41
|
+
"gatedActivation": true,
|
|
42
|
+
"branchMode": "dense_plus_moe",
|
|
43
|
+
"useDoubleWideMlp": false,
|
|
44
|
+
"swigluLimit": null
|
|
45
|
+
},
|
|
46
|
+
"rope": {
|
|
47
|
+
"ropeTheta": 1000000,
|
|
48
|
+
"ropeLocalTheta": 10000,
|
|
49
|
+
"ropeInterleaved": false,
|
|
50
|
+
"mropeInterleaved": false,
|
|
51
|
+
"mropeSection": null,
|
|
52
|
+
"partialRotaryFactor": 0.25,
|
|
53
|
+
"ropeLocalPartialRotaryFactor": null,
|
|
54
|
+
"ropeFrequencyBaseDim": 512,
|
|
55
|
+
"ropeLocalFrequencyBaseDim": null,
|
|
56
|
+
"ropeScalingType": null,
|
|
57
|
+
"ropeScalingFactor": 1,
|
|
58
|
+
"ropeLocalScalingType": null,
|
|
59
|
+
"ropeLocalScalingFactor": 1,
|
|
60
|
+
"yarnBetaFast": null,
|
|
61
|
+
"yarnBetaSlow": null,
|
|
62
|
+
"yarnOriginalMaxPos": null,
|
|
63
|
+
"ropeLocalYarnBetaFast": null,
|
|
64
|
+
"ropeLocalYarnBetaSlow": null,
|
|
65
|
+
"ropeLocalYarnOriginalMaxPos": null
|
|
66
|
+
},
|
|
67
|
+
"output": {
|
|
68
|
+
"finalLogitSoftcapping": 30,
|
|
69
|
+
"tieWordEmbeddings": true,
|
|
70
|
+
"scaleEmbeddings": true,
|
|
71
|
+
"embeddingTranspose": false,
|
|
72
|
+
"embeddingVocabSize": null,
|
|
73
|
+
"embeddingPostprocessor": null
|
|
74
|
+
},
|
|
75
|
+
"layerPattern": {
|
|
76
|
+
"type": "custom",
|
|
77
|
+
"globalPattern": null,
|
|
78
|
+
"period": null,
|
|
79
|
+
"offset": null,
|
|
80
|
+
"layerTypes": [
|
|
81
|
+
"sliding_attention",
|
|
82
|
+
"sliding_attention",
|
|
83
|
+
"sliding_attention",
|
|
84
|
+
"sliding_attention",
|
|
85
|
+
"sliding_attention",
|
|
86
|
+
"full_attention",
|
|
87
|
+
"sliding_attention",
|
|
88
|
+
"sliding_attention",
|
|
89
|
+
"sliding_attention",
|
|
90
|
+
"sliding_attention",
|
|
91
|
+
"sliding_attention",
|
|
92
|
+
"full_attention",
|
|
93
|
+
"sliding_attention",
|
|
94
|
+
"sliding_attention",
|
|
95
|
+
"sliding_attention",
|
|
96
|
+
"sliding_attention",
|
|
97
|
+
"sliding_attention",
|
|
98
|
+
"full_attention",
|
|
99
|
+
"sliding_attention",
|
|
100
|
+
"sliding_attention",
|
|
101
|
+
"sliding_attention",
|
|
102
|
+
"sliding_attention",
|
|
103
|
+
"sliding_attention",
|
|
104
|
+
"full_attention",
|
|
105
|
+
"sliding_attention",
|
|
106
|
+
"sliding_attention",
|
|
107
|
+
"sliding_attention",
|
|
108
|
+
"sliding_attention",
|
|
109
|
+
"sliding_attention",
|
|
110
|
+
"full_attention"
|
|
111
|
+
]
|
|
112
|
+
},
|
|
113
|
+
"chatTemplate": {
|
|
114
|
+
"type": "gemma4",
|
|
115
|
+
"enabled": true
|
|
116
|
+
},
|
|
117
|
+
"supportsEmbedding": false,
|
|
118
|
+
"supportsTranscription": false,
|
|
119
|
+
"supportsVision": false,
|
|
120
|
+
"diffusionGemma": {
|
|
121
|
+
"canvasLength": 256,
|
|
122
|
+
"maxDenoisingSteps": 48,
|
|
123
|
+
"maxNewTokens": 256,
|
|
124
|
+
"tMin": 0.4,
|
|
125
|
+
"tMax": 0.8,
|
|
126
|
+
"entropyBound": 0.1,
|
|
127
|
+
"confidenceThreshold": 0.005,
|
|
128
|
+
"stabilityThreshold": 1,
|
|
129
|
+
"padTokenId": 0,
|
|
130
|
+
"eosTokenIds": [
|
|
131
|
+
1,
|
|
132
|
+
106,
|
|
133
|
+
50
|
|
134
|
+
],
|
|
135
|
+
"boiTokenId": 255999,
|
|
136
|
+
"eoiTokenId": 258882,
|
|
137
|
+
"imageTokenId": 258880,
|
|
138
|
+
"selfConditioning": true,
|
|
139
|
+
"decoderCacheMode": "encoder_kv_readonly_canvas_concat",
|
|
140
|
+
"router": {
|
|
141
|
+
"scaleHiddenStates": true,
|
|
142
|
+
"normalizeTopK": true,
|
|
143
|
+
"perExpertScale": true
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
"session": {
|
|
148
|
+
"compute": {
|
|
149
|
+
"defaults": {
|
|
150
|
+
"activationDtype": "f16",
|
|
151
|
+
"mathDtype": "f16",
|
|
152
|
+
"accumDtype": "f16",
|
|
153
|
+
"outputDtype": "f16"
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
"kvcache": {
|
|
157
|
+
"kvDtype": "f16",
|
|
158
|
+
"layout": "contiguous",
|
|
159
|
+
"pageSize": 256,
|
|
160
|
+
"tiering": {
|
|
161
|
+
"mode": "off"
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
"decodeLoop": {
|
|
165
|
+
"batchSize": 8,
|
|
166
|
+
"stopCheckMode": "batch",
|
|
167
|
+
"readbackInterval": 8,
|
|
168
|
+
"readbackMode": "overlapped",
|
|
169
|
+
"ringTokens": 2,
|
|
170
|
+
"ringStop": 1,
|
|
171
|
+
"ringStaging": 2,
|
|
172
|
+
"disableCommandBatching": false
|
|
173
|
+
},
|
|
174
|
+
"perLayerInputs": {
|
|
175
|
+
"materialization": "auto",
|
|
176
|
+
"rowCache": {
|
|
177
|
+
"mode": "lru",
|
|
178
|
+
"maxRows": 1,
|
|
179
|
+
"maxBytes": 1,
|
|
180
|
+
"decodedDtype": "f16"
|
|
181
|
+
},
|
|
182
|
+
"prefetch": {
|
|
183
|
+
"mode": "off",
|
|
184
|
+
"rowsAhead": 1
|
|
185
|
+
},
|
|
186
|
+
"gpuUpload": {
|
|
187
|
+
"mode": "per_step_slices",
|
|
188
|
+
"stagingRows": 1
|
|
189
|
+
},
|
|
190
|
+
"hotCache": {
|
|
191
|
+
"mode": "off",
|
|
192
|
+
"maxTokens": 1,
|
|
193
|
+
"maxBytes": 1,
|
|
194
|
+
"outputDtype": "f16"
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
"prefillChunkSubmitMode": "async",
|
|
198
|
+
"useFlashPrefillAttention": true,
|
|
199
|
+
"useWideTileQ4KPrefill": true,
|
|
200
|
+
"retainQ4KMaterialization": true
|
|
201
|
+
},
|
|
202
|
+
"execution": {
|
|
203
|
+
"kernels": {
|
|
204
|
+
"embed": {
|
|
205
|
+
"kernel": "gather.wgsl",
|
|
206
|
+
"entry": "main",
|
|
207
|
+
"digest": "sha256:4b12653c53247b32ebde7f6cf6a989d6248977e3816c761540b990b5f9818cb6"
|
|
208
|
+
},
|
|
209
|
+
"rmsnorm": {
|
|
210
|
+
"kernel": "rmsnorm.wgsl",
|
|
211
|
+
"entry": "main",
|
|
212
|
+
"digest": "sha256:284d3efb0ad0991fc57ece5f634cbc8a931fcab36f193b2b6832561d4cc79ef1"
|
|
213
|
+
},
|
|
214
|
+
"final_norm_stable": {
|
|
215
|
+
"kernel": "rmsnorm.wgsl",
|
|
216
|
+
"entry": "main",
|
|
217
|
+
"digest": "sha256:284d3efb0ad0991fc57ece5f634cbc8a931fcab36f193b2b6832561d4cc79ef1",
|
|
218
|
+
"precision": {
|
|
219
|
+
"inputDtype": "f32",
|
|
220
|
+
"outputDtype": "f32"
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
"gemv": {
|
|
224
|
+
"kernel": "matmul_gemv_subgroup.wgsl",
|
|
225
|
+
"entry": "main_vec4",
|
|
226
|
+
"digest": "sha256:2ea9aea659367210fbf61d922c0d4ee17cdac68ffb506b3bc5516e498071e011"
|
|
227
|
+
},
|
|
228
|
+
"q4_decode_gemv": {
|
|
229
|
+
"kernel": "fused_matmul_q4.wgsl",
|
|
230
|
+
"entry": "main_gemv",
|
|
231
|
+
"digest": "sha256:c547743b9806fec47142c6a9f9ac2bd047981fd8cded46ce40dc01725e8aa71d",
|
|
232
|
+
"precision": {
|
|
233
|
+
"inputDtype": "f32",
|
|
234
|
+
"outputDtype": "f32"
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
"rope": {
|
|
238
|
+
"kernel": "rope.wgsl",
|
|
239
|
+
"entry": "main",
|
|
240
|
+
"digest": "sha256:b2da9d396668981dab9794c2973b668279f768994466b083d2105730555e1a5b"
|
|
241
|
+
},
|
|
242
|
+
"attn_decode": {
|
|
243
|
+
"kernel": "attention_decode_online_f16kv.wgsl",
|
|
244
|
+
"entry": "main",
|
|
245
|
+
"digest": "sha256:91808be35895e921c0fa43fc47bfe8cab69c437c388ab561f595d9dc983f66e1",
|
|
246
|
+
"precision": {
|
|
247
|
+
"kvDtype": "f16"
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
"residual": {
|
|
251
|
+
"kernel": "residual.wgsl",
|
|
252
|
+
"entry": "main",
|
|
253
|
+
"digest": "sha256:abd19bc08ad668a7cad562e2bc0a4be1aa8827ad4300d8d474b7fc2af4c27117"
|
|
254
|
+
},
|
|
255
|
+
"gelu": {
|
|
256
|
+
"kernel": "gelu.wgsl",
|
|
257
|
+
"entry": "main",
|
|
258
|
+
"digest": "sha256:7f8900b69de5107e4cf424cac0d4de1539591ece34e977ff30f6f7364460ab34",
|
|
259
|
+
"constants": {
|
|
260
|
+
"HAS_GATE": true
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
"tiled": {
|
|
264
|
+
"kernel": "matmul_f16w_f32a.wgsl",
|
|
265
|
+
"entry": "main",
|
|
266
|
+
"digest": "sha256:027a8f1cd9713cbe0b0ada160bd175e0542bb90896ad85441b023522d9a1befc"
|
|
267
|
+
},
|
|
268
|
+
"q4_prefill_shared": {
|
|
269
|
+
"kernel": "fused_matmul_q4_batched_multicol_shared.wgsl",
|
|
270
|
+
"entry": "main",
|
|
271
|
+
"digest": "sha256:142817adcacb28750a92793996cd15c2d9fe13d03e0c2d0aadf3e674dc7a35d6"
|
|
272
|
+
},
|
|
273
|
+
"q4_widetile": {
|
|
274
|
+
"kernel": "fused_matmul_q4_widetile_f16a.wgsl",
|
|
275
|
+
"entry": "main",
|
|
276
|
+
"digest": "sha256:fd0fb3e0a5aeb8189674cfdf450181ca132e4a2db899a122ef93ec0b4abf9b1d",
|
|
277
|
+
"precision": {
|
|
278
|
+
"inputDtype": "f16",
|
|
279
|
+
"outputDtype": "f16"
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
"attn_stream": {
|
|
283
|
+
"kernel": "attention_streaming_f16kv.wgsl",
|
|
284
|
+
"entry": "main",
|
|
285
|
+
"digest": "sha256:c3ec920699a81ee6df04a64eb0ea2477bec168ebb809af29f2d4b0924a4bdf8f",
|
|
286
|
+
"precision": {
|
|
287
|
+
"kvDtype": "f16"
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
"attn_small": {
|
|
291
|
+
"kernel": "attention_small_f16kv.wgsl",
|
|
292
|
+
"entry": "main",
|
|
293
|
+
"digest": "sha256:ad3bb913c17167eb28fefc6abd24602ea0f148bc22a2b5f437eeffcc6f7fc668",
|
|
294
|
+
"precision": {
|
|
295
|
+
"kvDtype": "f16"
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
"attn_head256": {
|
|
299
|
+
"kernel": "attention_head256_f16kv.wgsl",
|
|
300
|
+
"entry": "main",
|
|
301
|
+
"digest": "sha256:4ecdc079e322a770350414244cb383d72ae7ffa47ed620c64ff425c93413e97a",
|
|
302
|
+
"precision": {
|
|
303
|
+
"kvDtype": "f16"
|
|
304
|
+
}
|
|
305
|
+
},
|
|
306
|
+
"attn_head512": {
|
|
307
|
+
"kernel": "attention_head512_f16.wgsl",
|
|
308
|
+
"entry": "main",
|
|
309
|
+
"digest": "sha256:e6d5ad9ebeb226524a9f9e664110b3ecd37374e11201f36b8d2683e28254ee0a",
|
|
310
|
+
"precision": {
|
|
311
|
+
"activationDtype": "f16",
|
|
312
|
+
"kvDtype": "f16"
|
|
313
|
+
}
|
|
314
|
+
},
|
|
315
|
+
"lm_head_gemv": {
|
|
316
|
+
"kernel": "matmul_gemv_subgroup.wgsl",
|
|
317
|
+
"entry": "main_multicol",
|
|
318
|
+
"digest": "sha256:e41f94574d5ac54dd2710036da5d5acc643a483b79b2d74b86825efdaaa7438f",
|
|
319
|
+
"constants": {
|
|
320
|
+
"MULTICOL_COLS_PER_WG": 64,
|
|
321
|
+
"MULTICOL_THREADS_PER_COL": 4
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
"lm_head_gemv_stable": {
|
|
325
|
+
"kernel": "matmul_gemv_subgroup.wgsl",
|
|
326
|
+
"entry": "main_multicol",
|
|
327
|
+
"digest": "sha256:e41f94574d5ac54dd2710036da5d5acc643a483b79b2d74b86825efdaaa7438f",
|
|
328
|
+
"constants": {
|
|
329
|
+
"MULTICOL_COLS_PER_WG": 64,
|
|
330
|
+
"MULTICOL_THREADS_PER_COL": 4
|
|
331
|
+
},
|
|
332
|
+
"precision": {
|
|
333
|
+
"inputDtype": "f32",
|
|
334
|
+
"outputDtype": "f32"
|
|
335
|
+
}
|
|
336
|
+
},
|
|
337
|
+
"lm_head_prefill_stable": {
|
|
338
|
+
"kernel": "matmul_f16w_f32a.wgsl",
|
|
339
|
+
"entry": "main",
|
|
340
|
+
"digest": "sha256:027a8f1cd9713cbe0b0ada160bd175e0542bb90896ad85441b023522d9a1befc",
|
|
341
|
+
"precision": {
|
|
342
|
+
"inputDtype": "f32",
|
|
343
|
+
"outputDtype": "f32"
|
|
344
|
+
}
|
|
345
|
+
},
|
|
346
|
+
"prefill_embedding_override_cast": {
|
|
347
|
+
"kernel": "cast_f32_to_f16.wgsl",
|
|
348
|
+
"entry": "main",
|
|
349
|
+
"digest": "sha256:5ce9708402e1a01aa892f1519b5be967076bc3b3d91366cacbc9f0d37dcc5add",
|
|
350
|
+
"precision": {
|
|
351
|
+
"inputDtype": "f32",
|
|
352
|
+
"outputDtype": "f16"
|
|
353
|
+
}
|
|
354
|
+
},
|
|
355
|
+
"sample": {
|
|
356
|
+
"kernel": "sample.wgsl",
|
|
357
|
+
"entry": "sample_single_pass",
|
|
358
|
+
"digest": "sha256:7ff3dd675b4737d920e0b3889e15c4fedde8410a353bbc6d4651db76ce69eb9b"
|
|
359
|
+
}
|
|
360
|
+
},
|
|
361
|
+
"preLayer": [
|
|
362
|
+
[
|
|
363
|
+
"embed",
|
|
364
|
+
"embed",
|
|
365
|
+
"embed_tokens"
|
|
366
|
+
],
|
|
367
|
+
[
|
|
368
|
+
"cast",
|
|
369
|
+
"prefill_embedding_override_cast"
|
|
370
|
+
]
|
|
371
|
+
],
|
|
372
|
+
"decode": [
|
|
373
|
+
[
|
|
374
|
+
"input_norm",
|
|
375
|
+
"rmsnorm"
|
|
376
|
+
],
|
|
377
|
+
[
|
|
378
|
+
"q_proj",
|
|
379
|
+
"q4_decode_gemv",
|
|
380
|
+
"layer.{L}.self_attn.q_proj"
|
|
381
|
+
],
|
|
382
|
+
[
|
|
383
|
+
"k_proj",
|
|
384
|
+
"q4_decode_gemv",
|
|
385
|
+
"layer.{L}.self_attn.k_proj"
|
|
386
|
+
],
|
|
387
|
+
[
|
|
388
|
+
"v_proj",
|
|
389
|
+
"q4_decode_gemv",
|
|
390
|
+
"layer.{L}.self_attn.v_proj"
|
|
391
|
+
],
|
|
392
|
+
[
|
|
393
|
+
"rope_q",
|
|
394
|
+
"rope"
|
|
395
|
+
],
|
|
396
|
+
[
|
|
397
|
+
"rope_k",
|
|
398
|
+
"rope"
|
|
399
|
+
],
|
|
400
|
+
[
|
|
401
|
+
"attention",
|
|
402
|
+
"attn_decode"
|
|
403
|
+
],
|
|
404
|
+
[
|
|
405
|
+
"o_proj",
|
|
406
|
+
"q4_decode_gemv",
|
|
407
|
+
"layer.{L}.self_attn.o_proj"
|
|
408
|
+
],
|
|
409
|
+
[
|
|
410
|
+
"attn_residual",
|
|
411
|
+
"residual"
|
|
412
|
+
],
|
|
413
|
+
[
|
|
414
|
+
"post_attn_norm",
|
|
415
|
+
"rmsnorm"
|
|
416
|
+
],
|
|
417
|
+
[
|
|
418
|
+
"gate_proj",
|
|
419
|
+
"q4_decode_gemv",
|
|
420
|
+
"layer.{L}.mlp.gate_proj"
|
|
421
|
+
],
|
|
422
|
+
[
|
|
423
|
+
"up_proj",
|
|
424
|
+
"q4_decode_gemv",
|
|
425
|
+
"layer.{L}.mlp.up_proj"
|
|
426
|
+
],
|
|
427
|
+
[
|
|
428
|
+
"activation",
|
|
429
|
+
"gelu"
|
|
430
|
+
],
|
|
431
|
+
[
|
|
432
|
+
"down_proj",
|
|
433
|
+
"q4_decode_gemv",
|
|
434
|
+
"layer.{L}.mlp.down_proj"
|
|
435
|
+
],
|
|
436
|
+
[
|
|
437
|
+
"ffn_residual",
|
|
438
|
+
"residual"
|
|
439
|
+
]
|
|
440
|
+
],
|
|
441
|
+
"prefill": [
|
|
442
|
+
{
|
|
443
|
+
"layers": [
|
|
444
|
+
0,
|
|
445
|
+
1,
|
|
446
|
+
2,
|
|
447
|
+
3,
|
|
448
|
+
4,
|
|
449
|
+
6,
|
|
450
|
+
7,
|
|
451
|
+
8,
|
|
452
|
+
9,
|
|
453
|
+
10,
|
|
454
|
+
12,
|
|
455
|
+
13,
|
|
456
|
+
14,
|
|
457
|
+
15,
|
|
458
|
+
16,
|
|
459
|
+
18,
|
|
460
|
+
19,
|
|
461
|
+
20,
|
|
462
|
+
21,
|
|
463
|
+
22,
|
|
464
|
+
24,
|
|
465
|
+
25,
|
|
466
|
+
26,
|
|
467
|
+
27,
|
|
468
|
+
28
|
|
469
|
+
],
|
|
470
|
+
"steps": [
|
|
471
|
+
[
|
|
472
|
+
"input_norm",
|
|
473
|
+
"rmsnorm"
|
|
474
|
+
],
|
|
475
|
+
[
|
|
476
|
+
"q_proj",
|
|
477
|
+
"q4_widetile",
|
|
478
|
+
"layer.{L}.self_attn.q_proj"
|
|
479
|
+
],
|
|
480
|
+
[
|
|
481
|
+
"k_proj",
|
|
482
|
+
"q4_widetile",
|
|
483
|
+
"layer.{L}.self_attn.k_proj"
|
|
484
|
+
],
|
|
485
|
+
[
|
|
486
|
+
"v_proj",
|
|
487
|
+
"q4_widetile",
|
|
488
|
+
"layer.{L}.self_attn.v_proj"
|
|
489
|
+
],
|
|
490
|
+
[
|
|
491
|
+
"rope_q",
|
|
492
|
+
"rope"
|
|
493
|
+
],
|
|
494
|
+
[
|
|
495
|
+
"rope_k",
|
|
496
|
+
"rope"
|
|
497
|
+
],
|
|
498
|
+
[
|
|
499
|
+
"attention",
|
|
500
|
+
"attn_head256"
|
|
501
|
+
],
|
|
502
|
+
[
|
|
503
|
+
"o_proj",
|
|
504
|
+
"q4_widetile",
|
|
505
|
+
"layer.{L}.self_attn.o_proj"
|
|
506
|
+
],
|
|
507
|
+
[
|
|
508
|
+
"attn_residual",
|
|
509
|
+
"residual"
|
|
510
|
+
],
|
|
511
|
+
[
|
|
512
|
+
"post_attn_norm",
|
|
513
|
+
"rmsnorm"
|
|
514
|
+
],
|
|
515
|
+
[
|
|
516
|
+
"gate_proj",
|
|
517
|
+
"q4_widetile",
|
|
518
|
+
"layer.{L}.mlp.gate_proj"
|
|
519
|
+
],
|
|
520
|
+
[
|
|
521
|
+
"up_proj",
|
|
522
|
+
"q4_widetile",
|
|
523
|
+
"layer.{L}.mlp.up_proj"
|
|
524
|
+
],
|
|
525
|
+
[
|
|
526
|
+
"activation",
|
|
527
|
+
"gelu"
|
|
528
|
+
],
|
|
529
|
+
[
|
|
530
|
+
"down_proj",
|
|
531
|
+
"q4_widetile",
|
|
532
|
+
"layer.{L}.mlp.down_proj"
|
|
533
|
+
],
|
|
534
|
+
[
|
|
535
|
+
"ffn_residual",
|
|
536
|
+
"residual"
|
|
537
|
+
]
|
|
538
|
+
]
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
"layers": [
|
|
542
|
+
5,
|
|
543
|
+
11,
|
|
544
|
+
17,
|
|
545
|
+
23,
|
|
546
|
+
29
|
|
547
|
+
],
|
|
548
|
+
"steps": [
|
|
549
|
+
[
|
|
550
|
+
"input_norm",
|
|
551
|
+
"rmsnorm"
|
|
552
|
+
],
|
|
553
|
+
[
|
|
554
|
+
"q_proj",
|
|
555
|
+
"q4_widetile",
|
|
556
|
+
"layer.{L}.self_attn.q_proj"
|
|
557
|
+
],
|
|
558
|
+
[
|
|
559
|
+
"k_proj",
|
|
560
|
+
"q4_widetile",
|
|
561
|
+
"layer.{L}.self_attn.k_proj"
|
|
562
|
+
],
|
|
563
|
+
[
|
|
564
|
+
"v_proj",
|
|
565
|
+
"q4_widetile",
|
|
566
|
+
"layer.{L}.self_attn.v_proj"
|
|
567
|
+
],
|
|
568
|
+
[
|
|
569
|
+
"rope_q",
|
|
570
|
+
"rope"
|
|
571
|
+
],
|
|
572
|
+
[
|
|
573
|
+
"rope_k",
|
|
574
|
+
"rope"
|
|
575
|
+
],
|
|
576
|
+
[
|
|
577
|
+
"attention",
|
|
578
|
+
"attn_head512"
|
|
579
|
+
],
|
|
580
|
+
[
|
|
581
|
+
"o_proj",
|
|
582
|
+
"q4_widetile",
|
|
583
|
+
"layer.{L}.self_attn.o_proj"
|
|
584
|
+
],
|
|
585
|
+
[
|
|
586
|
+
"attn_residual",
|
|
587
|
+
"residual"
|
|
588
|
+
],
|
|
589
|
+
[
|
|
590
|
+
"post_attn_norm",
|
|
591
|
+
"rmsnorm"
|
|
592
|
+
],
|
|
593
|
+
[
|
|
594
|
+
"gate_proj",
|
|
595
|
+
"q4_widetile",
|
|
596
|
+
"layer.{L}.mlp.gate_proj"
|
|
597
|
+
],
|
|
598
|
+
[
|
|
599
|
+
"up_proj",
|
|
600
|
+
"q4_widetile",
|
|
601
|
+
"layer.{L}.mlp.up_proj"
|
|
602
|
+
],
|
|
603
|
+
[
|
|
604
|
+
"activation",
|
|
605
|
+
"gelu"
|
|
606
|
+
],
|
|
607
|
+
[
|
|
608
|
+
"down_proj",
|
|
609
|
+
"q4_widetile",
|
|
610
|
+
"layer.{L}.mlp.down_proj"
|
|
611
|
+
],
|
|
612
|
+
[
|
|
613
|
+
"ffn_residual",
|
|
614
|
+
"residual"
|
|
615
|
+
]
|
|
616
|
+
]
|
|
617
|
+
}
|
|
618
|
+
],
|
|
619
|
+
"postLayer": [
|
|
620
|
+
[
|
|
621
|
+
"final_norm",
|
|
622
|
+
"final_norm_stable"
|
|
623
|
+
],
|
|
624
|
+
[
|
|
625
|
+
"lm_head",
|
|
626
|
+
"lm_head_gemv_stable",
|
|
627
|
+
"lm_head"
|
|
628
|
+
],
|
|
629
|
+
[
|
|
630
|
+
"lm_head_prefill",
|
|
631
|
+
"lm_head_prefill_stable",
|
|
632
|
+
"lm_head"
|
|
633
|
+
],
|
|
634
|
+
[
|
|
635
|
+
"sample",
|
|
636
|
+
"sample"
|
|
637
|
+
]
|
|
638
|
+
],
|
|
639
|
+
"policies": {
|
|
640
|
+
"unsupportedPrecision": "error",
|
|
641
|
+
"dtypeTransition": "require_cast_step",
|
|
642
|
+
"unresolvedKernel": "error"
|
|
643
|
+
}
|
|
644
|
+
},
|
|
645
|
+
"modelType": "diffusion_gemma"
|
|
646
|
+
}
|
|
@@ -160,7 +160,7 @@
|
|
|
160
160
|
"rmsnorm": {
|
|
161
161
|
"kernel": "rmsnorm.wgsl",
|
|
162
162
|
"entry": "main",
|
|
163
|
-
"digest": "sha256:
|
|
163
|
+
"digest": "sha256:284d3efb0ad0991fc57ece5f634cbc8a931fcab36f193b2b6832561d4cc79ef1"
|
|
164
164
|
},
|
|
165
165
|
"tiled": {
|
|
166
166
|
"kernel": "matmul_f16w_f32a.wgsl",
|
|
@@ -180,12 +180,12 @@
|
|
|
180
180
|
"residual": {
|
|
181
181
|
"kernel": "residual.wgsl",
|
|
182
182
|
"entry": "main",
|
|
183
|
-
"digest": "sha256:
|
|
183
|
+
"digest": "sha256:abd19bc08ad668a7cad562e2bc0a4be1aa8827ad4300d8d474b7fc2af4c27117"
|
|
184
184
|
},
|
|
185
185
|
"gelu": {
|
|
186
186
|
"kernel": "gelu.wgsl",
|
|
187
187
|
"entry": "main",
|
|
188
|
-
"digest": "sha256:
|
|
188
|
+
"digest": "sha256:7f8900b69de5107e4cf424cac0d4de1539591ece34e977ff30f6f7364460ab34",
|
|
189
189
|
"constants": {
|
|
190
190
|
"HAS_GATE": true
|
|
191
191
|
}
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"type": "every_n",
|
|
61
61
|
"globalPattern": null,
|
|
62
62
|
"period": 6,
|
|
63
|
-
"offset":
|
|
63
|
+
"offset": 5,
|
|
64
64
|
"layerTypes": null
|
|
65
65
|
},
|
|
66
66
|
"chatTemplate": {
|
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
"rmsnorm": {
|
|
134
134
|
"kernel": "rmsnorm.wgsl",
|
|
135
135
|
"entry": "main",
|
|
136
|
-
"digest": "sha256:
|
|
136
|
+
"digest": "sha256:284d3efb0ad0991fc57ece5f634cbc8a931fcab36f193b2b6832561d4cc79ef1"
|
|
137
137
|
},
|
|
138
138
|
"gemv": {
|
|
139
139
|
"kernel": "matmul_gemv_subgroup.wgsl",
|
|
@@ -156,12 +156,12 @@
|
|
|
156
156
|
"residual": {
|
|
157
157
|
"kernel": "residual.wgsl",
|
|
158
158
|
"entry": "main",
|
|
159
|
-
"digest": "sha256:
|
|
159
|
+
"digest": "sha256:abd19bc08ad668a7cad562e2bc0a4be1aa8827ad4300d8d474b7fc2af4c27117"
|
|
160
160
|
},
|
|
161
161
|
"gelu": {
|
|
162
162
|
"kernel": "gelu.wgsl",
|
|
163
163
|
"entry": "main",
|
|
164
|
-
"digest": "sha256:
|
|
164
|
+
"digest": "sha256:7f8900b69de5107e4cf424cac0d4de1539591ece34e977ff30f6f7364460ab34",
|
|
165
165
|
"constants": {
|
|
166
166
|
"HAS_GATE": true
|
|
167
167
|
}
|