Heterodyne diffs quantized and full-precision LLM runs token by token and layer by layer
A developer found that a Q4_K_M quantized Qwen3-0.6B model disagreed with its BF16 version on a Python primality-check completion, flipping the prediction, and wanted to know where the divergence arose. Aggregate metrics like KL divergence and perplexity showed the drift but not which tokens, layers, or components caused it. They built heterodyne, a tool that runs two llama.cpp configurations on identical tokens and compares outputs and per-layer residual streams. It also performs activation transplants to test which layers carry the difference to the output. Because it operates inside llama.cpp's own kernels, it measures the GGUF models users actually deploy rather than dequantized PyTorch approximations.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in