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 equivalence compare_hf_and_megatron/compare.py Yes After round-trip passes
Text generation sanity hf_to_megatron_generate_text.py Yes Large models that OOM compare.py
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/.

Related skills

More from nvidia-nemo/megatron-bridge

Installs
1
GitHub Stars
577
First Seen
Apr 19, 2026