-
Notifications
You must be signed in to change notification settings - Fork 71
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
SFT Training update tutorials #769
Conversation
81dd858
to
64a9623
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thansk you for the pull-request. Looks good to me except for the dependencies.
setup.py
Outdated
@@ -19,6 +19,8 @@ | |||
"huggingface_hub >= 0.20.1", | |||
"numpy>=1.22.2, <=1.25.2", | |||
"protobuf>=3.20.3, <4", | |||
"trl == 0.11.4", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are the global, bare minimum dependencies: we should not add optional components here.
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
5. Make sure you have the `training` extra installed, to get all the necessary dependencies: | ||
```bash | ||
python -m pip install .[training] | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!!
@@ -63,7 +73,7 @@ Example: | |||
"context": "", | |||
"response": ( | |||
"World of warcraft is a massive online multi player role playing game. " | |||
"It was released in 2004 by blizarre entertainment" | |||
"It was released in 2004 by bizarre entertainment" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"It was released in 2004 by bizarre entertainment" | |
"It was released in 2004 by Blizzard Entertainment" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, that is what is actually in the Dolly dataset! See here 🤷
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a former big player of WoW I feel attacked.
--gradient_accumulation_steps $GRADIENT_ACCUMULATION_STEPS \ | ||
--gradient_checkpointing true \ | ||
--bf16 \ | ||
--zero_1 false \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be removed
@@ -50,9 +50,15 @@ | |||
"hf_doc_builder @ git+https://github.com/huggingface/doc-builder.git", | |||
] | |||
|
|||
TRAINING_REQUIRES = [ | |||
"trl == 0.11.4", | |||
"peft == 0.14.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add neuronx_distributed
as well?
Slurm can be used for multi-node training, but not relevant in the tutorial, so it is removed.
The shell script is to launch precompilation and fine-tuning.
- reword inference hw suggestion - adapt code to use the merged model directory
Peft was already in the AMI, but hte version was not fixed, and TRL was not installed, but it is required for the SFT LoRA fine tune LLM tutorial.
Instead of adding peft and trl as package dependencies, these are isolated in the training extra.
544da8d
to
15408fe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
That's awesome, thanks for taking care of that!
@@ -63,7 +73,7 @@ Example: | |||
"context": "", | |||
"response": ( | |||
"World of warcraft is a massive online multi player role playing game. " | |||
"It was released in 2004 by blizarre entertainment" | |||
"It was released in 2004 by bizarre entertainment" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a former big player of WoW I feel attacked.
What does this PR do?
This PR revisits the SFT Training tutorial of Llama3-8B. Few highlights of the changes:
Note that there is still an issue with the training: the loss does NOT decrease during fine-tune (cc @michaelbenayoun).
Before submitting