-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[Docs
] Add unsloth optimizations in TRL's documentation
#1119
Conversation
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. |
Cool work @younesbelkada and thanks! Looks good - I'll add a few changes in a bit! |
docs/source/sft_trainer.mdx
Outdated
|
||
### Accelerate fine-tuning using `unsloth` library | ||
|
||
You can further accelerate QLoRA / LoRA and even full-finetuning using [`unsloth`](https://github.com/unslothai/unsloth) library that is compatible with `SFTTrainer`. Currently `unsloth` supports only Llama and Mistral architectures. |
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.
"You can further accelerate QLoRA / LoRA and even full-finetuning using" maybe to
You can further accelerate QLoRA / LoRA 2.2x faster and use 60% less memroy and even full-finetuning (1.1x speed boost) using unsloth
library that is compatible with SFTTrainer
. Currently unsloth
supports only Llama (Yi, TinyLlama etc) and Mistral architectures.
docs/source/sft_trainer.mdx
Outdated
@@ -410,6 +410,61 @@ We have tested NEFTune by training `mistralai/Mistral-7B-v0.1` on the [OpenAssis | |||
</div> | |||
|
|||
Note however, that the amount of performance gain is _dataset dependent_ and in particular, applying NEFTune on synthetic datasets like [UltraChat](https://huggingface.co/datasets/stingning/ultrachat) typically produces smaller gains. | |||
|
|||
### Accelerate fine-tuning using `unsloth` library |
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.
Accelerate fine-tuning using unsloth
library
maybe to
Accelerate fine-tuning using unsloth
Actually instead of comments, I just editted the docs in place here: add-unsloth-docs...danielhanchen:trl:patch-1 |
Co-authored-by: Daniel Han <[email protected]>
Thanks a lot @danielhanchen ! I just merged your PR with your suggestions |
:) |
…e#1119) * add unsloth * Update sft_trainer.mdx (huggingface#1124) Co-authored-by: Daniel Han <[email protected]> --------- Co-authored-by: Daniel Han <[email protected]>
What does this PR do?
This PR adds details about unsloth library: https://github.com/unslothai/unsloth that can bring very interesting out of the box speedups to users. In the future, I'll make sure users that use unsloth + SFTTrainer have the tag
unsloth
when they push models on the hub with unslothcc @danielhanchen @lvwerra
@danielhanchen let me know if the content does look to you! Feel free to add any suggestion directly in the PR
Related: unslothai/unsloth#34