KL divergence benchmark

#3
by qenme - opened

Hey, your most persistent fan here, quick question for you. How did you get the KL divergence metrics of your model. Did that come from vLLM or autoround? I only know how to get those with llama-perplexity (llama-cpp), and I would love to try other tools too.

I used a custom script. What it does is first load the unquantized model with transformers, run the calibration set through it, and dump the per-token logits to disk. Then it loads the quantized model the same way, runs the same token sequences, and reads the full per-token logits back out. With both distributions in hand I finally compute the forward KL per position.

I used a custom script. What it does is first load the unquantized model with transformers, run the calibration set through it, and dump the per-token logits to disk. Then it loads the quantized model the same way, runs the same token sequences, and reads the full per-token logits back out. With both distributions in hand I finally compute the forward KL per position.

Thanks for the explanation!

Minachist changed discussion status to closed

Sign up or log in to comment