Megatron-LM icon indicating copy to clipboard operation
Megatron-LM copied to clipboard

[QUESTION]convert LLaMA2-7B to the Megatron format failed: the converted model only repeats meaningless numbers

Open carrot0117 opened this issue 1 year ago • 2 comments

When I converted the LLaMA2-7B model to the Megatron format, the program ran successfully and provided the converted model. However, the converted model cannot provide meaningful answers to questions and only repeats meaningless numbers. The original LLaMA2 model was able to respond to questions correctly. Below are the conversion script and the output log file. Is there any good way to solve this issue?

convert-hf-to-megatron-0121-7b.log

convert_hf_to_megatron.sh.txt

carrot0117 avatar Jan 22 '25 16:01 carrot0117

Marking as stale. No activity in 60 days.

github-actions[bot] avatar Mar 23 '25 18:03 github-actions[bot]

Since you posted this, NVIDIA has released Megatron Bridge, which is now the recommended solution for bidirectional conversion between Hugging Face and Megatron checkpoints.

I'd recommend trying Megatron Bridge for your LLaMA2-7B conversion instead of the older conversion scripts. It should resolve the issues you were experiencing with the converted model producing meaningless outputs.

Please feel free to open new issues with Megatron Bridge.

sbhavani avatar Oct 15 '25 17:10 sbhavani