LLMs from Scratch
This repository contains the code for developing, pretraining, and finetuning a GPT-like LLM and is the official code repository for the book Build a Large Language Model (From Scratch).
课时
- Appendix A: Introduction to PyTorch
- LLMs from Scratch
- Appendix A: Introduction to PyTorch
- Appendix C: Exercise Solutions
- Appendix D: Adding Bells and Whistles to the Training Loop
- Appendix E: Parameter-efficient Finetuning with LoRA
- Recommendations for Getting the Most Out of a Technical Book
- Chapter 2: Working with Text Data
- Chapter 2: Working with Text Data
- Chapter 2: Working with Text Data
- Chapter 2: Working with Text Data
- Byte Pair Encoding (BPE) Tokenizer From Scratch
- SimpleTokenizerV3
- Chapter 2: Working with Text Data
- Chapter 3: Coding Attention Mechanisms
- More Efficient Multi-Head Attention Implementations
- Understanding PyTorch Buffers
- Chapter 3: Coding Attention Mechanisms
- Chapter 4: Implementing a GPT Model from Scratch To Generate Text
- Chapter 4: Implementing a GPT Model from Scratch To Generate Text
- Bonus Material: KV Cache