AI Compare
​
​
ToolsArticlesServices
Best for
    All tools

    Sales

    AI tools for finding leads, qualifying them, preparing quotes, following up and keeping the CRM up to date.

    Marketing

    AI tools for content, social media, images, video, SEO and campaigns.

    Customer service

    AI tools for answering customer emails, chats and calls, handling requests and escalating the hard cases.

    Operations

    AI tools for running the daily work: workflows, scheduling, projects, purchasing and delivery.

    Finance

    AI tools for invoices, bookkeeping, reconciliation, spreadsheets and financial reporting.

    Management & Admin

    AI tools for owners, managers and office staff: planning, reports, documents, meetings, scheduling and everyday admin.

    HR

    AI tools for hiring, screening candidates, onboarding, training and answering employee questions.

    Legal & Compliance

    AI tools for reviewing contracts, tracking deadlines and preparing compliance work for a qualified person to check.

    IT & Development

    AI tools for developers and IT teams: coding, AI models, agents, infrastructure and integrations.

Find AI tools for your team
AllAssistantsWriting & DocsImagesVideoAudioAI AgentsAutomationCode
← Back to tools

•

2024-05-28

happy-llm logo

happy-llm

Not rated yet

32.4K GitHub stars

Type:

Tool

Platforms:

Github

Task:

Study and learnBuild RAG systemsWrite codeBuild AI appsAutomate software development

Best for:

IT & Development
Visit websiteView on GitHub

Pricing


Pricing information has not been added yet.

Overview

Happy-LLM is a free, open-source educational project from Datawhale that teaches the principles and training process behind large language models. It begins with NLP foundations and progressively explains attention, Transformer architecture, pretrained language-model families, modern LLM design, training strategies, and the capabilities that emerge as models scale.

The course combines theory with implementation. Learners build a small LLaMA2-style model, train tokenizers, experiment with pretraining and supervised fine-tuning, use parameter-efficient techniques such as LoRA and QLoRA, and study practical LLM applications including evaluation, RAG, agents, and newer agentic reinforcement-learning approaches such as GRPO and Search-R1-style workflows.

Happy-LLM is aimed at students, researchers, and AI enthusiasts who already have some Python experience and ideally basic deep-learning knowledge. Unlike tutorials focused only on calling model APIs, it tries to connect mathematical and architectural ideas to executable code, giving learners a path from understanding how LLMs work to training small models and building applications around them.

README

alt text

Happy-LLM

GitHub stars GitHub forks Language GitHub Project SwanLab
datawhalechina%2Fhappy-llm | Trendshift

中文 | English

📚 在线阅读地址

📚 从零开始构建大模型

深入理解 LLM 核心原理,动手实现你的第一个大模型


🎯 项目介绍

  很多小伙伴在看完 Datawhale开源项目: self-llm 开源大模型食用指南 后,感觉意犹未尽,想要深入了解大语言模型的原理和训练过程。于是我们(Datawhale)决定推出《Happy-LLM》项目,旨在帮助大家深入理解大语言模型的原理和训练过程。

  本项目是一个系统性的 LLM 学习教程,将从 NLP 的基本研究方法出发,根据 LLM 的思路及原理逐层深入,依次为读者剖析 LLM 的架构基础和训练过程。同时,我们会结合目前 LLM 领域最主流的代码框架,演练如何亲手搭建、训练一个 LLM,期以实现授之以鱼,更授之以渔。希望大家能从这本书开始走入 LLM 的浩瀚世界,探索 LLM 的无尽可能。

✨ 你将收获什么?

  • 📚 Datawhale 开源免费 完全免费的学习本项目所有内容
  • 🔍 深入理解 Transformer 架构和注意力机制
  • 📚 掌握 预训练语言模型的基本原理
  • 🧠 了解 现有大模型的基本结构
  • 🏗️ 动手实现 一个完整的 LLaMA2 模型
  • ⚙️ 掌握训练 从预训练到微调的全流程
  • 🚀 实战应用 RAG、Agent 等前沿技术

📖 内容导航

