Skip to content

Commit

Permalink
Update RLHF name (mila-iqia#275)
Browse files Browse the repository at this point in the history
* new RLHF benchmark

* Add RLHF config to standard

* Fix

---------

Co-authored-by: pierre.delaunay <[email protected]>
  • Loading branch information
Delaunay and pierre.delaunay authored Sep 10, 2024
1 parent 5672f16 commit b891f0d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 14 deletions.
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

0 comments on commit b891f0d

Please sign in to comment.