Home › Vibe Coding / AI Programming › how-to-train-your-gpt-zh
how-to-train-your-gpt-zh
l0K1ngg/how-to-train-your-gpt-zh
Visit the how-to-train-your-gpt-zh website / project page →
Verdict There is no mobile version;it must be set up on a computer first and cannot run on a phone;builds GPT core components from scratch: tokenizer;embedding layer;attention mechanism
This hot-list edition was updated Dec 4, 21:18.RSS
What is how-to-train-your-gpt-zh
A Chinese tutorial repository that builds a GPT from scratch, covering tokenisation, attention mechanisms, training, inference, and LoRA/QLoRA/DPO fine-tuning, with Chinese comments on every line of code.
Key features
- Builds GPT core components from scratch: tokenizer, embedding layer, attention mechanism, training loop and inference engine, with Chinese comments on every line of code.
- Implements Chinese GPT training: uses Chinese Wikipedia corpus and a self-trained tokenizer to reduce the number of Chinese character tokens from 1.89 to 0.76, supporting Chinese text continuation.
- Provides complete implementations of LoRA, QLoRA and DPO fine-tuning, with detailed Chinese comments and runnable code.
- Contains 28 topical explanations that go deep into the technical principles of RoPE, RMSNorm, SwiGLU, KV cache, AdamW and more.
Who it is for
Suitable for developers, students and engineers with basic Python knowledge (functions, classes, lists) who want to understand and implement the Transformer architecture, attention mechanisms and large-model fine-tuning from scratch. No machine learning or PyTorch experience required.
Who it is NOT for
Not suitable for people with no programming background at all or those who only want to call ready-made APIs quickly without caring about the underlying principles.
How to get started
- Visit https://github.com/l0K1ngg/how-to-train-your-gpt-zh
- Read the README to understand the tutorial structure and newly added Chinese content.
- Follow Chapter 1 to set up the local environment or open the ModelScope community Notebook directly.
- Run each chapter's Notebook in sequence, writing and understanding the code line by line starting from tokenisation
Pricing:Not published
Compiled from public descriptions on the tool's official website / README / launch page. Pricing and user numbers have not been verified; please check the official website. Some sections were drafted with AI assistance. Written in Chinese and English.
Similar alternatives (Vibe Coding / AI Programming)
Get a “Featured on AI Hot List” badge · Submit a tool
← Back to “Vibe Coding / AI Programming” · Full hot list · Use-case lists