doppler-gpu 0.4.3 → 0.4.4
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 +54 -33
- 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/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
|
@@ -0,0 +1,716 @@
|
|
|
1
|
+
{
|
|
2
|
+
"output": {
|
|
3
|
+
"baseDir": "models/local",
|
|
4
|
+
"modelBaseId": "gemma-4-12b-it-text-w4a16-ct-ehf16-af16",
|
|
5
|
+
"textOnly": true,
|
|
6
|
+
"fast": false
|
|
7
|
+
},
|
|
8
|
+
"quantization": {
|
|
9
|
+
"weights": "w4a16",
|
|
10
|
+
"embeddings": "f16",
|
|
11
|
+
"lmHead": "f16",
|
|
12
|
+
"vision": "f16",
|
|
13
|
+
"projector": "f16",
|
|
14
|
+
"audio": "f16",
|
|
15
|
+
"computePrecision": "f16",
|
|
16
|
+
"sourceTrainingQuantization": "qat",
|
|
17
|
+
"sourceQuantizationTarget": "w4a16",
|
|
18
|
+
"sourceQuantizationFormat": "compressed-tensors"
|
|
19
|
+
},
|
|
20
|
+
"manifest": {
|
|
21
|
+
"visionConfig": {
|
|
22
|
+
"_name_or_path": "",
|
|
23
|
+
"architectures": null,
|
|
24
|
+
"chunk_size_feed_forward": 0,
|
|
25
|
+
"dtype": null,
|
|
26
|
+
"id2label": {
|
|
27
|
+
"0": "LABEL_0",
|
|
28
|
+
"1": "LABEL_1"
|
|
29
|
+
},
|
|
30
|
+
"initializer_range": 0.02,
|
|
31
|
+
"is_encoder_decoder": false,
|
|
32
|
+
"label2id": {
|
|
33
|
+
"LABEL_0": 0,
|
|
34
|
+
"LABEL_1": 1
|
|
35
|
+
},
|
|
36
|
+
"mm_embed_dim": 3840,
|
|
37
|
+
"mm_posemb_size": 1120,
|
|
38
|
+
"model_patch_size": 48,
|
|
39
|
+
"model_type": "gemma4_unified_vision",
|
|
40
|
+
"num_soft_tokens": 280,
|
|
41
|
+
"output_attentions": false,
|
|
42
|
+
"output_hidden_states": false,
|
|
43
|
+
"output_proj_dims": 3840,
|
|
44
|
+
"patch_size": 16,
|
|
45
|
+
"pooling_kernel_size": 3,
|
|
46
|
+
"problem_type": null,
|
|
47
|
+
"return_dict": true,
|
|
48
|
+
"rms_norm_eps": 0.000001,
|
|
49
|
+
"vision_architecture": "gemma4",
|
|
50
|
+
"depth": 0,
|
|
51
|
+
"num_hidden_layers": 0,
|
|
52
|
+
"hidden_size": 3840,
|
|
53
|
+
"out_hidden_size": 3840,
|
|
54
|
+
"position_embedding_size": 1120,
|
|
55
|
+
"default_output_length": 280,
|
|
56
|
+
"hidden_activation": "gelu_pytorch_tanh",
|
|
57
|
+
"use_clipped_linears": true,
|
|
58
|
+
"standardize": false
|
|
59
|
+
},
|
|
60
|
+
"audioConfig": {
|
|
61
|
+
"_name_or_path": "",
|
|
62
|
+
"architectures": null,
|
|
63
|
+
"audio_embed_dim": 640,
|
|
64
|
+
"audio_samples_per_token": 640,
|
|
65
|
+
"chunk_size_feed_forward": 0,
|
|
66
|
+
"dtype": null,
|
|
67
|
+
"hidden_size": 640,
|
|
68
|
+
"id2label": {
|
|
69
|
+
"0": "LABEL_0",
|
|
70
|
+
"1": "LABEL_1"
|
|
71
|
+
},
|
|
72
|
+
"initializer_range": 0.02,
|
|
73
|
+
"is_encoder_decoder": false,
|
|
74
|
+
"label2id": {
|
|
75
|
+
"LABEL_0": 0,
|
|
76
|
+
"LABEL_1": 1
|
|
77
|
+
},
|
|
78
|
+
"model_type": "gemma4_unified_audio",
|
|
79
|
+
"output_attentions": false,
|
|
80
|
+
"output_hidden_states": false,
|
|
81
|
+
"output_proj_dims": 640,
|
|
82
|
+
"problem_type": null,
|
|
83
|
+
"return_dict": true,
|
|
84
|
+
"rms_norm_eps": 0.000001,
|
|
85
|
+
"audio_architecture": "gemma4",
|
|
86
|
+
"num_hidden_layers": 0,
|
|
87
|
+
"conv_kernel_size": 1,
|
|
88
|
+
"subsampling_conv_channels": [
|
|
89
|
+
1,
|
|
90
|
+
1
|
|
91
|
+
],
|
|
92
|
+
"attention_context_left": 13,
|
|
93
|
+
"attention_context_right": 0,
|
|
94
|
+
"attention_chunk_size": 1,
|
|
95
|
+
"attention_logit_cap": 50,
|
|
96
|
+
"attention_invalid_logits_value": -1000000000,
|
|
97
|
+
"residual_weight": 1,
|
|
98
|
+
"hidden_act": "silu",
|
|
99
|
+
"use_clipped_linears": true
|
|
100
|
+
},
|
|
101
|
+
"artifactIdentity": {
|
|
102
|
+
"sourceCheckpointId": "google/gemma-4-12B-it-qat-w4a16-ct",
|
|
103
|
+
"sourceRepo": "google/gemma-4-12B-it-qat-w4a16-ct",
|
|
104
|
+
"sourceRevision": "dcfe12254e8fb98c743f21efa05ff64937926c64",
|
|
105
|
+
"weightPackId": "gemma-4-12b-it-text-w4a16-ct-ehf16-af16-wp-catalog-v1",
|
|
106
|
+
"manifestVariantId": "gemma-4-12b-it-text-w4a16-ct-ehf16-af16-mv-w4a16-ct-reference-f16-dequant-v1",
|
|
107
|
+
"artifactCompleteness": "complete"
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"inference": {
|
|
111
|
+
"attention": {
|
|
112
|
+
"queryPreAttnScalar": 1,
|
|
113
|
+
"attnLogitSoftcapping": null,
|
|
114
|
+
"slidingWindow": 1024,
|
|
115
|
+
"queryKeyNorm": true,
|
|
116
|
+
"valueNorm": true,
|
|
117
|
+
"causal": true,
|
|
118
|
+
"attentionBias": false,
|
|
119
|
+
"attentionOutputGate": false
|
|
120
|
+
},
|
|
121
|
+
"normalization": {
|
|
122
|
+
"rmsNormEps": 0.000001,
|
|
123
|
+
"rmsNormWeightOffset": false,
|
|
124
|
+
"postAttentionNorm": true,
|
|
125
|
+
"preFeedforwardNorm": true,
|
|
126
|
+
"postFeedforwardNorm": true
|
|
127
|
+
},
|
|
128
|
+
"ffn": {
|
|
129
|
+
"activation": "gelu",
|
|
130
|
+
"gatedActivation": true,
|
|
131
|
+
"useDoubleWideMlp": false,
|
|
132
|
+
"swigluLimit": null
|
|
133
|
+
},
|
|
134
|
+
"rope": {
|
|
135
|
+
"ropeTheta": 1000000,
|
|
136
|
+
"ropeLocalTheta": 10000,
|
|
137
|
+
"ropeInterleaved": false,
|
|
138
|
+
"mropeInterleaved": false,
|
|
139
|
+
"mropeSection": null,
|
|
140
|
+
"partialRotaryFactor": 0.25,
|
|
141
|
+
"ropeLocalPartialRotaryFactor": null,
|
|
142
|
+
"ropeFrequencyBaseDim": 512,
|
|
143
|
+
"ropeLocalFrequencyBaseDim": null,
|
|
144
|
+
"ropeScalingType": null,
|
|
145
|
+
"ropeScalingFactor": 1,
|
|
146
|
+
"ropeLocalScalingType": null,
|
|
147
|
+
"ropeLocalScalingFactor": 1,
|
|
148
|
+
"yarnBetaFast": null,
|
|
149
|
+
"yarnBetaSlow": null,
|
|
150
|
+
"yarnOriginalMaxPos": null,
|
|
151
|
+
"ropeLocalYarnBetaFast": null,
|
|
152
|
+
"ropeLocalYarnBetaSlow": null,
|
|
153
|
+
"ropeLocalYarnOriginalMaxPos": null
|
|
154
|
+
},
|
|
155
|
+
"output": {
|
|
156
|
+
"finalLogitSoftcapping": 30,
|
|
157
|
+
"tieWordEmbeddings": true,
|
|
158
|
+
"scaleEmbeddings": true,
|
|
159
|
+
"embeddingTranspose": false,
|
|
160
|
+
"embeddingVocabSize": 262144,
|
|
161
|
+
"embeddingPostprocessor": null
|
|
162
|
+
},
|
|
163
|
+
"layerPattern": {
|
|
164
|
+
"type": "custom",
|
|
165
|
+
"globalPattern": null,
|
|
166
|
+
"period": null,
|
|
167
|
+
"offset": null,
|
|
168
|
+
"layerTypes": [
|
|
169
|
+
"sliding_attention",
|
|
170
|
+
"sliding_attention",
|
|
171
|
+
"sliding_attention",
|
|
172
|
+
"sliding_attention",
|
|
173
|
+
"sliding_attention",
|
|
174
|
+
"full_attention",
|
|
175
|
+
"sliding_attention",
|
|
176
|
+
"sliding_attention",
|
|
177
|
+
"sliding_attention",
|
|
178
|
+
"sliding_attention",
|
|
179
|
+
"sliding_attention",
|
|
180
|
+
"full_attention",
|
|
181
|
+
"sliding_attention",
|
|
182
|
+
"sliding_attention",
|
|
183
|
+
"sliding_attention",
|
|
184
|
+
"sliding_attention",
|
|
185
|
+
"sliding_attention",
|
|
186
|
+
"full_attention",
|
|
187
|
+
"sliding_attention",
|
|
188
|
+
"sliding_attention",
|
|
189
|
+
"sliding_attention",
|
|
190
|
+
"sliding_attention",
|
|
191
|
+
"sliding_attention",
|
|
192
|
+
"full_attention",
|
|
193
|
+
"sliding_attention",
|
|
194
|
+
"sliding_attention",
|
|
195
|
+
"sliding_attention",
|
|
196
|
+
"sliding_attention",
|
|
197
|
+
"sliding_attention",
|
|
198
|
+
"full_attention",
|
|
199
|
+
"sliding_attention",
|
|
200
|
+
"sliding_attention",
|
|
201
|
+
"sliding_attention",
|
|
202
|
+
"sliding_attention",
|
|
203
|
+
"sliding_attention",
|
|
204
|
+
"full_attention",
|
|
205
|
+
"sliding_attention",
|
|
206
|
+
"sliding_attention",
|
|
207
|
+
"sliding_attention",
|
|
208
|
+
"sliding_attention",
|
|
209
|
+
"sliding_attention",
|
|
210
|
+
"full_attention",
|
|
211
|
+
"sliding_attention",
|
|
212
|
+
"sliding_attention",
|
|
213
|
+
"sliding_attention",
|
|
214
|
+
"sliding_attention",
|
|
215
|
+
"sliding_attention",
|
|
216
|
+
"full_attention"
|
|
217
|
+
]
|
|
218
|
+
},
|
|
219
|
+
"chatTemplate": {
|
|
220
|
+
"type": "gemma4",
|
|
221
|
+
"enabled": true
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
"session": {
|
|
225
|
+
"compute": {
|
|
226
|
+
"defaults": {
|
|
227
|
+
"activationDtype": "f16",
|
|
228
|
+
"mathDtype": "f16",
|
|
229
|
+
"accumDtype": "f16",
|
|
230
|
+
"outputDtype": "f16"
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
"kvcache": {
|
|
234
|
+
"kvDtype": "f16",
|
|
235
|
+
"layout": "contiguous",
|
|
236
|
+
"pageSize": 256,
|
|
237
|
+
"tiering": {
|
|
238
|
+
"mode": "off"
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
"decodeLoop": {
|
|
242
|
+
"batchSize": 8,
|
|
243
|
+
"stopCheckMode": "batch",
|
|
244
|
+
"readbackInterval": 8,
|
|
245
|
+
"readbackMode": "overlapped",
|
|
246
|
+
"ringTokens": 2,
|
|
247
|
+
"ringStop": 1,
|
|
248
|
+
"ringStaging": 2,
|
|
249
|
+
"disableCommandBatching": false
|
|
250
|
+
},
|
|
251
|
+
"perLayerInputs": {
|
|
252
|
+
"materialization": "gpu_split_tables",
|
|
253
|
+
"rowCache": {
|
|
254
|
+
"mode": "lru",
|
|
255
|
+
"maxRows": 512,
|
|
256
|
+
"maxBytes": 268435456,
|
|
257
|
+
"decodedDtype": "f16"
|
|
258
|
+
},
|
|
259
|
+
"prefetch": {
|
|
260
|
+
"mode": "next_token",
|
|
261
|
+
"rowsAhead": 1
|
|
262
|
+
},
|
|
263
|
+
"gpuUpload": {
|
|
264
|
+
"mode": "per_step_slices",
|
|
265
|
+
"stagingRows": 2
|
|
266
|
+
},
|
|
267
|
+
"hotCache": {
|
|
268
|
+
"mode": "prepared_tokens",
|
|
269
|
+
"maxTokens": 4096,
|
|
270
|
+
"maxBytes": 268435456,
|
|
271
|
+
"outputDtype": "f16"
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
"prefillChunkSubmitMode": "sync",
|
|
275
|
+
"prefillTokenChunkSize": 64,
|
|
276
|
+
"useFlashPrefillAttention": false,
|
|
277
|
+
"useWideTileQ4KPrefill": false,
|
|
278
|
+
"retainQ4KMaterialization": false
|
|
279
|
+
},
|
|
280
|
+
"largeWeights": {
|
|
281
|
+
"lmHeadChunkRows": 65536,
|
|
282
|
+
"gpuResidentOverrides": [
|
|
283
|
+
"model.language_model.embed_tokens.weight"
|
|
284
|
+
]
|
|
285
|
+
},
|
|
286
|
+
"execution": {
|
|
287
|
+
"kernels": {
|
|
288
|
+
"embed": {
|
|
289
|
+
"kernel": "gather.wgsl",
|
|
290
|
+
"entry": "main",
|
|
291
|
+
"digest": "sha256:4b12653c53247b32ebde7f6cf6a989d6248977e3816c761540b990b5f9818cb6"
|
|
292
|
+
},
|
|
293
|
+
"rmsnorm": {
|
|
294
|
+
"kernel": "rmsnorm.wgsl",
|
|
295
|
+
"entry": "main",
|
|
296
|
+
"digest": "sha256:284d3efb0ad0991fc57ece5f634cbc8a931fcab36f193b2b6832561d4cc79ef1"
|
|
297
|
+
},
|
|
298
|
+
"final_norm_stable": {
|
|
299
|
+
"kernel": "rmsnorm.wgsl",
|
|
300
|
+
"entry": "main",
|
|
301
|
+
"digest": "sha256:284d3efb0ad0991fc57ece5f634cbc8a931fcab36f193b2b6832561d4cc79ef1",
|
|
302
|
+
"precision": {
|
|
303
|
+
"inputDtype": "f32",
|
|
304
|
+
"outputDtype": "f32"
|
|
305
|
+
}
|
|
306
|
+
},
|
|
307
|
+
"gemv": {
|
|
308
|
+
"kernel": "matmul_gemv_subgroup.wgsl",
|
|
309
|
+
"entry": "main_vec4",
|
|
310
|
+
"digest": "sha256:2ea9aea659367210fbf61d922c0d4ee17cdac68ffb506b3bc5516e498071e011"
|
|
311
|
+
},
|
|
312
|
+
"rope": {
|
|
313
|
+
"kernel": "rope.wgsl",
|
|
314
|
+
"entry": "main",
|
|
315
|
+
"digest": "sha256:b2da9d396668981dab9794c2973b668279f768994466b083d2105730555e1a5b"
|
|
316
|
+
},
|
|
317
|
+
"attn_decode": {
|
|
318
|
+
"kernel": "attention_decode_online_f16.wgsl",
|
|
319
|
+
"entry": "main",
|
|
320
|
+
"digest": "sha256:b1a3b2f6366d36e119f5ba0c0b1c9bcd7d830f4a053dea9f60505fa91c6e67b0",
|
|
321
|
+
"precision": {
|
|
322
|
+
"kvDtype": "f16",
|
|
323
|
+
"activationDtype": "f16"
|
|
324
|
+
}
|
|
325
|
+
},
|
|
326
|
+
"residual": {
|
|
327
|
+
"kernel": "residual.wgsl",
|
|
328
|
+
"entry": "main",
|
|
329
|
+
"digest": "sha256:abd19bc08ad668a7cad562e2bc0a4be1aa8827ad4300d8d474b7fc2af4c27117"
|
|
330
|
+
},
|
|
331
|
+
"gelu": {
|
|
332
|
+
"kernel": "gelu.wgsl",
|
|
333
|
+
"entry": "main",
|
|
334
|
+
"digest": "sha256:7f8900b69de5107e4cf424cac0d4de1539591ece34e977ff30f6f7364460ab34",
|
|
335
|
+
"constants": {
|
|
336
|
+
"HAS_GATE": true
|
|
337
|
+
}
|
|
338
|
+
},
|
|
339
|
+
"tiled": {
|
|
340
|
+
"kernel": "matmul_f16w_f32a.wgsl",
|
|
341
|
+
"entry": "main",
|
|
342
|
+
"digest": "sha256:027a8f1cd9713cbe0b0ada160bd175e0542bb90896ad85441b023522d9a1befc"
|
|
343
|
+
},
|
|
344
|
+
"attn_stream": {
|
|
345
|
+
"kernel": "attention_streaming_f16.wgsl",
|
|
346
|
+
"entry": "main",
|
|
347
|
+
"digest": "sha256:d129cdd68480c7309d0de66c5f5d74451c99b629189036e2f7cad9a1882d3d42",
|
|
348
|
+
"precision": {
|
|
349
|
+
"kvDtype": "f16",
|
|
350
|
+
"activationDtype": "f16"
|
|
351
|
+
}
|
|
352
|
+
},
|
|
353
|
+
"attn_small": {
|
|
354
|
+
"kernel": "attention_small_f16.wgsl",
|
|
355
|
+
"entry": "main",
|
|
356
|
+
"digest": "sha256:b8280518cf475a6dce78760f545cd00579ccd7a4f8a42681dd62e888e6557ee9",
|
|
357
|
+
"precision": {
|
|
358
|
+
"kvDtype": "f16",
|
|
359
|
+
"activationDtype": "f16"
|
|
360
|
+
}
|
|
361
|
+
},
|
|
362
|
+
"attn_head256": {
|
|
363
|
+
"kernel": "attention_streaming_f16.wgsl",
|
|
364
|
+
"entry": "main",
|
|
365
|
+
"digest": "sha256:d129cdd68480c7309d0de66c5f5d74451c99b629189036e2f7cad9a1882d3d42",
|
|
366
|
+
"precision": {
|
|
367
|
+
"kvDtype": "f16",
|
|
368
|
+
"activationDtype": "f16"
|
|
369
|
+
}
|
|
370
|
+
},
|
|
371
|
+
"attn_head512": {
|
|
372
|
+
"kernel": "attention_head512_f16.wgsl",
|
|
373
|
+
"entry": "main",
|
|
374
|
+
"digest": "sha256:e6d5ad9ebeb226524a9f9e664110b3ecd37374e11201f36b8d2683e28254ee0a",
|
|
375
|
+
"precision": {
|
|
376
|
+
"kvDtype": "f16",
|
|
377
|
+
"activationDtype": "f16"
|
|
378
|
+
}
|
|
379
|
+
},
|
|
380
|
+
"lm_head_gemv": {
|
|
381
|
+
"kernel": "matmul_gemv_subgroup.wgsl",
|
|
382
|
+
"entry": "main_multicol",
|
|
383
|
+
"digest": "sha256:e41f94574d5ac54dd2710036da5d5acc643a483b79b2d74b86825efdaaa7438f",
|
|
384
|
+
"constants": {
|
|
385
|
+
"MULTICOL_COLS_PER_WG": 64,
|
|
386
|
+
"MULTICOL_THREADS_PER_COL": 4
|
|
387
|
+
}
|
|
388
|
+
},
|
|
389
|
+
"lm_head_gemv_stable": {
|
|
390
|
+
"kernel": "matmul_gemv_subgroup.wgsl",
|
|
391
|
+
"entry": "main_multicol",
|
|
392
|
+
"digest": "sha256:e41f94574d5ac54dd2710036da5d5acc643a483b79b2d74b86825efdaaa7438f",
|
|
393
|
+
"constants": {
|
|
394
|
+
"MULTICOL_COLS_PER_WG": 64,
|
|
395
|
+
"MULTICOL_THREADS_PER_COL": 4
|
|
396
|
+
},
|
|
397
|
+
"precision": {
|
|
398
|
+
"inputDtype": "f32",
|
|
399
|
+
"outputDtype": "f32"
|
|
400
|
+
}
|
|
401
|
+
},
|
|
402
|
+
"lm_head_prefill_stable": {
|
|
403
|
+
"kernel": "matmul_f16w_f32a.wgsl",
|
|
404
|
+
"entry": "main",
|
|
405
|
+
"digest": "sha256:027a8f1cd9713cbe0b0ada160bd175e0542bb90896ad85441b023522d9a1befc",
|
|
406
|
+
"precision": {
|
|
407
|
+
"inputDtype": "f32",
|
|
408
|
+
"outputDtype": "f32"
|
|
409
|
+
}
|
|
410
|
+
},
|
|
411
|
+
"sample": {
|
|
412
|
+
"kernel": "sample.wgsl",
|
|
413
|
+
"entry": "sample_single_pass",
|
|
414
|
+
"digest": "sha256:7ff3dd675b4737d920e0b3889e15c4fedde8410a353bbc6d4651db76ce69eb9b"
|
|
415
|
+
}
|
|
416
|
+
},
|
|
417
|
+
"preLayer": [
|
|
418
|
+
[
|
|
419
|
+
"embed",
|
|
420
|
+
"embed",
|
|
421
|
+
"embed_tokens"
|
|
422
|
+
]
|
|
423
|
+
],
|
|
424
|
+
"decode": [
|
|
425
|
+
[
|
|
426
|
+
"input_norm",
|
|
427
|
+
"rmsnorm"
|
|
428
|
+
],
|
|
429
|
+
[
|
|
430
|
+
"q_proj",
|
|
431
|
+
"gemv",
|
|
432
|
+
"layer.{L}.self_attn.q_proj"
|
|
433
|
+
],
|
|
434
|
+
[
|
|
435
|
+
"k_proj",
|
|
436
|
+
"gemv",
|
|
437
|
+
"layer.{L}.self_attn.k_proj"
|
|
438
|
+
],
|
|
439
|
+
[
|
|
440
|
+
"v_proj",
|
|
441
|
+
"gemv",
|
|
442
|
+
"layer.{L}.self_attn.v_proj"
|
|
443
|
+
],
|
|
444
|
+
[
|
|
445
|
+
"rope_q",
|
|
446
|
+
"rope"
|
|
447
|
+
],
|
|
448
|
+
[
|
|
449
|
+
"rope_k",
|
|
450
|
+
"rope"
|
|
451
|
+
],
|
|
452
|
+
[
|
|
453
|
+
"attention",
|
|
454
|
+
"attn_decode"
|
|
455
|
+
],
|
|
456
|
+
[
|
|
457
|
+
"o_proj",
|
|
458
|
+
"gemv",
|
|
459
|
+
"layer.{L}.self_attn.o_proj"
|
|
460
|
+
],
|
|
461
|
+
[
|
|
462
|
+
"attn_residual",
|
|
463
|
+
"residual"
|
|
464
|
+
],
|
|
465
|
+
[
|
|
466
|
+
"post_attn_norm",
|
|
467
|
+
"rmsnorm"
|
|
468
|
+
],
|
|
469
|
+
[
|
|
470
|
+
"gate_proj",
|
|
471
|
+
"gemv",
|
|
472
|
+
"layer.{L}.mlp.gate_proj"
|
|
473
|
+
],
|
|
474
|
+
[
|
|
475
|
+
"up_proj",
|
|
476
|
+
"gemv",
|
|
477
|
+
"layer.{L}.mlp.up_proj"
|
|
478
|
+
],
|
|
479
|
+
[
|
|
480
|
+
"activation",
|
|
481
|
+
"gelu"
|
|
482
|
+
],
|
|
483
|
+
[
|
|
484
|
+
"down_proj",
|
|
485
|
+
"gemv",
|
|
486
|
+
"layer.{L}.mlp.down_proj"
|
|
487
|
+
],
|
|
488
|
+
[
|
|
489
|
+
"ffn_residual",
|
|
490
|
+
"residual"
|
|
491
|
+
]
|
|
492
|
+
],
|
|
493
|
+
"prefill": [
|
|
494
|
+
{
|
|
495
|
+
"layers": [
|
|
496
|
+
0,
|
|
497
|
+
1,
|
|
498
|
+
2,
|
|
499
|
+
3,
|
|
500
|
+
4,
|
|
501
|
+
6,
|
|
502
|
+
7,
|
|
503
|
+
8,
|
|
504
|
+
9,
|
|
505
|
+
10,
|
|
506
|
+
12,
|
|
507
|
+
13,
|
|
508
|
+
14,
|
|
509
|
+
15,
|
|
510
|
+
16,
|
|
511
|
+
18,
|
|
512
|
+
19,
|
|
513
|
+
20,
|
|
514
|
+
21,
|
|
515
|
+
22,
|
|
516
|
+
24,
|
|
517
|
+
25,
|
|
518
|
+
26,
|
|
519
|
+
27,
|
|
520
|
+
28,
|
|
521
|
+
30,
|
|
522
|
+
31,
|
|
523
|
+
32,
|
|
524
|
+
33,
|
|
525
|
+
34,
|
|
526
|
+
36,
|
|
527
|
+
37,
|
|
528
|
+
38,
|
|
529
|
+
39,
|
|
530
|
+
40,
|
|
531
|
+
42,
|
|
532
|
+
43,
|
|
533
|
+
44,
|
|
534
|
+
45,
|
|
535
|
+
46
|
|
536
|
+
],
|
|
537
|
+
"steps": [
|
|
538
|
+
[
|
|
539
|
+
"input_norm",
|
|
540
|
+
"rmsnorm"
|
|
541
|
+
],
|
|
542
|
+
[
|
|
543
|
+
"q_proj",
|
|
544
|
+
"tiled",
|
|
545
|
+
"layer.{L}.self_attn.q_proj"
|
|
546
|
+
],
|
|
547
|
+
[
|
|
548
|
+
"k_proj",
|
|
549
|
+
"tiled",
|
|
550
|
+
"layer.{L}.self_attn.k_proj"
|
|
551
|
+
],
|
|
552
|
+
[
|
|
553
|
+
"v_proj",
|
|
554
|
+
"tiled",
|
|
555
|
+
"layer.{L}.self_attn.v_proj"
|
|
556
|
+
],
|
|
557
|
+
[
|
|
558
|
+
"rope_q",
|
|
559
|
+
"rope"
|
|
560
|
+
],
|
|
561
|
+
[
|
|
562
|
+
"rope_k",
|
|
563
|
+
"rope"
|
|
564
|
+
],
|
|
565
|
+
[
|
|
566
|
+
"attention",
|
|
567
|
+
"attn_head256"
|
|
568
|
+
],
|
|
569
|
+
[
|
|
570
|
+
"o_proj",
|
|
571
|
+
"tiled",
|
|
572
|
+
"layer.{L}.self_attn.o_proj"
|
|
573
|
+
],
|
|
574
|
+
[
|
|
575
|
+
"attn_residual",
|
|
576
|
+
"residual"
|
|
577
|
+
],
|
|
578
|
+
[
|
|
579
|
+
"post_attn_norm",
|
|
580
|
+
"rmsnorm"
|
|
581
|
+
],
|
|
582
|
+
[
|
|
583
|
+
"gate_proj",
|
|
584
|
+
"tiled",
|
|
585
|
+
"layer.{L}.mlp.gate_proj"
|
|
586
|
+
],
|
|
587
|
+
[
|
|
588
|
+
"up_proj",
|
|
589
|
+
"tiled",
|
|
590
|
+
"layer.{L}.mlp.up_proj"
|
|
591
|
+
],
|
|
592
|
+
[
|
|
593
|
+
"activation",
|
|
594
|
+
"gelu"
|
|
595
|
+
],
|
|
596
|
+
[
|
|
597
|
+
"down_proj",
|
|
598
|
+
"tiled",
|
|
599
|
+
"layer.{L}.mlp.down_proj"
|
|
600
|
+
],
|
|
601
|
+
[
|
|
602
|
+
"ffn_residual",
|
|
603
|
+
"residual"
|
|
604
|
+
]
|
|
605
|
+
]
|
|
606
|
+
},
|
|
607
|
+
{
|
|
608
|
+
"layers": [
|
|
609
|
+
5,
|
|
610
|
+
11,
|
|
611
|
+
17,
|
|
612
|
+
23,
|
|
613
|
+
29,
|
|
614
|
+
35,
|
|
615
|
+
41,
|
|
616
|
+
47
|
|
617
|
+
],
|
|
618
|
+
"steps": [
|
|
619
|
+
[
|
|
620
|
+
"input_norm",
|
|
621
|
+
"rmsnorm"
|
|
622
|
+
],
|
|
623
|
+
[
|
|
624
|
+
"q_proj",
|
|
625
|
+
"tiled",
|
|
626
|
+
"layer.{L}.self_attn.q_proj"
|
|
627
|
+
],
|
|
628
|
+
[
|
|
629
|
+
"k_proj",
|
|
630
|
+
"tiled",
|
|
631
|
+
"layer.{L}.self_attn.k_proj"
|
|
632
|
+
],
|
|
633
|
+
[
|
|
634
|
+
"v_proj",
|
|
635
|
+
"tiled",
|
|
636
|
+
"layer.{L}.self_attn.v_proj"
|
|
637
|
+
],
|
|
638
|
+
[
|
|
639
|
+
"rope_q",
|
|
640
|
+
"rope"
|
|
641
|
+
],
|
|
642
|
+
[
|
|
643
|
+
"rope_k",
|
|
644
|
+
"rope"
|
|
645
|
+
],
|
|
646
|
+
[
|
|
647
|
+
"attention",
|
|
648
|
+
"attn_head512"
|
|
649
|
+
],
|
|
650
|
+
[
|
|
651
|
+
"o_proj",
|
|
652
|
+
"tiled",
|
|
653
|
+
"layer.{L}.self_attn.o_proj"
|
|
654
|
+
],
|
|
655
|
+
[
|
|
656
|
+
"attn_residual",
|
|
657
|
+
"residual"
|
|
658
|
+
],
|
|
659
|
+
[
|
|
660
|
+
"post_attn_norm",
|
|
661
|
+
"rmsnorm"
|
|
662
|
+
],
|
|
663
|
+
[
|
|
664
|
+
"gate_proj",
|
|
665
|
+
"tiled",
|
|
666
|
+
"layer.{L}.mlp.gate_proj"
|
|
667
|
+
],
|
|
668
|
+
[
|
|
669
|
+
"up_proj",
|
|
670
|
+
"tiled",
|
|
671
|
+
"layer.{L}.mlp.up_proj"
|
|
672
|
+
],
|
|
673
|
+
[
|
|
674
|
+
"activation",
|
|
675
|
+
"gelu"
|
|
676
|
+
],
|
|
677
|
+
[
|
|
678
|
+
"down_proj",
|
|
679
|
+
"tiled",
|
|
680
|
+
"layer.{L}.mlp.down_proj"
|
|
681
|
+
],
|
|
682
|
+
[
|
|
683
|
+
"ffn_residual",
|
|
684
|
+
"residual"
|
|
685
|
+
]
|
|
686
|
+
]
|
|
687
|
+
}
|
|
688
|
+
],
|
|
689
|
+
"postLayer": [
|
|
690
|
+
[
|
|
691
|
+
"final_norm",
|
|
692
|
+
"final_norm_stable"
|
|
693
|
+
],
|
|
694
|
+
[
|
|
695
|
+
"lm_head",
|
|
696
|
+
"lm_head_gemv_stable",
|
|
697
|
+
"lm_head"
|
|
698
|
+
],
|
|
699
|
+
[
|
|
700
|
+
"lm_head_prefill",
|
|
701
|
+
"lm_head_prefill_stable",
|
|
702
|
+
"lm_head"
|
|
703
|
+
],
|
|
704
|
+
[
|
|
705
|
+
"sample",
|
|
706
|
+
"sample"
|
|
707
|
+
]
|
|
708
|
+
],
|
|
709
|
+
"policies": {
|
|
710
|
+
"unsupportedPrecision": "error",
|
|
711
|
+
"dtypeTransition": "require_cast_step",
|
|
712
|
+
"unresolvedKernel": "error"
|
|
713
|
+
}
|
|
714
|
+
},
|
|
715
|
+
"modelType": "gemma4"
|
|
716
|
+
}
|