Skip to main content

compare_topk_decode

Function compare_topk_decode 

Source
pub fn compare_topk_decode(
    model_path: &str,
    prompt: &str,
    decode_tokens: u32,
) -> Result<(String, String), String>
Expand description

A1a correctness: decode the same prompt with the GPU top-k path off then on (same resident model, deterministic argmax) and return both strings. Since k=1 top-k == argmax, the texts must be byte-identical — this verifies the GEMM→top-k wiring, not just the kernel (which is oracle-tested).