Skip to content

Commit 5c64cca

Browse files
iseeyuankartikayk
andauthored
Update examples/models/llama2/README.md
Co-authored-by: Kartikay Khandelwal <[email protected]>
1 parent a817ff1 commit 5c64cca

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

examples/models/llama2/README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,19 @@ If you want to deploy and run a smaller model for educational purposes. From `ex
9191
python -m examples.models.llama2.tokenizer.tokenizer -t tokenizer.model -o tokenizer.bin
9292
```
9393
94-
If you want to fine tune your model based on a specific dataset, PyTorch team provides a native-Pytorch library, [TorchTune](https://github.com/pytorch/torchtune), for easily authoring, fine-tuning and experimenting with LLMs.
94+
95+
## (Optional) Finetuning
96+
97+
If you want to finetune your model based on a specific dataset, PyTorch provides [TorchTune](https://github.com/pytorch/torchtune) - a native-Pytorch library for easily authoring, fine-tuning and experimenting with LLMs.
98+
99+
Once you have [TorchTune installed](https://github.com/pytorch/torchtune?tab=readme-ov-file#get-started) you can finetune Llama2 7B model using LoRA on a single GPU, using the following command:
100+
101+
102+
tune run lora_finetune_single_device \
103+
--config llama2/7B_lora_single_device \
104+
checkpointer.checkpoint_dir=<path_to_checkpoint_folder> \
105+
tokenizer.path=<path_to_checkpoint_folder>/tokenizer.model
106+
95107
96108
## Step 3: Evaluate model accuracy
97109

0 commit comments

Comments
 (0)