@GitHub_Daily: Want to understand the underlying principles of large language models? Most resources only cover theory or provide source code, leaving you still confused. Stumbled upon this open-source tutorial, EveryonesLLM, which guides us step by step to build a complete large language model from scratch on Google Colab, writing code throughout. The whole tutorial is divided into...

X AI KOLs Timeline Tools

Summary

EveryonesLLM is an open-source tutorial that provides 29 chapters of Colab notebooks. It teaches users step by step to build a complete large language model from scratch on Google Colab, including pre-training and instruction fine-tuning, and supports Chinese.

Want to understand the underlying principles of large language models? Most resources only cover theory or provide source code, leaving you still confused. Stumbled upon this open-source tutorial, EveryonesLLM, which guides us step by step to build a complete large language model from scratch on Google Colab, writing code throughout. The whole tutorial is divided into 29 chapters, starting from the most basic data loading and word embeddings, gradually building up to the attention mechanism and Transformer modules, and finally completing pre-training and instruction fine-tuning. GitHub: http://github.com/HayatoHongo/EveryonesLLM… Each chapter is an independent Colab notebook. Just open your browser and run it — no need to mess with local environments. It adopts a 'practice + answer' format: fill in the code yourself first, then check the answers. This way, you learn more solidly. The tutorial is continuously updated, and recently added chapters on Vision LLM (Vision Large Language Models). After completing the tutorial, we can train a small AI capable of conversation and even try it out online.
Original Article
View Cached Full Text

Cached at: 06/16/26, 01:38 PM

If you want to understand the underlying principles of large language models, most resources only introduce theoretical knowledge or provide source code, leaving you confused.

I stumbled upon the open-source tutorial EveryonesLLM, which guides you step by step to build a complete large language model from scratch on Google Colab, writing all the code yourself.

The entire tutorial is divided into 29 chapters, starting from basic data loading and word embeddings, gradually building up to attention mechanisms, Transformer modules, and finally completing pretraining and instruction fine-tuning.

GitHub: http://github.com/HayatoHongo/EveryonesLLM

Each chapter is an independent Colab notebook — just open it in your browser and run it; no need to fuss with a local environment.

It also adopts a “practice + answer” format, where you write the code yourself first and then check your answers. This helps you learn more thoroughly.

The tutorial is continuously updated, and recently added a chapter on Vision LLM.

After completing the tutorial, you will be able to train a small conversational AI and even try it out online.


HayatoHongo/EveryonesLLM

Source: https://github.com/HayatoHongo/EveryonesLLM

