mirror of
https://github.com/rasbt/LLMs-from-scratch.git
synced 2024-11-25 16:22:50 +08:00
bb31de8999
Some checks failed
Code tests (Linux) / test (push) Has been cancelled
Code tests (macOS) / test (push) Has been cancelled
Test PyTorch 2.0 and 2.5 / test (2.0.1) (push) Has been cancelled
Test PyTorch 2.0 and 2.5 / test (2.5.0) (push) Has been cancelled
Code tests (Windows) / test (push) Has been cancelled
Check hyperlinks / test (push) Has been cancelled
Spell Check / spellcheck (push) Has been cancelled
PEP8 Style checks / flake8 (push) Has been cancelled
* typo & comment - safe -> save - commenting code: batch_size, seq_len = in_idx.shape * comment - adding # NEW for assert num_heads % num_kv_groups == 0 * update memory wording --------- Co-authored-by: rasbt <mail@sebastianraschka.com> |
||
---|---|---|
.. | ||
01_main-chapter-code | ||
02_alternative_weight_loading | ||
03_bonus_pretraining_on_gutenberg | ||
04_learning_rate_schedulers | ||
05_bonus_hparam_tuning | ||
06_user_interface | ||
07_gpt_to_llama | ||
08_memory_efficient_weight_loading | ||
README.md |
Chapter 5: Pretraining on Unlabeled Data
Main Chapter Code
- 01_main-chapter-code contains the main chapter code
Bonus Materials
- 02_alternative_weight_loading contains code to load the GPT model weights from alternative places in case the model weights become unavailable from OpenAI
- 03_bonus_pretraining_on_gutenberg contains code to pretrain the LLM longer on the whole corpus of books from Project Gutenberg
- 04_learning_rate_schedulers contains code implementing a more sophisticated training function including learning rate schedulers and gradient clipping
- 05_bonus_hparam_tuning contains an optional hyperparameter tuning script
- 06_user_interface implements an interactive user interface to interact with the pretrained LLM
- 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
- 08_memory_efficient_weight_loading contains a bonus notebook showing how to load model weights via PyTorch's
load_state_dict
method more efficiently