forked from Lightning-AI/litgpt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: awaelchli <[email protected]> Co-authored-by: Carlos Mocholí <[email protected]>
- Loading branch information
1 parent
a96a984
commit 17b5c98
Showing
7 changed files
with
329 additions
and
110 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Finetuning | ||
|
||
We provide a simple training scripts (`litgpt/finetune/*.py`) that instruction-tunes a pretrained model on the [Alpaca](https://github.com/tatsu-lab/stanford_alpaca) dataset. | ||
For example, you can either use | ||
|
||
LoRA ([Hu et al. 2021](https://arxiv.org/abs/2106.09685)): | ||
|
||
```bash | ||
litgpt finetune lora | ||
``` | ||
|
||
or Adapter ([Zhang et al. 2023](https://arxiv.org/abs/2303.16199)): | ||
|
||
```bash | ||
litgpt finetune adapter | ||
``` | ||
|
||
or Adapter v2 ([Gao et al. 2023](https://arxiv.org/abs/2304.15010)): | ||
|
||
```bash | ||
litgpt finetune adapter_v2 | ||
``` | ||
|
||
|
||
The finetuning requires at least one GPU with ~12 GB memory (RTX 3060). | ||
|
||
It is expected that you have downloaded the pretrained weights as described above. | ||
More details about each finetuning method and how you can apply it to your own data can be found in our technical how-to guides. | ||
|
||
|
||
### Finetuning how-to guides | ||
|
||
These technical tutorials illustrate how to run the finetuning code. | ||
|
||
- [Full-parameter finetuning](funetuning.md) | ||
- [Finetune with Adapters](finetune_adapter.md) | ||
- [Finetune with LoRA or QLoRA](finetune_lora.md) | ||
|
||
| ||
|
||
### Understanding finetuning -- conceptual tutorials | ||
|
||
Looking for conceptual tutorials and explanations? We have some additional articles below: | ||
|
||
- [Understanding Parameter-Efficient Finetuning of Large Language Models: From Prefix Tuning to LLaMA-Adapters](https://lightning.ai/pages/community/article/understanding-llama-adapters/) | ||
|
||
- [Parameter-Efficient LLM Finetuning With Low-Rank Adaptation (LoRA)](https://lightning.ai/pages/community/tutorial/lora-llm/) |