# dive-into-llms | Tongxin Yuan | Knowledge Base | Instagit

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

GitHub Stars: 30.2k

Repository: https://github.com/Lordog/dive-into-llms

---

## Articles

### [How do Multi-Modal LLMs Process and Generate Text and Images: A Deep Dive into NExT-GPT](/Lordog/dive-into-llms/how-do-multi-modal-llms-process-and-generate-text-and-images)

Discover how multi-modal LLMs process and generate text and images. Learn about modality-specific encoders, joint reasoning, and specialized decoders like Stable Diffusion.

- Tags: deep-dive
- Published: 2026-04-16

### [Architecture of Multi-Modal Large Language Models: Encoder-LLM-Decoder vs Task Scheduler Patterns](/Lordog/dive-into-llms/what-is-the-architecture-of-multi-modal-large-language-models)

Explore multi-modal large language model architectures. Understand encoder-LLM-decoder and task scheduler patterns for processing diverse data inputs.

- Tags: architecture
- Published: 2026-04-16

### [How to Evaluate the Success of Knowledge Editing in LLMs: The EasyEdit Metrics Framework](/Lordog/dive-into-llms/how-to-evaluate-the-success-of-knowledge-editing-in-llms)

Learn how to evaluate knowledge editing in LLMs with the EasyEdit metrics framework. Discover reliability, generality, locality, and portability measures for successful fact updates without compromising model capabilities.

- Tags: best-practices
- Published: 2026-04-16

### [ROME and MEMIT Methods for Knowledge Editing in LLMs: A Technical Guide](/Lordog/dive-into-llms/what-are-the-rome-and-memit-methods-for-knowledge-editing-in-llms)

Explore ROME and MEMIT knowledge editing methods for LLMs. Learn how rank-one updates and low-rank projections precisely modify model facts without full retraining. Dive into LLMs with this technical guide.

- Tags: technical-guide
- Published: 2026-04-16

### [Knowledge Editing Techniques for Language Models: A Practical Guide with EasyEdit](/Lordog/dive-into-llms/what-are-knowledge-editing-techniques-for-language-models)

Learn knowledge editing techniques for language models update factual information without full retraining. Explore practical methods with EasyEdit.

- Tags: deep-dive
- Published: 2026-04-16

### [Deterministic vs Probabilistic Watermarking in LLMs: Implementation and Detection Methods](/Lordog/dive-into-llms/what-is-the-difference-between-deterministic-and-probabilistic-watermarking)

Understand deterministic vs probabilistic watermarking in LLMs. Learn about fixed token mappings and biased sampling distributions for effective watermark implementation and detection.

- Tags: deep-dive
- Published: 2026-04-16

### [Designing Effective LLM Watermarks: Technical Considerations and Implementation Guide](/Lordog/dive-into-llms/what-are-the-considerations-for-designing-effective-llm-watermarks)

Learn to design effective LLM watermarks balancing detectability, fluency, and robustness. Implement LLM watermarking with our technical guide.

- Tags: how-to-guide
- Published: 2026-04-16

### [How to Implement Text Watermarks for LLM-Generated Content: A Complete Guide](/Lordog/dive-into-llms/how-to-implement-text-watermarks-for-llm-generated-content)

Learn how to implement text watermarks for LLM generated content with the Lordog/dive-into-llms repository. Discover a modular pipeline for embedding, detecting, and evaluating watermarks using KGW, X-SIR, and SIR algorithms.

- Tags: how-to-guide
- Published: 2026-04-16

### [How KL Divergence Prevents Mode Collapse in RLHF Training](/Lordog/dive-into-llms/how-can-kl-divergence-prevent-mode-collapse-in-rlhf-training)

Learn how KL divergence prevents mode collapse in RLHF training. Discover how this regularization technique ensures policy diversity and optimizes rewards by penalizing deviations from a reference model.

- Tags: deep-dive
- Published: 2026-04-16

### [The Three Stages of the RLHF Workflow with PPO: Implementation Guide](/Lordog/dive-into-llms/what-are-the-three-stages-of-the-rlhf-workflow-with-ppo)

Master the three stages of RLHF with PPO: Rollout, Evaluation, and Optimization. This guide details implementing the RLHF workflow to fine-tune LLMs effectively.

- Tags: how-to-guide
- Published: 2026-04-16

### [How to Implement RLHF Alignment Using the TRL Library and PPO: A Complete Guide](/Lordog/dive-into-llms/how-to-implement-rlhf-alignment-using-the-trl-library-and-ppo)

