# LLM-Beginner

A Chinese-language textbook on large models and agents paired with six progressive programming exercises, from a hand-written Transformer through a coding agent.

LLM-Beginner pairs an in-progress book, covering neural networks, Transformers, large model training and alignment, and agents built from tools, memory, and planning, with six programming tasks that can be done independently of the book: implementing attention and a Transformer by hand, building a mini-GPT with tokenization, RoPE, KV cache, and sampling, hand-writing LoRA for supervised fine-tuning and DPO preference alignment, building a retrieval-augmented question-answering pipeline, implementing a ReAct tool-calling agent with error recovery, and building a small coding agent that edits code, runs tests, and iterates.

Each task directory ships its own requirements file, a data-download script, and a self-check script that imports the learner's implementation by an expected function or class signature and scores it.

It targets Python 3.10 or newer and models from the Qwen family, and is distributed under the MIT license.

Website: https://nndl.ai/llm-agent/
