Module dump

Module dump 

Source
Expand description

2026-09-25: Debug taps: dump the hc_mult-wide residual highway and other buffers at named points, for a layer-by-layer diff against the reference.

Off unless METRALE_QWEN4EXP_DUMP names a directory. tap_highway and tap_f32 write <dir>/L{layer:02}_{tag}.bin as raw little-endian FP32; tap_bf16 writes <dir>/L{layer:02}_{tag}.bf16.bin as raw BF16.

Owner: model-layers (PLE). Invariants:

  • A tap never overwrites an existing file.

Functionsยง

tap_bf16
2026-09-25: Tap a BF16 buffer of n_elements the same way.
tap_f32
2026-09-25: Tap an FP32 buffer of n_elements the same way.
tap_highway
2026-09-25: Tap the FP32 highway, num_tokens * hc_dim values. No-op unless the dump directory is set. It synchronizes the stream first, so it must not run inside CUDA-graph capture. Errors are logged or dropped, never returned.