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

launch lighteval using lighteval --args #152

Merged
merged 25 commits into from
Jul 17, 2024
Merged

Conversation

NathanHB
Copy link
Member

@NathanHB NathanHB commented Apr 10, 2024

  • removes uneeded script files to launch lighteval
  • moves parsers function to lighteval.commands.parsers
  • creates a lighteval cli executable with 3 subcommands (list-tasks, nanotron, accelerate)
  • removes the code used to list tasks and puts it in the Registry class

how to use:

with nanotron

nothing changes except for the use of the cli executable

 lighteval nanotron  {nanotron args}

with accelerate

accelerate args now need to be passed to the lighteval script.

accelerate launch --multi_gpu --num_processes=8 -m \
lighteval accelerate \
--model_args dummy \
--tasks "original|mmlu:anatomy|0|0" \
--override_batch_size 1  \
--output_dir="tmp/" \

@NathanHB NathanHB marked this pull request as ready for review April 22, 2024 12:08
@NathanHB NathanHB requested a review from clefourrier April 30, 2024 09:42
Copy link
Member

@clefourrier clefourrier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, super useful

@@ -94,7 +94,8 @@ accelerate config
You can then evaluate a model using data parallelism as follows:

```shell
accelerate launch --multi_gpu --num_processes=<num_gpus> run_evals_accelerate.py \
accelerate launch --multi_gpu --num_processes=<num_gpus> -m \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not fond of accelerate ... lighteval accelerate

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree but not sure how we could really differenciate between nanotron and accelerate launchers

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, can you launch nanotron with accelerate?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wdym ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we'll ever get accelerate launch ... lighteval nanotron

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So we could assume that if accelerate launch is used, then it's lighteval accelerate?

src/lighteval/__main__.py Show resolved Hide resolved
@clefourrier clefourrier merged commit 4550cb7 into main Jul 17, 2024
2 checks passed
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.

2 participants