Introduction

The Dive Into LLMs tutorial series is a comprehensive, hands-on programming course designed to help developers and researchers master large language models. Created by researchers from Shanghai Jiao Tong University and the National University of Singapore, this open-source project provides practical programming tutorials covering everything from model fine-tuning to advanced topics like agent security and RLHF alignment.

With nearly 30,000 stars on GitHub, this tutorial series has become one of the most popular resources for learning LLM development. The project originated from course materials for “Frontier Technologies in Natural Language Processing” (NIS8021) and “Artificial Intelligence Security Technology” (NIS3353) courses, making it an academically grounded yet practically focused learning resource.

Learning Curriculum Overview

The tutorial series is organized into 11 comprehensive chapters, each covering a critical aspect of LLM development and deployment. The curriculum is designed to take learners from foundational concepts to advanced applications in a structured progression.

Dive Into LLMs Curriculum

The curriculum diagram above illustrates the complete learning path through all 11 chapters. The journey begins with fundamental skills like fine-tuning and prompt engineering, progresses through core topics like knowledge editing and mathematical reasoning, advances into security concepts like watermarking and jailbreak attacks, and culminates with specialized applications including GUI agents and RLHF safety alignment.

Each chapter is carefully structured to build upon previous knowledge, ensuring learners develop a comprehensive understanding of LLM technologies. The progression from basic to advanced topics allows both beginners and experienced practitioners to find appropriate entry points and learning challenges.

Tutorial Structure and Resources

Every chapter in the series follows a consistent three-resource structure designed to accommodate different learning styles and depth requirements.

Tutorial Structure

The tutorial structure diagram demonstrates how each chapter provides multiple learning modalities. PDF slides offer theoretical foundations with visual explanations and concept diagrams. README tutorials provide step-by-step instructions with code examples and setup guides. Jupyter notebooks deliver hands-on exercises with runnable code and experiment results.

This multi-modal approach ensures learners can choose their preferred learning method or combine all three for comprehensive understanding. The notebooks are particularly valuable for practical implementation, allowing learners to experiment with real code and observe results firsthand.

Key Concepts and Learning Path

The tutorial series covers a wide range of LLM concepts, organized into a logical progression from foundational to advanced topics.

Key Concepts Flowchart

The concepts flowchart illustrates the interconnected nature of LLM knowledge areas. Starting with foundation skills in fine-tuning and prompt engineering, learners progress through core skills like knowledge editing and mathematical reasoning. Advanced topics include model watermarking and jailbreak attacks, leading to specialized applications in steganography and multimodal models. The learning path concludes with agent security and RLHF alignment, preparing practitioners for real-world LLM deployment.

Chapter-by-Chapter Breakdown

Chapter 1: Fine-Tuning and Deployment

This foundational chapter covers pre-trained model fine-tuning and deployment. Learners discover how to select appropriate pre-trained models, perform fine-tuning on specific tasks, and deploy the resulting models as usable demos. The chapter includes practical guidance on using Hugging Face transformers and Gradio for creating interactive interfaces.

Key topics include:

  • Pre-trained model selection criteria
  • Fine-tuning techniques and best practices
  • Model deployment strategies
  • Demo creation with Gradio

Chapter 2: Prompt Learning and Chain-of-Thought

This chapter explores API-based LLM interaction and reasoning techniques. The famous example of “AI asking for encouragement” demonstrates how prompt engineering can dramatically affect model outputs. Learners master prompt design, chain-of-thought reasoning, and self-consistency methods.

Key topics include:

  • Prompt engineering fundamentals
  • Chain-of-thought reasoning
  • Self-consistency techniques
  • API interaction patterns

Chapter 3: Knowledge Editing

Language models store vast amounts of knowledge, but sometimes this knowledge needs correction or updating. This chapter covers methods and tools for editing specific knowledge in language models without full retraining. Learners explore various editing approaches and validation techniques.

Key topics include:

  • Knowledge editing methods
  • Model editing tools
  • Validation approaches
  • Practical applications

Chapter 4: Mathematical Reasoning

Mathematical reasoning remains challenging for language models. This chapter teaches how to enable LLMs to perform mathematical reasoning, including techniques for distilling reasoning capabilities. The popular “Mini R1” distillation example demonstrates practical implementation.

Key topics include:

  • Mathematical reasoning architectures
  • Distillation techniques
  • Training strategies
  • Evaluation methods

Chapter 5: Model Watermarking

Watermarking allows embedding invisible markers in model-generated content. This chapter covers techniques for adding human-invisible watermarks to LLM outputs, enabling content authentication and tracking without affecting output quality.

Key topics include:

  • Watermarking algorithms
  • Detection methods
  • Quality preservation
  • Applications and ethics

