LLM Model Format Conversion in Production: Avoiding Silent Degradation with Tensor Mapping, QKV Reordering, and Layer-Wise Validation
A systematic guide to parameter mapping, QKV reordering, shard indexing, layer-wise numerical validation, and rollback gates when converting LLM weights between Hugging Face, Megatron, and TensorRT-LLM. Build a repeatable, auditable release pipeline to prevent silent degradation, output drift, and parallel slicing errors.