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

Rlhf hf #275

Merged
merged 4 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
7 changes: 3 additions & 4 deletions benchmarks/rlhf/dev.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

rlhf_:
_rlhf:
inherits: _defaults
definition: .
install-variant: unpinned
Expand All @@ -17,13 +17,12 @@ rlhf_:


rlhf-single:
inherits: rlhf_
inherits: _rlhf
plan:
method: per_gpu


rlhf-gpus:
inherits: rlhf_
inherits: _rlhf
plan:
method: njobs
n: 1
5 changes: 1 addition & 4 deletions benchmarks/rlhf/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,8 @@ def tokenize(element):
train_dataset=train_dataset,
eval_dataset=eval_dataset,
)

trainer.train()
trainer.save_model(config.output_dir)
if config.push_to_hub:
trainer.push_to_hub()
trainer.generate_completions()


if __name__ == "__main__":
Expand Down
6 changes: 3 additions & 3 deletions config/base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ llava-gpus:
--gradient_accumulation_steps: 1


rlhf_:
_rlhf:
inherits: _defaults
definition: ../benchmarks/rlhf
install-variant: unpinned
Expand All @@ -796,12 +796,12 @@ rlhf_:
--bf16: true

rlhf-single:
inherits: rlhf_
inherits: _rlhf
plan:
method: per_gpu

rlhf-gpus:
inherits: rlhf_
inherits: _rlhf
plan:
method: njobs
n: 1
3 changes: 0 additions & 3 deletions scripts/article/run_cuda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,6 @@ else
. $MILABENCH_WORDIR/env/bin/activate
fi


export MILABENCH_CONFIG=/home/mila/d/delaunap/milabench/benchmarks/rlhf/dev.yaml

if [ "$MILABENCH_PREPARE" -eq 0 ]; then
cd $MILABENCH_WORDIR

Expand Down
Loading