Lordog / dive-into-llms

Lordog / dive-into-llms

《动手学大模型》系列编程实践教程

”Dive into LLMs” Programming Practice Tutorial Series


💡 Updates 2025/06/06

感谢各位朋友们的关注和积极反馈!我们从以下两个方面对本教程进行了更新: 上线国产化《大模型开发全流程》公益教程(含PPT、实验手册和视频),此处特别感谢华为昇腾社区的支持! 在原系列编程实践教程的基础上进行内容更新,并增加了新的主题(数学推理、GUI Agent、大模型对齐、隐写术等)!

💡 Updates 2025/06/06 Thank you all for your attention and positive feedback! We have updated this tutorial in the following two aspects: Launched the localized “Full-Process LLM Development” public tutorial (including PPTs, lab manuals, and videos). Special thanks to the Huawei Ascend community for their support! Updated the content of the original programming practice series and added new topics (Mathematical Reasoning, GUI Agents, LLM Alignment, Steganography, etc.)!


🎯 项目动机

《动手学大模型》系列编程实践教程,由上海交通大学《自然语言处理前沿技术》(NIS8021)、《人工智能安全技术》课程(NIS3353)讲义拓展而来(教师:张倬胜),旨在提供大模型相关的入门编程参考。本教程属公益性质、完全免费。通过简单实践,帮助同学们快速入门大模型,更好地开展课程设计或学术研究。

🎯 Project Motivation The “Dive into LLMs” programming practice tutorial series is expanded from the lecture notes of the courses “Frontier Technologies in Natural Language Processing” (NIS8021) and “Artificial Intelligence Security Technology” (NIS3353) at Shanghai Jiao Tong University (Instructor: Zhuosheng Zhang). It aims to provide an introductory programming reference for Large Language Models. This tutorial is non-profit and completely free. Through simple hands-on practice, it helps students quickly get started with LLMs and better conduct course projects or academic research.


📚 教程目录 (Tutorial Directory)

教程内容 (Content)简介 (Introduction)地址 (Links)
微调与部署预训练模型微调与部署指南:想提升预训练模型在指定任务上的性能?[课件] [教程] [脚本]
Fine-tuning & DeploymentGuide to fine-tuning and deploying pre-trained models: Want to improve performance on specific tasks?[Slides] [Tutorial] [Scripts]
提示学习与思维链大模型的API调用与推理指南:“AI在线求鼓励?”[课件] [教程] [脚本]
Prompt Learning & CoTGuide to API calls and inference: “AI seeking encouragement online?”[Slides] [Tutorial] [Scripts]
知识编辑语言模型的编辑方法和工具:想操控语言模型在对指定知识的记忆?[课件] [教程] [脚本]
Knowledge EditingMethods and tools for editing language models: Want to control how models remember specific knowledge?[Slides] [Tutorial] [Scripts]
数学推理如何让大模型学会数学推理?让我们快速蒸馏一个迷你R1![课件] [教程] [脚本]
Math ReasoningHow to teach LLMs mathematical reasoning? Let’s distill a mini-R1![Slides] [Tutorial] [Scripts]
模型水印语言模型的文本水印:在语言模型生成的内容中嵌入人类不可见的水印[课件] [教程] [脚本]
Model WatermarkingText watermarking for LLMs: Embedding invisible watermarks into generated content.[Slides] [Tutorial] [Scripts]
越狱攻击想要得到更好的安全,要先从学会攻击开始。让我们了解越狱攻击如何撬开大模型的嘴![课件] [教程] [脚本]
Jailbreak AttacksTo achieve better security, one must first learn to attack. Let’s see how jailbreaks crack open LLMs![Slides] [Tutorial] [Scripts]
大模型隐写“看不见的墨水”!想让大模型在流畅回答的同时,悄悄携带只有“自己人”能识别的信息吗?[课件] [教程] [脚本]
LLM Steganography”Invisible Ink”! Want LLMs to carry hidden messages while answering fluently?[Slides] [Tutorial] [Scripts]
多模态模型作为能够更充分模拟真实世界的多模态大语言模型,其如何实现更强大的多模态理解和生成能力?[课件] [教程] [脚本]
Multimodal ModelsHow do Multimodal LLMs achieve stronger understanding and generation to simulate the real world?[Slides] [Tutorial] [Scripts]
GUI智能体想要饭来张口、解放双手?那么让我们一起来让AI Agent替你点外卖、回消息、购物比价吧![课件] [教程] [脚本]
GUI AgentsWant to automate your life? Let AI Agents order food, reply to messages, and compare prices for you![Slides] [Tutorial] [Scripts]
智能体安全大模型智能体迈向了未来操作系统之旅。然而,大模型在开放智能体场景中能意识到风险威胁吗?[课件] [教程] [脚本]
Agent SecurityLLM Agents are the future of operating systems. But can they recognize threats in open scenarios?[Slides] [Tutorial] [Scripts]
RLHF安全对齐基于PPO的RLHF实验指南:本教程”十分危险“,阅读后请检查你的大模型是否在冷笑。[课件] [教程] [脚本]
RLHF AlignmentPPO-based RLHF guide: This tutorial is “very dangerous”—check if your model is smirking after reading![Slides] [Tutorial] [Scripts]

🔥 新上线:国产化《大模型开发全流程》

我们联合华为昇腾推出的《大模型开发全流程》公益教程正式上线!前沿技术+代码实践,手把手带你玩转AI大模型。在《动手学大模型》原系列教程的基础上,我们联合华为开发了《大模型开发全流程》系列课程。本系列教程基于昇腾基础软硬件开发,覆盖PPT、实验手册、视频等教程形式。

🔥 New Launch: Localized “Full-Process LLM Development” The “Full-Process LLM Development” public tutorial, launched in collaboration with Huawei Ascend, is now live! Combining cutting-edge technology with code practice, we guide you through the world of AI LLMs. Based on the original “Dive into LLMs” series, we partnered with Huawei to develop this curriculum. It is built on Ascend hardware/software and includes PPTs, lab manuals, and videos.


🙏 免责声明

本教程所有内容仅仅来自于贡献者的个人经验、互联网数据、日常科研工作中的相关积累。所有技巧仅供参考,不保证百分百正确。若有任何问题,欢迎提交 Issue 或 PR。另本项目所用徽章来自互联网,如侵犯了您的图片版权请联系我们删除,谢谢。

🙏 Disclaimer All content in this tutorial is derived from contributors’ personal experience, internet data, and daily research work. All techniques are for reference only and are not guaranteed to be 100% accurate. If you have any questions, please submit an Issue or PR. Additionally, the badges used in this project are from the internet; if any image copyright is infringed, please contact us for removal. Thank you.