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.
Add TinyLlama model config (Lightning-AI#671)
Co-authored-by: Carlos Mocholí <[email protected]>
- Loading branch information
Showing
3 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
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
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,25 @@ | ||
## Download TinyLlama weights | ||
|
||
[TinyLlama 1.1B](https://github.com/jzhang38/TinyLlama/) is Apache 2.0 licensed and can be used without restrictions. | ||
It is still in development and at the time of writing this, checkpoints for the model trained up to 1T tokens are available. | ||
The target is to train it for ~3 epochs on 3T tokens total. For more details on the schedule and progress of the pretraining, see the official [README](https://github.com/jzhang38/TinyLlama/tree/main). | ||
|
||
|
||
In order to use the TinyLLama 1.1B model checkpoint, which requires about 5 GB of disk space, download the weights and convert the checkpoint to the lit-gpt format: | ||
|
||
```bash | ||
pip install huggingface_hub | ||
|
||
python scripts/download.py --repo_id PY007/TinyLlama-1.1B-intermediate-step-480k-1T | ||
|
||
python scripts/convert_hf_checkpoint.py \ | ||
--checkpoint_dir checkpoints/PY007/TinyLlama-1.1B-intermediate-step-480k-1T | ||
``` | ||
|
||
You're done! To execute the model just run: | ||
|
||
```bash | ||
pip install sentencepiece | ||
|
||
python chat/base.py --checkpoint_dir checkpoints/PY007/TinyLlama-1.1B-intermediate-step-480k-1T | ||
``` |