Learn to implement RLHF alignment with the TRL library and PPO. This guide details loading models, configuring PPO, and optimizing policy updates for better LLM control.

- Tags: how-to-guide
- Published: 2026-04-16

### [How the PAIR Method Works for Iterative Prompt Refinement in Jailbreaking](/Lordog/dive-into-llms/how-does-the-pair-method-work-for-iterative-prompt-refinement-in-jailbreaking)

Discover how the PAIR method iteratively refines jailbreak prompts to bypass LLM safety features. Learn this prompt engineering technique for advanced LLM analysis in Lordog dive-into-llms.

- Tags: deep-dive
- Published: 2026-04-16

### [Components of the EasyJailbreak Framework: A Modular Approach to LLM Safety Testing](/Lordog/dive-into-llms/what-are-the-components-of-the-easy-jailbreak-framework)

Explore the EasyJailbreak framework's four modules Selector, Mutator, Constraint, and Evaluator for modular LLM safety testing. Learn about its preparation, attack loop, and reporting stages.

- Tags: architecture
- Published: 2026-04-16

### [Impact of Incorrect Examples on Few-Shot Prompting: Risks and Mitigation Strategies](/Lordog/dive-into-llms/what-impact-do-incorrect-examples-have-on-few-shot-prompting)

Learn how incorrect examples in few-shot prompting lead to pattern mis-learning and cascading errors. Discover crucial mitigation strategies to ensure accurate LLM outputs.

- Tags: best-practices
- Published: 2026-04-16

### [How Self-Consistency Decoding Improves LLM Reasoning: A Practical Guide](/Lordog/dive-into-llms/how-does-self-consistency-decoding-improve-llm-reasoning)

Discover how self-consistency decoding enhances LLM reasoning. Learn about temperature sampling and majority voting to filter errors and improve accuracy without retraining.

- Tags: how-to-guide
- Published: 2026-04-16

### [Program-of-Thought (PoT) vs Chain-of-Thought (CoT): Key Differences Explained](/Lordog/dive-into-llms/what-is-program-of-thought-pot-and-how-does-it-differ-from-cot)

Discover the key differences between Program-of-Thought PoT and Chain-of-Thought CoT prompting techniques. Learn how PoT uses code generation and CoT uses natural language for LLM problem solving.

- Tags: deep-dive
- Published: 2026-04-16

### [How to Implement Chain-of-Thought (CoT) Reasoning in LLMs: A Complete Guide](/Lordog/dive-into-llms/how-to-implement-chain-of-thought-cot-reasoning-in-llms)

Master Chain-of-Thought CoT reasoning in LLMs. This complete guide shows you how to augment prompts for step-by-step answers, enhancing model accuracy and understanding. Dive into LLMs with Lordog.

- Tags: how-to-guide
- Published: 2026-04-16

### [How to Deploy an LLM Demo on Gradio Spaces: Required Files and Setup Guide](/Lordog/dive-into-llms/what-files-are-needed-to-deploy-an-llm-demo-on-gradio-spaces)

Deploy an LLM demo on Gradio Spaces with ease. Learn the essential files needed: app.py, requirements.txt, and model checkpoints for a smooth setup.

- Tags: how-to-guide
- Published: 2026-04-16

### [How to Deploy Fine-Tuned LLMs with Gradio Spaces: A Step-by-Step Guide](/Lordog/dive-into-llms/how-to-deploy-fine-tuned-llms-with-gradio-spaces)

Easily deploy fine-tuned LLMs with Gradio Spaces. Follow our step-by-step guide to create your inference script, build a Gradio interface, and upload to Hugging Face.

- Tags: how-to-guide
- Published: 2026-04-16

### [Key Parameters for Fine-Tuning LLMs with Hugging Face: A Complete Guide](/Lordog/dive-into-llms/what-are-the-key-parameters-for-fine-tuning-llms-with-hugging-face)

Master fine-tuning LLMs with Hugging Face. Discover essential parameters for model loading, optimizer hyperparameters, and data handling using the Trainer API. Optimize your models efficiently.

- Tags: how-to-guide
- Published: 2026-04-16

### [Custom vs. Integrated Fine-Tuning with Hugging Face: A Complete Guide](/Lordog/dive-into-llms/what-are-the-custom-vs-integrated-approaches-for-fine-tuning-with-hugging-face)

Explore custom vs integrated fine-tuning with Hugging Face. Learn how integrated scripts accelerate prototyping and custom loops enable specialized LLM research.

- Tags: deep-dive
- Published: 2026-04-16

