Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged

Conversation

jacobthebanana
Copy link
Contributor

Quick documentation fix.

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

python tools/ckpts/convert_hf_llama_to_neox.py --tp 4 --model meta-llama/Meta-Llama-3-8B-Instruct --model_path checkpoints/neox_converted/llama3-8b-instruct

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

def convert(
input_checkpoint_path,
loaded_config,
output_checkpoint_path,
sequential: bool = True,
precision: Literal["auto", "fp16", "bf16", "fp32"] = "auto",
architecture: Literal["neox", "llama", "mistral"] = "neox",
is_rm: bool = False,
pad_token_id: int = -1,
):

Fixes #1317

Verified

This commit was signed with the committer’s verified signature.
@Quentin-Anthony Quentin-Anthony merged commit 6552654 into EleutherAI:main Nov 13, 2024
1 check passed
jahatef pushed a commit that referenced this pull request Nov 29, 2024

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

KeyError when converting DPO weights from GPTNeoX format to HuggingFace Llama in post-training documentations
2 participants