Illustration of what dive-into-llms does: Free Chinese notebooks and slides for learning to fine-tune, prompt and secure LLMs

Lordog /

dive-into-llms

Free Chinese notebooks and slides for learning to fine-tune, prompt and secure LLMs

This repo is a course-style set of hands-on tutorials for large language models. It grew out of lecture notes from two Shanghai Jiao Tong University courses, one on frontier NLP and one on AI security. The authors say it is free and meant to help students start quickly with course projects or research.

Each chapter has three parts: a PDF slide deck, a written tutorial in Markdown, and a Jupyter notebook with the code. Topics run from fine-tuning and deploying a model, and prompting with chain of thought, to newer ones like math reasoning, multimodal models, GUI agents and RLHF.

Many chapters focus on safety and security: jailbreak attacks, text watermarking, steganography, agent safety and safety alignment. Beginner LLM courses rarely cover these. The README is in Chinese. It also links to a separate Huawei Ascend course on the full LLM development process. It says the project is still being built and that its tips are not guaranteed to be correct.

What it does

  • Eleven topic chapters

    Covers fine-tuning and deployment, prompting and chain of thought, knowledge editing, math reasoning, watermarking, jailbreaks, steganography, multimodal models, GUI agents, agent safety and RLHF safety alignment.

  • Slides, tutorial and notebook for each

    Every chapter links a PDF deck, a Markdown walkthrough and a Jupyter notebook, so you can read the idea and then try the code.

  • Small practical projects

    Examples include distilling a mini R1-style model for math reasoning, editing a fact stored in a language model, and building an agent that operates a GUI.

  • Security-minded topics

    Jailbreak attacks, text watermarks, steganography and agent risk are taught alongside the usual fine-tuning and prompting material.

  • Link to a Huawei Ascend course

    The README points to a separate course on the full LLM development process, built on Huawei Ascend hardware and software, with slides, lab manuals and videos.

What you could build

  • Fine-tune a pretrained model on a specific task and wrap it in a simple demo.
  • Try prompting and chain-of-thought techniques against an LLM API.
  • Distill a small math-reasoning model by following the mini R1 chapter.
  • Experiment with jailbreak attacks and watermarking to learn how LLM safety is tested.
  • Use the slides and notebooks as material for a course project or study group.

Get started

The README gives no install commands. Open the chapter you want in the repo's documents folder, read its README and slides, then run the matching Jupyter notebook. Expect to need your own Python environment and, for training chapters, a GPU.

Commands are copied from the project's README. Read it on GitHub for the full setup.

More in Learning & resource lists

    ↑↓ to move, Enter to open, Esc to close