章节关键内容状态
学习与环境准备分章依赖、硬件建议与实践入口✅
前言本项目的缘起、背景及读者建议✅
第一章 NLP 基础概念什么是 NLP、发展历程、任务分类、文本表示演进✅
第二章 Transformer 架构注意力机制、Encoder-Decoder、手把手搭建 Transformer✅
第三章 预训练语言模型Encoder-only、Encoder-Decoder、Decoder-Only 模型对比✅
第四章 大语言模型LLM 定义、训练策略、涌现能力分析✅
第五章 动手搭建大模型实现 LLaMA2、训练 Tokenizer、预训练小型 LLM✅
第六章 大模型训练实践预训练、有监督微调、LoRA/QLoRA 高效微调✅
第七章 大模型应用模型评测、RAG 检索增强、Agent 智能体✅
第八章 Agentic-RL GRPO、OPD、Search-R1、ReTool(Coding Agent-RL)✅
Extra Chapter LLM Blog优秀的大模型 学习笔记/Blog ,欢迎大家来 PR !🚧

第六章正文已覆盖 Pretrain、SFT 与 PEFT 等核心训练流程,建议结合 第六章实践说明 和 学习与环境准备 一起阅读。

第八章聚焦 GRPO、OPD、Search-R1 与 ReTool。更多 Agentic RL 算法、训练代码与实验实践,可以前往作者持续维护的另一个仓库 agentic-rl-lab;该仓库更新频率更高,会持续跟进新的算法与环境。

Extra Chapter LLM Blog

  • 大模型都这么厉害了,微调0.6B的小模型有什么意义? @不要葱姜蒜 2025-7-11

  • Transformer 整体模块设计解读 @ditingdapeng 2025-7-14

  • 文本数据处理详解 @蔡鋆捷 2025-7-14

  • Qwen3-"VL"——超小中文多模态模型的“拼接微调”之路 @ShaohonChen 2025-7-30

  • S1: Thinking Budget with vLLM @不要葱姜蒜 2025-8-03

  • CDDRS: 使用细粒度语义信息指导增强的RAG检索方法 @Hongru0306 2025-8-21

  • 大模型生成 Token 的方式有哪些? @不要葱姜蒜 2025-10-17

  如果大家在学习 Happy-LLM 项目或 LLM 相关知识中有自己独到的见解、认知、实践,欢迎大家 PR 在 Extra Chapter LLM Blog 中。请遵守 Extra Chapter LLM Blog 的 PR 规范,我们会视 PR 内容的质量和价值来决定是否合并或补充到 Happy-LLM 正文中来。

模型下载

模型名称下载地址
Happy-LLM-Chapter5-Base-215M🤖 ModelScope
Happy-LLM-Chapter5-SFT-215M🤖 ModelScope

ModelScope 创空间体验地址:🤖 创空间

PDF 版本下载

  本 Happy-LLM PDF 教程完全开源免费。为防止各类营销号加水印后贩卖给大模型初学者,我们特地在 PDF 文件中预先添加了不影响阅读的 Datawhale 开源标志水印,敬请谅解~

Happy-LLM PDF : https://github.com/datawhalechina/happy-llm/releases/tag/v1.0.2

PPT 资源下载

  本项目配套教学讲义PPT课件资源获取链接:https://github.com/HZAI-ZJNU/happy-llm-ppt 或可在本项目的 Releases 页面下载。

