doppler-gpu 0.2.0 → 0.2.2
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 +29 -1
- package/README.md +97 -29
- package/package.json +40 -27
- package/src/cli/config/doppler-quickstart.json +10 -0
- package/src/cli/doppler-cli.js +66 -22
- package/src/cli/doppler-quickstart.d.ts +61 -0
- package/src/cli/doppler-quickstart.js +299 -0
- package/src/cli/doppler-serve.js +395 -0
- package/src/client/doppler-api.browser.js +13 -377
- package/src/client/doppler-api.d.ts +35 -56
- package/src/client/doppler-api.js +12 -363
- package/src/client/doppler-registry.json +55 -2
- package/src/client/runtime/index.d.ts +63 -0
- package/src/client/runtime/index.js +173 -0
- package/src/client/runtime/lora.d.ts +36 -0
- package/src/client/runtime/lora.js +165 -0
- package/src/client/{doppler-provider → runtime}/model-manager.d.ts +1 -1
- package/src/client/{doppler-provider → runtime}/model-manager.js +56 -30
- package/src/client/runtime/model-session.d.ts +72 -0
- package/src/client/runtime/model-session.js +122 -0
- package/src/client/runtime/model-source.d.ts +43 -0
- package/src/client/runtime/model-source.js +101 -0
- package/src/client/{doppler-provider → runtime}/source-runtime.d.ts +8 -5
- package/src/client/runtime/source-runtime.js +919 -0
- package/src/client/runtime/storage.d.ts +5 -0
- package/src/client/runtime/storage.js +51 -0
- package/src/client/{doppler-provider → runtime}/types.d.ts +14 -2
- package/src/config/README.md +2 -0
- package/src/config/conversion/README.md +47 -7
- package/src/config/conversion/embeddinggemma/google-embeddinggemma-300m-q4k-ehf16-af32.json +67 -5
- package/src/config/conversion/gemma3/gemma-3-1b-it-f16-af32.json +62 -11
- package/src/config/conversion/gemma3/gemma-3-1b-it-q4k-ehf16-af32.json +79 -18
- package/src/config/conversion/gemma3/gemma-3-270m-it-q4k-ehf16-af32.json +61 -13
- package/src/config/conversion/gemma3/translategemma-4b-1b-enes-q4k-ehf16-af32.json +53 -10
- package/src/config/conversion/gemma3/translategemma-4b-it-q4k-ehf16-af32.json +66 -18
- package/src/config/conversion/gemma4/gemma-4-e2b-it-q4k-ehf16-af32.json +256 -0
- package/src/config/conversion/gemma4/gemma-4-moe-q4k-ehf16-af32.json +49 -8
- package/src/config/conversion/gpt-oss-20b-f16-xmxfp4.json +45 -6
- package/src/config/conversion/janus/janus-pro-1b-text-q4k-ehaf16.json +45 -6
- package/src/config/conversion/lfm2/lfm2.5-1.2b-instruct-q4k-ehf16-af32.json +57 -9
- package/src/config/conversion/qwen3/qwen-3-5-0-8b-q4k-ehaf16.json +105 -26
- package/src/config/conversion/qwen3/qwen-3-5-2b-q4k-ehaf16.json +83 -33
- package/src/config/conversion/sana/sana-sprint-0.6b-f16.json +33 -5
- package/src/config/execution-contract-check.d.ts +2 -1
- package/src/config/execution-contract-check.js +187 -53
- package/src/config/kernel-path-loader.d.ts +36 -0
- package/src/config/kernel-path-loader.js +97 -10
- package/src/config/kernels/kernel-ref-digests.js +40 -24
- package/src/config/kernels/registry.js +0 -1
- package/src/config/kernels/registry.json +772 -66
- package/src/config/merge-contract-check.js +3 -0
- package/src/config/merge.d.ts +18 -1
- package/src/config/merge.js +56 -0
- package/src/config/param-categories.js +5 -0
- package/src/config/param-validator.js +42 -26
- package/src/config/platforms/apple-m3.json +1 -1
- package/src/config/platforms/loader.js +21 -16
- package/src/config/required-inference-fields-contract-check.js +16 -0
- package/src/config/runtime/compute/f16-batched.json +2 -0
- package/src/config/runtime/default.json +1 -0
- package/src/config/runtime/experiments/bench/gemma3-bench-q4k-alt.json +57 -0
- package/src/config/runtime/experiments/bench/gemma3-bench-q4k-batched.json +57 -0
- package/src/config/runtime/experiments/bench/gemma3-bench-q4k.json +2 -0
- package/src/config/runtime/experiments/bench/qwen3-bench-q4k-alt.json +57 -0
- package/src/config/runtime/experiments/bench/qwen3-bench-q4k-batched.json +57 -0
- package/src/config/runtime/experiments/debug/gemma3-browser-diagnose-q4k.json +81 -0
- package/src/config/runtime/experiments/debug/gemma3-debug-q4k.json +5 -0
- package/src/config/runtime/experiments/debug/qwen35-browser-diagnose-q4k.json +81 -0
- package/src/config/runtime/experiments/verify/gemma4-e2b-verify.json +38 -0
- package/src/config/runtime/profiles/gemma4-e2b-low-memory.json +63 -0
- package/src/config/runtime/profiles/gemma4-e2b-throughput.json +39 -0
- package/src/config/runtime/profiles/low-memory.json +1 -0
- package/src/config/runtime/profiles/turboquant-contiguous-prod.json +29 -0
- package/src/config/runtime/profiles/turboquant-contiguous.json +29 -0
- package/src/config/runtime/profiles/turboquant.json +36 -0
- package/src/config/runtime/profiles/vector-stability.json +1 -0
- package/src/config/runtime/tiers/gemma4-128gb.json +79 -0
- package/src/config/runtime/tiers/gemma4-16gb.json +15 -2
- package/src/config/runtime/tiers/gemma4-24gb.json +15 -2
- package/src/config/runtime/tiers/gemma4-32gb.json +15 -2
- package/src/config/runtime.js +11 -4
- package/src/config/schema/converter.schema.d.ts +4 -2
- package/src/config/schema/converter.schema.js +7 -5
- package/src/config/schema/doppler.schema.d.ts +26 -2
- package/src/config/schema/doppler.schema.js +77 -28
- package/src/config/schema/execution-v1.schema.d.ts +78 -5
- package/src/config/schema/execution-v1.schema.js +62 -1
- package/src/config/schema/index.d.ts +22 -29
- package/src/config/schema/index.js +15 -17
- package/src/config/schema/inference.schema.d.ts +26 -4
- package/src/config/schema/kernel-path.schema.d.ts +30 -3
- package/src/config/schema/kernel-registry.schema.d.ts +1 -1
- package/src/config/schema/kernel-registry.schema.js +1 -0
- package/src/config/schema/kvcache.schema.js +7 -0
- package/src/config/schema/loading.schema.d.ts +28 -0
- package/src/config/schema/loading.schema.js +9 -0
- package/src/config/schema/manifest.schema.d.ts +79 -5
- package/src/config/schema/manifest.schema.js +7 -1
- package/src/config/schema/platform.schema.d.ts +10 -8
- package/src/config/schema/speculation-self.schema.js +0 -5
- package/src/config/schema/support-tiers.schema.d.ts +53 -0
- package/src/config/schema/support-tiers.schema.js +128 -0
- package/src/config/source-packages/litert/gemma-4-e2b-it.json +622 -0
- package/src/config/source-packages/registry.json +15 -0
- package/src/config/support-tiers/subsystems.json +502 -0
- package/src/config/transforms/capability-transform-resolver.d.ts +16 -5
- package/src/config/transforms/capability-transform-resolver.js +44 -9
- package/src/config/transforms/execution-graph-transforms.d.ts +113 -2
- package/src/config/transforms/execution-graph-transforms.js +1220 -8
- package/src/converter/conversion-plan.js +20 -8
- package/src/converter/core.d.ts +48 -1
- package/src/converter/core.js +249 -62
- package/src/converter/parsers/gguf.d.ts +10 -1
- package/src/converter/rope-config.d.ts +1 -0
- package/src/converter/rope-config.js +75 -5
- package/src/converter/shard-packer.js +2 -2
- package/src/debug/tensor.js +13 -1
- package/src/{adapters → experimental/adapters}/adapter-manager.d.ts +1 -1
- package/src/{adapters → experimental/adapters}/adapter-manager.js +2 -2
- package/src/{adapters → experimental/adapters}/adapter-manifest.d.ts +1 -1
- package/src/{adapters → experimental/adapters}/adapter-manifest.js +1 -1
- package/src/{adapters → experimental/adapters}/adapter-registry.d.ts +1 -1
- package/src/{adapters → experimental/adapters}/adapter-registry.js +1 -1
- package/src/{adapters → experimental/adapters}/lora-loader.d.ts +1 -1
- package/src/{adapters → experimental/adapters}/lora-loader.js +2 -2
- package/src/{bridge → experimental/bridge}/extension-client.js +2 -2
- package/src/{bridge → experimental/bridge}/node-bridge.js +2 -4
- package/src/{bridge → experimental/bridge}/protocol.js +1 -1
- package/src/{browser → experimental/browser}/browser-converter.d.ts +4 -4
- package/src/{browser → experimental/browser}/browser-converter.js +12 -12
- package/src/{browser → experimental/browser}/gguf-importer.d.ts +1 -1
- package/src/{browser → experimental/browser}/gguf-importer.js +8 -8
- package/src/{browser → experimental/browser}/gguf-parser-browser.d.ts +2 -2
- package/src/{browser → experimental/browser}/gguf-parser-browser.js +3 -3
- package/src/{browser → experimental/browser}/quantization.d.ts +3 -3
- package/src/{browser → experimental/browser}/quantization.js +4 -4
- package/src/{browser → experimental/browser}/safetensors-parser-browser.d.ts +3 -3
- package/src/{browser → experimental/browser}/safetensors-parser-browser.js +3 -3
- package/src/{browser → experimental/browser}/shard-io-browser.d.ts +1 -1
- package/src/{browser → experimental/browser}/shard-io-browser.js +2 -2
- package/src/{browser → experimental/browser}/tensor-source-download.js +3 -3
- package/src/experimental/diffusion/index.d.ts +8 -0
- package/src/experimental/diffusion/index.js +8 -0
- package/src/{distribution → experimental/distribution}/p2p-transport-contract.js +1 -1
- package/src/{distribution → experimental/distribution}/p2p-transport.js +1 -1
- package/src/{distribution → experimental/distribution}/shard-delivery.js +5 -5
- package/src/experimental/energy/index.d.ts +2 -0
- package/src/experimental/energy/index.js +2 -0
- package/src/{hotswap → experimental/hotswap}/intent-bundle.d.ts +1 -1
- package/src/{hotswap → experimental/hotswap}/intent-bundle.js +2 -2
- package/src/{hotswap → experimental/hotswap}/manifest.d.ts +2 -2
- package/src/{hotswap → experimental/hotswap}/manifest.js +1 -1
- package/src/{hotswap → experimental/hotswap}/model-swap.js +1 -1
- package/src/{hotswap → experimental/hotswap}/runtime.d.ts +1 -1
- package/src/experimental/orchestration/index.d.ts +12 -0
- package/src/experimental/orchestration/index.js +12 -0
- package/src/{training → experimental/training}/README.md +1 -1
- package/src/{training → experimental/training}/artifacts.d.ts +3 -3
- package/src/{training → experimental/training}/artifacts.js +3 -3
- package/src/{training → experimental/training}/attention-backward.d.ts +1 -1
- package/src/{training → experimental/training}/attention-backward.js +3 -3
- package/src/{training → experimental/training}/attention-forward.d.ts +2 -2
- package/src/{training → experimental/training}/attention-forward.js +1 -1
- package/src/{training → experimental/training}/autograd.d.ts +2 -2
- package/src/{training → experimental/training}/autograd.js +7 -7
- package/src/{training → experimental/training}/backward-kernels.js +1 -1
- package/src/{training → experimental/training}/checkpoint.js +1 -1
- package/src/{training → experimental/training}/clip.d.ts +2 -2
- package/src/{training → experimental/training}/clip.js +3 -3
- package/src/{training → experimental/training}/export.d.ts +2 -2
- package/src/{training → experimental/training}/export.js +2 -2
- package/src/{training → experimental/training}/lora-pipeline.js +4 -4
- package/src/{training → experimental/training}/lora.d.ts +1 -1
- package/src/{training → experimental/training}/lora.js +4 -4
- package/src/{training → experimental/training}/loss-scaling.d.ts +2 -2
- package/src/{training → experimental/training}/loss-scaling.js +3 -3
- package/src/{training → experimental/training}/loss.d.ts +2 -2
- package/src/{training → experimental/training}/loss.js +1 -1
- package/src/{training → experimental/training}/operator-artifacts.js +1 -1
- package/src/{training → experimental/training}/optimizer.d.ts +2 -2
- package/src/{training → experimental/training}/optimizer.js +3 -3
- package/src/{training → experimental/training}/runner.d.ts +2 -2
- package/src/{training → experimental/training}/runner.js +5 -5
- package/src/{training → experimental/training}/suite.js +16 -16
- package/src/{training → experimental/training}/tensor-factory.d.ts +1 -1
- package/src/{training → experimental/training}/tensor-factory.js +2 -2
- package/src/{training → experimental/training}/trainer.d.ts +3 -3
- package/src/{training → experimental/training}/trainer.js +3 -3
- package/src/{training → experimental/training}/ul_dataset.d.ts +2 -2
- package/src/{training → experimental/training}/ul_dataset.js +1 -1
- package/src/{training → experimental/training}/ul_schedule.d.ts +1 -1
- package/src/{training → experimental/training}/workloads.js +4 -4
- package/src/formats/index.d.ts +24 -0
- package/src/formats/index.js +6 -0
- package/src/formats/litert/index.d.ts +1 -0
- package/src/formats/litert/index.js +1 -0
- package/src/formats/litert/types.d.ts +87 -0
- package/src/formats/litert/types.js +568 -0
- package/src/formats/rdrr/classification.js +16 -8
- package/src/formats/rdrr/parsing.d.ts +3 -2
- package/src/formats/rdrr/types.d.ts +33 -0
- package/src/formats/rdrr/validation.js +16 -5
- package/src/formats/tflite/index.d.ts +1 -0
- package/src/formats/tflite/index.js +1 -0
- package/src/formats/tflite/types.d.ts +84 -0
- package/src/formats/tflite/types.js +633 -0
- package/src/generation/index.d.ts +16 -14
- package/src/generation/index.js +1 -32
- package/src/gpu/command-recorder.d.ts +17 -1
- package/src/gpu/command-recorder.js +47 -10
- package/src/gpu/device.d.ts +3 -1
- package/src/gpu/device.js +17 -11
- package/src/gpu/kernel-selector.js +3 -1
- package/src/gpu/kernels/attention.d.ts +2 -0
- package/src/gpu/kernels/attention.js +359 -14
- package/src/gpu/kernels/attention.wgsl +20 -1
- package/src/gpu/kernels/attention_decode_contiguous_turboquant_f16kv.wgsl +180 -0
- package/src/gpu/kernels/attention_decode_contiguous_turboquant_prod_f16kv.wgsl +192 -0
- package/src/gpu/kernels/attention_decode_online_f16.wgsl +36 -18
- package/src/gpu/kernels/attention_decode_online_f16kv.wgsl +36 -18
- package/src/gpu/kernels/attention_decode_tiered_turboquant_f16kv.wgsl +269 -0
- package/src/gpu/kernels/attention_decode_tiered_turboquant_prod_f16kv.wgsl +281 -0
- package/src/gpu/kernels/attention_head256_f16kv.wgsl +269 -0
- package/src/gpu/kernels/attention_streaming.wgsl +22 -3
- package/src/gpu/kernels/attention_streaming_f16.wgsl +1 -1
- package/src/gpu/kernels/attention_streaming_f16kv.wgsl +1 -1
- package/src/gpu/kernels/backward/attention_backward.d.ts +14 -1
- package/src/gpu/kernels/check-hot-vocab-stop.d.ts +18 -0
- package/src/gpu/kernels/check-hot-vocab-stop.js +108 -0
- package/src/gpu/kernels/codegen/patches/attention_streaming_f16.from.attention_streaming.diff +1 -1
- package/src/gpu/kernels/codegen/patches/attention_streaming_f16kv.from.attention_streaming.diff +1 -1
- package/src/gpu/kernels/codegen/patches/rope_f16.from.rope.diff +126 -194
- package/src/gpu/kernels/codegen/wgsl-variants.js +24 -6
- package/src/gpu/kernels/depthwise_conv1d.d.ts +23 -0
- package/src/gpu/kernels/depthwise_conv1d.js +51 -0
- package/src/gpu/kernels/depthwise_conv1d.wgsl +46 -0
- package/src/gpu/kernels/feature-check.js +0 -1
- package/src/gpu/kernels/fused_ffn.js +67 -22
- package/src/gpu/kernels/fused_ffn_q4k.wgsl +48 -43
- package/src/gpu/kernels/fused_ffn_q4k_f16.wgsl +329 -0
- package/src/gpu/kernels/fused_matmul_q4.wgsl +417 -0
- package/src/gpu/kernels/fused_matmul_q4_batched_multicol_shared.wgsl +174 -0
- package/src/gpu/kernels/gather.d.ts +4 -0
- package/src/gpu/kernels/gather.js +13 -2
- package/src/gpu/kernels/gather.wgsl +5 -3
- package/src/gpu/kernels/gather_f16.wgsl +5 -3
- package/src/gpu/kernels/index.d.ts +7 -0
- package/src/gpu/kernels/index.js +6 -0
- package/src/gpu/kernels/kernel-configs.js +1 -0
- package/src/gpu/kernels/kv-quantize.js +87 -55
- package/src/gpu/kernels/kv_quantize_turboquant.wgsl +153 -0
- package/src/gpu/kernels/kv_quantize_turboquant_prod.wgsl +230 -0
- package/src/gpu/kernels/linear-attention-core.d.ts +3 -0
- package/src/gpu/kernels/linear-attention-core.js +145 -56
- package/src/gpu/kernels/matmul-dispatch.js +3 -0
- package/src/gpu/kernels/matmul-selection.js +31 -42
- package/src/gpu/kernels/matmul.d.ts +3 -0
- package/src/gpu/kernels/matmul.js +72 -34
- package/src/gpu/kernels/residual.d.ts +2 -0
- package/src/gpu/kernels/residual.js +43 -4
- package/src/gpu/kernels/rope.d.ts +2 -0
- package/src/gpu/kernels/rope.js +19 -6
- package/src/gpu/kernels/rope.wgsl +24 -12
- package/src/gpu/kernels/rope_f16.wgsl +97 -38
- package/src/gpu/kernels/scale.d.ts +5 -0
- package/src/gpu/kernels/scale.js +6 -1
- package/src/gpu/kernels/scale.wgsl +3 -1
- package/src/gpu/kernels/scale_f16.wgsl +32 -0
- package/src/gpu/kernels/turboquant-codebook.js +564 -0
- package/src/gpu/kernels/uniform-utils.js +26 -0
- package/src/gpu/kernels/utils.js +6 -1
- package/src/gpu/submit-probe.d.ts +12 -0
- package/src/gpu/submit-probe.js +77 -0
- package/src/gpu/weight-buffer.d.ts +26 -3
- package/src/gpu/weight-buffer.js +62 -2
- package/src/index-browser.d.ts +1 -91
- package/src/index-browser.js +0 -66
- package/src/index.d.ts +1 -102
- package/src/index.js +0 -74
- package/src/inference/browser-harness-model-helpers.d.ts +3 -0
- package/src/inference/browser-harness-model-helpers.js +134 -11
- package/src/inference/browser-harness-runtime-helpers.js +1 -9
- package/src/inference/browser-harness-text-helpers.js +441 -70
- package/src/inference/browser-harness.js +61 -4
- package/src/inference/decode-ring.d.ts +2 -0
- package/src/inference/decode-ring.js +20 -0
- package/src/inference/kv-cache/index.d.ts +3 -0
- package/src/inference/kv-cache/index.js +2 -0
- package/src/inference/kv-cache/mixed-geometry.d.ts +84 -0
- package/src/inference/kv-cache/mixed-geometry.js +422 -0
- package/src/inference/kv-cache/quantized.d.ts +56 -0
- package/src/inference/kv-cache/quantized.js +383 -0
- package/src/inference/kv-cache/tiered.d.ts +20 -3
- package/src/inference/kv-cache/tiered.js +203 -65
- package/src/inference/kv-cache/types.d.ts +49 -6
- package/src/inference/kv-cache.d.ts +3 -0
- package/src/inference/kv-cache.js +2 -0
- package/src/inference/multi-model-network.js +2 -1
- package/src/inference/pipelines/audio/gemma4.js +655 -0
- package/src/inference/pipelines/audio/index.js +39 -0
- package/src/inference/pipelines/audio/mel.js +171 -0
- package/src/inference/pipelines/context.js +9 -1
- package/src/inference/pipelines/diffusion/text-encoder-gpu.js +2 -0
- package/src/inference/pipelines/shared/clipped-linear.js +46 -0
- package/src/inference/pipelines/text/attention/dispatch-params.d.ts +2 -1
- package/src/inference/pipelines/text/attention/dispatch-params.js +52 -8
- package/src/inference/pipelines/text/attention/output-projection.js +3 -3
- package/src/inference/pipelines/text/attention/precision-contract.d.ts +36 -0
- package/src/inference/pipelines/text/attention/precision-contract.js +115 -0
- package/src/inference/pipelines/text/attention/projections.d.ts +23 -0
- package/src/inference/pipelines/text/attention/projections.js +182 -15
- package/src/inference/pipelines/text/attention/quant-options.js +54 -0
- package/src/inference/pipelines/text/attention/record.js +257 -69
- package/src/inference/pipelines/text/attention/run.js +306 -94
- package/src/inference/pipelines/text/attention/types.d.ts +11 -0
- package/src/inference/pipelines/text/chat-format.d.ts +8 -1
- package/src/inference/pipelines/text/chat-format.js +89 -5
- package/src/inference/pipelines/text/config.d.ts +78 -26
- package/src/inference/pipelines/text/config.js +722 -28
- package/src/inference/pipelines/text/dtype-contract.d.ts +15 -0
- package/src/inference/pipelines/text/dtype-contract.js +38 -0
- package/src/inference/pipelines/text/embed.d.ts +4 -0
- package/src/inference/pipelines/text/embed.js +165 -172
- package/src/inference/pipelines/text/execution-plan.d.ts +19 -0
- package/src/inference/pipelines/text/execution-plan.js +112 -20
- package/src/inference/pipelines/text/execution-runtime-builders.d.ts +8 -4
- package/src/inference/pipelines/text/execution-runtime-builders.js +90 -49
- package/src/inference/pipelines/text/execution-v1.d.ts +23 -4
- package/src/inference/pipelines/text/execution-v1.js +411 -33
- package/src/inference/pipelines/text/ffn/dense.d.ts +59 -0
- package/src/inference/pipelines/text/ffn/dense.js +575 -63
- package/src/inference/pipelines/text/ffn/moe.js +1 -0
- package/src/inference/pipelines/text/ffn/sandwich.js +20 -4
- package/src/inference/pipelines/text/ffn/standard.js +28 -4
- package/src/inference/pipelines/text/finiteness-policy.d.ts +4 -0
- package/src/inference/pipelines/text/finiteness-policy.js +14 -11
- package/src/inference/pipelines/text/generator-helpers.d.ts +7 -0
- package/src/inference/pipelines/text/generator-helpers.js +39 -4
- package/src/inference/pipelines/text/generator-runtime.js +45 -8
- package/src/inference/pipelines/text/generator-steps.js +407 -75
- package/src/inference/pipelines/text/generator.d.ts +6 -0
- package/src/inference/pipelines/text/generator.js +1179 -305
- package/src/inference/pipelines/text/init.d.ts +39 -7
- package/src/inference/pipelines/text/init.js +525 -110
- package/src/inference/pipelines/text/layer-plan.d.ts +1 -0
- package/src/inference/pipelines/text/layer-plan.js +2 -0
- package/src/inference/pipelines/text/layer.js +402 -19
- package/src/inference/pipelines/text/linear-attention.d.ts +4 -0
- package/src/inference/pipelines/text/linear-attention.js +112 -41
- package/src/inference/pipelines/text/logits/gpu.d.ts +2 -1
- package/src/inference/pipelines/text/logits/gpu.js +334 -15
- package/src/inference/pipelines/text/logits/index.d.ts +11 -0
- package/src/inference/pipelines/text/logits/index.js +227 -29
- package/src/inference/pipelines/text/logits/types.d.ts +3 -0
- package/src/inference/pipelines/text/logits/utils.js +3 -1
- package/src/inference/pipelines/text/lora-apply.js +3 -3
- package/src/inference/pipelines/text/model-load.d.ts +2 -1
- package/src/inference/pipelines/text/model-load.js +205 -178
- package/src/inference/pipelines/text/moe-gpu.js +8 -0
- package/src/inference/pipelines/text/moe-impl.d.ts +2 -0
- package/src/inference/pipelines/text/ops.d.ts +16 -2
- package/src/inference/pipelines/text/ops.js +11 -2
- package/src/inference/pipelines/text/per-layer-inputs.d.ts +107 -0
- package/src/inference/pipelines/text/per-layer-inputs.js +1581 -0
- package/src/inference/pipelines/text/probes.js +6 -0
- package/src/inference/pipelines/text/sampling-config.js +9 -1
- package/src/inference/pipelines/text/stage-names.js +3 -0
- package/src/inference/pipelines/text/state.d.ts +12 -3
- package/src/inference/pipelines/text/state.js +19 -0
- package/src/inference/pipelines/text/types.d.ts +79 -7
- package/src/inference/pipelines/text/weights.d.ts +2 -2
- package/src/inference/pipelines/text/weights.js +4 -0
- package/src/inference/pipelines/text.d.ts +6 -0
- package/src/inference/pipelines/text.js +860 -11
- package/src/inference/pipelines/video/frame-sampler.js +36 -0
- package/src/inference/pipelines/video/index.js +87 -0
- package/src/inference/pipelines/vision/encoder.js +27 -6
- package/src/inference/pipelines/vision/gemma4.js +731 -0
- package/src/inference/pipelines/vision/image-preprocess.js +22 -7
- package/src/inference/pipelines/vision/index.js +35 -10
- package/src/inference/pipelines/vision/ops.js +31 -26
- package/src/inference/pipelines/vision/patch-embed.js +22 -10
- package/src/inference/runtime-model.d.ts +89 -0
- package/src/inference/runtime-model.js +152 -0
- package/src/inference/test-harness.d.ts +8 -1
- package/src/inference/test-harness.js +54 -20
- package/src/inference/tokenizer.d.ts +5 -0
- package/src/inference/tokenizer.js +43 -0
- package/src/inference/tokenizers/base.d.ts +5 -0
- package/src/inference/tokenizers/base.js +5 -0
- package/src/inference/tokenizers/behavior-flags.d.ts +9 -0
- package/src/inference/tokenizers/behavior-flags.js +100 -0
- package/src/inference/tokenizers/bundled.d.ts +4 -0
- package/src/inference/tokenizers/bundled.js +110 -0
- package/src/inference/tokenizers/sentencepiece.d.ts +2 -0
- package/src/inference/tokenizers/sentencepiece.js +16 -0
- package/src/inference/tokenizers/types.d.ts +2 -0
- package/src/loader/doppler-loader.d.ts +10 -3
- package/src/loader/doppler-loader.js +103 -5
- package/src/loader/embedding-loader.d.ts +5 -1
- package/src/loader/embedding-loader.js +57 -6
- package/src/loader/final-weights-loader.js +44 -5
- package/src/loader/layer-loader.js +210 -8
- package/src/loader/loader-state.js +2 -2
- package/src/loader/loader-types.d.ts +17 -1
- package/src/loader/memory-monitor.d.ts +8 -0
- package/src/loader/memory-monitor.js +21 -0
- package/src/loader/multi-model-loader.d.ts +9 -1
- package/src/loader/multi-model-loader.js +9 -1
- package/src/loader/per-layer-input-loader.d.ts +30 -0
- package/src/loader/per-layer-input-loader.js +478 -0
- package/src/loader/shard-cache.d.ts +4 -3
- package/src/loader/shard-resolver.js +2 -0
- package/src/loader/tensors/source-transform.d.ts +50 -0
- package/src/loader/tensors/source-transform.js +776 -0
- package/src/loader/tensors/tensor-loader.d.ts +12 -0
- package/src/loader/tensors/tensor-loader.js +208 -123
- package/src/loader/tensors/tensor-reader.d.ts +8 -0
- package/src/loader/tensors/tensor-reader.js +283 -15
- package/src/loaders/index.d.ts +4 -0
- package/src/loaders/index.js +4 -0
- package/src/memory/buffer-pool.d.ts +4 -0
- package/src/memory/buffer-pool.js +36 -0
- package/src/rules/execution-rules-contract-check.d.ts +4 -0
- package/src/rules/execution-rules-contract-check.js +150 -24
- package/src/rules/inference/attention.rules.json +15 -0
- package/src/rules/inference/capability-transforms.rules.json +30 -0
- package/src/rules/inference/execution.rules.json +54 -2
- package/src/rules/inference/ffn.rules.json +33 -0
- package/src/rules/kernels/attention.rules.json +7 -0
- package/src/rules/kernels/fused-ffn.rules.json +4 -2
- package/src/rules/kernels/kv_quantize.rules.json +2 -0
- package/src/rules/kernels/matmul.rules.json +14 -0
- package/src/rules/kernels/scale.rules.json +2 -0
- package/src/rules/loader/tensor-loader.rules.json +1 -0
- package/src/storage/artifact-storage-context.d.ts +53 -0
- package/src/storage/artifact-storage-context.js +560 -0
- package/src/storage/downloader.js +7 -1
- package/src/storage/index.d.ts +18 -0
- package/src/storage/index.js +13 -0
- package/src/storage/preflight.js +22 -0
- package/src/storage/quickstart-downloader.js +35 -2
- package/src/storage/registry.d.ts +1 -0
- package/src/storage/registry.js +26 -4
- package/src/storage/shard-manager.d.ts +4 -0
- package/src/storage/shard-manager.js +25 -6
- package/src/storage/source-artifact-store.d.ts +9 -0
- package/src/storage/source-artifact-store.js +134 -0
- package/src/tooling/browser-command-runner.js +12 -5
- package/src/tooling/command-api-family-normalizers.js +144 -0
- package/src/tooling/command-api-helpers.js +1 -0
- package/src/tooling/command-api.d.ts +32 -9
- package/src/tooling/command-api.js +0 -25
- package/src/tooling/command-runner-shared.js +1 -2
- package/src/tooling/command-runner.html +5 -2
- package/src/tooling/diagnose-runner.js +1 -1
- package/src/tooling/kernel-path-builder/index.js +48 -32
- package/src/tooling/lean-execution-contract.d.ts +1 -1
- package/src/tooling/lean-execution-contract.js +2 -149
- package/src/tooling/litert-package-runtime.d.ts +46 -0
- package/src/tooling/litert-package-runtime.js +950 -0
- package/src/tooling/node-browser-command-runner.d.ts +13 -0
- package/src/tooling/node-browser-command-runner.js +163 -3
- package/src/tooling/node-command-runner.js +14 -5
- package/src/tooling/node-converter.js +226 -63
- package/src/tooling/node-source-runtime.d.ts +8 -3
- package/src/tooling/node-source-runtime.js +561 -236
- package/src/tooling/node-webgpu.js +7 -30
- package/src/tooling/opfs-cache.d.ts +18 -1
- package/src/tooling/opfs-cache.js +126 -9
- package/src/tooling/runtime-input-composition.d.ts +0 -1
- package/src/tooling/runtime-input-composition.js +0 -5
- package/src/tooling/source-artifact-adapter.d.ts +134 -0
- package/src/tooling/source-artifact-adapter.js +366 -0
- package/src/tooling/source-package-profiles.d.ts +33 -0
- package/src/tooling/source-package-profiles.js +57 -0
- package/src/tooling/source-runtime-bundle.d.ts +46 -6
- package/src/tooling/source-runtime-bundle.js +371 -60
- package/src/tooling/source-runtime-converter-config.d.ts +24 -0
- package/src/tooling/source-runtime-converter-config.js +297 -0
- package/src/tooling-experimental-exports.browser.js +2 -0
- package/src/tooling-experimental-exports.d.ts +7 -0
- package/src/tooling-experimental-exports.js +7 -0
- package/src/tooling-experimental-exports.shared.d.ts +26 -0
- package/src/tooling-experimental-exports.shared.js +29 -0
- package/src/tooling-exports.shared.d.ts +0 -23
- package/src/tooling-exports.shared.js +6 -28
- package/src/version.js +1 -1
- package/src/client/doppler-provider/generation.d.ts +0 -25
- package/src/client/doppler-provider/generation.js +0 -126
- package/src/client/doppler-provider/index.d.ts +0 -2
- package/src/client/doppler-provider/index.js +0 -3
- package/src/client/doppler-provider/provider.d.ts +0 -5
- package/src/client/doppler-provider/provider.js +0 -102
- package/src/client/doppler-provider/source-runtime.js +0 -677
- package/src/client/doppler-provider.d.ts +0 -46
- package/src/client/doppler-provider.js +0 -36
- package/src/config/schema/inference-defaults.schema.d.ts +0 -276
- package/src/config/schema/inference-defaults.schema.js +0 -189
- package/src/diffusion/index.d.ts +0 -8
- package/src/diffusion/index.js +0 -8
- package/src/energy/index.d.ts +0 -2
- package/src/energy/index.js +0 -2
- package/src/index-internal.d.ts +0 -2
- package/src/index-internal.js +0 -2
- /package/src/client/{doppler-provider → runtime}/types.js +0 -0
- /package/src/{adapters → experimental/adapters}/index.d.ts +0 -0
- /package/src/{adapters → experimental/adapters}/index.js +0 -0
- /package/src/{bridge → experimental/bridge}/extension/background.d.ts +0 -0
- /package/src/{bridge → experimental/bridge}/extension/background.js +0 -0
- /package/src/{bridge → experimental/bridge}/extension/manifest.json +0 -0
- /package/src/{bridge → experimental/bridge}/extension-client.d.ts +0 -0
- /package/src/{bridge → experimental/bridge}/index.d.ts +0 -0
- /package/src/{bridge → experimental/bridge}/index.js +0 -0
- /package/src/{bridge → experimental/bridge}/protocol.d.ts +0 -0
- /package/src/{browser → experimental/browser}/file-picker.d.ts +0 -0
- /package/src/{browser → experimental/browser}/file-picker.js +0 -0
- /package/src/{browser → experimental/browser}/tensor-source-download.d.ts +0 -0
- /package/src/{browser → experimental/browser}/tensor-source-file.d.ts +0 -0
- /package/src/{browser → experimental/browser}/tensor-source-file.js +0 -0
- /package/src/{browser → experimental/browser}/tensor-source-http.d.ts +0 -0
- /package/src/{browser → experimental/browser}/tensor-source-http.js +0 -0
- /package/src/{diffusion → experimental/diffusion}/config/expansion-lanes.json +0 -0
- /package/src/{diffusion → experimental/diffusion}/image-regression.d.ts +0 -0
- /package/src/{diffusion → experimental/diffusion}/image-regression.js +0 -0
- /package/src/{distribution → experimental/distribution}/p2p-control-plane.d.ts +0 -0
- /package/src/{distribution → experimental/distribution}/p2p-control-plane.js +0 -0
- /package/src/{distribution → experimental/distribution}/p2p-observability.d.ts +0 -0
- /package/src/{distribution → experimental/distribution}/p2p-observability.js +0 -0
- /package/src/{distribution → experimental/distribution}/p2p-transport-contract.d.ts +0 -0
- /package/src/{distribution → experimental/distribution}/p2p-webrtc-browser.d.ts +0 -0
- /package/src/{distribution → experimental/distribution}/p2p-webrtc-browser.js +0 -0
- /package/src/{distribution → experimental/distribution}/shard-delivery.d.ts +0 -0
- /package/src/{hotswap → experimental/hotswap}/runtime.js +0 -0
- /package/src/{training → experimental/training}/checkpoint-watch.d.ts +0 -0
- /package/src/{training → experimental/training}/checkpoint-watch.js +0 -0
- /package/src/{training → experimental/training}/checkpoint.d.ts +0 -0
- /package/src/{training → experimental/training}/dataloader.d.ts +0 -0
- /package/src/{training → experimental/training}/dataloader.js +0 -0
- /package/src/{training → experimental/training}/datasets/index.d.ts +0 -0
- /package/src/{training → experimental/training}/datasets/index.js +0 -0
- /package/src/{training → experimental/training}/datasets/jsonl.d.ts +0 -0
- /package/src/{training → experimental/training}/datasets/jsonl.js +0 -0
- /package/src/{training → experimental/training}/datasets/reploid.d.ts +0 -0
- /package/src/{training → experimental/training}/datasets/reploid.js +0 -0
- /package/src/{training → experimental/training}/datasets/text-pairs.d.ts +0 -0
- /package/src/{training → experimental/training}/datasets/text-pairs.js +0 -0
- /package/src/{training → experimental/training}/datasets/token-batch.d.ts +0 -0
- /package/src/{training → experimental/training}/datasets/token-batch.js +0 -0
- /package/src/{training → experimental/training}/datasets/translation-pairs.d.ts +0 -0
- /package/src/{training → experimental/training}/datasets/translation-pairs.js +0 -0
- /package/src/{training → experimental/training}/distillation/artifacts.d.ts +0 -0
- /package/src/{training → experimental/training}/distillation/artifacts.js +0 -0
- /package/src/{training → experimental/training}/distillation/checkpoint-watch.d.ts +0 -0
- /package/src/{training → experimental/training}/distillation/checkpoint-watch.js +0 -0
- /package/src/{training → experimental/training}/distillation/dataset.d.ts +0 -0
- /package/src/{training → experimental/training}/distillation/dataset.js +0 -0
- /package/src/{training → experimental/training}/distillation/eval.d.ts +0 -0
- /package/src/{training → experimental/training}/distillation/eval.js +0 -0
- /package/src/{training → experimental/training}/distillation/index.d.ts +0 -0
- /package/src/{training → experimental/training}/distillation/index.js +0 -0
- /package/src/{training → experimental/training}/distillation/runtime.d.ts +0 -0
- /package/src/{training → experimental/training}/distillation/runtime.js +0 -0
- /package/src/{training → experimental/training}/distillation/scoreboard.d.ts +0 -0
- /package/src/{training → experimental/training}/distillation/scoreboard.js +0 -0
- /package/src/{training → experimental/training}/distillation/stage-a.d.ts +0 -0
- /package/src/{training → experimental/training}/distillation/stage-a.js +0 -0
- /package/src/{training → experimental/training}/distillation/stage-b.d.ts +0 -0
- /package/src/{training → experimental/training}/distillation/stage-b.js +0 -0
- /package/src/{training → experimental/training}/distillation/student-fixture.d.ts +0 -0
- /package/src/{training → experimental/training}/distillation/student-fixture.js +0 -0
- /package/src/{training → experimental/training}/distillation/suite-data.d.ts +0 -0
- /package/src/{training → experimental/training}/distillation/suite-data.js +0 -0
- /package/src/{training → experimental/training}/index.d.ts +0 -0
- /package/src/{training → experimental/training}/index.js +0 -0
- /package/src/{training → experimental/training}/lora-pipeline.d.ts +0 -0
- /package/src/{training → experimental/training}/objectives/base.d.ts +0 -0
- /package/src/{training → experimental/training}/objectives/base.js +0 -0
- /package/src/{training → experimental/training}/objectives/cross_entropy.d.ts +0 -0
- /package/src/{training → experimental/training}/objectives/cross_entropy.js +0 -0
- /package/src/{training → experimental/training}/objectives/distill_kd.d.ts +0 -0
- /package/src/{training → experimental/training}/objectives/distill_kd.js +0 -0
- /package/src/{training → experimental/training}/objectives/distill_triplet.d.ts +0 -0
- /package/src/{training → experimental/training}/objectives/distill_triplet.js +0 -0
- /package/src/{training → experimental/training}/objectives/index.d.ts +0 -0
- /package/src/{training → experimental/training}/objectives/index.js +0 -0
- /package/src/{training → experimental/training}/objectives/ul_stage1_joint.d.ts +0 -0
- /package/src/{training → experimental/training}/objectives/ul_stage1_joint.js +0 -0
- /package/src/{training → experimental/training}/objectives/ul_stage2_base.d.ts +0 -0
- /package/src/{training → experimental/training}/objectives/ul_stage2_base.js +0 -0
- /package/src/{training → experimental/training}/operator-artifacts.d.ts +0 -0
- /package/src/{training → experimental/training}/operator-command.d.ts +0 -0
- /package/src/{training → experimental/training}/operator-command.js +0 -0
- /package/src/{training → experimental/training}/operator-eval.d.ts +0 -0
- /package/src/{training → experimental/training}/operator-eval.js +0 -0
- /package/src/{training → experimental/training}/operator-scoreboard.d.ts +0 -0
- /package/src/{training → experimental/training}/operator-scoreboard.js +0 -0
- /package/src/{training → experimental/training}/suite.d.ts +0 -0
- /package/src/{training → experimental/training}/ul_schedule.js +0 -0
- /package/src/{training → experimental/training}/workload-packs/distill-translategemma-medium.json +0 -0
- /package/src/{training → experimental/training}/workload-packs/distill-translategemma-tiny.json +0 -0
- /package/src/{training → experimental/training}/workload-packs/lora-toy-medium.json +0 -0
- /package/src/{training → experimental/training}/workload-packs/lora-toy-tiny.json +0 -0
- /package/src/{training → experimental/training}/workload-packs/registry.json +0 -0
- /package/src/{training → experimental/training}/workload-packs/ul-training-medium.json +0 -0
- /package/src/{training → experimental/training}/workload-packs/ul-training-tiny.json +0 -0
- /package/src/{training → experimental/training}/workloads.d.ts +0 -0
|
@@ -14,11 +14,12 @@
|
|
|
14
14
|
"attention": {
|
|
15
15
|
"queryPreAttnScalar": 256,
|
|
16
16
|
"attnLogitSoftcapping": null,
|
|
17
|
-
"slidingWindow":
|
|
17
|
+
"slidingWindow": 512,
|
|
18
18
|
"queryKeyNorm": true,
|
|
19
19
|
"causal": true,
|
|
20
20
|
"attentionBias": false,
|
|
21
|
-
"attentionOutputGate": false
|
|
21
|
+
"attentionOutputGate": false,
|
|
22
|
+
"valueNorm": false
|
|
22
23
|
},
|
|
23
24
|
"normalization": {
|
|
24
25
|
"rmsNormEps": 0.000001,
|
|
@@ -30,11 +31,12 @@
|
|
|
30
31
|
"ffn": {
|
|
31
32
|
"activation": "gelu",
|
|
32
33
|
"gatedActivation": true,
|
|
33
|
-
"swigluLimit": null
|
|
34
|
+
"swigluLimit": null,
|
|
35
|
+
"useDoubleWideMlp": false
|
|
34
36
|
},
|
|
35
37
|
"rope": {
|
|
36
38
|
"ropeTheta": 1000000,
|
|
37
|
-
"ropeLocalTheta":
|
|
39
|
+
"ropeLocalTheta": 10000,
|
|
38
40
|
"mropeInterleaved": false,
|
|
39
41
|
"mropeSection": null,
|
|
40
42
|
"partialRotaryFactor": null,
|
|
@@ -47,7 +49,10 @@
|
|
|
47
49
|
"yarnOriginalMaxPos": null,
|
|
48
50
|
"ropeLocalYarnBetaFast": null,
|
|
49
51
|
"ropeLocalYarnBetaSlow": null,
|
|
50
|
-
"ropeLocalYarnOriginalMaxPos": null
|
|
52
|
+
"ropeLocalYarnOriginalMaxPos": null,
|
|
53
|
+
"ropeLocalPartialRotaryFactor": null,
|
|
54
|
+
"ropeFrequencyBaseDim": null,
|
|
55
|
+
"ropeLocalFrequencyBaseDim": null
|
|
51
56
|
},
|
|
52
57
|
"output": {
|
|
53
58
|
"finalLogitSoftcapping": null,
|
|
@@ -58,9 +63,9 @@
|
|
|
58
63
|
"embeddingPostprocessor": null
|
|
59
64
|
},
|
|
60
65
|
"layerPattern": {
|
|
61
|
-
"type": "
|
|
66
|
+
"type": "every_n",
|
|
62
67
|
"globalPattern": null,
|
|
63
|
-
"period":
|
|
68
|
+
"period": 6,
|
|
64
69
|
"offset": null,
|
|
65
70
|
"layerTypes": null
|
|
66
71
|
},
|
|
@@ -69,7 +74,7 @@
|
|
|
69
74
|
"enabled": true
|
|
70
75
|
}
|
|
71
76
|
},
|
|
72
|
-
"
|
|
77
|
+
"session": {
|
|
73
78
|
"compute": {
|
|
74
79
|
"defaults": {
|
|
75
80
|
"activationDtype": "f32",
|
|
@@ -79,9 +84,46 @@
|
|
|
79
84
|
}
|
|
80
85
|
},
|
|
81
86
|
"kvcache": {
|
|
82
|
-
"kvDtype": "f16"
|
|
87
|
+
"kvDtype": "f16",
|
|
88
|
+
"layout": "contiguous",
|
|
89
|
+
"pageSize": 256,
|
|
90
|
+
"tiering": {
|
|
91
|
+
"mode": "off"
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"decodeLoop": {
|
|
95
|
+
"batchSize": 1,
|
|
96
|
+
"stopCheckMode": "batch",
|
|
97
|
+
"readbackInterval": 1,
|
|
98
|
+
"readbackMode": "sequential",
|
|
99
|
+
"ringTokens": 1,
|
|
100
|
+
"ringStop": 1,
|
|
101
|
+
"ringStaging": 1,
|
|
102
|
+
"disableCommandBatching": false
|
|
83
103
|
},
|
|
84
|
-
"
|
|
104
|
+
"perLayerInputs": {
|
|
105
|
+
"materialization": "auto",
|
|
106
|
+
"rowCache": {
|
|
107
|
+
"mode": "lru",
|
|
108
|
+
"maxRows": 256,
|
|
109
|
+
"maxBytes": 134217728,
|
|
110
|
+
"decodedDtype": "f32"
|
|
111
|
+
},
|
|
112
|
+
"prefetch": {
|
|
113
|
+
"mode": "next_token",
|
|
114
|
+
"rowsAhead": 1
|
|
115
|
+
},
|
|
116
|
+
"gpuUpload": {
|
|
117
|
+
"mode": "per_step_slices",
|
|
118
|
+
"stagingRows": 2
|
|
119
|
+
},
|
|
120
|
+
"hotCache": {
|
|
121
|
+
"mode": "prepared_tokens",
|
|
122
|
+
"maxTokens": 1024,
|
|
123
|
+
"maxBytes": 134217728,
|
|
124
|
+
"outputDtype": "f32"
|
|
125
|
+
}
|
|
126
|
+
}
|
|
85
127
|
},
|
|
86
128
|
"execution": {
|
|
87
129
|
"kernels": {
|
|
@@ -103,12 +145,15 @@
|
|
|
103
145
|
"rope": {
|
|
104
146
|
"kernel": "rope.wgsl",
|
|
105
147
|
"entry": "main",
|
|
106
|
-
"digest": "sha256:
|
|
148
|
+
"digest": "sha256:238e989aad7da731046cd54d7bb3c80a6f26daf5d7a8e435607161de902e5882"
|
|
107
149
|
},
|
|
108
150
|
"attn_decode": {
|
|
109
151
|
"kernel": "attention_decode_online_f16kv.wgsl",
|
|
110
152
|
"entry": "main",
|
|
111
|
-
"digest": "sha256:
|
|
153
|
+
"digest": "sha256:beee4722aa6281f58b74e1d055e192017b5555c189a58dd13dd158fe1511a7b8",
|
|
154
|
+
"precision": {
|
|
155
|
+
"kvDtype": "f16"
|
|
156
|
+
}
|
|
112
157
|
},
|
|
113
158
|
"residual": {
|
|
114
159
|
"kernel": "residual.wgsl",
|
|
@@ -131,7 +176,10 @@
|
|
|
131
176
|
"attn_small": {
|
|
132
177
|
"kernel": "attention_small_f16kv.wgsl",
|
|
133
178
|
"entry": "main",
|
|
134
|
-
"digest": "sha256:7e3acc24b8b45294d18052c759319fe8a202d4ebfc4b653d4b904b245ae7e5c9"
|
|
179
|
+
"digest": "sha256:7e3acc24b8b45294d18052c759319fe8a202d4ebfc4b653d4b904b245ae7e5c9",
|
|
180
|
+
"precision": {
|
|
181
|
+
"kvDtype": "f16"
|
|
182
|
+
}
|
|
135
183
|
},
|
|
136
184
|
"lm_head_gemv": {
|
|
137
185
|
"kernel": "matmul_gemv_subgroup.wgsl",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"attention": {
|
|
15
15
|
"queryPreAttnScalar": 256,
|
|
16
16
|
"attnLogitSoftcapping": null,
|
|
17
|
-
"slidingWindow":
|
|
17
|
+
"slidingWindow": 512,
|
|
18
18
|
"queryKeyNorm": true,
|
|
19
19
|
"causal": true,
|
|
20
20
|
"attentionBias": false,
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"rope": {
|
|
36
36
|
"ropeTheta": 1000000,
|
|
37
|
-
"ropeLocalTheta":
|
|
37
|
+
"ropeLocalTheta": 10000,
|
|
38
38
|
"mropeInterleaved": false,
|
|
39
39
|
"mropeSection": null,
|
|
40
40
|
"partialRotaryFactor": null,
|
|
@@ -58,9 +58,9 @@
|
|
|
58
58
|
"embeddingPostprocessor": null
|
|
59
59
|
},
|
|
60
60
|
"layerPattern": {
|
|
61
|
-
"type": "
|
|
61
|
+
"type": "every_n",
|
|
62
62
|
"globalPattern": null,
|
|
63
|
-
"period":
|
|
63
|
+
"period": 6,
|
|
64
64
|
"offset": null,
|
|
65
65
|
"layerTypes": null
|
|
66
66
|
},
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"enabled": true
|
|
70
70
|
}
|
|
71
71
|
},
|
|
72
|
-
"
|
|
72
|
+
"session": {
|
|
73
73
|
"compute": {
|
|
74
74
|
"defaults": {
|
|
75
75
|
"activationDtype": "f32",
|
|
@@ -79,9 +79,46 @@
|
|
|
79
79
|
}
|
|
80
80
|
},
|
|
81
81
|
"kvcache": {
|
|
82
|
-
"kvDtype": "f16"
|
|
82
|
+
"kvDtype": "f16",
|
|
83
|
+
"layout": "contiguous",
|
|
84
|
+
"pageSize": 256,
|
|
85
|
+
"tiering": {
|
|
86
|
+
"mode": "off"
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"decodeLoop": {
|
|
90
|
+
"batchSize": 4,
|
|
91
|
+
"stopCheckMode": "batch",
|
|
92
|
+
"readbackInterval": 1,
|
|
93
|
+
"readbackMode": "sequential",
|
|
94
|
+
"ringTokens": 1,
|
|
95
|
+
"ringStop": 1,
|
|
96
|
+
"ringStaging": 1,
|
|
97
|
+
"disableCommandBatching": false
|
|
83
98
|
},
|
|
84
|
-
"
|
|
99
|
+
"perLayerInputs": {
|
|
100
|
+
"materialization": "auto",
|
|
101
|
+
"rowCache": {
|
|
102
|
+
"mode": "lru",
|
|
103
|
+
"maxRows": 256,
|
|
104
|
+
"maxBytes": 134217728,
|
|
105
|
+
"decodedDtype": "f32"
|
|
106
|
+
},
|
|
107
|
+
"prefetch": {
|
|
108
|
+
"mode": "next_token",
|
|
109
|
+
"rowsAhead": 1
|
|
110
|
+
},
|
|
111
|
+
"gpuUpload": {
|
|
112
|
+
"mode": "per_step_slices",
|
|
113
|
+
"stagingRows": 2
|
|
114
|
+
},
|
|
115
|
+
"hotCache": {
|
|
116
|
+
"mode": "prepared_tokens",
|
|
117
|
+
"maxTokens": 1024,
|
|
118
|
+
"maxBytes": 134217728,
|
|
119
|
+
"outputDtype": "f32"
|
|
120
|
+
}
|
|
121
|
+
}
|
|
85
122
|
},
|
|
86
123
|
"execution": {
|
|
87
124
|
"kernels": {
|
|
@@ -103,12 +140,15 @@
|
|
|
103
140
|
"rope": {
|
|
104
141
|
"kernel": "rope.wgsl",
|
|
105
142
|
"entry": "main",
|
|
106
|
-
"digest": "sha256:
|
|
143
|
+
"digest": "sha256:238e989aad7da731046cd54d7bb3c80a6f26daf5d7a8e435607161de902e5882"
|
|
107
144
|
},
|
|
108
145
|
"attn_decode": {
|
|
109
146
|
"kernel": "attention_decode_online_f16kv.wgsl",
|
|
110
147
|
"entry": "main",
|
|
111
|
-
"digest": "sha256:
|
|
148
|
+
"digest": "sha256:beee4722aa6281f58b74e1d055e192017b5555c189a58dd13dd158fe1511a7b8",
|
|
149
|
+
"precision": {
|
|
150
|
+
"kvDtype": "f16"
|
|
151
|
+
}
|
|
112
152
|
},
|
|
113
153
|
"residual": {
|
|
114
154
|
"kernel": "residual.wgsl",
|
|
@@ -131,7 +171,10 @@
|
|
|
131
171
|
"attn_stream": {
|
|
132
172
|
"kernel": "attention_streaming_f16kv.wgsl",
|
|
133
173
|
"entry": "main",
|
|
134
|
-
"digest": "sha256:
|
|
174
|
+
"digest": "sha256:5976eef417cebf648f52aeebb47ed1dc6b03c3c541122290c5cead19238fdc24",
|
|
175
|
+
"precision": {
|
|
176
|
+
"kvDtype": "f16"
|
|
177
|
+
}
|
|
135
178
|
},
|
|
136
179
|
"lm_head_gemv": {
|
|
137
180
|
"kernel": "matmul_gemv_subgroup.wgsl",
|
|
@@ -15,11 +15,12 @@
|
|
|
15
15
|
"attention": {
|
|
16
16
|
"queryPreAttnScalar": 256,
|
|
17
17
|
"attnLogitSoftcapping": null,
|
|
18
|
-
"slidingWindow":
|
|
18
|
+
"slidingWindow": 512,
|
|
19
19
|
"queryKeyNorm": true,
|
|
20
20
|
"causal": true,
|
|
21
21
|
"attentionBias": false,
|
|
22
|
-
"attentionOutputGate": false
|
|
22
|
+
"attentionOutputGate": false,
|
|
23
|
+
"valueNorm": false
|
|
23
24
|
},
|
|
24
25
|
"normalization": {
|
|
25
26
|
"rmsNormEps": 0.000001,
|
|
@@ -31,11 +32,12 @@
|
|
|
31
32
|
"ffn": {
|
|
32
33
|
"activation": "gelu",
|
|
33
34
|
"gatedActivation": true,
|
|
34
|
-
"swigluLimit": null
|
|
35
|
+
"swigluLimit": null,
|
|
36
|
+
"useDoubleWideMlp": false
|
|
35
37
|
},
|
|
36
38
|
"rope": {
|
|
37
39
|
"ropeTheta": 1000000,
|
|
38
|
-
"ropeLocalTheta":
|
|
40
|
+
"ropeLocalTheta": 10000,
|
|
39
41
|
"mropeInterleaved": false,
|
|
40
42
|
"mropeSection": null,
|
|
41
43
|
"partialRotaryFactor": null,
|
|
@@ -48,7 +50,10 @@
|
|
|
48
50
|
"yarnOriginalMaxPos": null,
|
|
49
51
|
"ropeLocalYarnBetaFast": null,
|
|
50
52
|
"ropeLocalYarnBetaSlow": null,
|
|
51
|
-
"ropeLocalYarnOriginalMaxPos": null
|
|
53
|
+
"ropeLocalYarnOriginalMaxPos": null,
|
|
54
|
+
"ropeLocalPartialRotaryFactor": null,
|
|
55
|
+
"ropeFrequencyBaseDim": null,
|
|
56
|
+
"ropeLocalFrequencyBaseDim": null
|
|
52
57
|
},
|
|
53
58
|
"output": {
|
|
54
59
|
"finalLogitSoftcapping": null,
|
|
@@ -59,9 +64,9 @@
|
|
|
59
64
|
"embeddingPostprocessor": null
|
|
60
65
|
},
|
|
61
66
|
"layerPattern": {
|
|
62
|
-
"type": "
|
|
67
|
+
"type": "every_n",
|
|
63
68
|
"globalPattern": null,
|
|
64
|
-
"period":
|
|
69
|
+
"period": 6,
|
|
65
70
|
"offset": null,
|
|
66
71
|
"layerTypes": null
|
|
67
72
|
},
|
|
@@ -70,7 +75,7 @@
|
|
|
70
75
|
"enabled": true
|
|
71
76
|
}
|
|
72
77
|
},
|
|
73
|
-
|
|
78
|
+
"session": {
|
|
74
79
|
"compute": {
|
|
75
80
|
"defaults": {
|
|
76
81
|
"activationDtype": "f32",
|
|
@@ -80,9 +85,46 @@
|
|
|
80
85
|
}
|
|
81
86
|
},
|
|
82
87
|
"kvcache": {
|
|
83
|
-
"kvDtype": "f16"
|
|
88
|
+
"kvDtype": "f16",
|
|
89
|
+
"layout": "contiguous",
|
|
90
|
+
"pageSize": 256,
|
|
91
|
+
"tiering": {
|
|
92
|
+
"mode": "off"
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"decodeLoop": {
|
|
96
|
+
"batchSize": 4,
|
|
97
|
+
"stopCheckMode": "batch",
|
|
98
|
+
"readbackInterval": 1,
|
|
99
|
+
"readbackMode": "sequential",
|
|
100
|
+
"ringTokens": 1,
|
|
101
|
+
"ringStop": 1,
|
|
102
|
+
"ringStaging": 1,
|
|
103
|
+
"disableCommandBatching": false
|
|
84
104
|
},
|
|
85
|
-
"
|
|
105
|
+
"perLayerInputs": {
|
|
106
|
+
"materialization": "auto",
|
|
107
|
+
"rowCache": {
|
|
108
|
+
"mode": "lru",
|
|
109
|
+
"maxRows": 256,
|
|
110
|
+
"maxBytes": 134217728,
|
|
111
|
+
"decodedDtype": "f32"
|
|
112
|
+
},
|
|
113
|
+
"prefetch": {
|
|
114
|
+
"mode": "next_token",
|
|
115
|
+
"rowsAhead": 1
|
|
116
|
+
},
|
|
117
|
+
"gpuUpload": {
|
|
118
|
+
"mode": "per_step_slices",
|
|
119
|
+
"stagingRows": 2
|
|
120
|
+
},
|
|
121
|
+
"hotCache": {
|
|
122
|
+
"mode": "prepared_tokens",
|
|
123
|
+
"maxTokens": 1024,
|
|
124
|
+
"maxBytes": 134217728,
|
|
125
|
+
"outputDtype": "f32"
|
|
126
|
+
}
|
|
127
|
+
}
|
|
86
128
|
},
|
|
87
129
|
"execution": {
|
|
88
130
|
"kernels": {
|
|
@@ -97,19 +139,22 @@
|
|
|
97
139
|
"digest": "sha256:f516b3e4bde2015f2a207c3ca5b8c9820c7809fa8f8d0786f90c568e0f1ac077"
|
|
98
140
|
},
|
|
99
141
|
"gemv": {
|
|
100
|
-
"kernel": "
|
|
101
|
-
"entry": "
|
|
102
|
-
"digest": "sha256:
|
|
142
|
+
"kernel": "matmul_f32.wgsl",
|
|
143
|
+
"entry": "main",
|
|
144
|
+
"digest": "sha256:b5bb8e3d8014136e33de7935dd2a1f074c988044fe05cf5b559718c6f061eaa8"
|
|
103
145
|
},
|
|
104
146
|
"rope": {
|
|
105
147
|
"kernel": "rope.wgsl",
|
|
106
148
|
"entry": "main",
|
|
107
|
-
"digest": "sha256:
|
|
149
|
+
"digest": "sha256:238e989aad7da731046cd54d7bb3c80a6f26daf5d7a8e435607161de902e5882"
|
|
108
150
|
},
|
|
109
151
|
"attn_decode": {
|
|
110
152
|
"kernel": "attention_decode_online_f16kv.wgsl",
|
|
111
153
|
"entry": "main",
|
|
112
|
-
"digest": "sha256:
|
|
154
|
+
"digest": "sha256:beee4722aa6281f58b74e1d055e192017b5555c189a58dd13dd158fe1511a7b8",
|
|
155
|
+
"precision": {
|
|
156
|
+
"kvDtype": "f16"
|
|
157
|
+
}
|
|
113
158
|
},
|
|
114
159
|
"residual": {
|
|
115
160
|
"kernel": "residual.wgsl",
|
|
@@ -125,14 +170,17 @@
|
|
|
125
170
|
}
|
|
126
171
|
},
|
|
127
172
|
"tiled": {
|
|
128
|
-
"kernel": "
|
|
173
|
+
"kernel": "matmul_f32.wgsl",
|
|
129
174
|
"entry": "main",
|
|
130
|
-
"digest": "sha256:
|
|
175
|
+
"digest": "sha256:b5bb8e3d8014136e33de7935dd2a1f074c988044fe05cf5b559718c6f061eaa8"
|
|
131
176
|
},
|
|
132
177
|
"attn_stream": {
|
|
133
178
|
"kernel": "attention_streaming_f16kv.wgsl",
|
|
134
179
|
"entry": "main",
|
|
135
|
-
"digest": "sha256:
|
|
180
|
+
"digest": "sha256:5976eef417cebf648f52aeebb47ed1dc6b03c3c541122290c5cead19238fdc24",
|
|
181
|
+
"precision": {
|
|
182
|
+
"kvDtype": "f16"
|
|
183
|
+
}
|
|
136
184
|
},
|
|
137
185
|
"lm_head_gemv": {
|
|
138
186
|
"kernel": "matmul_gemv_subgroup.wgsl",
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
{
|
|
2
|
+
"output": {
|
|
3
|
+
"baseDir": "models/local",
|
|
4
|
+
"modelBaseId": "gemma-4-e2b-it-q4k-ehf16-af32",
|
|
5
|
+
"textOnly": false
|
|
6
|
+
},
|
|
7
|
+
"quantization": {
|
|
8
|
+
"weights": "q4k",
|
|
9
|
+
"embeddings": "f16",
|
|
10
|
+
"lmHead": "f16",
|
|
11
|
+
"vision": "f16",
|
|
12
|
+
"projector": "f16",
|
|
13
|
+
"audio": "f16",
|
|
14
|
+
"computePrecision": "f32",
|
|
15
|
+
"q4kLayout": "row"
|
|
16
|
+
},
|
|
17
|
+
"manifest": {
|
|
18
|
+
"visionConfig": {
|
|
19
|
+
"vision_architecture": "gemma4",
|
|
20
|
+
"hidden_size": 768,
|
|
21
|
+
"num_attention_heads": 12,
|
|
22
|
+
"num_hidden_layers": 16,
|
|
23
|
+
"num_key_value_heads": 12,
|
|
24
|
+
"head_dim": 64,
|
|
25
|
+
"intermediate_size": 3072,
|
|
26
|
+
"patch_size": 16,
|
|
27
|
+
"pooling_kernel_size": 3,
|
|
28
|
+
"position_embedding_size": 10240,
|
|
29
|
+
"default_output_length": 280,
|
|
30
|
+
"rms_norm_eps": 0.000001,
|
|
31
|
+
"hidden_activation": "gelu_pytorch_tanh",
|
|
32
|
+
"use_clipped_linears": true,
|
|
33
|
+
"standardize": false,
|
|
34
|
+
"rope_parameters": {
|
|
35
|
+
"rope_theta": 100
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"audioConfig": {
|
|
39
|
+
"audio_architecture": "gemma4",
|
|
40
|
+
"num_hidden_layers": 12,
|
|
41
|
+
"hidden_size": 1024,
|
|
42
|
+
"num_attention_heads": 8,
|
|
43
|
+
"conv_kernel_size": 5,
|
|
44
|
+
"subsampling_conv_channels": [128, 32],
|
|
45
|
+
"output_proj_dims": 1536,
|
|
46
|
+
"attention_context_left": 13,
|
|
47
|
+
"attention_context_right": 0,
|
|
48
|
+
"attention_chunk_size": 12,
|
|
49
|
+
"attention_logit_cap": 50,
|
|
50
|
+
"attention_invalid_logits_value": -1000000000,
|
|
51
|
+
"residual_weight": 0.5,
|
|
52
|
+
"rms_norm_eps": 0.000001,
|
|
53
|
+
"hidden_act": "silu",
|
|
54
|
+
"use_clipped_linears": true
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"inference": {
|
|
58
|
+
"attention": {
|
|
59
|
+
"queryPreAttnScalar": 1,
|
|
60
|
+
"attnLogitSoftcapping": null,
|
|
61
|
+
"slidingWindow": 512,
|
|
62
|
+
"queryKeyNorm": true,
|
|
63
|
+
"valueNorm": true,
|
|
64
|
+
"causal": true,
|
|
65
|
+
"attentionBias": false,
|
|
66
|
+
"attentionOutputGate": false
|
|
67
|
+
},
|
|
68
|
+
"normalization": {
|
|
69
|
+
"rmsNormEps": 1e-6,
|
|
70
|
+
"rmsNormWeightOffset": false,
|
|
71
|
+
"postAttentionNorm": true,
|
|
72
|
+
"preFeedforwardNorm": true,
|
|
73
|
+
"postFeedforwardNorm": true
|
|
74
|
+
},
|
|
75
|
+
"ffn": {
|
|
76
|
+
"activation": "gelu",
|
|
77
|
+
"gatedActivation": true,
|
|
78
|
+
"useDoubleWideMlp": true,
|
|
79
|
+
"swigluLimit": null
|
|
80
|
+
},
|
|
81
|
+
"rope": {
|
|
82
|
+
"ropeTheta": 1000000,
|
|
83
|
+
"ropeLocalTheta": 10000,
|
|
84
|
+
"ropeInterleaved": false,
|
|
85
|
+
"mropeInterleaved": false,
|
|
86
|
+
"mropeSection": null,
|
|
87
|
+
"partialRotaryFactor": 0.25,
|
|
88
|
+
"ropeLocalPartialRotaryFactor": null,
|
|
89
|
+
"ropeFrequencyBaseDim": 512,
|
|
90
|
+
"ropeLocalFrequencyBaseDim": null,
|
|
91
|
+
"ropeScalingType": null,
|
|
92
|
+
"ropeScalingFactor": 1,
|
|
93
|
+
"ropeLocalScalingType": null,
|
|
94
|
+
"ropeLocalScalingFactor": 1,
|
|
95
|
+
"yarnBetaFast": null,
|
|
96
|
+
"yarnBetaSlow": null,
|
|
97
|
+
"yarnOriginalMaxPos": null,
|
|
98
|
+
"ropeLocalYarnBetaFast": null,
|
|
99
|
+
"ropeLocalYarnBetaSlow": null,
|
|
100
|
+
"ropeLocalYarnOriginalMaxPos": null
|
|
101
|
+
},
|
|
102
|
+
"output": {
|
|
103
|
+
"finalLogitSoftcapping": 30,
|
|
104
|
+
"tieWordEmbeddings": true,
|
|
105
|
+
"scaleEmbeddings": true,
|
|
106
|
+
"embeddingTranspose": false,
|
|
107
|
+
"embeddingVocabSize": null,
|
|
108
|
+
"embeddingPostprocessor": null
|
|
109
|
+
},
|
|
110
|
+
"layerPattern": {
|
|
111
|
+
"type": "every_n",
|
|
112
|
+
"globalPattern": null,
|
|
113
|
+
"period": 5,
|
|
114
|
+
"offset": 4,
|
|
115
|
+
"layerTypes": null
|
|
116
|
+
},
|
|
117
|
+
"chatTemplate": {
|
|
118
|
+
"type": "gemma4",
|
|
119
|
+
"enabled": true
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
"session": {
|
|
123
|
+
"compute": {
|
|
124
|
+
"defaults": {
|
|
125
|
+
"activationDtype": "f32",
|
|
126
|
+
"mathDtype": "f32",
|
|
127
|
+
"accumDtype": "f32",
|
|
128
|
+
"outputDtype": "f32"
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
"kvcache": {
|
|
132
|
+
"kvDtype": "f16",
|
|
133
|
+
"layout": "contiguous",
|
|
134
|
+
"pageSize": 256,
|
|
135
|
+
"tiering": {
|
|
136
|
+
"mode": "off"
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
"decodeLoop": {
|
|
140
|
+
"batchSize": 8,
|
|
141
|
+
"stopCheckMode": "batch",
|
|
142
|
+
"readbackInterval": 8,
|
|
143
|
+
"readbackMode": "overlapped",
|
|
144
|
+
"ringTokens": 2,
|
|
145
|
+
"ringStop": 1,
|
|
146
|
+
"ringStaging": 2,
|
|
147
|
+
"disableCommandBatching": false
|
|
148
|
+
},
|
|
149
|
+
"perLayerInputs": {
|
|
150
|
+
"materialization": "range_backed",
|
|
151
|
+
"rowCache": {
|
|
152
|
+
"mode": "lru",
|
|
153
|
+
"maxRows": 512,
|
|
154
|
+
"maxBytes": 268435456,
|
|
155
|
+
"decodedDtype": "f32"
|
|
156
|
+
},
|
|
157
|
+
"prefetch": {
|
|
158
|
+
"mode": "next_token",
|
|
159
|
+
"rowsAhead": 1
|
|
160
|
+
},
|
|
161
|
+
"gpuUpload": {
|
|
162
|
+
"mode": "per_step_slices",
|
|
163
|
+
"stagingRows": 2
|
|
164
|
+
},
|
|
165
|
+
"hotCache": {
|
|
166
|
+
"mode": "prepared_tokens",
|
|
167
|
+
"maxTokens": 4096,
|
|
168
|
+
"maxBytes": 268435456,
|
|
169
|
+
"outputDtype": "f32"
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
"execution": {
|
|
174
|
+
"kernels": {
|
|
175
|
+
"embed": { "kernel": "gather.wgsl", "entry": "main", "digest": "sha256:4b12653c53247b32ebde7f6cf6a989d6248977e3816c761540b990b5f9818cb6" },
|
|
176
|
+
"rmsnorm": { "kernel": "rmsnorm.wgsl", "entry": "main", "digest": "sha256:989f2e7ef2ce27c187062ffa913dd6ed785ec01531fa9cea4879d2b8168a8ad3" },
|
|
177
|
+
"final_norm_stable": { "kernel": "rmsnorm.wgsl", "entry": "main", "digest": "sha256:989f2e7ef2ce27c187062ffa913dd6ed785ec01531fa9cea4879d2b8168a8ad3", "precision": { "inputDtype": "f32", "outputDtype": "f32" } },
|
|
178
|
+
"gemv": { "kernel": "matmul_gemv_subgroup.wgsl", "entry": "main_vec4", "digest": "sha256:5c71b5a60a672187d45f9783dbd1721f94b207a2b6cd0724130ce11aadd8fe66" },
|
|
179
|
+
"rope": { "kernel": "rope.wgsl", "entry": "main", "digest": "sha256:238e989aad7da731046cd54d7bb3c80a6f26daf5d7a8e435607161de902e5882" },
|
|
180
|
+
"attn_decode": { "kernel": "attention_decode_online_f16kv.wgsl", "entry": "main", "digest": "sha256:beee4722aa6281f58b74e1d055e192017b5555c189a58dd13dd158fe1511a7b8", "precision": { "kvDtype": "f16" } },
|
|
181
|
+
"residual": { "kernel": "residual.wgsl", "entry": "main", "digest": "sha256:f1abd88c959c5d8dd27b9353d487e37b2a96850ed9d90c365212e260399cc2a7" },
|
|
182
|
+
"gelu": { "kernel": "gelu.wgsl", "entry": "main", "digest": "sha256:a9007ea08aaff98f9be08f1e0490a6bcf252883eac5513de876ab9ce918865e6", "constants": { "HAS_GATE": true } },
|
|
183
|
+
"tiled": { "kernel": "matmul_f16w_f32a.wgsl", "entry": "main", "digest": "sha256:78b78ec9a73766b5cfa71505f845a2cd3dac2468f8b92e5624e0c67201198888" },
|
|
184
|
+
"attn_stream": { "kernel": "attention_streaming_f16kv.wgsl", "entry": "main", "digest": "sha256:5976eef417cebf648f52aeebb47ed1dc6b03c3c541122290c5cead19238fdc24", "precision": { "kvDtype": "f16" } },
|
|
185
|
+
"attn_small": { "kernel": "attention_small_f16kv.wgsl", "entry": "main", "digest": "sha256:369aa3b386b4ef89a916ba2717465caa47079f52bbe0f3e5d61bd3220e2ec71e", "precision": { "kvDtype": "f16" } },
|
|
186
|
+
"lm_head_gemv": { "kernel": "matmul_gemv_subgroup.wgsl", "entry": "main_multicol", "digest": "sha256:f4d392b7f1e97e5bd63044ce09bdeb77ed7e77f6080181d483b8f1553e844ec4", "constants": { "MULTICOL_COLS_PER_WG": 64, "MULTICOL_THREADS_PER_COL": 4 } },
|
|
187
|
+
"lm_head_gemv_stable": { "kernel": "matmul_gemv_subgroup.wgsl", "entry": "main_multicol", "digest": "sha256:f4d392b7f1e97e5bd63044ce09bdeb77ed7e77f6080181d483b8f1553e844ec4", "constants": { "MULTICOL_COLS_PER_WG": 64, "MULTICOL_THREADS_PER_COL": 4 }, "precision": { "inputDtype": "f32", "outputDtype": "f32" } },
|
|
188
|
+
"lm_head_prefill_stable": { "kernel": "matmul_f16w_f32a.wgsl", "entry": "main", "digest": "sha256:78b78ec9a73766b5cfa71505f845a2cd3dac2468f8b92e5624e0c67201198888", "precision": { "inputDtype": "f32", "outputDtype": "f32" } },
|
|
189
|
+
"sample": { "kernel": "sample.wgsl", "entry": "sample_single_pass", "digest": "sha256:91c5c30bbc3e034457c1521c1ad576ce798c0868a1fe16e02be5f92706614096" }
|
|
190
|
+
},
|
|
191
|
+
"preLayer": [
|
|
192
|
+
["embed", "embed", "embed_tokens"]
|
|
193
|
+
],
|
|
194
|
+
"decode": [
|
|
195
|
+
["input_norm", "rmsnorm"],
|
|
196
|
+
["q_proj", "gemv", "layer.{L}.self_attn.q_proj"],
|
|
197
|
+
["k_proj", "gemv", "layer.{L}.self_attn.k_proj"],
|
|
198
|
+
["v_proj", "gemv", "layer.{L}.self_attn.v_proj"],
|
|
199
|
+
["rope_q", "rope"],
|
|
200
|
+
["rope_k", "rope"],
|
|
201
|
+
["attention", "attn_decode"],
|
|
202
|
+
["o_proj", "gemv", "layer.{L}.self_attn.o_proj"],
|
|
203
|
+
["attn_residual", "residual"],
|
|
204
|
+
["post_attn_norm", "rmsnorm"],
|
|
205
|
+
["ffn", "gelu"],
|
|
206
|
+
["ffn_residual", "residual"]
|
|
207
|
+
],
|
|
208
|
+
"prefill": [
|
|
209
|
+
{
|
|
210
|
+
"layers": [0, 1, 2, 3, 5, 6, 7, 8, 10, 11, 12, 13, 15, 16, 17, 18, 20, 21, 22, 23, 25, 26, 27, 28, 30, 31, 32, 33],
|
|
211
|
+
"steps": [
|
|
212
|
+
["input_norm", "rmsnorm"],
|
|
213
|
+
["q_proj", "tiled", "layer.{L}.self_attn.q_proj"],
|
|
214
|
+
["k_proj", "tiled", "layer.{L}.self_attn.k_proj"],
|
|
215
|
+
["v_proj", "tiled", "layer.{L}.self_attn.v_proj"],
|
|
216
|
+
["rope_q", "rope"],
|
|
217
|
+
["rope_k", "rope"],
|
|
218
|
+
["attention", "attn_small"],
|
|
219
|
+
["o_proj", "tiled", "layer.{L}.self_attn.o_proj"],
|
|
220
|
+
["attn_residual", "residual"],
|
|
221
|
+
["post_attn_norm", "rmsnorm"],
|
|
222
|
+
["ffn", "gelu"],
|
|
223
|
+
["ffn_residual", "residual"]
|
|
224
|
+
]
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"layers": [4, 9, 14, 19, 24, 29, 34],
|
|
228
|
+
"steps": [
|
|
229
|
+
["input_norm", "rmsnorm"],
|
|
230
|
+
["q_proj", "tiled", "layer.{L}.self_attn.q_proj"],
|
|
231
|
+
["k_proj", "tiled", "layer.{L}.self_attn.k_proj"],
|
|
232
|
+
["v_proj", "tiled", "layer.{L}.self_attn.v_proj"],
|
|
233
|
+
["rope_q", "rope"],
|
|
234
|
+
["rope_k", "rope"],
|
|
235
|
+
["attention", "attn_stream"],
|
|
236
|
+
["o_proj", "tiled", "layer.{L}.self_attn.o_proj"],
|
|
237
|
+
["attn_residual", "residual"],
|
|
238
|
+
["post_attn_norm", "rmsnorm"],
|
|
239
|
+
["ffn", "gelu"],
|
|
240
|
+
["ffn_residual", "residual"]
|
|
241
|
+
]
|
|
242
|
+
}
|
|
243
|
+
],
|
|
244
|
+
"postLayer": [
|
|
245
|
+
["final_norm", "final_norm_stable"],
|
|
246
|
+
["lm_head", "lm_head_gemv_stable", "lm_head"],
|
|
247
|
+
["lm_head_prefill", "lm_head_prefill_stable", "lm_head"],
|
|
248
|
+
["sample", "sample"]
|
|
249
|
+
],
|
|
250
|
+
"policies": {
|
|
251
|
+
"unsupportedPrecision": "error",
|
|
252
|
+
"dtypeTransition": "require_cast_step",
|
|
253
|
+
"unresolvedKernel": "error"
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|