quant-fidelity-eval / README.md
prabodbc's picture
Trim the card; the builder writes the JSONL prompts only
d7f4f7c verified
|
Raw History Blame Contribute Delete
2.56 kB
---
pretty_name: Quant fidelity eval (public sources)
tags:
- quantization
- evaluation
- kl-divergence
- agentic
- tool-use
configs:
- config_name: default
data_files:
- split: on_policy
path: public_on_prompts.jsonl
- split: forced
path: public_off_prompts.jsonl
---
# Quant fidelity eval (public sources)
240 prompts from seven public datasets for measuring how closely a quantized model reproduces its original, as
per-token KL divergence.
- **`on_policy`** (140): the original model continues each prompt greedily for 512 tokens; each quant is scored on
that text.
- **`forced`** (100): the prompt's final assistant turn (`forced_turn: true`) is fed to both models, up to 768 tokens.
Each line holds `id`, `category`, `messages` and `forced_turn`. Render the messages with the evaluated model's chat
template.
## Sources
| Source | Dataset | Licence (per its card) | On-policy | Forced |
| --- | --- | --- | ---: | ---: |
| ultrachat | [HuggingFaceH4/ultrachat_200k](https://huggingface.co/datasets/HuggingFaceH4/ultrachat_200k), `test_sft` | MIT | 20 | 15 |
| openhermes | [teknium/OpenHermes-2.5](https://huggingface.co/datasets/teknium/OpenHermes-2.5) | not stated on card | 20 | 15 |
| tulu3 | [allenai/tulu-3-sft-mixture](https://huggingface.co/datasets/allenai/tulu-3-sft-mixture), WildChat rows excluded | ODC-BY | 25 | 15 |
| openorca | [Open-Orca/OpenOrca](https://huggingface.co/datasets/Open-Orca/OpenOrca) | MIT | 15 | 0 |
| swe_agent | [nebius/SWE-agent-trajectories](https://huggingface.co/datasets/nebius/SWE-agent-trajectories) | CC-BY-4.0 | 20 | 20 |
| openhands | [SWE-Gym/OpenHands-SFT-Trajectories](https://huggingface.co/datasets/SWE-Gym/OpenHands-SFT-Trajectories), `train.success.oss` | MIT | 20 | 20 |
| glaive_fc | [glaiveai/glaive-function-calling-v2](https://huggingface.co/datasets/glaiveai/glaive-function-calling-v2) | Apache-2.0 | 20 | 15 |
The prompt text belongs to these datasets; their licences and attribution terms apply.
## Usage
1. Freeze the original model's log-probabilities at every continuation position (greedy for `on_policy`, the given
turn for `forced`).
2. Run each quant on the same tokens and compute KL(original ‖ quant) per token.
3. Report the pooled mean, p50, p99 and max, and bootstrap over prompts rather than tokens.
## Rebuilding
`python build_public.py <out dir>` (needs `datasets` and `huggingface_hub`) rebuilds the set exactly: pinned
revisions, a seeded shuffle and hash-chosen cut points. `public_manifest.json` records the source row and turn of every
prompt.