From 8a448a4410367f7f2b8252b19b17db1b1486418a Mon Sep 17 00:00:00 2001 From: Sebastian Raschka Date: Sat, 5 Oct 2024 07:52:15 -0500 Subject: [PATCH] Llama 3 (#384) * Implement Llama 3.2 * Add Llama 3.2 files * exclude IMDB link because stanford website seems down --- .github/workflows/check-links.yml | 2 +- .gitignore | 3 +++ README.md | 1 + ch05/README.md | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-links.yml b/.github/workflows/check-links.yml index fd9f961b..0c5b4ec3 100644 --- a/.github/workflows/check-links.yml +++ b/.github/workflows/check-links.yml @@ -29,6 +29,6 @@ jobs: - name: Check links run: | - pytest --check-links ./ --check-links-ignore "https://platform.openai.com/*" --check-links-ignore "https://openai.com/*" --check-links-ignore "https://arena.lmsys.org" --check-links-ignore "https://www.reddit.com/r/*" + pytest --check-links ./ --check-links-ignore "https://platform.openai.com/*" --check-links-ignore "https://openai.com/*" --check-links-ignore "https://arena.lmsys.org" --check-links-ignore "https://www.reddit.com/r/*" --check-links-ignore "https://ai.stanford.edu/~amaas/data/sentiment/" # pytest --check-links ./ --check-links-ignore "https://platform.openai.com/*" --check-links-ignore "https://arena.lmsys.org" --retries 2 --retry-delay 5 diff --git a/.gitignore b/.gitignore index 038cfcfc..f91cc5ce 100644 --- a/.gitignore +++ b/.gitignore @@ -38,6 +38,9 @@ ch05/06_user_interface/gpt2 ch05/07_gpt_to_llama/Llama-2-7b ch05/07_gpt_to_llama/Llama-2-7b-chat ch05/07_gpt_to_llama/.cache +ch05/07_gpt_to_llama/llama3-files +ch05/07_gpt_to_llama/llama31-files +ch05/07_gpt_to_llama/llama32-files ch06/01_main-chapter-code/gpt2 ch06/02_bonus_additional-experiments/gpt2 diff --git a/README.md b/README.md index 853b143d..bee8635d 100644 --- a/README.md +++ b/README.md @@ -117,6 +117,7 @@ Several folders contain optional materials as a bonus for interested readers: - [Optimizing Hyperparameters for Pretraining](ch05/05_bonus_hparam_tuning) - [Building a User Interface to Interact With the Pretrained LLM](ch05/06_user_interface) - [Converting GPT to Llama](ch05/07_gpt_to_llama) + - [Llama 3.2 From Scratch](ch05/07_gpt_to_llama/standalone-llama32.ipynb) - **Chapter 6:** - [Additional experiments finetuning different layers and using larger models](ch06/02_bonus_additional-experiments) - [Finetuning different models on 50k IMDB movie review dataset](ch06/03_bonus_imdb-classification) diff --git a/ch05/README.md b/ch05/README.md index 3a725194..defa30bf 100644 --- a/ch05/README.md +++ b/ch05/README.md @@ -11,4 +11,4 @@ - [04_learning_rate_schedulers](04_learning_rate_schedulers) contains code implementing a more sophisticated training function including learning rate schedulers and gradient clipping - [05_bonus_hparam_tuning](05_bonus_hparam_tuning) contains an optional hyperparameter tuning script - [06_user_interface](06_user_interface) implements an interactive user interface to interact with the pretrained LLM -- [07_gpt_to_llama](07_gpt_to_llama) contains a step-by-step guide for converting a GPT architecture implementation to Llama and loads pretrained weights from Meta AI +- [07_gpt_to_llama](07_gpt_to_llama) contains a step-by-step guide for converting a GPT architecture implementation to Llama 3.2 and loads pretrained weights from Meta AI