doppler-gpu 0.2.0 → 0.2.1
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 +21 -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
|
@@ -38,7 +38,7 @@ export {
|
|
|
38
38
|
export {
|
|
39
39
|
EXECUTION_V1_SCHEMA_ID,
|
|
40
40
|
DEFAULT_EXECUTION_V1_COMPUTE_DEFAULTS,
|
|
41
|
-
|
|
41
|
+
DEFAULT_EXECUTION_V1_SESSION,
|
|
42
42
|
DEFAULT_EXECUTION_V1_POLICIES,
|
|
43
43
|
DEFAULT_EXECUTION_V1_PATCH,
|
|
44
44
|
isExecutionV1Digest,
|
|
@@ -62,6 +62,18 @@ export {
|
|
|
62
62
|
validateBrowserSuiteMetrics,
|
|
63
63
|
} from './browser-suite-metrics.schema.js';
|
|
64
64
|
|
|
65
|
+
// =============================================================================
|
|
66
|
+
// Support-Tier Registry Schema
|
|
67
|
+
// =============================================================================
|
|
68
|
+
export {
|
|
69
|
+
SUPPORT_TIER_REGISTRY_SCHEMA_VERSION,
|
|
70
|
+
SUPPORT_TIERS,
|
|
71
|
+
SUPPORT_SCOPES,
|
|
72
|
+
CLAIM_VISIBILITY_LEVELS,
|
|
73
|
+
DEFAULT_SUPPORT_TIER_REGISTRY,
|
|
74
|
+
validateSupportTierRegistry,
|
|
75
|
+
} from './support-tiers.schema.js';
|
|
76
|
+
|
|
65
77
|
// =============================================================================
|
|
66
78
|
// Conversion Report Schema
|
|
67
79
|
// =============================================================================
|
|
@@ -95,6 +107,7 @@ export {
|
|
|
95
107
|
export {
|
|
96
108
|
DEFAULT_Q4K_LAYOUT,
|
|
97
109
|
DEFAULT_SHARD_CACHE_CONFIG,
|
|
110
|
+
DEFAULT_LOADER_MEMORY_BUDGET_CONFIG,
|
|
98
111
|
DEFAULT_MEMORY_MANAGEMENT_CONFIG,
|
|
99
112
|
DEFAULT_PREFETCH_CONFIG,
|
|
100
113
|
DEFAULT_OPFS_PATH_CONFIG,
|
|
@@ -120,22 +133,6 @@ export {
|
|
|
120
133
|
DEFAULT_STORAGE_FULL_CONFIG,
|
|
121
134
|
} from './storage.schema.js';
|
|
122
135
|
|
|
123
|
-
// =============================================================================
|
|
124
|
-
// Inference Defaults Schema
|
|
125
|
-
// =============================================================================
|
|
126
|
-
export {
|
|
127
|
-
DEFAULT_GENERATION_CONFIG,
|
|
128
|
-
DEFAULT_BATCHING_DEFAULTS,
|
|
129
|
-
DEFAULT_COMPUTE_DEFAULTS,
|
|
130
|
-
DEFAULT_LARGE_WEIGHT_CONFIG,
|
|
131
|
-
DEFAULT_SAMPLING_DEFAULTS,
|
|
132
|
-
DEFAULT_TOKENIZER_DEFAULTS,
|
|
133
|
-
DEFAULT_CHAT_TEMPLATE_CONFIG,
|
|
134
|
-
DEFAULT_KERNEL_PATH_POLICY,
|
|
135
|
-
DEFAULT_INFERENCE_DEFAULTS_CONFIG,
|
|
136
|
-
DEFAULT_MODEL_INFERENCE_DEFAULTS,
|
|
137
|
-
} from './inference-defaults.schema.js';
|
|
138
|
-
|
|
139
136
|
// =============================================================================
|
|
140
137
|
// Distribution Schema
|
|
141
138
|
// =============================================================================
|
|
@@ -490,6 +487,7 @@ export {
|
|
|
490
487
|
// =============================================================================
|
|
491
488
|
export {
|
|
492
489
|
// Defaults
|
|
490
|
+
DEFAULT_CHAT_TEMPLATE_CONFIG,
|
|
493
491
|
DEFAULT_RUNTIME_CONFIG,
|
|
494
492
|
DEFAULT_DOPPLER_CONFIG,
|
|
495
493
|
|
|
@@ -18,7 +18,10 @@ export interface RoPEConfigSchema {
|
|
|
18
18
|
/** Local RoPE theta for sliding window layers (Gemma 3 uses 10000) */
|
|
19
19
|
ropeLocalTheta?: number;
|
|
20
20
|
|
|
21
|
-
/** Apply adjacent-pair rotary layout instead of rotate-half layout. */
|
|
21
|
+
/** Apply adjacent-pair rotary layout instead of rotate-half layout for standard RoPE. */
|
|
22
|
+
ropeInterleaved?: boolean;
|
|
23
|
+
|
|
24
|
+
/** Apply adjacent-pair rotary layout for mRoPE section pairing. */
|
|
22
25
|
mropeInterleaved?: boolean;
|
|
23
26
|
|
|
24
27
|
/** mRoPE section sizes before the Qwen doubling step. */
|
|
@@ -27,6 +30,15 @@ export interface RoPEConfigSchema {
|
|
|
27
30
|
/** Fraction of the head dimension that participates in rotary embedding. */
|
|
28
31
|
partialRotaryFactor?: number | null;
|
|
29
32
|
|
|
33
|
+
/** Fraction of the local/sliding head dimension that participates in rotary embedding. */
|
|
34
|
+
ropeLocalPartialRotaryFactor?: number | null;
|
|
35
|
+
|
|
36
|
+
/** Frequency exponent base dimension for full/global attention RoPE (null = use rotary dim). */
|
|
37
|
+
ropeFrequencyBaseDim?: number | null;
|
|
38
|
+
|
|
39
|
+
/** Frequency exponent base dimension for local/sliding attention RoPE (null = use local rotary dim). */
|
|
40
|
+
ropeLocalFrequencyBaseDim?: number | null;
|
|
41
|
+
|
|
30
42
|
/** RoPE scaling type */
|
|
31
43
|
ropeScalingType?: 'linear' | 'dynamic' | 'yarn' | null;
|
|
32
44
|
|
|
@@ -66,6 +78,8 @@ export interface AttentionSchema {
|
|
|
66
78
|
attnLogitSoftcapping?: number | null;
|
|
67
79
|
/** Use query-key normalization */
|
|
68
80
|
queryKeyNorm?: boolean;
|
|
81
|
+
/** Apply unit-scale RMSNorm to values before attention */
|
|
82
|
+
valueNorm?: boolean;
|
|
69
83
|
/** Apply sigmoid gate from q_proj split to attention output */
|
|
70
84
|
attentionOutputGate?: boolean;
|
|
71
85
|
/** @deprecated Use RoPEConfigSchema.ropeScalingType instead */
|
|
@@ -94,6 +108,8 @@ export interface FFNSchema {
|
|
|
94
108
|
activation?: 'silu' | 'gelu' | 'relu' | 'swiglu';
|
|
95
109
|
/** Whether activation is gated (e.g., SwiGLU, GeGLU) */
|
|
96
110
|
gatedActivation?: boolean;
|
|
111
|
+
/** Double the FFN intermediate width on KV-shared layers. */
|
|
112
|
+
useDoubleWideMlp?: boolean;
|
|
97
113
|
/** Clamp SwiGLU output (null = disabled) */
|
|
98
114
|
swigluLimit?: number | null;
|
|
99
115
|
}
|
|
@@ -101,6 +117,7 @@ export interface FFNSchema {
|
|
|
101
117
|
/** Built-in chat template types */
|
|
102
118
|
export type ChatTemplateType =
|
|
103
119
|
| 'gemma'
|
|
120
|
+
| 'gemma4'
|
|
104
121
|
| 'llama3'
|
|
105
122
|
| 'gpt-oss'
|
|
106
123
|
| 'chatml'
|
|
@@ -110,11 +127,14 @@ export type ChatTemplateType =
|
|
|
110
127
|
|
|
111
128
|
/** Chat template configuration for instruct models */
|
|
112
129
|
export interface ChatTemplateSchema {
|
|
113
|
-
/** Template type identifier (gemma, llama3, gpt-oss, chatml, qwen, translategemma) */
|
|
130
|
+
/** Template type identifier (gemma, gemma4, llama3, gpt-oss, chatml, qwen, translategemma) */
|
|
114
131
|
type?: ChatTemplateType;
|
|
115
132
|
|
|
116
|
-
/** Whether to apply chat template by default (instruct
|
|
117
|
-
enabled?: boolean;
|
|
133
|
+
/** Whether to apply chat template by default (null = no runtime override, instruct manifests should set true) */
|
|
134
|
+
enabled?: boolean | null;
|
|
135
|
+
|
|
136
|
+
/** Enable thinking/reasoning mode (null = disabled, true = enabled). Gemma 4 uses <|think|> control token. */
|
|
137
|
+
thinking?: boolean | null;
|
|
118
138
|
|
|
119
139
|
/** Custom template with {prompt} placeholder (overrides type) */
|
|
120
140
|
custom?: string;
|
|
@@ -168,6 +188,8 @@ export interface LayerPipelineStepSchema {
|
|
|
168
188
|
inputDtype?: LayerPipelineDtype;
|
|
169
189
|
/** Explicit output dtype contract for this step */
|
|
170
190
|
outputDtype?: LayerPipelineDtype;
|
|
191
|
+
/** Explicit KV-cache dtype contract for attention steps */
|
|
192
|
+
kvDtype?: LayerPipelineDtype;
|
|
171
193
|
/** Cast source dtype (cast op only) */
|
|
172
194
|
fromDtype?: LayerPipelineDtype;
|
|
173
195
|
/** Cast target dtype (cast op only) */
|
|
@@ -41,6 +41,18 @@ export interface KernelStepSchema {
|
|
|
41
41
|
*/
|
|
42
42
|
constants?: Record<string, number | boolean>;
|
|
43
43
|
|
|
44
|
+
/**
|
|
45
|
+
* Optional per-step precision contract. Used by execution-v1-derived kernel
|
|
46
|
+
* paths to narrow or widen only specific ops without changing the global
|
|
47
|
+
* activation/KV contract.
|
|
48
|
+
*/
|
|
49
|
+
precision?: {
|
|
50
|
+
activationDtype?: 'f16' | 'f32';
|
|
51
|
+
kvDtype?: 'f16' | 'f32';
|
|
52
|
+
inputDtype?: 'f16' | 'f32';
|
|
53
|
+
outputDtype?: 'f16' | 'f32';
|
|
54
|
+
};
|
|
55
|
+
|
|
44
56
|
/**
|
|
45
57
|
* Weight buffer reference (for matmul ops).
|
|
46
58
|
* Uses template syntax: 'layer.{L}.self_attn.q_proj'
|
|
@@ -76,8 +88,23 @@ export interface LayerOverrideSchema {
|
|
|
76
88
|
/** Layer indices this override applies to */
|
|
77
89
|
layers: number[];
|
|
78
90
|
|
|
79
|
-
/**
|
|
80
|
-
|
|
91
|
+
/**
|
|
92
|
+
* Legacy all-phase override steps. When present, these replace both decode
|
|
93
|
+
* and prefill defaults.
|
|
94
|
+
*/
|
|
95
|
+
steps?: KernelStepSchema[];
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Phase-specific decode override. When omitted, decode falls back to
|
|
99
|
+
* `steps` or the base decode path.
|
|
100
|
+
*/
|
|
101
|
+
decode?: LayerKernelPathSchema;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Phase-specific prefill override. When omitted, prefill falls back to
|
|
105
|
+
* `steps` or the base prefill path.
|
|
106
|
+
*/
|
|
107
|
+
prefill?: LayerKernelPathSchema;
|
|
81
108
|
}
|
|
82
109
|
|
|
83
110
|
/**
|
|
@@ -106,7 +133,7 @@ export interface KernelPathSchema {
|
|
|
106
133
|
kvDtype?: string;
|
|
107
134
|
|
|
108
135
|
/**
|
|
109
|
-
* Explicit
|
|
136
|
+
* Explicit alternate-plan target used only when finiteness recovery is opted in.
|
|
110
137
|
* Required for inline/generated kernel paths that do not have a stable registry id.
|
|
111
138
|
*/
|
|
112
139
|
finitenessFallbackKernelPathId?: string;
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* GPU features that a kernel variant may require.
|
|
12
12
|
* These map to WebGPU adapter features.
|
|
13
13
|
*/
|
|
14
|
-
export type GpuFeature = 'shader-f16' | 'subgroups'
|
|
14
|
+
export type GpuFeature = 'shader-f16' | 'subgroups';
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* WebGPU buffer binding types.
|
|
@@ -41,6 +41,7 @@ export function resolveKernelConfig(
|
|
|
41
41
|
wgslOverrides: variantSchema.wgslOverrides ?? {},
|
|
42
42
|
sharedMemory: variantSchema.sharedMemory ?? 0,
|
|
43
43
|
outputDtype: variantSchema.outputDtype ?? null,
|
|
44
|
+
weightDtype: variantSchema.weightDtype ?? null,
|
|
44
45
|
variantMetadata: variantSchema.variantMetadata ?? null,
|
|
45
46
|
};
|
|
46
47
|
}
|
|
@@ -26,6 +26,13 @@ export const DEFAULT_KVCACHE_CONFIG = {
|
|
|
26
26
|
minAluBwRatio: 0.0,
|
|
27
27
|
},
|
|
28
28
|
},
|
|
29
|
+
// Contiguous quantized KV cache controls (for full-attention models)
|
|
30
|
+
// Activates when layout is auto-resolved to 'contiguous_quantized' or set explicitly.
|
|
31
|
+
quantization: {
|
|
32
|
+
mode: 'none', // none | turboquant | turboquant_prod
|
|
33
|
+
bitWidth: 4,
|
|
34
|
+
prodMode: false,
|
|
35
|
+
},
|
|
29
36
|
};
|
|
30
37
|
|
|
31
38
|
export const PAGED_LAYOUT_SEQ_LEN_THRESHOLD = 8192;
|
|
@@ -46,6 +46,31 @@ export interface ShardCacheConfigSchema {
|
|
|
46
46
|
/** Default shard cache configuration */
|
|
47
47
|
export declare const DEFAULT_SHARD_CACHE_CONFIG: ShardCacheConfigSchema;
|
|
48
48
|
|
|
49
|
+
/**
|
|
50
|
+
* Configuration for memory management during model loading.
|
|
51
|
+
*
|
|
52
|
+
* Controls when to flush caches and GPU queues to manage memory pressure.
|
|
53
|
+
*/
|
|
54
|
+
export interface LoaderMemoryBudgetConfigSchema {
|
|
55
|
+
/** Enable resident-memory fail-closed protection during loading */
|
|
56
|
+
enabled: boolean;
|
|
57
|
+
|
|
58
|
+
/** Absolute resident-memory cap in bytes (null = derive from system memory) */
|
|
59
|
+
maxResidentBytes: number | null;
|
|
60
|
+
|
|
61
|
+
/** Fraction of system memory to allow when deriving maxResidentBytes (null = disabled) */
|
|
62
|
+
systemMemoryFraction: number | null;
|
|
63
|
+
|
|
64
|
+
/** Bytes to reserve for the OS and sibling processes when deriving maxResidentBytes */
|
|
65
|
+
reserveBytes: number;
|
|
66
|
+
|
|
67
|
+
/** Minimum derived resident-memory budget in bytes */
|
|
68
|
+
minimumBudgetBytes: number;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/** Default loader memory budget configuration */
|
|
72
|
+
export declare const DEFAULT_LOADER_MEMORY_BUDGET_CONFIG: LoaderMemoryBudgetConfigSchema;
|
|
73
|
+
|
|
49
74
|
/**
|
|
50
75
|
* Configuration for memory management during model loading.
|
|
51
76
|
*
|
|
@@ -63,6 +88,9 @@ export interface MemoryManagementConfigSchema {
|
|
|
63
88
|
|
|
64
89
|
/** Log memory stats every N milliseconds during loading */
|
|
65
90
|
logIntervalMs: number;
|
|
91
|
+
|
|
92
|
+
/** Resident-memory admission and fail-closed budget */
|
|
93
|
+
budget: LoaderMemoryBudgetConfigSchema;
|
|
66
94
|
}
|
|
67
95
|
|
|
68
96
|
/** Default memory management configuration */
|
|
@@ -27,11 +27,20 @@ export const DEFAULT_SHARD_CACHE_CONFIG = {
|
|
|
27
27
|
// Memory Management Config
|
|
28
28
|
// =============================================================================
|
|
29
29
|
|
|
30
|
+
export const DEFAULT_LOADER_MEMORY_BUDGET_CONFIG = {
|
|
31
|
+
enabled: true,
|
|
32
|
+
maxResidentBytes: null,
|
|
33
|
+
systemMemoryFraction: 0.5,
|
|
34
|
+
reserveBytes: 2 * GB,
|
|
35
|
+
minimumBudgetBytes: 1 * GB,
|
|
36
|
+
};
|
|
37
|
+
|
|
30
38
|
export const DEFAULT_MEMORY_MANAGEMENT_CONFIG = {
|
|
31
39
|
flushIntervalLayers: 4,
|
|
32
40
|
flushThresholdBytes: 256 * MB,
|
|
33
41
|
gpuQueueFlushLayers: 4,
|
|
34
42
|
logIntervalMs: 30000, // 30 seconds
|
|
43
|
+
budget: DEFAULT_LOADER_MEMORY_BUDGET_CONFIG,
|
|
35
44
|
};
|
|
36
45
|
|
|
37
46
|
// =============================================================================
|
|
@@ -12,7 +12,7 @@ import type { LayerPipelineSchema, LayerType, LinearNormMode } from './inference
|
|
|
12
12
|
import type { EnergyModelConfigSchema } from './energy.schema.js';
|
|
13
13
|
import type {
|
|
14
14
|
ExecutionV1GraphSchema,
|
|
15
|
-
|
|
15
|
+
ExecutionV1SessionSchema,
|
|
16
16
|
} from './execution-v1.schema.js';
|
|
17
17
|
|
|
18
18
|
/** Supported hash algorithms */
|
|
@@ -145,8 +145,12 @@ export interface ArchitectureSchema {
|
|
|
145
145
|
numAttentionHeads: number;
|
|
146
146
|
numKeyValueHeads: number;
|
|
147
147
|
headDim: number;
|
|
148
|
+
globalHeadDim?: number;
|
|
148
149
|
vocabSize: number;
|
|
149
150
|
maxSeqLen: number;
|
|
151
|
+
hiddenSizePerLayerInput?: number;
|
|
152
|
+
vocabSizePerLayerInput?: number;
|
|
153
|
+
numKvSharedLayers?: number;
|
|
150
154
|
ropeTheta?: number;
|
|
151
155
|
rmsNormEps?: number;
|
|
152
156
|
linearNumKeyHeads?: number;
|
|
@@ -171,6 +175,8 @@ export interface ManifestAttentionSchema {
|
|
|
171
175
|
slidingWindow: number | null;
|
|
172
176
|
/** Query-key normalization */
|
|
173
177
|
queryKeyNorm: boolean;
|
|
178
|
+
/** Value RMSNorm with implicit unit scale (Gemma 4 text attention) */
|
|
179
|
+
valueNorm: boolean;
|
|
174
180
|
/** Whether attention mask is causal (false = bidirectional attention) */
|
|
175
181
|
causal: boolean;
|
|
176
182
|
/** Attention bias mask enabled */
|
|
@@ -204,6 +210,8 @@ export interface ManifestFFNSchema {
|
|
|
204
210
|
activation: 'silu' | 'gelu' | 'geglu' | 'swiglu' | 'relu';
|
|
205
211
|
/** Whether activation is gated (e.g., SwiGLU, GeGLU) */
|
|
206
212
|
gatedActivation: boolean;
|
|
213
|
+
/** Double the FFN intermediate width on KV-shared layers. */
|
|
214
|
+
useDoubleWideMlp: boolean;
|
|
207
215
|
/** Clamp SwiGLU output (null = disabled) */
|
|
208
216
|
swigluLimit: number | null;
|
|
209
217
|
}
|
|
@@ -218,12 +226,20 @@ export interface ManifestRoPESchema {
|
|
|
218
226
|
ropeTheta: number;
|
|
219
227
|
/** Local theta for sliding window layers (null = same as ropeTheta) */
|
|
220
228
|
ropeLocalTheta: number | null;
|
|
221
|
-
/** Use adjacent-pair rotary layout instead of rotate-half layout. */
|
|
229
|
+
/** Use adjacent-pair rotary layout instead of rotate-half layout for standard RoPE. */
|
|
230
|
+
ropeInterleaved: boolean;
|
|
231
|
+
/** Use adjacent-pair rotary layout for mRoPE section pairing. */
|
|
222
232
|
mropeInterleaved: boolean;
|
|
223
233
|
/** mRoPE section sizes before the Qwen doubling step. */
|
|
224
234
|
mropeSection: number[] | null;
|
|
225
235
|
/** Fraction of the head dimension that participates in rotary embedding. */
|
|
226
236
|
partialRotaryFactor: number | null;
|
|
237
|
+
/** Fraction of the local/sliding head dimension that participates in rotary embedding. */
|
|
238
|
+
ropeLocalPartialRotaryFactor: number | null;
|
|
239
|
+
/** Frequency exponent base dimension for full/global attention RoPE (null = use rotary dim). */
|
|
240
|
+
ropeFrequencyBaseDim: number | null;
|
|
241
|
+
/** Frequency exponent base dimension for local/sliding attention RoPE (null = use local rotary dim). */
|
|
242
|
+
ropeLocalFrequencyBaseDim: number | null;
|
|
227
243
|
/** RoPE scaling type (null = no scaling, 'linear', 'dynamic', 'yarn') */
|
|
228
244
|
ropeScalingType: string | null;
|
|
229
245
|
/** RoPE scaling factor (1.0 if no scaling) */
|
|
@@ -302,7 +318,7 @@ export interface ManifestLayerPatternSchema {
|
|
|
302
318
|
*/
|
|
303
319
|
export interface ManifestChatTemplateSchema {
|
|
304
320
|
/** Chat template type (null = no chat template) */
|
|
305
|
-
type: 'gemma' | 'llama3' | 'gpt-oss' | 'chatml' | 'qwen' | 'translategemma' | null;
|
|
321
|
+
type: 'gemma' | 'gemma4' | 'llama3' | 'gpt-oss' | 'chatml' | 'qwen' | 'translategemma' | null;
|
|
306
322
|
/** Whether chat template is enabled */
|
|
307
323
|
enabled: boolean;
|
|
308
324
|
}
|
|
@@ -331,8 +347,8 @@ export interface ManifestInferenceSchema {
|
|
|
331
347
|
chatTemplate: ManifestChatTemplateSchema;
|
|
332
348
|
/** Layer pipeline override (null = use optimized hardcoded path) */
|
|
333
349
|
pipeline: LayerPipelineSchema | null;
|
|
334
|
-
/**
|
|
335
|
-
|
|
350
|
+
/** Explicit session policy for execution v1 manifests */
|
|
351
|
+
session: ExecutionV1SessionSchema | null;
|
|
336
352
|
/** Explicit execution graph (v1 compact tuple format) */
|
|
337
353
|
execution: ExecutionV1GraphSchema | null;
|
|
338
354
|
}
|
|
@@ -382,6 +398,60 @@ export interface TensorSchema {
|
|
|
382
398
|
spans?: TensorSpanSchema[];
|
|
383
399
|
layout?: WeightLayout;
|
|
384
400
|
originalShape?: number[];
|
|
401
|
+
sourceTransform?: {
|
|
402
|
+
kind: 'affine_dequant';
|
|
403
|
+
scheme: 'per_tensor_affine';
|
|
404
|
+
sourceDtype: 'INT8' | 'UINT8' | 'INT4' | 'INT2';
|
|
405
|
+
targetDtype: 'F16';
|
|
406
|
+
scale: number;
|
|
407
|
+
zeroPoint: number;
|
|
408
|
+
} | {
|
|
409
|
+
kind: 'litert_rowwise_dequant';
|
|
410
|
+
scheme: 'per_row_affine';
|
|
411
|
+
sourceDtype: 'INT8' | 'INT4' | 'INT2' | 'UINT8';
|
|
412
|
+
targetDtype: 'F16';
|
|
413
|
+
storageEncoding: 'signed' | 'offset_binary';
|
|
414
|
+
scaleSemantics: 'step' | 'qmax_abs';
|
|
415
|
+
scaleDivisor?: number;
|
|
416
|
+
scaleSource: {
|
|
417
|
+
shard: number;
|
|
418
|
+
shardIndex?: number;
|
|
419
|
+
offset: number;
|
|
420
|
+
size: number;
|
|
421
|
+
spans?: TensorSpanSchema[];
|
|
422
|
+
};
|
|
423
|
+
rowSumSource?: {
|
|
424
|
+
shard: number;
|
|
425
|
+
shardIndex?: number;
|
|
426
|
+
offset: number;
|
|
427
|
+
size: number;
|
|
428
|
+
spans?: TensorSpanSchema[];
|
|
429
|
+
};
|
|
430
|
+
} | {
|
|
431
|
+
kind: 'litert_axis_dequant';
|
|
432
|
+
scheme: 'per_axis_affine';
|
|
433
|
+
sourceDtype: 'INT8' | 'INT4' | 'INT2' | 'UINT8';
|
|
434
|
+
targetDtype: 'F16';
|
|
435
|
+
storageEncoding: 'signed' | 'offset_binary';
|
|
436
|
+
scaleSemantics: 'step' | 'qmax_abs';
|
|
437
|
+
scaleDivisor?: number;
|
|
438
|
+
storageShape: [number, number];
|
|
439
|
+
quantAxis: 0 | 1;
|
|
440
|
+
scaleSource: {
|
|
441
|
+
shard: number;
|
|
442
|
+
shardIndex?: number;
|
|
443
|
+
offset: number;
|
|
444
|
+
size: number;
|
|
445
|
+
spans?: TensorSpanSchema[];
|
|
446
|
+
};
|
|
447
|
+
sumSource?: {
|
|
448
|
+
shard: number;
|
|
449
|
+
shardIndex?: number;
|
|
450
|
+
offset: number;
|
|
451
|
+
size: number;
|
|
452
|
+
spans?: TensorSpanSchema[];
|
|
453
|
+
};
|
|
454
|
+
};
|
|
385
455
|
}
|
|
386
456
|
|
|
387
457
|
/** External tensor map (tensors.json) */
|
|
@@ -459,6 +529,10 @@ export interface ManifestSchema {
|
|
|
459
529
|
hashAlgorithm: HashAlgorithm;
|
|
460
530
|
totalSize: number;
|
|
461
531
|
eos_token_id: number | number[] | null;
|
|
532
|
+
image_token_id?: number;
|
|
533
|
+
audio_token_id?: number;
|
|
534
|
+
video_token_id?: number;
|
|
535
|
+
visionArchitecture?: 'qwen3vl' | 'gemma4' | 'siglip' | (string & {});
|
|
462
536
|
|
|
463
537
|
// Architecture (required)
|
|
464
538
|
architecture: ArchitectureSchema | string;
|
|
@@ -43,6 +43,7 @@ export const DEFAULT_MANIFEST_INFERENCE = {
|
|
|
43
43
|
attnLogitSoftcapping: null, // No softcapping (null = disabled)
|
|
44
44
|
slidingWindow: null, // Full attention (null = no sliding window)
|
|
45
45
|
queryKeyNorm: false,
|
|
46
|
+
valueNorm: false,
|
|
46
47
|
causal: true, // Causal mask enabled by default (decoder-style attention)
|
|
47
48
|
attentionBias: false,
|
|
48
49
|
attentionOutputGate: false,
|
|
@@ -57,14 +58,19 @@ export const DEFAULT_MANIFEST_INFERENCE = {
|
|
|
57
58
|
ffn: {
|
|
58
59
|
activation: 'silu',
|
|
59
60
|
gatedActivation: true,
|
|
61
|
+
useDoubleWideMlp: false,
|
|
60
62
|
swigluLimit: null,
|
|
61
63
|
},
|
|
62
64
|
rope: {
|
|
63
65
|
ropeTheta: 10000,
|
|
64
66
|
ropeLocalTheta: null, // Same as ropeTheta (null = use ropeTheta)
|
|
67
|
+
ropeInterleaved: false,
|
|
65
68
|
mropeInterleaved: false,
|
|
66
69
|
mropeSection: null,
|
|
67
70
|
partialRotaryFactor: null,
|
|
71
|
+
ropeLocalPartialRotaryFactor: null,
|
|
72
|
+
ropeFrequencyBaseDim: null,
|
|
73
|
+
ropeLocalFrequencyBaseDim: null,
|
|
68
74
|
ropeScalingType: null, // No scaling (null = disabled)
|
|
69
75
|
ropeScalingFactor: 1.0,
|
|
70
76
|
ropeLocalScalingType: null, // Local scaling policy (null = no scaling)
|
|
@@ -98,7 +104,7 @@ export const DEFAULT_MANIFEST_INFERENCE = {
|
|
|
98
104
|
enabled: false,
|
|
99
105
|
},
|
|
100
106
|
pipeline: null,
|
|
101
|
-
|
|
107
|
+
session: null,
|
|
102
108
|
execution: null,
|
|
103
109
|
};
|
|
104
110
|
|
|
@@ -13,18 +13,20 @@
|
|
|
13
13
|
/**
|
|
14
14
|
* Patterns for detecting which platform to use based on GPU adapter info.
|
|
15
15
|
*/
|
|
16
|
+
export type PlatformDetectionPattern = string | string[];
|
|
17
|
+
|
|
16
18
|
export interface PlatformDetectionSchema {
|
|
17
|
-
/** Vendor string pattern (e.g., "apple", "nvidia", "amd") */
|
|
18
|
-
vendor?:
|
|
19
|
+
/** Vendor string pattern or patterns (e.g., "apple", "nvidia", "amd") */
|
|
20
|
+
vendor?: PlatformDetectionPattern;
|
|
19
21
|
|
|
20
|
-
/** Architecture pattern (e.g., "gpu-family-apple-9") */
|
|
21
|
-
architecture?:
|
|
22
|
+
/** Architecture pattern or patterns (e.g., "gpu-family-apple-9") */
|
|
23
|
+
architecture?: PlatformDetectionPattern;
|
|
22
24
|
|
|
23
|
-
/** Device name pattern (e.g., "M3", "RTX 4090") */
|
|
24
|
-
device?:
|
|
25
|
+
/** Device name pattern or patterns (e.g., "M3", "RTX 4090") */
|
|
26
|
+
device?: PlatformDetectionPattern;
|
|
25
27
|
|
|
26
|
-
/** WebGPU adapter description pattern */
|
|
27
|
-
description?:
|
|
28
|
+
/** WebGPU adapter description pattern or patterns */
|
|
29
|
+
description?: PlatformDetectionPattern;
|
|
28
30
|
}
|
|
29
31
|
|
|
30
32
|
/**
|
|
@@ -40,11 +40,6 @@ export function validateSelfSpeculationConfig(config) {
|
|
|
40
40
|
if (!Number.isInteger(config.tokens) || config.tokens < 1) {
|
|
41
41
|
throw new Error('[Speculation] tokens must be a positive integer.');
|
|
42
42
|
}
|
|
43
|
-
if (config.tokens !== 1) {
|
|
44
|
-
throw new Error(
|
|
45
|
-
`[Speculation] Only tokens=1 (batch-2) is currently supported for self-speculation. Got tokens=${config.tokens}.`
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
43
|
if (!SPECULATION_VERIFY_MODES.includes(config.verify)) {
|
|
49
44
|
throw new Error(
|
|
50
45
|
`[Speculation] verify="${config.verify}" is not supported. Expected one of: ${SPECULATION_VERIFY_MODES.join(', ')}.`
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Support-tier registry schema.
|
|
3
|
+
*
|
|
4
|
+
* Canonical source for subsystem support classification used to generate
|
|
5
|
+
* `docs/subsystem-support-matrix.md`.
|
|
6
|
+
*
|
|
7
|
+
* @module config/schema/support-tiers
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
export type SupportTier = 'tier1' | 'experimental' | 'internal-only';
|
|
11
|
+
export type SupportScope =
|
|
12
|
+
| 'api'
|
|
13
|
+
| 'cli'
|
|
14
|
+
| 'demo'
|
|
15
|
+
| 'format'
|
|
16
|
+
| 'runtime'
|
|
17
|
+
| 'integration'
|
|
18
|
+
| 'browser';
|
|
19
|
+
export type ClaimVisibility = 'primary' | 'secondary' | 'none';
|
|
20
|
+
|
|
21
|
+
export interface SupportSubsystemEntrySchema {
|
|
22
|
+
id: string;
|
|
23
|
+
label: string;
|
|
24
|
+
scope: SupportScope;
|
|
25
|
+
tier: SupportTier;
|
|
26
|
+
owner: string;
|
|
27
|
+
userFacing: boolean;
|
|
28
|
+
demoDefault: boolean;
|
|
29
|
+
exported: boolean;
|
|
30
|
+
claimVisibility: ClaimVisibility;
|
|
31
|
+
packageExport: string | null;
|
|
32
|
+
command: string | null;
|
|
33
|
+
docs: string[];
|
|
34
|
+
entrypoints: string[];
|
|
35
|
+
notes: string;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface SupportTierRegistrySchema {
|
|
39
|
+
schemaVersion: number;
|
|
40
|
+
source: 'doppler';
|
|
41
|
+
updatedAtUtc: string;
|
|
42
|
+
subsystems: SupportSubsystemEntrySchema[];
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export declare const SUPPORT_TIER_REGISTRY_SCHEMA_VERSION: 1;
|
|
46
|
+
export declare const SUPPORT_TIERS: readonly SupportTier[];
|
|
47
|
+
export declare const SUPPORT_SCOPES: readonly SupportScope[];
|
|
48
|
+
export declare const CLAIM_VISIBILITY_LEVELS: readonly ClaimVisibility[];
|
|
49
|
+
export declare const DEFAULT_SUPPORT_TIER_REGISTRY: SupportTierRegistrySchema;
|
|
50
|
+
|
|
51
|
+
export declare function validateSupportTierRegistry(
|
|
52
|
+
registry: unknown
|
|
53
|
+
): SupportTierRegistrySchema;
|