7 GitHub repos to learn LLMs: from Transformer basics to training your own models

goyalshaliniuk · x · 2026-08-19

A curated list of 7 GitHub repositories for systematically learning LLMs — from Transformer fundamentals to building and training language models yourself, without dozens of scattered tutorials.

Highlighted first is Sebastian Raschka's LLMs-from-scratch (103k stars), the official code repo for Build a Large Language Model (From Scratch): step-by-step PyTorch implementation of attention, Transformers, pretraining, and fine-tuning. Others in the thread include Karpathy's nanoGPT and minGPT (300-line minimal GPT, now semi-archived in favor of nanoGPT), plus llm.c (pure C/CUDA GPT-2 pretraining, 7% faster than PyTorch Nightly, 30.8k stars), and Hugging Face's free multilingual LLM Course and the Transformers library (164k stars).

Related event: 7 GitHub Repos to Master LLMs from Scratch(2 posts)→

Original post →

More from coding & agent

coding & agent channel →