💡 如何学习

  本项目适合大学生、研究人员、LLM 爱好者。在学习本项目之前,建议具备一定的编程经验,尤其是要对 Python 编程语言有一定的了解。最好具备深度学习的相关知识,并了解 NLP 领域的相关概念和术语,以便更轻松地学习本项目。

  如果你计划复现章节代码,建议先阅读 学习与环境准备。仓库当前按章节拆分依赖,不同章节建议使用独立的 Python 环境,以减少版本冲突。

  本项目分为两部分——基础知识与实战应用。第1章~第4章是基础知识部分,从浅入深介绍 LLM 的基本原理。其中,第1章简单介绍 NLP 的基本任务和发展,为非 NLP 领域研究者提供参考;第2章介绍 LLM 的基本架构——Transformer,包括原理介绍及代码实现,作为 LLM 最重要的理论基础;第3章整体介绍经典的 PLM,包括 Encoder-Only、Encoder-Decoder 和 Decoder-Only 三种架构,也同时介绍了当前一些主流 LLM 的架构和思想;第4章则正式进入 LLM 部分,详细介绍 LLM 的特点、能力和整体训练过程。第5章~第8章是实战应用部分,将逐步带领大家深入 LLM 的底层细节。其中,第5章将带领大家基于 PyTorch 亲手搭建一个 LLM,并实现预训练、有监督微调的全流程;第6章将引入目前业界主流的 LLM 训练框架 Transformers,带领学习者基于该框架快速、高效地实现 LLM 训练过程;第7章介绍 LLM 的评测、检索增强生成(Retrieval-Augmented Generation,RAG)和智能体(Agent);第8章进一步介绍 GRPO、OPD,以及 Search-R1 与 ReTool 两类 Agentic RL 实践。你可以根据个人兴趣和需求,选择性地阅读相关章节。

  在阅读本书的过程中,建议你将理论和实际相结合。LLM 是一个快速发展、注重实践的领域,我们建议你多投入实战,复现本书提供的各种代码,同时积极参加 LLM 相关的项目与比赛,真正投入到 LLM 开发的浪潮中。我们鼓励你关注 Datawhale 及其他 LLM 相关开源社区,当遇到问题时,你可以随时在本项目的 issue 区提问。

  最后,欢迎每一位读者在学习完本项目后加入到 LLM 开发者的行列。作为国内 AI 开源社区,我们希望充分聚集共创者,一起丰富这个开源 LLM 的世界,打造更多、更全面特色 LLM 的教程。星火点点,汇聚成海。我们希望成为 LLM 与普罗大众的阶梯,以自由、平等的开源精神,拥抱更恢弘而辽阔的 LLM 世界。

  • 中国计算机学会(CCF) × Datawhale × GitLink开源平台联合推出AI普惠课程,免费算力报名参加 【报名地址】【GitLink 地址】

🤝 如何贡献

我们欢迎任何形式的贡献!

  • 🐛 报告 Bug - 发现问题请提交 Issue
  • 💡 功能建议 - 有好想法就告诉我们
  • 📝 内容完善 - 帮助改进教程内容
  • 🔧 代码优化 - 提交 Pull Request

🙏 致谢

核心贡献者

  • 宋志学-项目负责人 (Datawhale成员)
  • 邹雨衡-项目负责人 (Datawhale成员-对外经济贸易大学)
  • 朱信忠-指导专家(Datawhale首席科学家-浙江师范大学杭州人工智能研究院教授)

Extra-Chapter 贡献者

  • ditingdapeng(内容贡献者-云原生基础架构工程师)
  • 蔡鋆捷(内容贡献者-福州大学)
  • ShaohonChen (情感机器实验室研究员-西安电子科技大学在读硕士)
  • 肖鸿儒, 庄健琨 (内容贡献者-同济大学)

特别感谢

  • 感谢 @Sm1les 对本项目的帮助与支持
  • 感谢所有为本项目做出贡献的开发者们 ❤️

Star History

Datawhale

⭐ 如果这个项目对你有帮助,请给我们一个 Star!

关于 Datawhale

Datawhale

扫描二维码关注 Datawhale 公众号,获取更多优质开源内容


📜 开源协议

本作品采用知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议进行许可。

Releases

Release information has not been added yet.

Complete your AI stack

Combine coding assistance with models, automation, app building, and monitoring.

Claude logo
Claude
Reasoning model

Long-context AI assistant focused on reasoning and documents

View tool
n8n logo
n8n
Automate workflows

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

View tool
Best alternatives

Compare similar tools in the same category.

CodeRabbit logo

CodeRabbit

AI-powered code review assistant for pull requests.

OpenClaw logo

OpenClaw

Your own personal AI assistant. Any OS. Any Platform. The lobster way. 🦞

Cursor logo

Cursor

AI coding editor and autonomous software development platform

DeepSeek logo

DeepSeek

AI assistant for reasoning, coding, research, and agent tasks

ECC logo

ECC

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

View all in this category
Help
Pick an answer below
Hi! I can point you to the right tool or guide. What are you looking for?
Browse all articles