Chapter 6: Jailbreak Attacks

Understanding security requires understanding attacks. This chapter explores jailbreak attacks that attempt to bypass LLM safety measures. By learning attack techniques, practitioners can better design robust defenses.

Key topics include:

  • Attack methodologies
  • Vulnerability analysis
  • Defense strategies
  • Security testing

Chapter 7: LLM Steganography

Steganography enables hiding information within seemingly normal text. This chapter teaches how LLMs can generate fluent responses while secretly carrying information only intended recipients can decode. The “invisible ink” concept demonstrates practical applications.

Key topics include:

  • Steganography principles
  • Encoding techniques
  • Detection challenges
  • Secure communication

Chapter 8: Multimodal Models

Multimodal LLMs process text, images, video, and audio together. This chapter explores how these models achieve enhanced understanding and generation capabilities, examining whether multimodal architectures might enable AGI-level performance.

Key topics include:

  • Multimodal architectures
  • Cross-modal understanding
  • Generation capabilities
  • AGI implications

Chapter 9: GUI Agents

GUI agents can interact with graphical interfaces to automate tasks. This chapter teaches how to build agents that can order food, reply to messages, compare prices, and perform other GUI-based tasks, truly “liberating hands” from routine work.

Key topics include:

  • GUI understanding
  • Action planning
  • Task automation
  • Real-world applications

Chapter 10: Agent Security

As LLMs become agents in open environments, security becomes critical. This chapter examines whether LLMs can recognize risk threats in agent scenarios and how to build secure agent systems.

Key topics include:

  • Threat recognition
  • Secure architecture
  • Risk mitigation
  • Safety frameworks

Chapter 11: RLHF Safety Alignment

Reinforcement Learning from Human Feedback (RLHF) is crucial for aligning models with human values. This chapter provides experimental guidance using PPO for RLHF, with a playful warning to “check if your model is smirking” after training.

Key topics include:

  • RLHF fundamentals
  • PPO implementation
  • Reward modeling
  • Alignment techniques

Comprehensive Learning Path

The complete learning path integrates all chapters into a cohesive educational journey.

Learning Path

The learning path diagram shows the five-phase progression through the curriculum. Phase 1 establishes foundation skills in fine-tuning and prompts. Phase 2 develops core skills in knowledge editing and mathematical reasoning. Phase 3 addresses security through watermarking and jailbreak understanding. Phase 4 explores advanced topics in steganography and multimodal models. Phase 5 culminates with agent development, security, and RLHF alignment.

Huawei Ascend Partnership

In addition to the original tutorial series, the project has partnered with Huawei Ascend to create the “Full-Process Large Model Development” series. This collaboration provides:

  • Beginner, intermediate, and advanced tracks
  • PPT slides, lab manuals, and video content
  • Ascend hardware optimization guidance
  • Migration and fine-tuning tutorials

The Ascend community resources complement the original tutorials with hardware-specific optimizations and deployment guidance for Chinese AI infrastructure.

Prerequisites and Setup

To get started with the tutorials, learners should have:

  • Python programming experience
  • Basic machine learning knowledge
  • Familiarity with PyTorch or TensorFlow
  • Understanding of neural network fundamentals

The Jupyter notebooks include setup instructions and dependency requirements. Most chapters can be run on consumer GPUs or cloud platforms like Google Colab for accessibility.

How to Use the Tutorials

  1. Clone the repository: Start by cloning the GitHub repository to access all materials
  2. Choose your starting point: Begin with Chapter 1 for comprehensive learning or jump to specific topics
  3. Review PDF slides: Understand theoretical concepts before implementation
  4. Follow README guides: Step-by-step instructions walk through setup and execution
  5. Run notebooks: Hands-on practice with runnable code and experiments
  6. Experiment and extend: Modify code to explore concepts deeper

Community and Contributions

The project welcomes contributions from the community. As an ongoing project, there may be areas for improvement, and the maintainers encourage PR submissions and issue discussions. The contributor list includes researchers from Shanghai Jiao Tong University and the National University of Singapore, ensuring academic rigor alongside practical applicability.

Conclusion

The Dive Into LLMs tutorial series represents one of the most comprehensive open-source resources for learning large language model development. With its structured curriculum, hands-on approach, and coverage of both foundational and cutting-edge topics, it provides an excellent pathway for anyone seeking to master LLM technologies.

Whether you’re a student beginning your LLM journey, a researcher exploring advanced topics, or a practitioner implementing production systems, this tutorial series offers valuable insights and practical guidance. The combination of theoretical foundations, practical code, and real-world applications makes it an indispensable resource for the AI community.

Watch PyShine on YouTube

Contents