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

Adds support for converting from safetensors #740

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixed souping moving yaml
soldni committed Nov 11, 2024
commit 5fae50e5e68f29355cfd9b38b3872c20693f9bb0
21 changes: 20 additions & 1 deletion scripts/olmo_soup.py
Original file line number Diff line number Diff line change
@@ -11,6 +11,24 @@
-o /weka/oe-training-default/ai2-llm/checkpoints/OLMo-medium/peteish7-anneal-from-928646-50B-nowup-moremath-dclm07-fw2-se-flan-soup/step11931
```
Merge any three checkpoints out of five:
```bash
for i in $(seq 1 5); do
for j in $(seq $((i+1)) 5); do
for k in $(seq $((j+1)) 5); do
echo "Merging $i $j $k"
python scripts/olmo_soup.py -c \
/weka/oe-training-default/ai2-llm/checkpoints/OLMo-medium/peteish7-anneal-from-928646-50B-nowup-moremath-dclm07-fw2-se-flan-seed$i/step11931 \
/weka/oe-training-default/ai2-llm/checkpoints/OLMo-medium/peteish7-anneal-from-928646-50B-nowup-moremath-dclm07-fw2-se-flan-seed$j/step11931 \
/weka/oe-training-default/ai2-llm/checkpoints/OLMo-medium/peteish7-anneal-from-928646-50B-nowup-moremath-dclm07-fw2-se-flan-seed$k/step11931 \
-o /weka/oe-training-default/ai2-llm/checkpoints/OLMo-medium/peteish7-anneal-from-928646-50B-nowup-moremath-dclm07-fw2-se-flan-soup-$i$j$k/step11931
done
done
done
```
Author: Luca Soldaini (@soldni)
""" # noqa
@@ -114,7 +132,8 @@ def main():
print("Copying config.yaml")
# copy the config file
if (config_path := args.checkpoints[0] / "config.yaml").exists():
config_path.rename(args.output / "config.yaml")
with open(config_path, "r") as src_f, open(args.output / "config.yaml", "w") as dst_f:
dst_f.write(src_f.read())
print("Done!")