A 12-chapter, commented tutorial that walks you through building and training a small LLaMA-style GPT from scratch in Python and PyTorch.
afshinea/stanford-cme-295-transformers-large-language-models
A VIP cheatsheet and study guide condensing Stanford's CME 295 course on Transformers and large language models into one place.
- Stars
- 4,967
- Forks
- 722
- Open issues
- 8
- Last commit
- last month
What is it?
This repository collects the core concepts from Stanford's CME 295 course on Transformers and Large Language Models into a single cheatsheet. It covers Transformer fundamentals such as self-attention and architecture variants, then moves to LLM topics including prompting, finetuning methods like SFT and LoRA, and preference tuning with RLHF and DPO.
The material also spans reasoning-oriented training (RLVR, OPD), optimizations like distributed training, KV caching and speculative decoding, and applications such as AI agents, evaluation and diffusion LLMs. The content is offered as a PDF cheatsheet, available in many languages, and summarizes a larger companion book with several hundred illustrations.
Key features
- 01Covers Transformer fundamentals including self-attention and architecture variants
- 02Explains LLM finetuning with SFT and LoRA and preference tuning with RLHF and DPO
- 03Summarizes reasoning training methods such as RLVR and OPD
- 04Lists inference optimizations including KV caching and speculative decoding
- 05Available as a downloadable PDF cheatsheet in many languages
Use cases
- Reviewing core LLM and Transformer concepts before interviews or exams
- Getting a fast overview of modern LLM training pipelines
- Studying alongside or as a companion to the CME 295 course
Topics
FAQ
- What is stanford-cme-295-transformers-large-language-models?
- A VIP cheatsheet and study guide condensing Stanford's CME 295 course on Transformers and large language models into one place. This repository collects the core concepts from Stanford's CME 295 course on Transformers and Large Language Models into a single cheatsheet. It covers Transformer fundamentals such as self-attention and architecture variants, then moves to LLM topics including prompting, finetuning methods like SFT and LoRA, and preference tuning with RLHF and DPO.
- Is stanford-cme-295-transformers-large-language-models free to use? What license does it have?
- stanford-cme-295-transformers-large-language-models is open source under the MIT license. Check the license terms before using it in commercial products.
- Is stanford-cme-295-transformers-large-language-models still maintained?
- Updated within 6 months. The last commit to stanford-cme-295-transformers-large-language-models was on Sep 13, 2026.
- What can I use stanford-cme-295-transformers-large-language-models for?
- Reviewing core LLM and Transformer concepts before interviews or exams Getting a fast overview of modern LLM training pipelines Studying alongside or as a companion to the CME 295 course
- Where can I get stanford-cme-295-transformers-large-language-models?
- The source code and installation instructions are on GitHub: https://github.com/afshinea/stanford-cme-295-transformers-large-language-models
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A PyTorch implementation of the Vision Transformer (ViT) and many of its variants for image classification and related vision tasks.
A free hands-on course with Jupyter notebooks and articles covering LLM applications with OpenAI, Hugging Face, LangChain, vector databases, fine-tuning and pruning.
Official training and reference code for RWKV, an RNN-style language model architecture that can also be trained in parallel like a GPT transformer.
Unified framework for efficiently fine-tuning 100+ LLMs and VLMs with a zero-code CLI and Web UI.
Hugging Face library for Parameter-Efficient Fine-Tuning (PEFT), adapting large pretrained models by training only a small set of extra parameters.