🌐 Select Language / 日本語 🇯🇵 (https://github.com/HayatoHongo/EveryonesLLM/tree/ja) | 中文 🇨🇳

Build LLM on Google Colab from scratch

colab-badge

EveryonesLLM_demo

🎉 Click → AI YOU build in Chapter29😘 (https://huggingface.co/spaces/HayatoHongoEveryonesAI/EveryonesGPT_SFT)


Table of Contents

WebUI

WebApp Released (Now only in Japanese) (https://EveryonesAI-v2.created.app/)

EveryonesLLM

ChapterEstimated TimeNotebook
Chapter 00: Start Tutorial1-2 hoursOpen in Colab
Chapter 01: Dataloader1-2 hoursOpen in Colab
Chapter 02: TokenEmbedding0.5-1 hourOpen in Colab
Chapter 03: PositionEmbedding0.5-1 hourOpen in Colab
Chapter 04: EmbeddingModule0.5-1 hourOpen in Colab
Chapter 05: LayerNorm1-2 hoursOpen in Colab
Chapter 06: AttentionHead3-4 hoursOpen in Colab
Chapter 07: MultiHeadAttention1-2 hoursOpen in Colab
Chapter 08: FeedForward1-2 hoursOpen in Colab
Chapter 09: TransformerBlock0.5-1 hourOpen in Colab
Chapter 10: VocabularyLogits0.5-1 hourOpen in Colab
Chapter 11: nanoGPT1-2 hoursOpen in Colab
Chapter 12: Trainer1-2 hoursOpen in Colab
Chapter 13: Tokens per second (CPU)1-2 hoursOpen in Colab
Chapter 14: Tokens per second (T4 GPU)0.5-1 hourOpen in Colab
Chapter 15: Train nanoGPT with GPU0.5-1 hourOpen in Colab
Chapter 16: Make only the model size bigger0.5-1 hour (+ 1 hour model training)Open in Colab
Chapter 17: Make the dataset bigger1-2 hours (+ 1 hour model training)Open in Colab
Chapter 18: tiktoken1-2 hours (+ 1 hour model training)Open in Colab
Chapter 19: Long Train1-2 hours (+ 6 hours model training)Open in Colab
Chapter 20: Learning rate0.5-1 hourOpen in Colab
Chapter 21: Scaling Law1-2 hoursOpen in Colab
Chapter 22: TinyStories (Main)1-2 hoursOpen in Colab
Chapter 22: TinyStories (Model Training)1 hourOpen in Colab
Chapter 23: RPE (OverSimplified)2-3 hoursOpen in Colab
Chapter 24: RPE (Simplified)1-2 hours (+ 1 hour model training)Open in Colab
Chapter 25: LR schedule1 hourOpen in Colab
Chapter 26: Checkpoint1 hourOpen in Colab
Chapter 27: Pretraining0.5 hour (+ 20 hours model training)Open in Colab
Chapter 28: Instruction Tuning0.5 hour (+ 0.5 hour model training)Open in Colab
Chapter 29: Magpie (Prompt mask)1.5 hours (+ 2 hours model training)Open in Colab

2026/6/5 Vision LLM beta is now available!

Explanations and exercises are not available yet. Evaluation on major benchmarks is also not available yet.

Please use it for early preview learning. We plan to update it from time to time, so we recommend working on it after future updates.

ChapterEstimated timeNotebook
Chapter 30: Vision Pretraining (Beta)3 hours model trainingOpen in Colab
Chapter 31: Vision Instruction Tuning (Beta)2 hours model trainingOpen in Colab

EveryonesVLM_demo

Link to Web App (Vision LLM) (https://huggingface.co/spaces/HayatoHongoEveryonesAI/EveryonesGPT_Vision_Instruct_noRoPE)



Tensor Map (Full Tensor Overview)

Try making the tensor map below by yourself!
Do not worry, I prepared lots of hints for you.
View the full-resolution Tensor Map of the nanoGPT model on Canva

Everyones TensorMap


About the Development Environment

To keep setup easy, please try running all the samples on Google Colab.

However, Google Colab does not save checkmarks in checkboxes.
If you want to track your progress, or if you want to work little by little, say every 30 minutes, I recommend VS Code.
In that case, fork this repository and clone it to your own PC.
Just use the Google Colab extension for VS Code, then you can use Colab CPU and GPU.


Answers

ChapterEstimated TimeNotebook
Chapter 00: Start Tutorial1-2 hoursOpen in Colab
Chapter 01: Dataloader1-2 hoursOpen in Colab
Chapter 02: TokenEmbedding0.5-1 hourOpen in Colab
Chapter 03: PositionEmbedding0.5-1 hourOpen in Colab
Chapter 04: EmbeddingModule0.5-1 hourOpen in Colab
Chapter 05: LayerNorm1-2 hoursOpen in Colab
Chapter 06: AttentionHead3-4 hoursOpen in Colab
Chapter 07: MultiHeadAttention1-2 hoursOpen in Colab
Chapter 08: FeedForward1-2 hoursOpen in Colab
Chapter 09: TransformerBlock0.5-1 hourOpen in Colab
Chapter 10: VocabularyLogits0.5-1 hourOpen in Colab
Chapter 11: nanoGPT1-2 hoursOpen in Colab
Chapter 12: Trainer1-2 hoursOpen in Colab
Chapter 13: Tokens per second (CPU)1-2 hoursOpen in Colab
Chapter 14: Tokens per second (T4 GPU)0.5-1 hourOpen in Colab
Chapter 15: Train nanoGPT with GPU0.5-1 hourOpen in Colab
Chapter 16: Make only the model size bigger0.5-1 hour (+ 1 hour model training)Open in Colab
Chapter 17: Make the dataset bigger1-2 hours (+ 1 hour model training)Open in Colab
Chapter 18: tiktoken1-2 hours (+ 1 hour model training)Open in Colab
Chapter 19: Long Train1-2 hours (+ 6 hours model training)Open in Colab
Chapter 20: Learning rate0.5-1 hourOpen in Colab
Chapter 21: Scaling Law1-2 hoursOpen in Colab
Chapter 22: TinyStories (Main)1-2 hoursOpen in Colab
Chapter 22: TinyStories (Model Training)1 hourOpen in Colab
Chapter 23: RPE (OverSimplified)2-3 hoursOpen in Colab
Chapter 24: RPE (Simplified)1-2 hours (+ 1 hour model training)Open in Colab

Similar Articles

@GitHub_Daily: Want to understand how Large Language Models actually work? Existing resources are either too academic and hard to digest, or too superficial, focusing only on concepts, with nothing that clearly explains the entire process from start to finish. Similarly, I came across the 'how-llms-work' project, which turns the complete workflow of LLMs into a visual interactive webpage, based on Andrej Karpathy’s...

X AI KOLs Timeline

An interactive visual guide, 'how-llms-work', breaks down the entire lifecycle of Large Language Models based on Andrej Karpathy's lectures, covering data collection to post-training.

@Xx15573208: I've read many articles about Transformers and understand the theory, but when I actually sit down to write code, I have no idea where to start. LLMs-from-scratch is specifically designed to solve this problem: it accompanies the book "Build a Large Language Model" and guides you through implementing GPT from scratch using PyTorch…

X AI KOLs Timeline

LLMs-from-scratch is a GitHub repository that accompanies the book "Build a Large Language Model," providing complete code to implement GPT from scratch with PyTorch, covering the full pipeline including pretraining, fine-tuning, and RLHF. It has gained 93K+ stars and is ideal for developers who want to deeply understand the principles behind large language models.

@XAMTO_AI: Stop bookmarking those flashy but useless AI tutorials. This 'Hands-On Large Models' is what you really need—open source, free, and code that runs. The book covers 12 chapters, guiding you step by step through the complete workflow of deploying large models: ① Language Model Basics ② Prompt Engineering ③ Semantic Search ④ Model Fine-Tuning ⑤ Multimodal…

X AI KOLs Timeline

Recommend an open-source free tutorial 'Hands-On Large Models', covering 12 chapters including language model basics, prompt engineering, semantic search, model fine-tuning, multimodal applications, etc. All code can be run directly in Colab.

@wsl8297: UC's Open Course on Reinforcement Learning for LLMs uses a 'theory + practice' approach to thoroughly explain key AI training techniques from the ground up, helping you systematically build a complete framework spanning from RL to LLM training. Comprehensive curriculum paired with complete resources: lecture slides, full videos, and practical exercises are all provided so you can start implementing right away…

X AI KOLs Timeline

Assistant Professor Ernest K. Ryu at UCLA offers the open course 'Reinforcement Learning for Large Language Models,' comprehensively analyzing key LLM training techniques like RLHF, PPO, and DPO alongside their supporting resources through a blend of theory and practice. The course provides developers and researchers with a systematic learning path from foundational algorithms to practical deployment.

@wsl8297: Sharing an easy-to-read open-source book 'Foundations of Large Models'. From an introduction to large language models to architectural evolution, then to key technologies such as Prompt engineering, parameter-efficient fine-tuning, model editing, retrieval-augmented generation (RAG), all in one book. GitHub: https://github.com/ZJU-LLMs/…

X AI KOLs Timeline

The Zhejiang University team open-sourced an easy-to-understand textbook on large models 'Foundations of Large Models', covering from architectural evolution to key technologies like RAG, accompanied by the Agent-Kernel multi-agent framework.