Skip to main content

Module diagnostics

Module diagnostics 

Source
Expand description

Optional CPU-reference comparisons, research dumps and per-step traces.

FunctionsΒ§

argmax πŸ”’
dump_decode πŸ”’
dump_prefill_chunk πŸ”’
Record prompt argmax rows and the final long-context attention selection.
dump_run πŸ”’
logits_diff πŸ”’
qwen4_exp_check_rows πŸ”’
Compare the GPU’s rows against the CPU reference, which forwards the same tokens one at a time. With next (the token after each row), the CPU also runs the MTP head per row and the last row’s draft logits are compared with the GPU’s.