dive-into-llms README

The project's README from github.com/Lordog/dive-into-llms. As one markdown file: README.md.

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

version Status-building PRs-Welcome stars FORK Issues

项目动机/ 教程目录/ 贡献者列表

💡 Updates

2025/06/06 感谢各位朋友们的关注和积极反馈!我们从以下两个方面对本教程进行了更新:

🎯 项目动机

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

📚 教程目录

教程内容 简介 地址
微调与部署 预训练模型微调与部署指南:想提升预训练模型在指定任务上的性能?让我们选择合适的预训练模型,在特定任务上进行微调,并将微调后的模型部署成方便使用的Demo! [课件] [教程] [脚本]
提示学习与思维链 大模型的API调用与推理指南:“AI在线求鼓励?大模型对一些问题的回答令人大跌眼镜,但它可能只是想要一句「鼓励」” [课件] [教程] [脚本]
知识编辑 语言模型的编辑方法和工具:想操控语言模型在对指定知识的记忆?让我们选择合适的编辑方法,对特定知识进行编辑,并将对编辑后的模型进行验证! [课件] [教程] [脚本]
数学推理 如何让大模型学会数学推理?让我们快速蒸馏一个迷你R1! [课件] [教程] [脚本]
模型水印 语言模型的文本水印:在语言模型生成的内容中嵌入人类不可见的水印 [课件] [教程] [脚本]
越狱攻击 想要得到更好的安全,要先从学会攻击开始。让我们了解越狱攻击如何撬开大模型的嘴! [课件] [教程] [脚本]
大模型隐写 “看不见的墨水”!想让大模型在流畅回答的同时,悄悄携带只有“自己人”能识别的信息吗?大模型隐写告诉你! [课件] [教程] [脚本]
多模态模型 作为能够更充分模拟真实世界的多模态大语言模型,其如何实现更强大的多模态理解和生成能力?多模态大语言模型是否能够帮助实现AGI? [课件] [教程] [脚本]
GUI智能体 想要饭来张口、解放双手?那么让我们一起来让AI Agent替你点外卖、回消息、购物比价吧! [课件] [教程] [脚本]
智能体安全 大模型智能体迈向了未来操作系统之旅。然而,大模型在开放智能体场景中能意识到风险威胁吗? [课件] [教程] [脚本]
RLHF安全对齐 基于PPO的RLHF实验指南:本教程”十分危险“,阅读后请检查你的大模型是否在冷笑。 [课件] [教程] [脚本]

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

🙏 免责声明

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

🤝 欢迎贡献

本教程目前是一个正在进行中的项目,如有疏漏在所难免,欢迎任何的PR及issue讨论。

❤️ 贡献者列表

感谢以下老师和同学对本项目的支持与贡献:

《动手学大模型》系列教程开发团队:

《大模型开发全流程》系列教程开发团队:

🌟 Star History

Star History Chart

dive-into-llms (Lordog/dive-into-llms)

ai-security
Searching Database…

What is this?It's a free Chinese-language tutorial series called 'Dive into LLMs' (《动手学大模型》) that teaches large language model concepts through hands-on coding exercises, built from Shanghai Jiao Tong University's NLP and AI-security course materials.
Is this one course or a collection of separate topic tutorials?It's a collection of 11 independent topic modules (fine-tuning/deployment, prompt learning, knowledge editing, math reasoning, watermarking, jailbreak attacks, LLM steganography, multimodal models, GUI agents, agent security, RLHF alignment), each with slides, a written tutorial, and runnable Jupyter notebook scripts.
How do I start using these tutorials?Pick a topic from the README's tutorial table and open its slides (课件), written guide (教程), and Jupyter notebook script (脚本); each module is self-contained.
Do I need prior Python or deep-learning experience?Not explicitly stated, but since the material covers fine-tuning, RLHF/PPO, and model editing with runnable notebooks, basic Python and machine-learning familiarity is expected to follow along.
Is the content guaranteed to be accurate and complete?No — the authors state it's an ongoing project drawn from personal experience and internet data, with no guarantee everything is fully correct, and issues/PRs are welcomed to fix gaps.
Who is this tutorial series for?It's aimed at students and researchers wanting a quick, practical entry point into LLM topics for coursework or academic research, not production engineering.
Is there anything beyond the original tutorial series?Yes — a separate, Huawei Ascend (昇腾)-based series called 大模型开发全流程 (Full LLM Development Pipeline) was added, with beginner/intermediate/advanced tracks including slides, lab manuals, and videos.
What makes the LLM steganography module interesting?It shows how to make a model's generated text covertly carry a hidden message readable only by those who know the scheme, while the output still reads naturally.
What does the jailbreak-attack module teach?It walks through how adversarial prompting techniques can bypass a model's safety guardrails, framed as learning attacks to better understand defenses.
Creator
Lordog
Size
132.9 MB
Stars
56.9K
Age
2y
Commits · 90 Days