从零构建大语言模型:Sebastian Raschka 官方代码仓库
这本 Manning 图书的官方实践仓库用 PyTorch 从底层实现 GPT 风格 LLM:从分词、attention 和模型组装,到预训练、GPT-2 权重加载、分类微调与指令微调。七章主线、五个附录和持续更新的 bonus material 都配有可运行 Notebook 与精简代码。
Build a Large Language Model (From Scratch): Official Code Repository
Sebastian Raschka’s official Manning book repository implements a GPT-like LLM in PyTorch from tokenization and attention through pretraining, GPT-2 weight loading, classification finetuning, and instruction finetuning, with runnable notebooks, five appendices, exercises, and extensive evolving bonus material.
https://github.com/rasbt/LLMs-from-scratch

GitHub
GitHub - rasbt/LLMs-from-scratch: Implement a ChatGPT-like LLM in PyTorch from scratch, step by step
Implement a ChatGPT-like LLM in PyTorch from scratch, step by step - rasbt/LLMs-from-scratch
August 23, 2026 8