Module predicted_residency

Module predicted_residency 

Source
Expand description

2026-09-25: That table evaluated from the config before the checkpoint loads; preflight’s headroom check reads it. 2026-09-25: The derived-weight bytes of the native-FP8 dense route, predicted from the config and the environment before the checkpoint loads.

Owner: model-arch weight loader (Qwen3.5 dense). Invariants:

  • predicted_derived_bytes reads no environment and allocates nothing; Fp8RouteInputs::from_env does the reads.
  • A route whose plan keeps an NVFP4 copy (METRALE_DENSE_FP8_KEEP_NVFP4, a CUTLASS NVFP4 attention lever, METRALE_ATTN_W4A4) gets DerivedBytesEstimate::Unavailable.

The server’s preflight (post_load_yardstick in serve_phases/preflight/headroom.rs) adds the prediction to the checkpoint’s on-disk size to estimate the memory in use before the KV cache. When the prediction is unavailable, it uses pre-load free memory. Which copies are built is fp8_residency::DenseFp8Plan::resolve; their sizes are shape arithmetic over the config. The loader tallies NVFP4 copies through DerivedResidency::skip, never keep, so a route that builds them is not predicted.

Structs§

Fp8RouteInputs
2026-09-25: The route conditions of load_layers that are known before the checkpoint loads.
PredictedDerived
2026-09-25: The derived bytes the native-FP8 dense loader will keep, by term.

Enums§

DerivedBytesEstimate
2026-09-25: A prediction, or the reason there is none.

Functions§

predicted_derived_bytes
2026-09-25: Bytes the native-FP8 dense loader will derive on top of the checkpoint, or why that is not predicted. Reads only its arguments.