EleutherAI / gpt-neox

An implementation of model parallel autoregressive transformers on GPUs, based on the Megatron and DeepSpeed libraries
https://www.eleuther.ai/
Apache License 2.0
6.95k stars 1.02k forks source link

Fix documentation for converting SFT/DPO weights back to HF Llama #1318

Closed jacobthebanana closed 1 week ago

jacobthebanana commented 2 weeks ago

Quick documentation fix.

In the documentation post-training/README.md, the base weights were converted from HF Llama:

https://github.com/EleutherAI/gpt-neox/blob/59a5236ddaf721890e3d6ef98fb8ca66c2266ce0/post-training/README.md?plain=1#L6

When converting fine-tuned weights from GPTNeoX format back to HF Llama, the --architecture llama flag seems to be required (otherwise the default value "neox" would be selected.) While specified for RM conversion, this flag is not included in the command for converting GPTNeoX SFT/DPO weights back to HF in this documentation.

https://github.com/EleutherAI/gpt-neox/blob/59a5236ddaf721890e3d6ef98fb8ca66c2266ce0/post-training/README.md?plain=1#L53-56

https://github.com/EleutherAI/gpt-neox/blob/59a5236ddaf721890e3d6ef98fb8ca66c2266ce0/tools/ckpts/convert_neox_to_hf.py#L469-L478

Fixes #1317