Expand description
2026-09-25: GDN / SSM decode-path flags, resolved once per process from the serve command line or, failing that, the environment.
Owner: model-layers (qwen3 SSM). Invariants:
- The flags are one process-wide cell: the first of
set_from_cliorflags()fixes them, and later calls see the same value. A model loaded later in the same process keeps that resolution. - The server publishes
h_f16_poolonly together withh_f16(both come fromssm_h_dtype_bits), and the environment fallback never sets it.
The flags select kernels and are coupled: the FP16 h-state twins exist
only on the fused-norm arm, so h_f16 without fused_norm would reach an
FP32-only kernel. The server’s argument validation rejects that pair
before load. When the command line gives any GDN flag, the server
publishes the whole cell through set_from_cli; otherwise flags()
reads the environment on first use.
Structs§
Constants§
- MAX_
F16_ TWIN_ DFLASH_ GAMMA - 2026-09-25: The largest
--dflash-gammawhose verify width still has an FP16 twin. - MAX_
F16_ TWIN_ K - 2026-09-25: The widest chain-verify K with an FP16 h-state twin
(
gated_delta_rule_wy{5..16}_f16). - UNRESOLVED_
DFLASH_ GAMMA - 2026-09-30: The γ of a DFlash serve when neither
--dflash-gammanor a drafter block size decides it.
Functions§
- default_
dflash_ gamma - 2026-09-25: The DFlash gamma for a drafter of this trained block size, when no
--dflash-gammawas given. - flags
- 2026-09-25: The resolved flags, falling back to the environment on first use.
- gdn_
fused_ norm_ enabled - 2026-09-25:
--gdn-fused-norm(environment fallback:METRALE_GDN_FUSED_NORM=1). - gdn_
woa_ enabled - 2026-09-25: Write-on-accept K=4 batched verify. Off unless
METRALE_GDN_WOA=1. With it off the parent wy4 kernel runs, the fold inwoa.rsreturnsOk(false), and the accept path (async_chkpt.rs) restoreshfor every K. - resolve_
dflash_ gamma - 2026-09-30: The one resolver of a DFlash serve’s γ:
--dflash-gammawhen pinned, elsedefault_dflash_gammaof the drafter’s trained block size (DflashConfig::effective_block_size), elseUNRESOLVED_DFLASH_GAMMA. The server resolves it once before the preflight reserve (serve_phases::apply_dflash_gamma); the reserve, the pools the build sizes and the scheduler all read that value. - set_
from_ cli - 2026-09-25: Publish the command line’s resolution. Call once, before the model builds.
- ssm_
batched_ recurrent_ enabled - 2026-09-25:
--ssm-batched-recurrent(environment fallback:METRALE_SSM_BATCHED_RECURRENT). - ssm_
h_ dtype_ bits - 2026-09-25: Decode
--ssm-h-dtypeinto the two h-state bits it publishes:(h_f16, h_f16_pool). - ssm_
h_ f16_ pool_ enabled - 2026-09-25:
--ssm-h-dtype f16-pool: h pools sized at 2 bytes per element. Impliesssm_h_fp16_enabled;ssm_h_dtype_bitsguarantees that where the flag is decoded. - ssm_
h_ fp16_ enabled - 2026-09-25:
--ssm-h-dtype f16orf16-pool(environment fallback:METRALE_SSM_H_FP16). - verify_
exact_ enabled - 2026-09-25:
--exact-verifygiven: the MTP-verify pass runs the sequential-decode-exact chain. SeeGdnFlags::verify_exact_active.