parity-testing
Installation
SKILL.md
Parity Testing for Megatron Bridge
This skill provides the decision framework for choosing the right
verification tool and interpreting results. For the full model onboarding
workflow (which includes parity testing as milestones 1 and 2), see the
add-model-support skill.
Quick Decision: Which Tool to Run
| What you want to verify | Tool | GPU? | When to use |
|---|---|---|---|
| All weights round-trip exactly (single GPU) | hf_megatron_roundtrip.py |
No | First check after writing a bridge |
| Weights round-trip with TP/PP/EP | hf_megatron_roundtrip_multi_gpu.py |
Yes | After single-GPU passes |
| Forward-pass logit correlation | compare_hf_and_megatron/compare.py |
Yes | After round-trip passes |
| Text generation sanity | hf_to_megatron_generate_text.py |
Yes | Separate inference evidence |
| Programmatic weight check | weights_verification_table() |
Yes | Inside Python scripts |
| VLM generation sanity | hf_to_megatron_generate_vlm.py |
Yes | VLM models |
All tools live under examples/conversion/.