Home
Softono
d

datawhalechina

Professional software vendor delivering innovative solutions on the Softono platform. Specialized in both open-source and proprietary software development.

Total Products
22

Software by datawhalechina

easy-vibe
Open Source

easy-vibe

<!-- trigger vercel build --> <div align="center"> <img src="assets/easy-vibe-logo-hd.svg" alt="Easy-Vibe Logo" width="300"> <img src="assets/banner.png" alt="Easy-Vibe Banner" width="100%"> <p align="center" style="font-size: 1.2em; color: #666; margin: 20px 0;"> Jump right in and vibe together — if you can talk, you can build apps.<br> <span style="font-size: 0.9em; color: #888;">直接上手,一起 vibe!会说话就会做应用。</span> </p> <a href="https://trendshift.io/repositories/22079" target="_blank"><img src="https://trendshift.io/api/badge/repositories/22079" alt="datawhalechina/easy-vibe | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a> <p align="center" style="font-size: 1.05em; color: #666; margin: 16px 0;"> 你好 · Hello · 哈囉 · こんにちは · 안녕하세요 · Hola · Bonjour · Hallo · مرحبا · Xin chào<br> Stages 1–3 of our tutorial are now available in 10 languages. Friends around the world, let's start coding together!<br> <span style="font-size: 0.9em; color: #888;">我们的教程(第一至第三部分)已经支持 10 种语言,欢迎世界各地的朋友一起 coding!</span> </p> <p align="center"> 🚀 <a href="https://datawhalechina.github.io/easy-vibe/welcome.html">Start Exploring</a> · ✨ <a href="https://datawhalechina.github.io/easy-vibe/en/appendix/">Interactive Tutorial</a> · 🦞 <a href="https://github.com/datawhalechina/hello-claw">Learn OpenClaw</a> · 📖 <a href="#table-of-contents">Table of Contents</a><br> <span style="font-size: 0.85em; color: #888;">🚀 <a href="https://datawhalechina.github.io/easy-vibe/welcome.html">开始体验</a> · ✨ <a href="https://datawhalechina.github.io/easy-vibe/zh-cn/appendix/">交互式教程</a> · 🦞 <a href="https://github.com/datawhalechina/hello-claw">学习 OpenClaw</a> · 📖 <a href="#table-of-contents">查看目录</a></span> </p> <p align="center"> <a href="https://datawhalechina.github.io/easy-vibe/welcome.html">Read Online</a> · <a href="#-content-navigation">Learning Map</a><br> <span style="font-size: 0.85em; color: #888;"> <a href="https://datawhalechina.github.io/easy-vibe/welcome.html">开始阅读</a> · <a href="#-content-navigation">学习地图</a> </span> </p> <p align="center"> <a href="https://github.com/datawhalechina/easy-vibe/stargazers" target="_blank"> <img src="https://img.shields.io/github/stars/datawhalechina/easy-vibe?color=660874&style=for-the-badge&logo=star&logoColor=white&labelColor=1a1a2e" alt="Stars"></a> <a href="https://github.com/datawhalechina/easy-vibe/network/members" target="_blank"> <img src="https://img.shields.io/github/forks/datawhalechina/easy-vibe?color=660874&style=for-the-badge&logo=git-fork&logoColor=white&labelColor=1a1a2e" alt="Forks"></a> <a href="LICENSE" target="_blank"> <img src="https://img.shields.io/badge/License-CC_BY_NC_SA_4.0-4ecdc4?style=for-the-badge&logo=creative-commons&logoColor=white&labelColor=1a1a2e" alt="License"></a> </p> <p align="center"> <a href="README.md"><img alt="English" src="https://img.shields.io/badge/English-d9d9d9"></a> <a href="docs-readme/zh-CN/README.md"><img alt="简体中文" src="https://img.shields.io/badge/简体中文-d9d9d9"></a> <a href="docs-readme/zh-TW/README.md"><img alt="繁體中文" src="https://img.shields.io/badge/繁體中文-d9d9d9"></a> <a href="docs-readme/ja-JP/README.md"><img alt="日本語" src="https://img.shields.io/badge/日本語-d9d9d9"></a> <a href="docs-readme/es-ES/README.md"><img alt="Español" src="https://img.shields.io/badge/Español-d9d9d9"></a> <a href="docs-readme/fr-FR/README.md"><img alt="Français" src="https://img.shields.io/badge/Français-d9d9d9"></a> <a href="docs-readme/ko-KR/README.md"><img alt="한국어" src="https://img.shields.io/badge/한국어-d9d9d9"></a> <a href="docs-readme/ar-SA/README.md"><img alt="العربية" src="https://img.shields.io/badge/العربية-d9d9d9"></a> <a href="docs-readme/vi-VN/README.md"><img alt="Tiếng_Việt" src="https://img.shields.io/badge/Tiếng_Việt-d9d9d9"></a> <a href="docs-readme/de-DE/README.md"><img alt="Deutsch" src="https://img.shields.io/badge/Deutsch-d9d9d9"></a> </p> </div> <table align="center"> <tr> <td width="50%" valign="top" align="center"> <img src="assets/gif-header.png" width="100%"> <br> <strong>A beginner-friendly learning map</strong> <br> <sub>Clear guidance from zero, so you can stop "learning and forgetting"</sub> </td> <td width="50%" valign="top" align="center"> <img src="assets/gif-tutorial.png" width="100%"> <br> <strong>Step-by-step visual tutorials</strong> <br> <sub>Detailed walkthroughs that feel like learning with a private tutor</sub> </td> </tr> <tr> <td width="50%" valign="top" align="center"> <img src="assets/gif-ide.gif" width="100%"> <br> <strong>Immersive simulated coding</strong> <br> <sub>Virtual mouse guidance helps you quickly learn the core IDE workflow</sub> </td> <td width="50%" valign="top" align="center"> <img src="assets/gif-diffusion.gif" width="100%"> <br> <strong>Visible AI principles</strong> <br> <sub>Animated explanations make it easy to see how AI generates images</sub> </td> </tr> <tr> <td width="50%" valign="top" align="center"> <img src="assets/gif-rag.gif" width="100%"> <br> <strong>Learn RAG like a game</strong> <br> <sub>Interactive components let you click through the full RAG data flow</sub> </td> <td width="50%" valign="top" align="center"> <img src="assets/git-terminal.gif" width="100%"> <br> <strong>Visual terminal concepts</strong> <br> <sub>Command-line behavior becomes intuitive when the underlying logic is visualized</sub> </td> </tr> </table> <div align="center"> <h3>⭐ <a href="https://github.com/datawhalechina/easy-vibe" style="color: #d0cd16ff;">Star the repo here</a> to help accelerate updates ❤️</h3> </div> <div align="center" style="margin: 30px 0;"> <a href="https://github.com/datawhalechina/easy-vibe/issues/new?template=story_submission.md"> <img src="https://raw.githubusercontent.com/datawhalechina/easy-vibe/main/assets/stories_image.png" alt="Share Your Vibe Story" width="80%" style="border-radius: 10px; box-shadow: 0 4px 12px rgba(0,0,0,0.15);"> </a> <p style="margin-top: 15px; font-size: 1.1em; color: #666;"> 📝 <strong>Have your own vibe coding story?</strong> Submit it here and inspire others! </p> </div> ## Table of Contents - [Why Easy-Vibe](#why-easy-vibe) - [News](#-news) - [Who This Is For](#who-this-is-for) - [Your Learning Paths](#your-learning-paths) - [Study Suggestions](#study-suggestions) - [I. Beginner Entry](#i-beginner-entry) - [II. Junior and Mid-Level Developers](#ii-junior-and-mid-level-developers) - [III. Advanced Developers](#iii-advanced-developers) - [Appendix Knowledge Base](#-appendix-knowledge-base) - [How To Learn](#️-how-to-learn) - [Run Locally](#-run-locally) - [Other Courses](#other-courses) - [Contributing & Contributors](#-contributing--contributors) - [LICENSE](#-license) ## Why Easy-Vibe Want an expense tracker? Say it. Need a booking system with WeChat login? Say it. Want a blog with comments? Say it. In the AI era, programming starts by describing what you want. Easy-Vibe teaches you how to turn that into a real product. ## 🔥 News - **[2026-05-31]** 🌍 **Stage 3 multilingual coverage is now complete**: Stage 3 (Advanced Developer) is fully available across all supported locales (zh-cn, en, zh-tw, ja-jp, ko-kr, es-es, fr-fr, de-de, ar-sa, vi-vn), covering 25 chapters of core skills, cross-platform development, personal brand, and AI advanced topics. - **[2026-05-26]** 🌍 **Stage 2 multilingual coverage is now complete**: Stage 2 (Junior Developer) is fully available across all supported locales (zh-cn, en, zh-tw, ja-jp, ko-kr, es-es, fr-fr, de-de, ar-sa, vi-vn), covering 24 chapters of frontend, backend, AI capabilities, and comprehensive projects. - **[2026-05-20]** 🌍 **Stage 1 multilingual coverage is now complete**: Stage 1 is fully available across all supported locales (zh-cn, en, zh-tw, ja-jp, ko-kr, es-es, fr-fr, de-de, ar-sa, vi-vn). Navigation/build checks have been verified to avoid 404s. - **[2026-03-29]** ✨ **Vibe Stories launched and upgraded with real user journeys**: Added a new homepage Vibe Stories section with an interactive carousel and dedicated story pages, then replaced placeholder content with four real user stories featuring a rural primary school teacher, a college student, a high school IT teacher, and a truck driver who built real products with AI. [👉 View the stories](https://datawhalechina.github.io/easy-vibe/zh-cn/vibe-stories/story-1.html) - **[2026-03-26]** 🚀 **Major Stage 2 practice update**: Completed the SaaS capstone project "[Your First SaaS Full-Stack App: Copywriting Generator Website](https://datawhalechina.github.io/easy-vibe/en/stage-2/assignments/fullstack-app/)" and substantially expanded the "[How to integrate Stripe and payment systems](https://datawhalechina.github.io/easy-vibe/en/stage-2/backend/stripe-payment/)" section, plus key content around multi-product UI and WeChat Mini Program backend workflows. - **[2026-03-25]** 📚 **New appendix: User Research and Requirement Validation**: Added four new articles covering idea sourcing, the Double Diamond model, Jobs to Be Done, and The Mom Test to help beginners discover and validate product ideas. [👉 Read the appendix](https://datawhalechina.github.io/easy-vibe/en/appendix/) - **[2026-03-25]** 📚 **English documentation fully updated**: Stage 2 (Full-stack Development) and Stage 3 (Advanced Development) are now fully available in English. [👉 Start learning](https://datawhalechina.github.io/easy-vibe/en/stage-2/) <details> <summary>Past News</summary> - **[2026-03-02]** 🦞 **OpenClaw and AI Agent friendly support**: Added `llms.txt` so OpenClaw, Claude, Cursor, Trae, and other AI agents can quickly understand the repository structure and find the right tutorial content. - **[2026-03-01]** The [Advanced Development section](https://datawhalechina.github.io/easy-vibe/en/stage-3/) has been comprehensively upgraded with deep guides for Claude Code, including MCP, Skills, Agent Teams, and more, along with eight cross-platform project tutorials. - **[2026-02-25]** Updated the [Appendix Knowledge Base](https://datawhalechina.github.io/easy-vibe/en/appendix/), now covering 9 knowledge areas and 80+ interactive topics. - **[2026-01-27]** Added Android and iOS app development tutorials. - **[2026-01-19]** Released interactive demos for Prompt Engineering, AI history, authentication design, Git principles, and more. - **[2026-01-16]** Reorganized the project structure and formally established a beginner entry path. - **[2026-01-14]** Completed a large update to the Stage 1 product prototyping docs. - **[2026-01-13]** Refactored the documentation architecture and fully enabled multi-language support. - **[2026-01-01]** Released the core learning map for the project. </details> ## Who This Is For - **Complete beginners**: Build your first project first, then understand how it works - **Product managers / founders**: Validate ideas fast and build MVPs at low cost - **Students**: Develop practical skills for the AI era - **Junior developers**: Learn the full path from idea to launch - **Mid-level and senior developers**: Upgrade your AI collaboration workflow for complex projects ## Your Learning Paths ### 🎮 I want a fast first win **Best for**: Everyone **What you will learn**: What AI coding actually feels like through a simple, concrete hands-on example **What you will get**: A clear first impression of vibe coding and how to work with AI by conversation [Start here](https://datawhalechina.github.io/easy-vibe/en/stage-1/ai-capabilities-through-games/) ### 💡 I want to turn an idea into a product prototype **Best for**: Beginners / product managers / founders **What you will learn**: Learning roadmap, AI IDE tools, idea validation, prototyping, AI capability integration, and full demo iteration **What you will get**: A demoable AI product prototype you can actually show to users or teammates [Start learning](https://datawhalechina.github.io/easy-vibe/en/stage-1/learning-map/) ### 🚀 I want to build full-stack products end to end **Best for**: Junior developers / indie hackers / advanced learners **What you will learn**: Frontend workflows, design-to-code, databases, backend APIs, deployment, billing, and major projects **What you will get**: The ability to independently ship modern AI-enabled web applications [Start learning](https://datawhalechina.github.io/easy-vibe/en/stage-2/) ### AI-Native: I want advanced Claude Code and agent workflows **Best for**: Developers interested in AI-native engineering **What you will learn**: Claude Code, MCP, Skills, Agent Teams, long-running tasks, Spec Coding, and cross-platform app delivery **What you will get**: A stronger workflow for complex AI-assisted development and automation [Go to advanced development](https://datawhalechina.github.io/easy-vibe/en/stage-3/) ### 📚 I want reference material and fundamentals **Best for**: Everyone **What you will learn**: Computer fundamentals, frontend/backend basics, infrastructure, AI principles, and engineering practices **What you will get**: A long-term reference knowledge base covering 9 major knowledge areas [Browse the knowledge base](https://datawhalechina.github.io/easy-vibe/en/appendix/) ## Study Suggestions - If you are a beginner, product manager, or founder, start with [Stage 1](https://datawhalechina.github.io/easy-vibe/en/stage-1/learning-map/) - If you want to move from prototypes to full-stack delivery, start with [Stage 2](https://datawhalechina.github.io/easy-vibe/en/stage-2/) - If you want advanced Claude Code workflows or cross-platform projects, go to [Stage 3](https://datawhalechina.github.io/easy-vibe/en/stage-3/) - If you get blocked by concepts or missing background knowledge, use the [Appendix Knowledge Base](https://datawhalechina.github.io/easy-vibe/en/appendix/) ### 📖 Content Navigation <div align="center"> <img src="assets/readme-image1.png" alt="Learning Map" width="70%" style="border-radius: 10px; box-shadow: 0 8px 20px rgba(45,55,72,0.3); margin: 15px 0;"/> </div> ### I. Beginner Entry | Section | Key Content | | :------ | :---------- | | [Learning Map](https://datawhalechina.github.io/easy-vibe/en/stage-1/learning-map/) | A guided overview of the full learning journey | | [AI Era: If You Can Speak, You Can Code](https://datawhalechina.github.io/easy-vibe/en/stage-1/ai-capabilities-through-games/) | Get your first feel for AI coding through examples like Snake | | [Master AI Programming Tools](https://datawhalechina.github.io/easy-vibe/en/stage-1/introduction-to-ai-ide/) | Learn how AI IDE tools work and build simple local projects with them | | [Find Great Ideas](https://datawhalechina.github.io/easy-vibe/en/stage-1/finding-great-idea/) | Learn how to discover and validate product ideas worth building | | [Build Product Prototypes](https://datawhalechina.github.io/easy-vibe/en/stage-1/building-prototype/) | Move from requirements to single-page and multi-page product prototypes | | [Integrate AI Capabilities](https://datawhalechina.github.io/easy-vibe/en/stage-1/integrating-ai-capabilities/) | Integrate text, image, and video AI features | | [Complete project practice](https://datawhalechina.github.io/easy-vibe/en/stage-1/complete-project-practice/) | Simulate real scenarios, collect user feedback, and iterate on a full project | #### Appendix: Product and Business Thinking | Section | Key Content | | :------ | :---------- | | [Product Thinking and Solution Design](https://datawhalechina.github.io/easy-vibe/en/stage-1/appendix-a-product-thinking/) | Core frameworks for going from zero to one with a product | | [AI Industry Application Scenarios (B-end)](https://datawhalechina.github.io/easy-vibe/en/stage-1/appendix-industry-scenarios/) | Understand how AI is applied across industries | | [AI Consumer Scenarios Inspiration (C-end)](https://datawhalechina.github.io/easy-vibe/en/stage-1/appendix-c-consumer-scenarios/) | Explore product opportunities in consumer AI | #### Appendix: User Research and Requirement Validation | Section | Key Content | | :------ | :---------- | | [Where to find ideas: 3 reference sources that work best for beginners](https://datawhalechina.github.io/easy-vibe/en/stage-1/appendix-idea-sources/) | Build a reliable pipeline for finding concrete product opportunities | | [Double Diamond: first do the right thing, then do it right](https://datawhalechina.github.io/easy-vibe/en/stage-1/appendix-double-diamond/) | Use a structured process to move from scattered inspiration to a workable direction | | [Use Jobs to Be Done to find what users really want done](https://datawhalechina.github.io/easy-vibe/en/stage-1/appendix-jobs-to-be-done/) | Analyze user goals through real tasks instead of surface-level feature requests | | [The Mom Test: a user interview method for validating demand](https://datawhalechina.github.io/easy-vibe/en/stage-1/appendix-mom-test/) | Learn how to ask better questions and avoid false-positive feedback | #### Appendix: Technical Solutions | Section | Key Content | | :------ | :---------- | | [What to do if you encounter errors](https://datawhalechina.github.io/easy-vibe/en/stage-1/appendix-b-common-errors/) | Common vibe coding issues and how to troubleshoot them | | [Comparison of Seven AI Programming Tools](https://datawhalechina.github.io/easy-vibe/en/stage-1/appendix-articles/example0-1/vibe-coding-tools-snake-game-tutorial) | Compare major AI coding platforms through hands-on testing | | [Design Websites with Agents](https://datawhalechina.github.io/easy-vibe/en/stage-1/appendix-articles/example0-2/vibe-coding-tools-build-website-with-ai-coding-and-design-agents) | Learn multi-agent collaboration in practice | ### II. Junior and Mid-Level Developers #### Frontend | Section | Key Content | | :------ | :---------- | | [Frontend 0: Build Your Own Asset-Production Agent with Lovart](https://datawhalechina.github.io/easy-vibe/en/stage-2/frontend/lovart-assets/) | Use Nanobanana and Lovart to batch-generate visual assets and build a drawing agent with intent recognition | | [Frontend 1: Figma & MasterGo Basics](https://datawhalechina.github.io/easy-vibe/en/stage-2/frontend/figma-mastergo/) | Learn the workflow from design drafts to implementation-ready UI thinking | | [Frontend 2: Build Your First Modern App - UI Design](https://datawhalechina.github.io/easy-vibe/en/stage-2/frontend/ui-design/) | Learn the UI design foundations behind modern application interfaces | | [Frontend 3: UI Guidelines and Multi-Product Design](https://datawhalechina.github.io/easy-vibe/en/stage-2/frontend/multi-product-ui/) | Improve consistency and aesthetics across multiple products with shared UI rules | | [Frontend 4: Make Interfaces Beautiful with LLMs and Skills](https://datawhalechina.github.io/easy-vibe/en/stage-2/frontend/llm-skills-beautiful/) | Use prompts and plugins to make AI generate more polished, distinctive interfaces | | [Frontend 4: Let's Build Hogwarts Portraits](https://datawhalechina.github.io/easy-vibe/en/stage-2/frontend/hogwarts-portraits/) | Build an interactive AI-image frontend project from scratch | | [Frontend 6: From Design Prototype to Project Code](https://datawhalechina.github.io/easy-vibe/en/stage-2/frontend/design-to-code/) | Turn design prototypes into frontend code that can really run in the browser | | [Frontend 7: Upgrade Your UI with Modern Component Libraries](https://datawhalechina.github.io/easy-vibe/en/stage-2/frontend/modern-component-library/) | Use component libraries to build professional interfaces faster | #### Backend | Section | Key Content | | :------ | :---------- | | [Backend 1: Learn Git and GitHub](https://datawhalechina.github.io/easy-vibe/en/stage-2/backend/git-workflow/) | Master core version control operations and collaboration workflows with Git | | [Backend 2: From Database to Supabase](https://datawhalechina.github.io/easy-vibe/en/stage-2/backend/database-supabase/) | Learn relational database basics and use Supabase as a modern BaaS platform | | [Backend 3: Backend API Design and Development](https://datawhalechina.github.io/easy-vibe/en/stage-2/backend/ai-interface-code/) | Use AI to assist API design, backend code generation, and API documentation | | [Backend 4: Ship Your Product Prototype](https://datawhalechina.github.io/easy-vibe/en/stage-2/backend/zeabur-deployment/) | Quickly deploy full-stack applications to the cloud with Zeabur | | [Backend 5: From IDEs to CLI AI Coding Tools](https://datawhalechina.github.io/easy-vibe/en/stage-2/backend/modern-cli/) | Explore terminal-first AI coding workflows for modern development | | [Backend 6: Integrate Stripe and Other Billing Systems](https://datawhalechina.github.io/easy-vibe/en/stage-2/backend/stripe-payment/) | Add monetization with payment and billing capabilities | #### Major Projects | Section | Key Content | | :------ | :---------- | | [Major Project 1: Your First SaaS Full-Stack App - AI Copywriting Website](https://datawhalechina.github.io/easy-vibe/en/stage-2/assignments/fullstack-app/) | Build an AI marketing copy workspace with login, generation, billing, and admin management | | [Major Project 2: Online Exam and Management System](https://datawhalechina.github.io/easy-vibe/en/stage-2/assignments/modern-frontend-trae/) | Build an online exam system with question generation, test-taking flows, and admin tools | #### AI Capabilities Appendix | Section | Key Content | | :------ | :---------- | | [AI 1: Dify Basics & Knowledge Base Integration](https://datawhalechina.github.io/easy-vibe/en/stage-2/ai-capabilities/dify-knowledge-base/) | Learn to build AI applications with Dify and integrate private knowledge bases | ### III. Advanced Developers #### Claude Code Core Skills | Section | Key Content | | :------ | :---------- | | [Getting started with Claude Code](https://datawhalechina.github.io/easy-vibe/en/stage-3/core-skills/basics/) | Installation, setup, fundamentals, and useful commands | | [Claude Code MCP guide](https://datawhalechina.github.io/easy-vibe/en/stage-3/core-skills/mcp/) | Connect Claude Code to GitHub, databases, APIs, and other services through MCP | | [Claude Code Skills guide](https://datawhalechina.github.io/easy-vibe/en/stage-3/core-skills/skills/) | Package expertise into reusable skills you can use again and again | | [How to keep Claude Code working for long-running tasks](https://datawhalechina.github.io/easy-vibe/en/stage-3/core-skills/long-running-tasks/) | Design long-running tasks so coding tools can keep working until the job is done | | [Claude Agent Teams guide](https://datawhalechina.github.io/easy-vibe/en/stage-3/core-skills/agent-teams/) | Coordinate multiple AI instances like a real development team | | [Claude Code Superpowers for engineering-grade development](https://datawhalechina.github.io/easy-vibe/en/stage-3/core-skills/superpowers/) | Help AI produce engineering-grade code with TDD and best practices | | [Claude Code workflow best practices](https://datawhalechina.github.io/easy-vibe/en/stage-3/core-skills/workflow/) | Best practices for refactoring, code review, and daily development | | [Claude Code remote development on mobile](https://datawhalechina.github.io/easy-vibe/en/stage-3/core-skills/mobile-development/) | Use Claude Code beyond the desktop and build a productive remote workflow on mobile devices | | [Claude Agent SDK complete guide](https://datawhalechina.github.io/easy-vibe/en/stage-3/core-skills/claude-agent-sdk/) | Build custom agent workflows and integrate Claude into your own tools with the SDK | | [From vibe coding to spec coding](https://datawhalechina.github.io/easy-vibe/en/stage-3/core-skills/spec-coding/) | Move from ad-hoc prompting to a more structured, specification-driven AI development workflow | #### Cross-Platform Development | Section | Key Content | | :------ | :---------- | | [How to choose the right platform for your app](https://datawhalechina.github.io/easy-vibe/en/stage-3/cross-platform/choose-platform/) | Compare app forms and choose the right platform based on users, scenarios, and delivery goals | | [Build a WeChat Mini Program](https://datawhalechina.github.io/easy-vibe/en/stage-3/cross-platform/wechat-miniprogram/) | Understand the ecosystem and ship a frontend mini program from template to launch | | [Build a WeChat Mini Program with backend](https://datawhalechina.github.io/easy-vibe/en/stage-3/cross-platform/wechat-miniprogram-backend/) | Add backend logic and databases to complete the full business loop | | [Build an Android app](https://datawhalechina.github.io/easy-vibe/en/stage-3/cross-platform/android-app/) | Learn Android app development with a modern native workflow | | [Build an iOS app](https://datawhalechina.github.io/easy-vibe/en/stage-3/cross-platform/ios-app/) | Learn iOS app development and the conventions of the Apple ecosystem | | [Build a local PWA app](https://datawhalechina.github.io/easy-vibe/en/stage-3/cross-platform/pwa-local-app/) | Turn a website into a real app with offline support, push, and installation | | [Build a browser AI assistant extension](https://datawhalechina.github.io/easy-vibe/en/stage-3/cross-platform/browser-ai-extension/) | Create a Chrome extension that summarizes any page with either cloud APIs or built-in AI | | [Build an Electron desktop app](https://datawhalechina.github.io/easy-vibe/en/stage-3/cross-platform/electron-voice-to-text/) | Build a voice-to-text desktop app with Electron for three platforms | | [Rapidly build and mint an NFT](https://datawhalechina.github.io/easy-vibe/en/stage-3/cross-platform/nft-minting/) | Write a smart contract from scratch, deploy it, and mint your own NFT | | [Build a VS Code extension](https://datawhalechina.github.io/easy-vibe/en/stage-3/cross-platform/vscode-extension/) | Build an AI project assistant with templates, code chat, and multi-file Q&A | | [Build an industrial-grade Qt desktop app](https://datawhalechina.github.io/easy-vibe/en/stage-3/cross-platform/qt-industrial-hmi/) | Create a real-time Qt HMI system with trends, alerts, and monitoring | #### AI Capabilities Appendix | Section | Key Content | | :------ | :---------- | | [What is RAG and how does it work](https://datawhalechina.github.io/easy-vibe/en/stage-3/ai-advanced/rag-introduction/) | Build a systematic understanding of RAG principles and common architectures | | [Intermediate and advanced RAG workflows with LangGraph](https://datawhalechina.github.io/easy-vibe/en/stage-3/ai-advanced/langgraph-advanced-rag/) | Design multi-step workflows and more advanced RAG systems | ### 📚 Appendix Knowledge Base > Covering **9 major knowledge areas** and **80+ interactive topics**, this appendix uses animation and visual components to help you intuitively understand core concepts from computer fundamentals to the AI frontier. > > 👉 [View the full appendix](https://datawhalechina.github.io/easy-vibe/en/appendix/) ### 🎓 Other Courses - [Hands-on Modern RL](#other-courses) - [Learn Harness Engineering](#other-courses) ## 🛠️ How To Learn - Read and practice the sections that match your current level. If you get stuck, feel free to open an issue. ## 💻 Run Locally ### Modern approach In an AI IDE chat window such as VS Code, Cursor, or Trae, you can simply say: ```text Please help me run this project locally. ``` ### Traditional approach 1. `npm install` 2. `npm run dev` 3. Open `http://localhost:3000` in your browser. ## Other Courses Our team has also created other courses! Check them out: [![Hands-on Modern RL](https://img.shields.io/badge/HANDS--ON_MODERN_RL-0052cc?style=for-the-badge)](https://github.com/walkinglabs/hands-on-modern-rl) **Hands-on Modern RL**: An open-source, hands-on curriculum bridging the gap from basic RL concepts to LLM alignment, RLVR, and advanced Agentic systems. [![Learn Harness Engineering](https://img.shields.io/badge/LEARN_HARNESS_ENGINEERING-0052cc?style=for-the-badge)](https://github.com/walkinglabs/learn-harness-engineering/tree/main) **Learn Harness Engineering**: A comprehensive guide to harness engineering. ## 🤝 Contributing & Contributors - If you find an issue or see something that can be improved, feel free to open an issue. If nobody replies, you can also contact the [Datawhale support team](https://github.com/datawhalechina/DOPMC/blob/main/OP.md). - If you want to contribute, open a pull request. If nobody replies, you can also contact the [Datawhale support team](https://github.com/datawhalechina/DOPMC/blob/main/OP.md). - If you want to start a new Datawhale open-source project, please follow the [Datawhale Open Source Project Guide](https://github.com/datawhalechina/DOPMC/blob/main/GUIDE.md). ### 🙏 Contributors - [Sanbu - Project Lead](https://github.com/sanbuphy) (Datawhale member) - Fang Ke - Mentor (Datawhale member, Tsinghua University) - [Yerim Kang](https://github.com/yerim25) (Practice projects, Tsinghua University) - [Zhilin Zhao](https://github.com/ChileenZ) (Practice projects, Tsinghua University) - [Yixuan Li](https://yixuan20.github.io/) (Visual design, Tsinghua University) - Siyi Liu (Practice projects, Tsinghua University) - [Lixin Liu](https://github.com/liulx25xx) (Practice projects, Tsinghua University) - Everyone in the AI Vibe Coding 101 internal testing group who shared suggestions and feedback ### Special Thanks - Thanks to [@Sm1les](https://github.com/Sm1les) for the help and support on this project - Thanks to every contributor and everyone who supported the project with feedback and stars ❤️ <div align="center"> <a href="https://www.star-history.com/#datawhalechina/easy-vibe&type=timeline&legend=top-left"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=datawhalechina/easy-vibe&type=timeline&theme=dark&legend=top-left" /> <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=datawhalechina/easy-vibe&type=timeline&legend=top-left" /> </picture> </a> </div> <div align=center style="margin-top: 30px;"> <a href="https://github.com/datawhalechina/easy-vibe/graphs/contributors"> <img src="https://contrib.rocks/image?repo=datawhalechina/easy-vibe" /> </a> </div> ## 📄 LICENSE <div align="center"> <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"> <img alt="Creative Commons License" style="border-width:0" src="https://img.shields.io/badge/license-CC%20BY--NC--SA%204.0-lightgrey" /> </a> <br /> This work is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"> Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License </a>. </div> ## Star History [![Star History Chart](https://api.star-history.com/svg?repos=datawhalechina/easy-vibe&type=date&legend=top-left)](https://www.star-history.com/#datawhalechina/easy-vibe&type=date&legend=top-left)

Education & Learning
16.6K Github Stars
hello-agents
Open Source

hello-agents

<div align="right"> <a href="./README_EN.md">English</a> | 中文 </div> <div align='center'> <img src="./docs/images/hello-agents.png" alt="alt text" width="100%"> <h1>Hello-Agents</h1> <h3>🤖 《从零开始构建智能体》</h3> <div align="center"> <a href="https://trendshift.io/repositories/15520" target="_blank"> <img src="https://trendshift.io/api/badge/repositories/15520" alt="datawhalechina%2Fhello-agents | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/> </a> </div> <p><em>从基础理论到实际应用,全面掌握智能体系统的设计与实现</em></p> <img src="https://img.shields.io/github/stars/datawhalechina/Hello-Agents?style=flat&logo=github" alt="GitHub stars"/> <img src="https://img.shields.io/github/forks/datawhalechina/Hello-Agents?style=flat&logo=github" alt="GitHub forks"/> <img src="https://img.shields.io/badge/language-Chinese-brightgreen?style=flat" alt="Language"/> <a href="https://github.com/datawhalechina/Hello-Agents"><img src="https://img.shields.io/badge/GitHub-Project-blue?style=flat&logo=github" alt="GitHub Project"></a> <a href="https://datawhalechina.github.io/hello-agents/"><img src="https://img.shields.io/badge/在线阅读-Online%20Reading-green?style=flat&logo=gitbook" alt="Online Reading"></a> </div> --- ## 🎯 项目介绍 &emsp;&emsp;如果说 2024 年是"百模大战"的元年,那么 2025 年无疑开启了"Agent 元年"。技术的焦点正从训练更大的基础模型,转向构建更聪明的智能体应用。然而,当前系统性、重实践的教程却极度匮乏。为此,我们发起了 Hello-Agents 项目,希望能为社区提供一本从零开始、理论与实战并重的智能体系统构建指南。 &emsp;&emsp;Hello-Agents 是 Datawhale 社区的<strong>系统性智能体学习教程</strong>。如今 Agent 构建主要分为两派,一派是 Dify,Coze,n8n 这类软件工程类 Agent,其本质是流程驱动的软件开发,LLM 作为数据处理的后端;另一派则是 AI 原生的 Agent,即真正以 AI 驱动的 Agent。本教程旨在带领大家深入理解并构建后者——真正的 AI Native Agent。教程将带领你穿透框架表象,从智能体的核心原理出发,深入其核心架构,理解其经典范式,并最终亲手构建起属于自己的多智能体应用。我们相信,最好的学习方式就是动手实践。希望这本教程能成为你探索智能体世界的起点,能够从一名大语言模型的"使用者",蜕变为一名智能体系统的"构建者"。 ## 📚 快速开始 ### 在线阅读 **[🌐 国外访问](https://datawhalechina.github.io/hello-agents/)** | **[🚀 国内加速](https://hello-agents.datawhale.cc)** - 无需下载,随时随地学习 ### 本地阅读 如果您希望在本地阅读或贡献内容,请参考下方的学习指南。 ### ✨ 你将收获什么? - 📖 <strong>Datawhale 开源免费</strong> 完全免费学习本项目所有内容,与社区共同成长 - 🔍 <strong>理解核心原理</strong> 深入理解智能体的概念、历史与经典范式 - 🏗️ <strong>亲手实现</strong> 掌握热门低代码平台和智能体代码框架的使用 - 🛠️ <strong>自研框架 [HelloAgents](https://github.com/jjyaoao/helloagents)</strong> 基于 Openai 原生 API 从零构建一个自己的智能体框架 - ⚙️ <strong>掌握高级技能</strong> 一步步实现上下文工程、Memory、协议、评估等系统性技术 - 🤝 <strong>模型训练</strong> 掌握 Agentic RL,从 SFT 到 GRPO 的全流程实战训练 LLM - 🚀 <strong>驱动真实案例</strong> 实战开发智能旅行助手、赛博小镇等综合项目 - 📖 <strong>求职面试</strong> 学习智能体求职相关面试问题 ## 📖 内容导航 | 章节 | 关键内容 | 状态 | | ------------------------------------------------------------------------------------------- | --------------------------------------------- | ---- | | [前言](./docs/前言.md) | 项目的缘起、背景及读者建议 | ✅ | | <strong>第一部分:智能体与语言模型基础</strong> | | | | [第一章 初识智能体](./docs/chapter1/第一章%20初识智能体.md) | 智能体定义、类型、范式与应用 | ✅ | | [第二章 智能体发展史](./docs/chapter2/第二章%20智能体发展史.md) | 从符号主义到 LLM 驱动的智能体演进 | ✅ | | [第三章 大语言模型基础](./docs/chapter3/第三章%20大语言模型基础.md) | Transformer、提示、主流 LLM 及其局限 | ✅ | | <strong>第二部分:构建你的大语言模型智能体</strong> | | | | [第四章 智能体经典范式构建](./docs/chapter4/第四章%20智能体经典范式构建.md) | 手把手实现 ReAct、Plan-and-Solve、Reflection | ✅ | | [第五章 基于低代码平台的智能体搭建](./docs/chapter5/第五章%20基于低代码平台的智能体搭建.md) | 了解 Coze、Dify、n8n 等低代码智能体平台使用 | ✅ | | [第六章 框架开发实践](./docs/chapter6/第六章%20框架开发实践.md) | AutoGen、AgentScope、LangGraph 等主流框架应用 | ✅ | | [第七章 构建你的Agent框架](./docs/chapter7/第七章%20构建你的Agent框架.md) | 从 0 开始构建智能体框架 | ✅ | | <strong>第三部分:高级知识扩展</strong> | | | | [第八章 记忆与检索](./docs/chapter8/第八章%20记忆与检索.md) | 记忆系统,RAG,存储 | ✅ | | [第九章 上下文工程](./docs/chapter9/第九章%20上下文工程.md) | 持续交互的"情境理解" | ✅ | | [第十章 智能体通信协议](./docs/chapter10/第十章%20智能体通信协议.md) | MCP、A2A、ANP 等协议解析 | ✅ | | [第十一章 Agentic-RL](./docs/chapter11/第十一章%20Agentic-RL.md) | 从 SFT 到 GRPO 的 LLM 训练实战 | ✅ | | [第十二章 智能体性能评估](./docs/chapter12/第十二章%20智能体性能评估.md) | 核心指标、基准测试与评估框架 | ✅ | | <strong>第四部分:综合案例进阶</strong> | | | | [第十三章 智能旅行助手](./docs/chapter13/第十三章%20智能旅行助手.md) | MCP 与多智能体协作的真实世界应用 | ✅ | | [第十四章 自动化深度研究智能体](./docs/chapter14/第十四章%20自动化深度研究智能体.md) | DeepResearch Agent 复现与解析 | ✅ | | [第十五章 构建赛博小镇](./docs/chapter15/第十五章%20构建赛博小镇.md) | Agent 与游戏的结合,模拟社会动态 | ✅ | | <strong>第五部分:毕业设计及未来展望</strong> | | | | [第十六章 毕业设计](./docs/chapter16/第十六章%20毕业设计.md) | 构建属于你的完整多智能体应用 | ✅ | ### 社区贡献精选 (Community Blog) &emsp;&emsp;欢迎大家将在学习 Hello-Agents 或 Agent 相关技术中的独到见解、实践总结,以 PR 的形式贡献到社区精选。如果是独立于正文的内容,也可以投稿至 Extra-Chapter!<strong>期待你的第一次贡献!</strong> | 社区精选 | 内容总结 | | --------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------- | | [00-共创毕业设计](https://github.com/datawhalechina/hello-agents/blob/main/Co-creation-projects) | 社区共创毕业设计项目 | | [01-Agent面试题总结](https://github.com/datawhalechina/hello-agents/blob/main/Extra-Chapter/Extra01-面试问题总结.md) | Agent 岗位相关面试问题 | | [01-Agent面试题答案](https://github.com/datawhalechina/hello-agents/blob/main/Extra-Chapter/Extra01-参考答案.md) | 相关面试问题答案 | | [02-上下文工程内容补充](https://github.com/datawhalechina/hello-agents/blob/main/Extra-Chapter/Extra02-上下文工程补充知识.md) | 上下文工程内容扩展 | | [03-Dify智能体创建保姆级教程](https://github.com/datawhalechina/hello-agents/blob/main/Extra-Chapter/Extra03-Dify智能体创建保姆级操作流程.md) | Dify智能体创建保姆级教程 | | [04-Hello-agents课程常见问题](https://github.com/datawhalechina/hello-agents/blob/main/Extra-Chapter/Extra04-DatawhaleFAQ.md) | Datawhale课程常见问题 | | [05-Agent Skills与MCP对比解读](https://github.com/datawhalechina/hello-agents/blob/main/Extra-Chapter/Extra05-AgentSkills解读.md) | Agent Skills与MCP技术对比 | | [06-GUI Agent科普与实战](https://github.com/datawhalechina/hello-agents/blob/main/Extra-Chapter/Extra06-GUIAgent科普与实战.md) | GUI Agent科普与多场景实战 | | [07-环境配置](https://github.com/datawhalechina/hello-agents/blob/main/Extra-Chapter/Extra07-环境配置.md) | 环境配置 | | [08-如何写出好的Skill](https://github.com/datawhalechina/hello-agents/blob/main/Extra-Chapter/Extra08-如何写出好的Skill.md) | Skill 写作最佳实践 | | [09-Agent应用开发实践踩坑与经验分享](https://github.com/datawhalechina/hello-agents/blob/main/Extra-Chapter/Extra09-Agent应用开发实践踩坑与经验分享.md) | Code Agent 应用开发踩坑与经验总结 | | [10-Agent Self-Evolution智能体自进化](https://github.com/datawhalechina/hello-agents/blob/main/Extra-Chapter/Extra10-Agent自进化.md) | Agent 自进化四类闭环与代表项目 | | [11-WebAgent科普与实战](https://github.com/datawhalechina/hello-agents/blob/main/Extra-Chapter/Extra11-WebAgent科普与实战.md) | Web Agent 原理、反爬实战与 HelloAgents 集成 | | [12-旅行助手后训练实战](https://github.com/datawhalechina/hello-agents/blob/main/Extra-Chapter/Extra12-旅行助手后训练实战.md) | 把旅行助手 Demo 打磨成能用的 Planner | | [13-Hello-Agents视频课录制共创](https://github.com/datawhalechina/hello-agents/blob/main/Extra-Chapter/Extra13-Hello-Agents视频课录制共创.md) | 视频课程共创录制资源 | ### PDF 版本下载 &emsp;&emsp;*<strong>本 Hello-Agents PDF 教程完全开源免费。为防止各类营销号加水印后贩卖给多智能体系统初学者,我们特地在 PDF 文件中预先添加了不影响阅读的 Datawhale 开源标志水印,敬请谅解~</strong>* > *Hello-Agents PDF : https://github.com/datawhalechina/hello-agents/releases/latest/* > *Hello-Agents PDF 国内下载地址 : https://www.datawhale.cn/learn/summary/239* ## 💡 如何学习 &emsp;&emsp;欢迎你,未来的智能系统构建者!在开启这段激动人心的旅程之前,请允许我们给你一些清晰的指引。 &emsp;&emsp;本项目内容兼顾理论与实战,旨在帮助你系统性地掌握从单个智能体到多智能体系统的设计与开发全流程。因此,尤其适合有一定编程基础的 <strong>AI 开发者、软件工程师、在校学生</strong> 以及对前沿 AI 技术抱有浓厚兴趣的 <strong>自学者</strong>。在学习本项目之前,我们希望你具备基础的 Python 编程能力,并对大语言模型有基本的概念性了解(例如,知道如何通过 API 调用一个 LLM)。项目的重点是应用与构建,因此你无需具备深厚的算法或模型训练背景。 &emsp;&emsp;项目分为五大部分,每一部分都是通往下一阶段的坚实阶梯: - <strong>第一部分:智能体与语言模型基础</strong>(第一章~第三章),我们将从智能体的定义、类型与发展历史讲起,为你梳理"智能体"这一概念的来龙去脉。随后,我们会快速巩固大语言模型的核心知识,为你的实践之旅打下坚实的理论地基。 - <strong>第二部分:构建你的大语言模型智能体</strong>(第四章~第七章),这是你动手实践的起点。你将亲手实现 ReAct 等经典范式,体验 Coze 等低代码平台的便捷,并掌握 Langgraph 等主流框架的应用。最终,我们还会带你从零开始构建一个属于自己的智能体框架,让你兼具“用轮子”与“造轮子”的能力。 - <strong>第三部分:高级知识扩展</strong>(第八章~第十二章),在这一部分,你的智能体将“学会”思考与协作。我们将使用第二部分的自研框架,深入探索记忆与检索、上下文工程、Agent 训练等核心技术,并学习多智能体间的通信协议。最终,你将掌握评估智能体系统性能的专业方法。 - <strong>第四部分:综合案例进阶</strong>(第十三章~第十五章),这里是理论与实践的交汇点。你将把所学融会贯通,亲手打造智能旅行助手、自动化深度研究智能体,乃至一个模拟社会动态的赛博小镇,在真实有趣的项目中淬炼你的构建能力。 - <strong>第五部分:毕业设计及未来展望</strong>(第十六章),在旅程的终点,你将迎来一个毕业设计,构建一个完整的、属于你自己的多智能体应用,全面检验你的学习成果。我们还将与你一同展望智能体的未来,探索激动人心的前沿方向。 &emsp;&emsp;智能体是一个飞速发展且极度依赖实践的领域。为了获得最佳的学习效果,我们在项目的`code`文件夹内提供了配套的全部代码,强烈建议你<strong>将理论与实践相结合</strong>。请务必亲手运行、调试甚至修改项目里提供的每一份代码。欢迎你随时关注 Datawhale 以及其他 Agent 相关社区,当遇到问题时,你可以随时在本项目的 issue 区提问。 &emsp;&emsp;现在,准备好进入智能体的奇妙世界了吗?让我们即刻启程! ## 下一步规划 - 视频课程陆续放出(将会更加细致,实践课带领大家从设计思路到实施,授人以鱼也授人以渔) - HelloAgents框架已经更新V1.0.0版本,将会继续完善,增加更多好用,轻量化的工具和特性,兼容学习版本。 - 2026年5月更新智能体最新学习路线, [点击](https://github.com/datawhalechina/Agent-Learning-Hub) 查询 - 感谢大家助力4W Star! 现在提供调查问卷,供大家填写自己需要学习的智能体内容。后续作品《从零开始训练智能体》,帮助每一个学习者掌握从零到一训练自定义场景智能体模型的能力。 <div align='center'> <img src="./读者反馈问卷.png" alt="读者反馈问卷" width="30%"> <p>扫描二维码填写反馈意见,助力新项目共同成长</p> </div> ## 🤝 如何贡献 我们是一个开放的开源社区,欢迎任何形式的贡献! - 🐛 <strong>报告 Bug</strong> - 发现内容或代码问题,请提交 Issue - 💡 <strong>提出建议</strong> - 对项目有好想法,欢迎发起讨论 - 📝 <strong>完善内容</strong> - 帮助改进教程,提交你的 Pull Request - ✍️ <strong>分享实践</strong> - 在"社区贡献精选"中分享你的学习笔记和项目 ## 🙏 致谢 ### 核心贡献者 - [陈思州-项目负责人](https://github.com/jjyaoao) (Datawhale 成员, 全文写作和校对) <a href="https://www.xiaohongshu.com/user/profile/67b9cc34000000000e013517" target="_blank"><img alt="Static Badge" src="https://img.shields.io/badge/Rednote-小红书-e93c49"></a> - [孙韬-联合发起者](https://github.com/fengju0213) (Datawhale 成员、CAMEL-AI, 第九章内容和校对) - [姜舒凡-联合发起者](https://github.com/Tsumugii24)(Datawhale 成员, 章节习题设计和校对) - [黄佩林-Datawhale意向成员](https://github.com/HeteroCat) (Agent 开发工程师, 第五章内容贡献者) - [曾鑫民-Agent工程师](https://github.com/fancyboi999) (牛客科技, 第十四章案例开发) - [胡昊-运营组织者](https://github.com/ACGpp) (Datawhale成员) - [朱信忠-指导专家](https://xinzhongzhu.github.io/) (Datawhale首席科学家-浙江师范大学杭州人工智能研究院教授) ### Extra-Chapter 贡献者 - [WH](https://github.com/WHQAQ11) (内容贡献者) - [周奥杰-DW贡献者团队](https://github.com/thunderbolt-fire) (西安交通大学, Extra02 内容贡献) - [张宸旭-个人开发者](https://github.com/Tasselszcx)(帝国理工学院, Extra03 内容贡献) - [黄宏晗-DW贡献者团队](https://github.com/XiaoMa-PM) (深圳大学, Extra04 内容贡献) - [王大鹏-Datawhale成员](https://github.com/ditingdapeng) (高级研发工程师, Extra08 内容贡献) - [尤逸晖-个人开发者](https://github.com/YYHDBL) (南京信息工程大学, Extra09 内容贡献) - [殷鑫-个人开发者](https://github.com/vinci-grape) (浙江大学, Extra10 内容贡献) - [Pranav Janakiraman-个人开发者](https://github.com/pranavjana) (TinyFish, Extra11 内容贡献) - [王雨飞-个人开发者](https://github.com/nameless0120) (北京邮电大学,Extra12 内容贡献) ### 特别感谢 - 感谢 [@Sm1les](https://github.com/Sm1les) 对本项目的帮助与支持 - 感谢所有为本项目做出贡献的开发者们 ❤️ <div align=center style="margin-top: 30px;"> <a href="https://github.com/datawhalechina/Hello-Agents/graphs/contributors"> <img src="https://contrib.rocks/image?repo=datawhalechina/Hello-Agents" /> </a> </div> ## Star History <div align='center'> <img src="./docs/images/datawhalechina-hello-agents-stats-20260516.png" alt="Datawhale" width="90%"> </div> <div align="center"> <p>⭐ 如果这个项目对你有帮助,请给我们一个 Star!</p> </div> ## 读者交流群 <div align='center'> <img src="./读者群二维码.png" alt="读者群二维码" width="30%"> <p>扫描二维码加入读者交流群,与更多学习者交流讨论</p> </div> ## 关于 Datawhale <div align='center'> <img src="./docs/images/datawhale.png" alt="Datawhale" width="30%"> <p>扫描二维码关注 Datawhale 公众号,获取更多优质开源内容</p> </div> ## 🎓 引用 如果 Hello-Agents 对您的研究或工作有所帮助,欢迎引用: ```bibtex @misc{hello_agents2025, title = {Hello-Agents: Building an AI Agent from Scratch}, author = {Sizhou Chen and Tao Sun and Shufan Jiang and Peilin Huang and Xinmin Zeng and Xinzhong Zhu and all Hello-Agents contributors}, year = {2025}, url = {https://github.com/datawhalechina/Hello-Agents}, note = {GitHub repository} } ``` --- ## 📜 开源协议 本作品采用[知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议](http://creativecommons.org/licenses/by-nc-sa/4.0/)进行许可。

AI Agents Course Builders
57.8K Github Stars
happy-llm
Open Source

happy-llm

<div align='center'> <img src="./images/head.jpg" alt="alt text" width="100%"> <h1>Happy-LLM</h1> </div> <div align="center"> <img src="https://img.shields.io/github/stars/datawhalechina/happy-llm?style=flat&logo=github" alt="GitHub stars"/> <img src="https://img.shields.io/github/forks/datawhalechina/happy-llm?style=flat&logo=github" alt="GitHub forks"/> <img src="https://img.shields.io/badge/language-Chinese-brightgreen?style=flat" alt="Language"/> <a href="https://github.com/datawhalechina/happy-llm"><img src="https://img.shields.io/badge/GitHub-Project-blue?style=flat&logo=github" alt="GitHub Project"></a> <a href="https://swanlab.cn/@kmno4/Happy-LLM/overview"><img src="https://raw.githubusercontent.com/SwanHubX/assets/main/badge1.svg" alt="SwanLab"></a> </div> <div align="center"> <a href="https://trendshift.io/repositories/14175" target="_blank"><img src="https://trendshift.io/api/badge/repositories/14175" alt="datawhalechina%2Fhappy-llm | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a> </div> <div align="center"> [中文](./README.md) | [English](./README_en.md) </div> <div align="center"> <p><a href="https://datawhalechina.github.io/happy-llm/">📚 在线阅读地址</a></p> <h3>📚 从零开始构建大模型</h3> <p><em>深入理解 LLM 核心原理,动手实现你的第一个大模型</em></p> </div> --- ## 🎯 项目介绍 > &emsp;&emsp;*很多小伙伴在看完 Datawhale开源项目: [self-llm 开源大模型食用指南](https://github.com/datawhalechina/self-llm) 后,感觉意犹未尽,想要深入了解大语言模型的原理和训练过程。于是我们(Datawhale)决定推出《Happy-LLM》项目,旨在帮助大家深入理解大语言模型的原理和训练过程。* &emsp;&emsp;本项目是一个**系统性的 LLM 学习教程**,将从 NLP 的基本研究方法出发,根据 LLM 的思路及原理逐层深入,依次为读者剖析 LLM 的架构基础和训练过程。同时,我们会结合目前 LLM 领域最主流的代码框架,演练如何亲手搭建、训练一个 LLM,期以实现授之以鱼,更授之以渔。希望大家能从这本书开始走入 LLM 的浩瀚世界,探索 LLM 的无尽可能。 ### ✨ 你将收获什么? - 📚 **Datawhale 开源免费** 完全免费的学习本项目所有内容 - 🔍 **深入理解** Transformer 架构和注意力机制 - 📚 **掌握** 预训练语言模型的基本原理 - 🧠 **了解** 现有大模型的基本结构 - 🏗️ **动手实现** 一个完整的 LLaMA2 模型 - ⚙️ **掌握训练** 从预训练到微调的全流程 - 🚀 **实战应用** RAG、Agent 等前沿技术 ## 📖 内容导航 | 章节 | 关键内容 | 状态 | | --- | --- | --- | | [学习与环境准备](./docs/学习与环境准备.md) | 分章依赖、硬件建议与实践入口 | ✅ | | [前言](./docs/前言.md) | 本项目的缘起、背景及读者建议 | ✅ | | [第一章 NLP 基础概念](./docs/chapter1/第一章%20NLP基础概念.md) | 什么是 NLP、发展历程、任务分类、文本表示演进 | ✅ | | [第二章 Transformer 架构](./docs/chapter2/第二章%20Transformer架构.md) | 注意力机制、Encoder-Decoder、手把手搭建 Transformer | ✅ | | [第三章 预训练语言模型](./docs/chapter3/第三章%20预训练语言模型.md) | Encoder-only、Encoder-Decoder、Decoder-Only 模型对比 | ✅ | | [第四章 大语言模型](./docs/chapter4/第四章%20大语言模型.md) | LLM 定义、训练策略、涌现能力分析 | ✅ | | [第五章 动手搭建大模型](./docs/chapter5/第五章%20动手搭建大模型.md) | 实现 LLaMA2、训练 Tokenizer、预训练小型 LLM | ✅ | | [第六章 大模型训练实践](./docs/chapter6/第六章%20大模型训练流程实践.md) | 预训练、有监督微调、LoRA/QLoRA 高效微调 | ✅ | | [第七章 大模型应用](./docs/chapter7/第七章%20大模型应用.md) | 模型评测、RAG 检索增强、Agent 智能体 | ✅ | | [Extra Chapter LLM Blog](./Extra-Chapter/) | 优秀的大模型 学习笔记/Blog ,欢迎大家来 PR !| 🚧 | > 第六章正文已覆盖 Pretrain、SFT 与 PEFT 等核心训练流程,建议结合 [第六章实践说明](./docs/chapter6/readme.md) 和 [学习与环境准备](./docs/学习与环境准备.md) 一起阅读;偏好对齐可继续参考 [第六章补充专题](./docs/chapter6/6.4%5BWIP%5D%20偏好对齐.md)。 ### Extra Chapter LLM Blog - [大模型都这么厉害了,微调0.6B的小模型有什么意义?](./Extra-Chapter/why-fine-tune-small-large-language-models/readme.md) @[不要葱姜蒜](https://github.com/KMnO4-zx) 2025-7-11 - [Transformer 整体模块设计解读](./Extra-Chapter/transformer-architecture/) @[ditingdapeng](https://github.com/ditingdapeng) 2025-7-14 - [文本数据处理详解](./Extra-Chapter/text-data-processing/readme.md) @[蔡鋆捷](https://github.com/xinala-781) 2025-7-14 - [Qwen3-"VL"——超小中文多模态模型的“拼接微调”之路](./Extra-Chapter/vlm-concatenation-finetune/README.md) @[ShaohonChen](https://github.com/ShaohonChen) 2025-7-30 - [S1: Thinking Budget with vLLM](./Extra-Chapter/s1-vllm-thinking-budget/readme.md) @[不要葱姜蒜](https://github.com/kmno4-zx) 2025-8-03 - [CDDRS: 使用细粒度语义信息指导增强的RAG检索方法](./Extra-Chapter/CDDRS/readme.md) @[Hongru0306](https://github.com/Hongru0306) 2025-8-21 - [大模型生成 Token 的方式有哪些?](./Extra-Chapter/generation-method/readme.md) @[不要葱姜蒜](https://github.com/kmno4-zx) 2025-10-17 > &emsp;&emsp;*如果大家在学习 Happy-LLM 项目或 LLM 相关知识中有自己独到的见解、认知、实践,欢迎大家 PR 在 [Extra Chapter LLM Blog](./Extra-Chapter/) 中。请遵守 Extra Chapter LLM Blog 的 [PR 规范](./Extra-Chapter/Readme.md),我们会视 PR 内容的质量和价值来决定是否合并或补充到 Happy-LLM 正文中来。* ### 模型下载 | 模型名称 | 下载地址 | | --- | --- | | Happy-LLM-Chapter5-Base-215M | [🤖 ModelScope](https://www.modelscope.cn/models/kmno4zx/happy-llm-215M-base) | | Happy-LLM-Chapter5-SFT-215M | [🤖 ModelScope](https://www.modelscope.cn/models/kmno4zx/happy-llm-215M-sft) | > *ModelScope 创空间体验地址:[🤖 创空间](https://www.modelscope.cn/studios/kmno4zx/happy_llm_215M_sft)* ### PDF 版本下载 &emsp;&emsp;***本 Happy-LLM PDF 教程完全开源免费。为防止各类营销号加水印后贩卖给大模型初学者,我们特地在 PDF 文件中预先添加了不影响阅读的 Datawhale 开源标志水印,敬请谅解~*** > *Happy-LLM PDF : https://github.com/datawhalechina/happy-llm/releases/tag/v1.0.2* ### PPT 资源下载 &emsp;&emsp;***本项目配套教学讲义PPT课件资源获取链接:https://github.com/HZAI-ZJNU/happy-llm-ppt 或可在本项目的 [Releases](https://github.com/datawhalechina/happy-llm/releases) 页面下载。*** ## 💡 如何学习 &emsp;&emsp;本项目适合大学生、研究人员、LLM 爱好者。在学习本项目之前,建议具备一定的编程经验,尤其是要对 Python 编程语言有一定的了解。最好具备深度学习的相关知识,并了解 NLP 领域的相关概念和术语,以便更轻松地学习本项目。 &emsp;&emsp;如果你计划复现章节代码,建议先阅读 [学习与环境准备](./docs/学习与环境准备.md)。仓库当前按章节拆分依赖,不同章节建议使用独立的 Python 环境,以减少版本冲突。 &emsp;&emsp;本项目分为两部分——基础知识与实战应用。第1章~第4章是基础知识部分,从浅入深介绍 LLM 的基本原理。其中,第1章简单介绍 NLP 的基本任务和发展,为非 NLP 领域研究者提供参考;第2章介绍 LLM 的基本架构——Transformer,包括原理介绍及代码实现,作为 LLM 最重要的理论基础;第3章整体介绍经典的 PLM,包括 Encoder-Only、Encoder-Decoder 和 Decoder-Only 三种架构,也同时介绍了当前一些主流 LLM 的架构和思想;第4章则正式进入 LLM 部分,详细介绍 LLM 的特点、能力和整体训练过程。第5章~第7章是实战应用部分,将逐步带领大家深入 LLM 的底层细节。其中,第5章将带领大家者基于 PyTorch 层亲手搭建一个 LLM,并实现预训练、有监督微调的全流程;第6章将引入目前业界主流的 LLM 训练框架 Transformers,带领学习者基于该框架快速、高效地实现 LLM 训练过程;第7章则将介绍 基于 LLM 的各种应用,补全学习者对 LLM 体系的认知,包括 LLM 的评测、检索增强生成(Retrieval-Augmented Generation,RAG)、智能体(Agent)的思想和简单实现。你可以根据个人兴趣和需求,选择性地阅读相关章节。 &emsp;&emsp;在阅读本书的过程中,建议你将理论和实际相结合。LLM 是一个快速发展、注重实践的领域,我们建议你多投入实战,复现本书提供的各种代码,同时积极参加 LLM 相关的项目与比赛,真正投入到 LLM 开发的浪潮中。我们鼓励你关注 Datawhale 及其他 LLM 相关开源社区,当遇到问题时,你可以随时在本项目的 issue 区提问。 &emsp;&emsp;最后,欢迎每一位读者在学习完本项目后加入到 LLM 开发者的行列。作为国内 AI 开源社区,我们希望充分聚集共创者,一起丰富这个开源 LLM 的世界,打造更多、更全面特色 LLM 的教程。星火点点,汇聚成海。我们希望成为 LLM 与普罗大众的阶梯,以自由、平等的开源精神,拥抱更恢弘而辽阔的 LLM 世界。 > - 中国计算机学会(CCF) × Datawhale × GitLink开源平台联合推出AI普惠课程,免费算力报名参加 [【报名地址】](https://mp.weixin.qq.com/s/P03f3e2vUUh7OxDP40Ra6w)[【GitLink 地址】](https://gitlink.org.cn/datawhalechina/happy-llm) ## 🤝 如何贡献 我们欢迎任何形式的贡献! - 🐛 **报告 Bug** - 发现问题请提交 Issue - 💡 **功能建议** - 有好想法就告诉我们 - 📝 **内容完善** - 帮助改进教程内容 - 🔧 **代码优化** - 提交 Pull Request ## 🙏 致谢 ### 核心贡献者 - [宋志学-项目负责人](https://github.com/KMnO4-zx) (Datawhale成员) - [邹雨衡-项目负责人](https://github.com/logan-zou) (Datawhale成员-对外经济贸易大学) - [朱信忠-指导专家](https://xinzhongzhu.github.io/)(Datawhale首席科学家-浙江师范大学杭州人工智能研究院教授) ### Extra-Chapter 贡献者 - [ditingdapeng](https://github.com/ditingdapeng)(内容贡献者-云原生基础架构工程师) - [蔡鋆捷](https://github.com/xinala-781)(内容贡献者-福州大学) - [ShaohonChen](https://github.com/ShaohonChen) (情感机器实验室研究员-西安电子科技大学在读硕士) - [肖鸿儒, 庄健琨](https://github.com/Hongru0306) (内容贡献者-同济大学) ### 特别感谢 - 感谢 [@Sm1les](https://github.com/Sm1les) 对本项目的帮助与支持 - 感谢所有为本项目做出贡献的开发者们 ❤️ <div align=center style="margin-top: 30px;"> <a href="https://github.com/datawhalechina/happy-llm/graphs/contributors"> <img src="https://contrib.rocks/image?repo=datawhalechina/happy-llm" /> </a> </div> ## Star History <div align='center'> <img src="./images/star-history-20251017.png" alt="Datawhale" width="90%"> </div> <div align="center"> <p>⭐ 如果这个项目对你有帮助,请给我们一个 Star!</p> </div> ## 关于 Datawhale <div align='center'> <img src="./images/datawhale.png" alt="Datawhale" width="30%"> <p>扫描二维码关注 Datawhale 公众号,获取更多优质开源内容</p> </div> --- ## 📜 开源协议 本作品采用[知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议](http://creativecommons.org/licenses/by-nc-sa/4.0/)进行许可。

ML Frameworks Course Builders
31K Github Stars
self-llm
Open Source

self-llm

<div align=center> <img src="./images/head-img.png" > <h1>开源大模型食用指南</h1> </div> <div align="center"> 中文 | [English](./README_en.md) </div> &emsp;&emsp;本项目是一个围绕开源大模型、针对国内初学者、基于 Linux 平台的中国宝宝专属大模型教程,针对各类开源大模型提供包括环境配置、本地部署、高效微调等技能在内的全流程指导,简化开源大模型的部署、使用和应用流程,让更多的普通学生、研究者更好地使用开源大模型,帮助开源、自由的大模型更快融入到普通学习者的生活中。 &emsp;&emsp;本项目的主要内容包括: 1. 基于 Linux 平台的开源 LLM 环境配置指南,针对不同模型要求提供不同的详细环境配置步骤; 2. 针对国内外主流开源 LLM 的部署使用教程,包括 LLaMA、ChatGLM、InternLM 等; 3. 开源 LLM 的部署应用指导,包括命令行调用、在线 Demo 部署、LangChain 框架集成等; 4. 开源 LLM 的全量微调、高效微调方法,包括分布式全量微调、LoRA、ptuning 等。 &emsp;&emsp;**项目的主要内容就是教程,让更多的学生和未来的从业者了解和熟悉开源大模型的食用方法!任何人都可以提出issue或是提交PR,共同构建维护这个项目。** &emsp;&emsp;想要深度参与的同学可以联系我们,我们会将你加入到项目的维护者中。 > &emsp;&emsp;***学习建议:本项目的学习建议是,先学习环境配置,然后再学习模型的部署使用,最后再学习微调。因为环境配置是基础,模型的部署使用是基础,微调是进阶。初学者可以选择Qwen1.5,InternLM2,MiniCPM等模型优先学习。*** > &emsp;&emsp;**进阶学习推荐** :如果您在学习完本项目后,希望更深入地理解大语言模型的核心原理,并渴望亲手从零开始训练属于自己的大模型,我们强烈推荐关注 Datawhale 的另一个开源项目—— [Happy-LLM 从零开始的大语言模型原理与实践教程](https://github.com/datawhalechina/happy-llm) 。该项目将带您深入探索大模型的底层机制,掌握完整的训练流程。 > 注:如果有同学希望了解大模型的模型构成,以及从零手写RAG、Agent和Eval等任务,可以学习Datawhale的另一个项目[Tiny-Universe](https://github.com/datawhalechina/tiny-universe),大模型是当下深度学习领域的热点,但现有的大部分大模型教程只在于教给大家如何调用api完成大模型的应用,而很少有人能够从原理层面讲清楚模型结构、RAG、Agent 以及 Eval。所以该仓库会提供全部手写,不采用调用api的形式,完成大模型的 RAG 、 Agent 、Eval 任务。 > 注:考虑到有同学希望在学习本项目之前,希望学习大模型的理论部分,如果想要进一步深入学习 LLM 的理论基础,并在理论的基础上进一步认识、应用 LLM,可以参考 Datawhale 的 [so-large-llm](https://github.com/datawhalechina/so-large-lm.git)课程。 > 注:如果有同学在学习本课程之后,想要自己动手开发大模型应用。同学们可以参考 Datawhale 的 [动手学大模型应用开发](https://github.com/datawhalechina/llm-universe) 课程,该项目是一个面向小白开发者的大模型应用开发教程,旨在基于阿里云服务器,结合个人知识库助手项目,向同学们完整的呈现大模型应用开发流程。 ## 项目意义 &emsp;&emsp;什么是大模型? >大模型(LLM)狭义上指基于深度学习算法进行训练的自然语言处理(NLP)模型,主要应用于自然语言理解和生成等领域,广义上还包括机器视觉(CV)大模型、多模态大模型和科学计算大模型等。 &emsp;&emsp;百模大战正值火热,开源 LLM 层出不穷。如今国内外已经涌现了众多优秀开源 LLM,国外如 LLaMA、Alpaca,国内如 ChatGLM、BaiChuan、InternLM(书生·浦语)等。开源 LLM 支持用户本地部署、私域微调,每一个人都可以在开源 LLM 的基础上打造专属于自己的独特大模型。 &emsp;&emsp;然而,当前普通学生和用户想要使用这些大模型,需要具备一定的技术能力,才能完成模型的部署和使用。对于层出不穷又各有特色的开源 LLM,想要快速掌握一个开源 LLM 的应用方法,是一项比较有挑战的任务。 &emsp;&emsp;本项目旨在首先基于核心贡献者的经验,实现国内外主流开源 LLM 的部署、使用与微调教程;在实现主流 LLM 的相关部分之后,我们希望充分聚集共创者,一起丰富这个开源 LLM 的世界,打造更多、更全面特色 LLM 的教程。星火点点,汇聚成海。 &emsp;&emsp;***我们希望成为 LLM 与普罗大众的阶梯,以自由、平等的开源精神,拥抱更恢弘而辽阔的 LLM 世界。*** ## 项目受众 &emsp;&emsp;本项目适合以下学习者: * 想要使用或体验 LLM,但无条件获得或使用相关 API; * 希望长期、低成本、大量应用 LLM; * 对开源 LLM 感兴趣,想要亲自上手开源 LLM; * NLP 在学,希望进一步学习 LLM; * 希望结合开源 LLM,打造领域特色的私域 LLM; * 以及最广大、最普通的学生群体。 ## 项目规划及进展 &emsp;&emsp; 本项目拟围绕开源 LLM 应用全流程组织,包括环境配置及使用、部署应用、微调等,每个部分覆盖主流及特点开源 LLM: ### Example 系列 - [Chat-嬛嬛](./examples/Chat-嬛嬛/readme.md): Chat-甄嬛是利用《甄嬛传》剧本中所有关于甄嬛的台词和语句,基于LLM进行LoRA微调得到的模仿甄嬛语气的聊天语言模型。 - [Tianji-天机](./examples/Tianji-天机/readme.md):天机是一款基于人情世故社交场景,涵盖提示词工程 、智能体制作、 数据获取与模型微调、RAG 数据清洗与使用等全流程的大语言模型系统应用教程。 - [AMChat](./examples/AMchat-高等数学/readme.md): AM (Advanced Mathematics) chat 是一个集成了数学知识和高等数学习题及其解答的大语言模型。该模型使用 Math 和高等数学习题及其解析融合的数据集,基于 InternLM2-Math-7B 模型,通过 xtuner 微调,专门设计用于解答高等数学问题。 - [数字生命](./examples/数字生命/readme.md): 本项目将以我为原型,利用特制的数据集对大语言模型进行微调,致力于创造一个能够真正反映我的个性特征的AI数字人——包括但不限于我的语气、表达方式和思维模式等等,因此无论是日常聊天还是分享心情,它都以一种既熟悉又舒适的方式交流,仿佛我在他们身边一样。整个流程是可迁移复制的,亮点是数据集的制作。 ### 已支持模型 <p align="center"> <strong>✨ 已支持 50+ 主流大语言模型 ✨</strong><br> <em>每个模型都提供完整的部署、微调和使用教程</em><br> 📖 <strong><a href="./support_model.md">查看完整模型列表和教程</a></strong> | 🎯 <strong><a href="./support_model.md#通用环境配置">快速开始</a></strong> </p> <table align="center"> <tr> <td valign="top" width="25%"> • <a href="./support_model.md#kimi-k25">Kimi-K2.5</a><br> • <a href="./support_model.md#step-35-flash">Step-3.5-Flash</a><br> • <a href="./support_model.md#glm-47-flash">GLM-4.7-Flash</a><br> • <a href="./support_model.md#gemma3">Gemma3</a><br> • <a href="./support_model.md#minimax-m3">MiniMax-M3</a><br> • <a href="./support_model.md#minimax-m25">MiniMax-M2.5</a><br> • <a href="./support_model.md#minimax-m2">MiniMax-M2</a><br> • <a href="./support_model.md#qwen3">Qwen3</a><br> • <a href="./support_model.md#qwen3-vl-4b-instruct">Qwen3-VL</a><br> • <a href="./support_model.md#spatiallm">SpatialLM</a><br> • <a href="./support_model.md#hunyuan3d-2">Hunyuan3D-2</a><br> • <a href="./support_model.md#qwen2-vl">Qwen2-VL</a><br> • <a href="./support_model.md#minicpm-o-2_6">MiniCPM-o</a><br> • <a href="./support_model.md#qwen25-coder">Qwen2.5-Coder</a><br> • <a href="./support_model.md#deepseek-coder-v2">DeepSeek-Coder-V2</a><br> • <a href="./support_model.md#gpt-oss-20b">gpt-oss-20b</a><br> • <a href="./support_model.md#glm-41-thinking">GLM-4.1-Thinking</a> </td> <td valign="top" width="25%"> • <a href="./support_model.md#deepseek-r1-distill">DeepSeek-R1</a><br> • <a href="./support_model.md#internlm3">InternLM3</a><br> • <a href="./support_model.md#phi4">phi4</a><br> • <a href="./support_model.md#glm-45-air">GLM-4.5-Air</a><br> • <a href="./support_model.md#hunyuan-a13b-instruct">Hunyuan-A13B</a><br> • <a href="./support_model.md#deepseek-深度求索">DeepSeek</a><br> • <a href="./support_model.md#baichuan-百川智能">Baichuan</a><br> • <a href="./support_model.md#internlm">InternLM</a><br> • <a href="./support_model.md#kimi">Kimi</a><br> • <a href="./support_model.md#ernie-45">ERNIE-4.5</a><br> • <a href="./support_model.md#llama4">Llama4</a><br> • <a href="./support_model.md#apple-openelm">Apple OpenELM</a> </td> <td valign="top" width="25%"> • <a href="./support_model.md#llama31-8b-instruct">Llama3.1</a><br> • <a href="./support_model.md#gemma-2-9b-it">Gemma-2</a><br> • <a href="./support_model.md#qwen25">Qwen2.5</a><br> • <a href="./support_model.md#qwen2">Qwen2</a><br> • <a href="./support_model.md#glm-4">GLM-4</a><br> • <a href="./support_model.md#qwen-15">Qwen 1.5</a><br> • <a href="./support_model.md#phi-3">phi-3</a><br> • <a href="./support_model.md#minicpm">MiniCPM</a><br> • <a href="./support_model.md#yi-零一万物">Yi 零一万物</a><br> • <a href="./support_model.md#yuan20">Yuan2.0</a><br> • <a href="./support_model.md#yuan20-m32">Yuan2.0-M32</a><br> • <a href="./support_model.md#哔哩哔哩-index-19b">哔哩哔哩 Index</a> </td> <td valign="top" width="25%"> • <a href="./support_model.md#characterglm-6b">CharacterGLM</a><br> • <a href="./support_model.md#bluelm-vivo-蓝心大模型">BlueLM</a><br> • <a href="./support_model.md#qwen-audio">Qwen-Audio</a><br> • <a href="./support_model.md#transnormerllm">TransNormerLLM</a><br> • <a href="./support_model.md#atom-llama2">Atom</a><br> • <a href="./support_model.md#chatglm3">ChatGLM3</a><br> • <a href="./support_model.md#qwen2-57b-a14b-instruct">Qwen2-57B-A14B-Instruct</a><br> • <a href="./support_model.md#qwen2-72b-instruct">Qwen2-72B-Instruct</a><br> • <a href="./support_model.md#qwen2-7b-instruct">Qwen2-7B-Instruct</a><br> • <a href="./support_model.md#internlm2-20b">InternLM2-20B</a><br> • <a href="./support_model.md#tele-chat">Tele-Chat</a><br> • <a href="./support_model.md#xverse2">XVERSE2</a> </td> </tr> </table> ### AMD GPU 专区 <p align="center"> <strong>🚀 AMD GPU 平台已支持模型</strong><br> <em>每个模型都提供完整的 AMD 环境配置和部署教程</em><br> <em>感谢 AMD University Program 对本项目的支持</em><br> 📖 <strong><a href="./support_model_amd.md">查看完整 AMD 平台模型列表和教程</a></strong><br> </p> <table align="center"> <tr> <td valign="top" width="50%"> • <a href="./support_model_amd.md#谷歌-gemma3">谷歌 Gemma3</a><br> • AMD 环境准备与配置<br> • NPU 推理加速支持 </td> <td valign="top" width="50%"> • <a href="./support_model_amd.md#qwen3">Qwen3</a><br> • lemonade-server SDK 部署<br> • Ryzen AI 300 系列优化 </td> </tr> </table> ### 昇腾Ascend NPU 专区 <p align="center"> <strong>🚀 昇腾Ascend NPU 平台已支持模型</strong><br> <em>每个模型都提供完整的昇腾Ascend NPU 环境配置和部署教程</em><br> 📖 <strong><a href="./support_model_Ascend.md">查看完整昇腾 NPU 平台模型列表和教程</a></strong><br> </p> <table align="center"> <tr> <td valign="top" width="30%"> • <a href="./support_model_Ascend.md#qwen3536">Qwen3.6</a><br> • vLLM-ascend 部署调用 </td> <td valign="top" width="30%"> • <a href="./support_model_Ascend.md#qwen3">Qwen3</a><br> • Ascend NPU 环境配置通用指南<br> • MindIE 服务化部署调用<br> • vLLM-ascend 部署调用<br> • sglang-ascend 部署调用 </td> <td valign="top" width="40%"> • <a href="./support_model_Ascend.md#大模型服务化性能和精度测试">大模型服务化性能和精度测试</a><br> • AISBench 测试工具环境配置<br> • 昇腾大模型服务化性能测试<br> • 昇腾大模型服务化精度测试 </td> </tr> </table> ### 沐曦专区 <p align="center"> <strong><em>Coming Soon!</em></strong> </p> ### Apple M 专区 <p align="center"> 📖 <strong><a href="./models_mlx/README.md">点击跳转 Apple M 专区</a></strong><br> </p> ### Welcome More Platforms! - 🚀 即将支持更多平台(Apple M 系列已有设备测试),敬请期待! - 🤝 欢迎昇腾 Ascend、摩尔线程 MUSA、沐曦等平台提供技术支持、硬件支持或参与贡献 - 🌟 欢迎各平台开发者共建共享,推动大模型技术在更多国产硬件生态中的繁荣发展! ## 致谢 ### 核心贡献者 - [宋志学(不要葱姜蒜)-项目负责人](https://github.com/KMnO4-zx) (Datawhale成员) - [邹雨衡-项目负责人](https://github.com/logan-zou) (Datawhale成员-对外经济贸易大学) - [刘十一-Ascend专区负责人](https://github.com/Zhiwen-Liu)(Datawhale成员-鲸英助教) - [姜舒凡](https://github.com/Tsumugii24)(内容创作者-Datawhale成员) - [郭宣伯](https://github.com/Twosugar666)(内容创作者-北京航空航天大学) - [林泽毅](https://github.com/Zeyi-Lin)(内容创作者-SwanLab产品负责人) - [林恒宇](https://github.com/LINHYYY)(内容创作者-广东东软学院-鲸英助教) - [王泽宇](https://github.com/moyitech)(内容创作者-太原理工大学-鲸英助教) - [郭志航](https://github.com/acwwt)(内容创作者) - [陈榆](https://github.com/LucaChen)(内容创作者-谷歌开发者机器学习技术专家) - [肖鸿儒](https://github.com/Hongru0306) (Datawhale成员-同济大学) - [张帆](https://github.com/zhangfanTJU)(内容创作者-Datawhale成员) - [李娇娇](https://github.com/Aphasia0515) (Datawhale成员) - [高立业](https://github.com/0-yy-0)(内容创作者-DataWhale成员) - [Kailigithub](https://github.com/Kailigithub) (Datawhale成员) - [丁悦](https://github.com/dingyue772) (Datawhale-鲸英助教) - [谢好冉](https://github.com/ilovexsir)(内容创作者-鲸英助教) - [惠佳豪](https://github.com/L4HeyXiao) (Datawhale-宣传大使) - [王茂霖](https://github.com/mlw67)(内容创作者-Datawhale成员) - [孙健壮](https://github.com/Caleb-Sun-jz)(内容创作者-对外经济贸易大学) - [郑皓桦](https://github.com/BaiYu96) (内容创作者) - [荞麦](https://github.com/yeyeyeyeeeee)(内容创作者-Datawhale成员) - [骆秀韬](https://github.com/anine09)(内容创作者-Datawhale成员-似然实验室) - [李柯辰](https://github.com/Joe-2002) (Datawhale成员) - [程宏](https://github.com/chg0901)(内容创作者-Datawhale意向成员) - [李秀奇](https://github.com/li-xiu-qi)(内容创作者-DataWhale意向成员) - [余洋](https://github.com/YangYu-NUAA)(内容创作者-安徽理工大学副教授-Datawhale成员) - [陈思州](https://github.com/jjyaoao) (Datawhale成员) - [颜鑫](https://github.com/thomas-yanxin) (Datawhale成员) - [杜森](https://github.com/study520ai520)(内容创作者-Datawhale成员-南阳理工学院) - [散步](https://github.com/sanbuphy) (Datawhale成员) - [郑远婧](https://github.com/isaacahahah)(内容创作者-鲸英助教-福州大学) - [Swiftie](https://github.com/cswangxiaowei) (小米NLP算法工程师) - [张友东](https://github.com/AXYZdong)(内容创作者-Datawhale成员) - [张晋](https://github.com/Jin-Zhang-Yaoguang)(内容创作者-Datawhale成员) - [娄天奥](https://github.com/lta155)(内容创作者-中国科学院大学-鲸英助教) - [小罗](https://github.com/lyj11111111) (内容创作者-Datawhale成员) - [邓恺俊](https://github.com/Kedreamix)(内容创作者-Datawhale成员) - [赵文恺](https://github.com/XiLinky)(内容创作者-太原理工大学-鲸英助教) - [王熠明](https://github.com/Bald0Wang)(内容创作者-Datawhale成员) - [黄柏特](https://github.com/KashiwaByte)(内容创作者-西安电子科技大学) - [左春生](https://github.com/LinChentang)(内容创作者-Datawhale成员) - [杨卓](https://github.com/little1d)(内容创作者-西安电子科技大学-鲸英助教) - [付志远](https://github.com/comfzy)(内容创作者-海南大学) - [三水](https://github.com/sssanssss)(内容创作者-鲸英助教) - [樊奇](https://github.com/fanqiNO1)(内容创作者-上海交通大学) - [陈辅元](https://github.com/Fyuan0206)(内容创作者-Datawhale成员) - [谭逸珂](https://github.com/LikeGiver)(内容创作者-对外经济贸易大学) - [何至轩](https://github.com/pod2c)(内容创作者-鲸英助教) - [康婧淇](https://github.com/jodie-kang)(内容创作者-Datawhale成员) - [杨晨旭](https://github.com/langlibai66)(内容创作者-太原理工大学-鲸英助教) - [赵伟](https://github.com/2710932616)(内容创作者-鲸英助教) - [苏向标](https://github.com/gzhuuser)(内容创作者-广州大学-鲸英助教) - [陈睿](https://github.com/riannyway)(内容创作者-西交利物浦大学-鲸英助教) - [张龙斐](https://github.com/Feimike09)(内容创作者-鲸英助教) - [孙超](https://github.com/anarchysaiko)(内容创作者-Datawhale成员) - [卓堂越](https://github.com/nusakom)(内容创作者-鲸英助教) - [fancy](https://github.com/fancyboi999)(内容创作者-鲸英助教) - [谭斐然](https://github.com/frtanxidian)(西安电子科技大学-鲸英助教) > 注:排名根据贡献程度排序 ### 其他 - 特别感谢[@Sm1les](https://github.com/Sm1les)对本项目的帮助与支持 - 感谢 AMD University Program 对本项目的支持 - 部分lora代码和讲解参考仓库:https://github.com/zyds/transformers-code.git - 如果有任何想法可以联系我们 DataWhale 也欢迎大家多多提出 issue - 特别感谢以下为教程做出贡献的同学! <div align=center style="margin-top: 30px;"> <a href="https://github.com/datawhalechina/self-llm/graphs/contributors"> <img src="https://contrib.rocks/image?repo=datawhalechina/self-llm" /> </a> </div> ### Star History <div align=center style="margin-top: 30px;"> <img src="./images/star-history-20251220.png"/> </div>

ML Frameworks Course Builders
30.8K Github Stars
llm-cookbook
Open Source

llm-cookbook

![figures/readme.jpg](figures/readme.jpg) # 面向开发者的大模型手册 - LLM Cookbook ## 项目简介 本项目是一个面向开发者的大模型手册,针对国内开发者的实际需求,主打 LLM 全方位入门实践。本项目基于吴恩达老师大模型系列课程内容,对原课程内容进行筛选、翻译、复现和调优,覆盖从 Prompt Engineering 到 RAG 开发、模型微调的全部流程,用最适合国内学习者的方式,指导国内开发者如何学习、入门 LLM 相关项目。 针对不同内容的特点,我们对共计 11 门吴恩达老师的大模型课程进行了翻译复现,并结合国内学习者的实际情况,对不同课程进行了分级和排序,初学者可以先系统学习我们的必修类课程,掌握入门 LLM 所有方向都需要掌握的基础技能和概念,再选择性地学习我们的选修类课程,在自己感兴趣的方向上不断探索和学习。 如果有你非常喜欢但我们还没有进行复现的吴恩达老师大模型课程,我们欢迎每一位开发者参考我们已有课程的格式和写法来对课程进行复现并提交 PR,在 PR 审核通过后,我们会根据课程内容将课程进行分级合并。欢迎每一位开发者的贡献! **在线阅读地址:[面向开发者的 LLM 入门课程 - 在线阅读](https://datawhalechina.github.io/llm-cookbook/)** **PDF 下载地址:[面向开发者的 LLM 入门教程 - PDF](https://github.com/datawhalechina/llm-cookbook/releases/tag/v1%2C0%2C0)** **英文原版地址:[吴恩达关于大模型的系列课程](https://learn.deeplearning.ai)** ## 项目意义 LLM 正在逐步改变人们的生活,而对于开发者,如何基于 LLM 提供的 API 快速、便捷地开发一些具备更强能力、集成 LLM 的应用,来便捷地实现一些更新颖、更实用的能力,是一个急需学习的重要能力。 由吴恩达老师与 OpenAI 合作推出的大模型系列教程,从大模型时代开发者的基础技能出发,深入浅出地介绍了如何基于大模型 API、LangChain 架构快速开发结合大模型强大能力的应用。其中,《Prompt Engineering for Developers》教程面向入门 LLM 的开发者,深入浅出地介绍了对于开发者,如何构造 Prompt 并基于 OpenAI 提供的 API 实现包括总结、推断、转换等多种常用功能,是入门 LLM 开发的经典教程;《Building Systems with the ChatGPT API》教程面向想要基于 LLM 开发应用程序的开发者,简洁有效而又系统全面地介绍了如何基于 ChatGPT API 打造完整的对话系统;《LangChain for LLM Application Development》教程结合经典大模型开源框架 LangChain,介绍了如何基于 LangChain 框架开发具备实用功能、能力全面的应用程序,《LangChain Chat With Your Data》教程则在此基础上进一步介绍了如何使用 LangChain 架构结合个人私有数据开发个性化大模型应用;《Building Generative AI Applications with Gradio》、《Evaluating and Debugging Generative AI》教程分别介绍了两个实用工具 Gradio 与 W&B,指导开发者如何结合这两个工具来打造、评估生成式 AI 应用。 上述教程非常适用于开发者学习以开启基于 LLM 实际搭建应用程序之路。因此,我们将该系列课程翻译为中文,并复现其范例代码,也为其中一个视频增加了中文字幕,支持国内中文学习者直接使用,以帮助中文学习者更好地学习 LLM 开发;我们也同时实现了效果大致相当的中文 Prompt,支持学习者感受中文语境下 LLM 的学习使用,对比掌握多语言语境下的 Prompt 设计与 LLM 开发。未来,我们也将加入更多 Prompt 高级技巧,以丰富本课程内容,帮助开发者掌握更多、更巧妙的 Prompt 技能。 ## 项目受众 所有具备基础 Python 能力,想要入门 LLM 的开发者。 ## 项目亮点 《ChatGPT Prompt Engineering for Developers》、《Building Systems with the ChatGPT API》等教程作为由吴恩达老师与 OpenAI 联合推出的官方教程,在可预见的未来会成为 LLM 的重要入门教程,但是目前还只支持英文版且国内访问受限,打造中文版且国内流畅访问的教程具有重要意义;同时,GPT 对中文、英文具有不同的理解能力,本教程在多次对比、实验之后确定了效果大致相当的中文 Prompt,支持学习者研究如何提升 ChatGPT 在中文语境下的理解与生成能力。 ## 学习指南 本教程适用于所有具备基础 Python 能力,想要入门 LLM 的开发者。 如果你想要开始学习本教程,你需要提前具备: 1. 至少一个 LLM API(最好是 OpenAI,如果是其他 API,你可能需要参考 [其他教程](https://github.com/datawhalechina/llm-universe) 对 API 调用代码进行修改) 2. 能够使用 Python Jupyter Notebook 本教程共包括 11 门课程,分为必修类、选修类两个类别。必修类课程是我们认为最适合初学者学习以入门 LLM 的课程,包括了入门 LLM 所有方向都需要掌握的基础技能和概念,我们也针对必修类课程制作了适合阅读的在线阅读和 PDF 版本,在学习必修类课程时,我们建议学习者按照我们列出的顺序进行学习;选修类课程是在必修类课程上的拓展延伸,包括了 RAG 开发、模型微调、模型评估等多个方面,适合学习者在掌握了必修类课程之后选择自己感兴趣的方向和课程进行学习。 必修类课程包括: 1. 面向开发者的 Prompt Engineering。基于吴恩达老师《ChatGPT Prompt Engineering for Developers》课程打造,面向入门 LLM 的开发者,深入浅出地介绍了对于开发者,如何构造 Prompt 并基于 OpenAI 提供的 API 实现包括总结、推断、转换等多种常用功能,是入门 LLM 开发的第一步。 2. 搭建基于 ChatGPT 的问答系统。基于吴恩达老师《Building Systems with the ChatGPT API》课程打造,指导开发者如何基于 ChatGPT 提供的 API 开发一个完整的、全面的智能问答系统。通过代码实践,实现了基于 ChatGPT 开发问答系统的全流程,介绍了基于大模型开发的新范式,是大模型开发的实践基础。 3. 使用 LangChain 开发应用程序。基于吴恩达老师《LangChain for LLM Application Development》课程打造,对 LangChain 展开深入介绍,帮助学习者了解如何使用 LangChain,并基于 LangChain 开发完整的、具备强大能力的应用程序。 4. 使用 LangChain 访问个人数据。基于吴恩达老师《LangChain Chat with Your Data》课程打造,深入拓展 LangChain 提供的个人数据访问能力,指导开发者如何使用 LangChain 开发能够访问用户个人数据、提供个性化服务的大模型应用。 选修类课程包括: 1. 使用 Gradio 搭建生成式 AI 应用。基于吴恩达老师《Building Generative AI Applications with Gradio》课程打造,指导开发者如何使用 Gradio 通过 Python 接口程序快速、高效地为生成式 AI 构建用户界面。 2. 评估改进生成式 AI。基于吴恩达老师《Evaluating and Debugging Generative AI》课程打造,结合 wandb,提供一套系统化的方法和工具,帮助开发者有效地跟踪和调试生成式 AI 模型。 3. 微调大语言模型。基于吴恩达老师《Finetuning Large Language Model》课程打造,结合 lamini 框架,讲述如何便捷高效地在本地基于个人数据微调开源大语言模型。 4. 大模型与语义检索。基于吴恩达老师《Large Language Models with Semantic Search》课程打造,针对检索增强生成,讲述了多种高级检索技巧以实现更准确、高效的检索增强 LLM 生成效果。 5. 基于 Chroma 的高级检索。基于吴恩达老师《Advanced Retrieval for AI with Chroma》课程打造,旨在介绍基于 Chroma 的高级检索技术,提升检索结果的准确性。 6. 搭建和评估高级 RAG 应用。基于吴恩达老师《Building and Evaluating Advanced RAG Applications》课程打造,介绍构建和实现高质量 RAG 系统所需的关键技术和评估框架。 7. LangChain 的 Functions、Tools 和 Agents。基于吴恩达老师《Functions, Tools and Agents with LangChain》课程打造,介绍如何基于 LangChain 的新语法构建 Agent。 8. Prompt 高级技巧。包括 CoT、自我一致性等多种 Prompt 高级技巧的基础理论与代码实现。 其他资料包括: **双语字幕视频地址:[吴恩达 x OpenAI 的 Prompt Engineering 课程专业翻译版](https://www.bilibili.com/video/BV1Bo4y1A7FU/?share_source=copy_web)** **中英双语字幕下载:[《ChatGPT 提示工程》非官方版中英双语字幕](https://github.com/GitHubDaily/ChatGPT-Prompt-Engineering-for-Developers-in-Chinese)** **视频讲解:[面向开发者的 Prompt Engineering 讲解(数字游民大会)](https://www.bilibili.com/video/BV1PN4y1k7y2/?spm_id_from=333.999.0.0)** 目录结构说明: content:基于原课程复现的双语版代码,可运行的 Notebook,更新频率最高,更新速度最快。 docs:必修类课程文字教程版在线阅读源码,适合阅读的 Markdown。 figures:图片文件。 ## 致谢 **核心贡献者** - [邹雨衡-项目负责人](https://github.com/logan-zou)(Datawhale成员-对外经济贸易大学研究生) - [左春生-项目负责人](https://github.com/LinChentang)(内容创作者-Datawhale成员) - [长琴-项目发起人](https://yam.gift/)(内容创作者-Datawhale成员-AI算法工程师) - [玉琳-项目发起人](https://github.com/Sophia-Huang)(内容创作者-Datawhale成员) - [徐虎-教程编撰者](https://github.com/xuhu0115)(内容创作者-Datawhale成员) - [刘伟鸿-教程编撰者](https://github.com/Weihong-Liu)(内容创作者-江南大学非全研究生) - [Joye-教程编撰者](https://Joyenjoye.com)(内容创作者-数据科学家) - [高立业](https://github.com/0-yy-0)(内容创作者-DataWhale成员-算法工程师) - [邓宇文](https://github.com/GKDGKD)(内容创作者-Datawhale成员) - [魂兮](https://github.com/wisdom-pan)(内容创作者-前端工程师) - [宋志学](https://github.com/KMnO4-zx)(内容创作者-Datawhale成员) - [韩颐堃](https://github.com/YikunHan42)(内容创作者-Datawhale成员) - [陈逸涵](https://github.com/6forwater29) (内容创作者-Datawhale意向成员-AI爱好者) - [仲泰](https://github.com/ztgg0228)(内容创作者-Datawhale成员) - [万礼行](https://github.com/leason-wan)(内容创作者-视频翻译者) - [王熠明](https://github.com/Bald0Wang)(内容创作者-Datawhale成员) - [曾浩龙](https://yetingyun.blog.csdn.net)(内容创作者-Datawhale 意向成员-JLU AI 研究生) - [小饭同学](https://github.com/xinqi-fan)(内容创作者) - [孙韩玉](https://github.com/sunhanyu714)(内容创作者-算法量化部署工程师) - [张银晗](https://github.com/YinHan-Zhang)(内容创作者-Datawhale成员) - [张晋](https://github.com/Jin-Zhang-Yaoguang)(内容创作者-Datawhale成员) - [李娇娇](https://github.com/Aphasia0515)(内容创作者-Datawhale成员) - [邓恺俊](https://github.com/Kedreamix)(内容创作者-Datawhale成员) - [范致远](https://github.com/Zhiyuan-Fan)(内容创作者-Datawhale成员) - [周景林](https://github.com/Beyondzjl)(内容创作者-Datawhale成员) - [诸世纪](https://github.com/very-very-very)(内容创作者-算法工程师) - [Zhang Yixin](https://github.com/YixinZ-NUS)(内容创作者-IT爱好者) - Sarai(内容创作者-AI应用爱好者) **其他** 1. 特别感谢 [@Sm1les](https://github.com/Sm1les)、[@LSGOMYP](https://github.com/LSGOMYP) 对本项目的帮助与支持; 2. 感谢 [GithubDaily](https://github.com/GitHubDaily) 提供的双语字幕; 3. 如果有任何想法可以联系我们 Datawhale 也欢迎大家多多提出 Issues; 4. 特别感谢以下为教程做出贡献的同学! <a href="https://datawhalechina.github.io/llm-cookbook/graphs/contributors"> <img src="https://contrib.rocks/image?repo=datawhalechina/llm-cookbook" /> </a> Made with [contrib.rocks](https://contrib.rocks). ## Star History [![Star History Chart](https://api.star-history.com/svg?repos=datawhalechina/llm-cookbook&type=Date)](https://star-history.com/#datawhalechina/llm-cookbook&Date) ## 关注我们 <div align=center> <p>扫描下方二维码关注公众号:Datawhale</p> <img src="figures/qrcode.jpeg" width = "180" height = "180"> </div> Datawhale 是一个专注于数据科学与 AI 领域的开源组织,汇集了众多领域院校和知名企业的优秀学习者,聚合了一群有开源精神和探索精神的团队成员。微信搜索公众号 Datawhale 可以加入我们。 ## LICENSE <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="知识共享许可协议" style="border-width:0" src="https://img.shields.io/badge/license-CC%20BY--NC--SA%204.0-lightgrey" /></a><br />本作品采用<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/">知识共享署名 - 非商业性使用 - 相同方式共享 4.0 国际许可协议</a>进行许可。

Education & Learning ML Frameworks
24.2K Github Stars
all-in-rag
Open Source

all-in-rag

# All-in-RAG | 大模型应用开发实战一:RAG技术全栈指南 <div align='center'> <img src="./docs/logo.svg" alt="All-in-RAG Logo" width="70%"> </div> <div align="center"> <h2>🔍 检索增强生成 (RAG) 技术全栈指南</h2> <p><em>从理论到实践,从基础到进阶,构建你的RAG技术体系</em></p> </div> <div align="center"> <img src="https://img.shields.io/github/stars/datawhalechina/all-in-rag?style=for-the-badge&logo=github&color=ff6b6b" alt="GitHub stars"/> <img src="https://img.shields.io/github/forks/datawhalechina/all-in-rag?style=for-the-badge&logo=github&color=4ecdc4" alt="GitHub forks"/> <img src="https://img.shields.io/badge/Python-3.12.7-blue?style=for-the-badge&logo=python&logoColor=white" alt="Python"/> <a href="https://zread.ai/datawhalechina/all-in-rag"> <img src="https://img.shields.io/badge/Ask_Zread-_.svg?style=for-the-badge&color=00b0aa&labelColor=000000&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTQuOTYxNTYgMS42MDAxSDIuMjQxNTZDMS44ODgxIDEuNjAwMSAxLjYwMTU2IDEuODg2NjQgMS42MDE1NiAyLjI0MDFWNC45NjAxQzEuNjAxNTYgNS4zMTM1NiAxLjg4ODEgNS42MDAxIDIuMjQxNTYgNS42MDAxSDQuOTYxNTZDNS4zMTUwMiA1LjYwMDEgNS42MDE1NiA1LjMxMzU2IDUuNjAxNTYgNC45NjAxVjIuMjQwMUM1LjYwMTU2IDEuODg2NjQgNS4zMTUwMiAxLjYwMDEgNC45NjE1NiAxLjYwMDFaIiBmaWxsPSIjZmZmIi8%2BCjxwYXRoIGQ9Ik00Ljk2MTU2IDEwLjM5OTlIMi4yNDE1NkMxLjg4ODEgMTAuMzk5OSAxLjYwMTU2IDEwLjY4NjQgMS42MDE1NiAxMS4wMzk5VjEzLjc1OTlDMS42MDE1NiAxNC4xMTM0IDEuODg4MSAxNC4zOTk5IDIuMjQxNTYgMTQuMzk5OUg0Ljk2MTU2QzUuMzE1MDIgMTQuMzk5OSA1LjYwMTU2IDE0LjExMzQgNS42MDE1NiAxMy43NTk5VjExLjAzOTlDNS42MDE1NiAxMC42ODY0IDUuMzE1MDIgMTAuMzk5OSA0Ljk2MTU2IDEwLjM5OTlaIiBmaWxsPSIjZmZmIi8%2BCjxwYXRoIGQ9Ik0xMy43NTg0IDEuNjAwMUgxMS4wMzg0QzEwLjY4NSAxLjYwMDEgMTAuMzk4NCAxLjg4NjY0IDEwLjM5ODQgMi4yNDAxVjQuOTYwMUMxMC4zOTg0IDUuMzEzNTYgMTAuNjg1IDUuNjAwMSAxMS4wMzg0IDUuNjAwMUgxMy43NTg0QzE0LjExMTkgNS42MDAxIDE0LjM5ODQgNS4zMTM1NiAxNC4zOTg0IDQuOTYwMVYyLjI0MDFDMTQuMzk4NCAxLjg4NjY0IDE0LjExMTkgMS42MDAxIDEzLjc1ODQgMS42MDAxWiIgZmlsbD0iI2ZmZiIvPgo8cGF0aCBkPSJNNCAxMkwxMiA0TDQgMTJaIiBmaWxsPSIjZmZmIi8%2BCjxwYXRoIGQ9Ik00IDEyTDEyIDQiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIvPgo8L3N2Zz4K&logoColor=ffffff" alt="zread"/> </a> </div> <div align="center"> <a href="https://datawhalechina.github.io/all-in-rag/"> <img src="https://img.shields.io/badge/📖_在线阅读-立即开始-success?style=for-the-badge&logoColor=white" alt="在线阅读"/> </a> <a href="README_en.md"> <img src="https://img.shields.io/badge/🌍_English-Version-blue?style=for-the-badge&logoColor=white" alt="English Version"/> </a> <a href="https://github.com/datawhalechina"> <img src="https://img.shields.io/badge/💬_讨论交流-加入我们-purple?style=for-the-badge&logoColor=white" alt="讨论交流"/> </a> </div> <div align="center"> <br> <table> <tr> <td align="center">🎯 <strong>系统化学习</strong><br>完整的RAG技术体系</td> <td align="center">🛠️ <strong>动手实践</strong><br>丰富的项目案例</td> <td align="center">🚀 <strong>生产就绪</strong><br>工程化最佳实践</td> <td align="center">📊 <strong>多模态支持</strong><br>文本+图像检索</td> </tr> </table> </div> ## 项目简介(中文 | [English](README_en.md)) 本项目是一个面向大模型应用开发者的RAG(检索增强生成)技术全栈教程,旨在通过体系化的学习路径和动手实践项目,帮助开发者掌握基于大语言模型的RAG应用开发技能,构建生产级的智能问答和知识检索系统。 **主要内容包括:** 1. **RAG技术基础**:深入浅出地介绍RAG的核心概念、技术原理和应用场景 2. **数据处理全流程**:从数据加载、清洗到文本分块的完整数据准备流程 3. **索引构建与优化**:向量嵌入、多模态嵌入、向量数据库构建及索引优化技术 4. **检索技术进阶**:混合检索、查询构建、Text2SQL等高级检索技术 5. **生成集成与评估**:格式化生成、系统评估与优化方法 6. **项目实战**:从基础到进阶的完整RAG应用开发实践 ## 项目意义 随着大语言模型的快速发展,RAG技术已成为构建智能问答系统、知识检索应用的核心技术。然而,现有的RAG教程往往零散且缺乏系统性,初学者难以形成完整的技术体系认知。 本项目从实践出发,结合最新的RAG技术发展趋势,构建了一套完整的RAG学习体系,帮助开发者: - 系统掌握RAG技术的理论基础和实践技能 - 理解RAG系统的完整架构和各组件的作用 - 具备独立开发RAG应用的能力 - 掌握RAG系统的评估和优化方法 ## 项目受众 **本项目适合以下人群学习:** - 具备Python编程基础,对RAG技术感兴趣的开发者 - 希望系统学习RAG技术的AI工程师 - 想要构建智能问答系统的产品开发者 - 对检索增强生成技术有学习需求的研究人员 **前置要求:** - 掌握Python基础语法和常用库的使用 - 能够简单使用docker - 了解基本的LLM概念(推荐但非必需) - 具备基础的Linux命令行操作能力 ## 项目亮点 1. **体系化学习路径**:从基础概念到高级应用,构建完整的RAG技术学习体系 2. **理论与实践并重**:每个章节都包含理论讲解和代码实践,确保学以致用 3. **多模态支持**:不仅涵盖文本RAG,还包括多模态嵌入和检索技术 4. **工程化导向**:注重实际应用中的工程化问题,包括性能优化、系统评估等 5. **丰富的实战项目**:提供从基础到进阶的多个实战项目,帮助巩固学习成果 ## 内容大纲 ### 第一部分:RAG基础入门 **第一章 解锁RAG** [📖 查看章节](./docs/chapter1) - [x] [RAG简介](./docs/chapter1/01_RAG_intro.md) - RAG技术概述与应用场景 - [x] [准备工作](./docs/chapter1/02_preparation.md) - 环境配置与准备 - [x] [四步构建RAG](./docs/chapter1/03_get_start_rag.md) - 快速上手RAG开发 - [x] [附:环境部署](./docs/chapter1/virtualenv.md) - Python虚拟环境部署方案补充 (贡献者: [@anarchysaiko](https://github.com/anarchysaiko)) **第二章 数据准备** [📖 查看章节](./docs/chapter2) - [x] [数据加载](./docs/chapter2/04_data_load.md) - 多格式文档处理与加载 - [x] [文本分块](./docs/chapter2/05_text_chunking.md) - 文本切分策略与优化 ### 第二部分:索引构建与优化 **第三章 索引构建** [📖 查看章节](./docs/chapter3) - [x] [向量嵌入](./docs/chapter3/06_vector_embedding.md) - 文本向量化技术详解 - [x] [多模态嵌入](./docs/chapter3/07_multimodal_embedding.md) - 图文多模态向量化 - [x] [向量数据库](./docs/chapter3/08_vector_db.md) - 向量存储与检索系统 - [x] [Milvus实践](./docs/chapter3/09_milvus.md) - Milvus多模态检索实战 - [x] [索引优化](./docs/chapter3/10_index_optimization.md) - 索引性能调优技巧 ### 第三部分:检索技术进阶 **第四章 检索优化** [📖 查看章节](./docs/chapter4) - [x] [混合检索](./docs/chapter4/11_hybrid_search.md) - 稠密+稀疏检索融合 - [x] [查询构建](./docs/chapter4/12_query_construction.md) - 智能查询理解与构建 - [x] [Text2SQL](./docs/chapter4/13_text2sql.md) - 自然语言转SQL查询 - [x] [查询重构与分发](./docs/chapter4/14_query_rewriting.md) - 查询优化策略 - [x] [检索进阶技术](./docs/chapter4/15_advanced_retrieval_techniques.md) - 高级检索算法 ### 第四部分:生成与评估 **第五章 生成集成** [📖 查看章节](./docs/chapter5) - [x] [格式化生成](./docs/chapter5/16_formatted_generation.md) - 结构化输出与格式控制 **第六章 RAG系统评估** [📖 查看章节](./docs/chapter6) - [x] [评估介绍](./docs/chapter6/18_system_evaluation.md) - RAG系统评估方法论 - [x] [评估工具](./docs/chapter6/19_common_tools.md) - 常用评估工具与指标 ### 第五部分:高级应用与实战 **第七章 高级RAG架构(拓展部分)** [📖 查看章节](./docs/chapter7) - [x] [基于知识图谱的RAG](./docs/chapter7/20_kg_rag.md) **第八章 项目实战一** [📖 查看章节](./docs/chapter8) - [x] [环境配置与项目架构](./docs/chapter8/01_env_architecture.md) - [x] [数据准备模块实现](./docs/chapter8/02_data_preparation.md) - [x] [索引构建与检索优化](./docs/chapter8/03_index_retrieval.md) - [x] [生成集成与系统整合](./docs/chapter8/04_generation_sys.md) **第九章 项目实战一优化(选修篇)** [📖 查看章节](./docs/chapter9) [🍽️ 项目展示](https://github.com/FutureUnreal/What-to-eat-today) - [x] [图RAG架构设计](./docs/chapter9/01_graph_rag_architecture.md) - [x] [图数据建模与准备](./docs/chapter9/02_graph_data_modeling.md) - [x] [Milvus索引构建](./docs/chapter9/03_index_construction.md) - [x] [智能查询路由与检索策略](./docs/chapter9/04_intelligent_query_routing.md) **第十章 项目实战二(选修篇)** [📖 查看章节](./docs/chapter10) *规划中* ### Extra-chapter - [Neo4J 简单应用](./Extra-chapter/Neo4J-Simple-Application/readme.md) (贡献者: [dalvqw](https://github.com/FutureUnreal)) - [多模态 Omni Embedding 实践(Jina v5-omni)](./Extra-chapter/multimodal-embedding-omni-practice/readme.md)(优化中) > 如果你在使用 RAG / 向量数据库 / Agentic RAG 等相关技术时,也有值得分享的经验与专题内容,非常欢迎以独立章节的形式投稿到 [Extra Chapter](./Extra-chapter/) 中。提交前请先阅读 Extra Chapter 的[贡献与 PR 指南](./Extra-chapter/README.md),我们会根据内容的完整度、实践深度与参考价值综合评估是否合并,并视情况在主教程中进行引用或扩展说明。 ## 目录结构说明 ``` all-in-rag/ ├── docs/ # 教程文档 ├── code/ # 代码示例 ├── data/ # 示例数据 ├── models/ # 预训练模型 ├── Extra-chapter/ # 扩展章节与社区实践内容 └── README.md # 项目说明 ``` ## 实战项目展示 ### 第八章 项目一: ![项目一](./project01.png) ### 第九章 项目一(Graph RAG优化): ![项目一(Graph RAG优化)](./project01_graph.png) ### 第十章 项目二: ## 致谢 **核心贡献者** - [dalvqw-项目负责人](https://github.com/FutureUnreal)(项目发起人与主要贡献者) **额外章节贡献者** - [孙超-内容创作者](https://github.com/anarchysaiko)(Datawhale成员-上海工程技术大学) ### 特别感谢 - 感谢 [@Sm1les](https://github.com/Sm1les) 对本项目的帮助与支持 - 感谢所有为本项目做出贡献的开发者们 - 感谢开源社区提供的优秀工具和框架支持 - 特别感谢以下为教程做出贡献的开发者! [![Contributors](https://contrib.rocks/image?repo=datawhalechina/all-in-rag)](https://github.com/datawhalechina/all-in-rag/graphs/contributors) *Made with [contrib.rocks](https://contrib.rocks).* ## 参与贡献 我们欢迎所有形式的贡献,包括但不限于: - 🚨 **Bug报告**:发现问题请提交 [Issue](https://github.com/datawhalechina/all-in-rag/issues) - 💭 **教程建议**:有好的想法欢迎在 [Discussions](https://github.com/datawhalechina/all-in-rag/discussions) 中讨论 - 📚 **文档改进**:帮助完善文档内容和示例代码(当前仅支持 Extra-chapter 优质内容pr) ## Star History [![all-in-rag stats](https://datawhalechina.github.io/members-visualization/badges/all-in-rag.png)](https://datawhalechina.github.io/members-visualization/repo-badge?repo=all-in-rag) <div align="center"> <p>如果这个项目对你有帮助,请给我们一个 ⭐️</p> <p>让更多人发现这个项目(护食?发来!)</p> </div> ![star](./emoji.png) ## 关于 Datawhale <div align='center'> <img src="https://raw.githubusercontent.com/datawhalechina/pumpkin-book/master/res/qrcode.jpeg" alt="Datawhale" width="30%"> <p>扫描二维码关注 Datawhale 公众号,获取更多优质开源内容</p> </div> --- ## 许可证 <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="知识共享许可协议" style="border-width:0" src="https://img.shields.io/badge/license-CC%20BY--NC--SA%204.0-lightgrey" /></a> 本作品采用 [知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议](http://creativecommons.org/licenses/by-nc-sa/4.0/) 进行许可。 ---

Education & Learning Knowledge Bases & RAG
8.4K Github Stars
llms-from-scratch-cn
Open Source

llms-from-scratch-cn

<center> # 动手学LLM # LLMs From Scratch: Hands-on Building Your Own Large Language Models </center> [![GitHub stars](https://img.shields.io/github/stars/datawhalechina/llms-from-scratch-cn.svg?style=social)](https://github.com/datawhalechina/llms-from-scratch-cn) [![GitHub forks](https://img.shields.io/github/forks/datawhalechina/llms-from-scratch-cn.svg?style=social)](https://github.com/datawhalechina/llms-from-scratch-cn) [![GitHub issues](https://img.shields.io/github/issues/datawhalechina/llms-from-scratch-cn.svg)](https://github.com/datawhalechina/llms-from-scratch-cn/issues) [![Code License](https://img.shields.io/badge/Code%20License-Apache_2.0-brightgreen.svg)](https://github.com/datawhalechina/llms-from-scratch-cn/blob/main/LICENSE.txt) --- ## 📘 项目介绍 如果你想从0手写代码,构建大语言模型,本项目很适合你。 本项目 "LLMs From Scratch" 是由 Datawhale 提供的一个从头开始构建类似 ChatGPT 大型语言模型(LLM)的实践教程。 我们旨在通过详细的指导、代码示例和深度学习资源,帮助开发者和研究者掌握创建大语言模型和大语言模型架构的核心技术。 本项目包括了从0逐步构建GLM4\Llama3\RWKV6的教程,从0构建大模型,一起深入理解大模型原理。 ![image](https://github.com/datawhalechina/llms-from-scratch-cn/assets/84905965/11e1e396-e528-46a0-8e07-57ba513eac63) --- ## 🌟 项目亮点 - **全面的学习路径**: 提供从基础理论到实际编码的系统化学习路径。 - **实践导向**: 强调通过实际操作掌握 LLM 的开发和训练。 - **重点关注LLM架构**: 在微调、部署相关教程较为丰富的背景下,我们着重关注大模型的架构实现。 ## 🚀 主要内容 ### (1)基础知识 在基础知识部分,我们基于"rasbt/LLMs-from-scratch"提供了一个如何从头开始实现类似ChatGPT的大语言模型(LLM)的详细教程,特别感谢@[rasbt](https://github.com/rasbt)。 如果你想快速入门,请参考Codes路径下的notebook,简洁的代码可以帮助你快速入门。 如果你想详细学习,请参考Translated_Book路径下的notebook,提供了更为详细的相关知识。 👨‍💻 **代码实现**: 该项目包含了创建GPT-like大语言模型的全部代码,涵盖了编码、预训练和微调过程。 📖 **逐步学习**: 教程通过清晰的文本、图表和示例,分步骤教授如何创建自己的LLM。 💡 **教育目的**: 该方法主要用于教育,帮助学习者训练和开发小型但功能性的模型,这与创建像ChatGPT这样的大型基础模型的方法相似。 🔧 **简洁易懂的代码**: 利用简洁且可运行的notebook代码,即使只有PyTorch基础,也能完成大模型的构建。 🤔 **深入理解模型原理**: 通过本教程,读者可以深入理解大型语言模型的工作原理。 📖 详细章节安排如下: | 章节标题 | 主要代码 | 所有代码和补充 | |-----------------------------------|----------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------| | 第1章: 理解大型语言模型 | 没有代码 | 没有代码 | | 第2章: 处理文本数据 | - [ch02.ipynb](./Codes/ch02/01_main-chapter-code/ch02.ipynb)<br/>- [dataloader.ipynb](./Codes/ch02/01_main-chapter-code/dataloader.ipynb)<br/>- [exercise-solutions.ipynb](./Codes/ch02/01_main-chapter-code/exercise-solutions.ipynb) | [./Codes/ch02](./Codes/ch02) | | 第3章: 编写注意力机制 | - [ch03.ipynb](./Codes/ch03/01_main-chapter-code/ch03.ipynb)<br/>- [multihead-attention.ipynb](./Codes/ch03/01_main-chapter-code/multihead-attention.ipynb)<br/>- [exercise-solutions.ipynb](./Codes/ch03/01_main-chapter-code/exercise-solutions.ipynb) | [./Codes/ch03](./Codes/ch03) | | 第4章: 从零开始实现GPT模型 | - [ch04.ipynb](./Codes/ch04/01_main-chapter-code/ch04.ipynb)<br/>- [gpt.py](./Codes/ch04/01_main-chapter-code/gpt.py)<br/>- [exercise-solutions.ipynb](./Codes/ch04/01_main-chapter-code/exercise-solutions.ipynb) | [./Codes/ch04](./Codes/ch04) | | 第5章: 使用未标记数据进行预训练 | - [ch05.ipynb](./Codes/ch05/01_main-chapter-code/ch05.ipynb)<br/>- [train.py](./Codes/ch05/01_main-chapter-code/train.py)<br/>- [generate.py](./Codes/ch05/01_main-chapter-code/generate.py)<br/>- [exercise-solutions.ipynb](./Codes/ch05/01_main-chapter-code/exercise-solutions.ipynb) | [./Codes/ch05](./Codes/ch05) | | 第6章: 用于文本分类的微调 | 即将发布 | 即将发布 | | 第7章: 使用人类反馈进行微调 | 即将发布 | 即将发布 | | 第8章: 在实践中使用大型语言模型 | 即将发布 | 即将发布 | | 附录A: PyTorch简介 | - [code-part1.ipynb](./Codes/appendix-A/03_main-chapter-code/code-part1.ipynb)<br/>- [code-part2.ipynb](./Codes/appendix-A/03_main-chapter-code/code-part2.ipynb)<br/>- [DDP-script.py](./Codes/appendix-A/03_main-chapter-code/DDP-script.py)<br/>- [exercise-solutions.ipynb](./Codes/appendix-A/03_main-chapter-code/exercise-solutions.ipynb) | [appendix-A](./Codes/appendix-A) | | 附录B: 参考文献和进一步的阅读材料 | 没有代码 | - | | 附录C: 练习 | 没有代码 | - | | 附录D: 为训练过程添加额外的功能和特性 | - [appendix-D.ipynb](./Codes/appendix-D/01_main-chapter-code/appendix-D.ipynb) | [appendix-D](./Codes/appendix-D) | --- ### (2)模型架构的讨论和搭建 - **支持多种大型模型**: 项目涵盖了 ChatGLM、Llama、RWKV 等多个大型模型的架构讨论与实现,详见 `./Model_Architecture_Discussions` 目录。 - **架构详细解析**: 包括每个模型的配置文件、训练脚本和核心代码,帮助学习者深入理解不同模型的内部机制。 | 模型类型 | Notebook 笔记本 | 贡献者 | | --- | --- | --- | | ChatGLM3 | [chatglm3.ipynb](./Model_Architecture_Discussions/ChatGLM3/加载模型权重.ipynb) | [@Tangent-90C](https://github.com/Tangent-90C) | | Llama3 | [llama3.ipynb](./Model_Architecture_Discussions/llama3/llama3-from-scratch.ipynb) | [@A10-research](https://www.aaaaaaaaaa.org/) | | RWKV V2 | [rwkv-v2.ipynb](./Model_Architecture_Discussions/rwkv-v2/rwkv-v2-guide.ipynb) | [@Ethan-Chen-plus](https://github.com/Ethan-Chen-plus) | | RWKV V3 | [rwkv-v3.ipynb](./Model_Architecture_Discussions/rwkv-v3/rwkv-v3-guide.ipynb) | [@Ethan-Chen-plus](https://github.com/Ethan-Chen-plus) | | RWKV V4 | [rwkv-v4.ipynb](./Model_Architecture_Discussions/rwkv-v4/rwkv-v4-guide.ipynb) | [@Ethan-Chen-plus](https://github.com/Ethan-Chen-plus) | | RWKV V5 | [rwkv-v5.ipynb](./Model_Architecture_Discussions/rwkv-v5/rwkv-v5-guide.ipynb) | [@Ethan-Chen-plus](https://github.com/Ethan-Chen-plus) | | RWKV V6 | [rwkv-v6.ipynb](./Model_Architecture_Discussions/rwkv-v6/rwkv-v6-guide.ipynb) | [@Ethan-Chen-plus](https://github.com/Ethan-Chen-plus) | | ChatGLM4 | [chatglm4.ipynb](./Model_Architecture_Discussions/ChatGLM4/chatglm4-guide.ipynb) | [@Ethan-Chen-plus](https://github.com/Ethan-Chen-plus) | | MiniCPM | [minicpm.ipynb](./Model_Architecture_Discussions/MiniCPM/MiniCPM.ipynb) | [@0-yy-0](https://github.com/0-yy-0) | --- --- ## 📅 Roadmap *注:规划未来任务,并通过 Issue 形式对外发布。* --- ## 👫 参与贡献 - 如果你想参与到项目中,欢迎查看项目的 [Issue](https://github.com/datawhalechina/llms-from-scratch-cn/issues) 查看没有被分配的任务。 - 如果你发现了问题,请在 [Issue](https://github.com/datawhalechina/llms-from-scratch-cn/issues) 中进行反馈🐛。 - 如果你对本项目感兴趣,欢迎通过 [Discussion](https://github.com/datawhalechina/llms-from-scratch-cn/discussions) 进行交流💬。 <center> <img src="images/mental-model.jpg" width="600px"> </center> - 项目受众 - - 技术背景:该项目适合有一定编程基础的人员,特别是对大型语言模型(LLM)感兴趣的开发者和研究者。 - 学习目标:适合那些希望深入了解LLM工作原理,并愿意投入时间从零开始构建和训练自己的LLM的学习者。 - 应用领域:适用于对自然语言处理、人工智能领域感兴趣的开发者,以及希望在教育或研究环境中应用LLM的人员。 - 项目亮点 - 系统化学习:该项目提供了一个系统化的学习路径,从理论基础到实际编码,帮助学习者全面理解LLM。 - 实践导向:与仅仅介绍理论或API使用不同,该项目强调实践,让学习者通过实际操作来掌握LLM的开发和训练。 - 深入浅出:该项目以清晰的语言、图表和示例来解释复杂的概念,使得非专业背景的学习者也能较好地理解。 如果你对 Datawhale 很感兴趣并想要发起一个新的项目,欢迎查看 [Datawhale 贡献指南](https://github.com/datawhalechina/DOPMC#%E4%B8%BA-datawhale-%E5%81%9A%E5%87%BA%E8%B4%A1%E7%8C%AE)。 希望这个项目能够帮助你更好地理解和构建大型语言模型! 🌐 ## 贡献者名单(教程部分) | 姓名 | 职责 | 简介 | GitHub | | :-----:| :----------:| :-----------:|:------:| | 陈可为 | 项目负责人 | 中国科学院大学 |[@Ethan-Chen-plus](https://github.com/Ethan-Chen-plus)| | 王训志 | 第2章贡献者 | 南开大学 |[@aJupyter](https://github.com/aJupyter)| | 汪健麟 | 第2章贡献者 | || | Aria | 第2章贡献者 | |[@ariafyy](https://github.com/ariafyy)| | 汪健麟 | 第2章贡献者 | || | 张友东 | 第3章贡献者 | || | 邹雨衡 | 第3章贡献者 | || | 曹 妍 | 第3章贡献者 | |[@SamanthaTso](https://github.com/SamanthaTso)| | 陈嘉诺 | 第4章贡献者 | 广州大学 |[@Tangent-90C](https://github.com/Tangent-90C)| | 高立业 | 第4章贡献者 | |[@0-yy-0](https://github.com/0-yy-0)| | 蒋文力 | 第4章贡献者 | |[@morcake](https://github.com/morcake)| | 丁悦 | 第5章贡献者 | 哈尔滨工业大学(威海)|[@dingyue772](https://github.com/dingyue772)| | 周景林 | 附录贡献者 | |[@Beyondzjl](https://github.com/Beyondzjl)| | 陈可为 | 附录贡献者 | |[@Ethan-Chen-plus](https://github.com/Ethan-Chen-plus)| ## 关注我们 <div align=center> <p>扫描下方二维码关注公众号:Datawhale</p> <img src="https://raw.githubusercontent.com/datawhalechina/pumpkin-book/master/res/qrcode.jpeg" width = "180" height = "180"> </div> ## LICENSE <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="知识共享许可协议" style="border-width:0" src="https://img.shields.io/badge/license-CC%20BY--NC--SA%204.0-lightgrey" /></a><br />本作品采用<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/">知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议</a>进行许可。 *注:默认使用CC 4.0协议,也可根据自身项目情况选用其他协议*

Education & Learning ML Frameworks
4.2K Github Stars
daily-interview
Open Source

daily-interview

<div align='center'> <img src="./logo.png" alt="alt text" width="100%"> <h1>⭐Daily Interview - 面试必看 </h1> </div> <div align="center"> <div align="center"> [![GitHub stars](https://img.shields.io/github/stars/datawhalechina/daily-interview?style=for-the-badge&logo=github)](https://github.com/datawhalechina/daily-interview/stargazers) [![GitHub forks](https://img.shields.io/github/forks/datawhalechina/daily-interview?style=for-the-badge&logo=github)](https://github.com/datawhalechina/daily-interview/network) [![GitHub issues](https://img.shields.io/github/issues/datawhalechina/daily-interview?style=for-the-badge&logo=github)](https://github.com/datawhalechina/daily-interview/issues) [![License](https://img.shields.io/badge/license-CC%20BY--NC--SA%204.0-lightgrey?style=for-the-badge)](http://creativecommons.org/licenses/by-nc-sa/4.0/) **每一个面试者面试之前必看一遍的小面经** [📖 在线阅读](https://datawhalechina.github.io/daily-interview/) | [🚀 快速开始](#使用指南) | [🤝 参与贡献](#招募) </div> ## 📖 项目背景 在求职路上,我们经常面临这样的困扰: - 📚 **信息过载**:牛客网、知乎等平台虽然有海量面经,但往往大而散,难以高效利用 - ⏰ **时间紧迫**:面试前临时抱佛脚,翻阅大量材料反而增加心理压力 - 🎯 **缺乏重点**:不知道哪些是真正的高频考点,复习没有针对性 **Daily Interview** 就是为了解决这些问题而生的! ## 🎯 项目宗旨 > 💡 **核心理念**:不求大而全,但求精而准 - ✅ **精选高频**:只收录面试中真正高频的知识点和题目 - ✅ **快速复习**:面试前半天时间,温故而知新 - ✅ **举一反三**:提供思路和方法,而非标准答案 - ❌ **不求全面**:知识在更新迭代,我们专注核心内容 - ❌ **不做补习**:每个人短板不同,需要自主完善知识体系 ## 📚 内容体系 <div align="center"> <img src="https://github.com/datawhalechina/daily-interview/blob/master/content.png" width="500px" alt="内容体系图"> </div> ### 🗂️ 知识模块 | 模块 | 内容 | 适用岗位 | |------|------|----------| | 🧮 **算法基础** | 数据结构、算法思想、复杂度分析 | 🌟 所有技术岗位 | | 💻 **编程语言** | Java、JavaScript、Python等 | 开发岗、算法岗 | | 🔧 **计算机基础** | 操作系统、网络、数据库、数学 | 🌟 所有技术岗位 | | 🤖 **AI算法** | 机器学习、深度学习、NLP、CV | 算法岗、AI工程师 | | 🏗️ **系统设计** | 分布式系统、高并发架构 | 高级开发岗 | | 🛠️ **开发技术** | 前端、后端、大数据技术栈 | 开发岗 | | 📋 **项目经验** | 项目介绍、技术难点、优化方案 | 🌟 所有岗位 | | 🗣️ **行为面试** | 自我介绍、职业规划、团队协作 | 🌟 所有岗位 | ### 📊 Star History <div align="center"> [![Star History Chart](https://api.star-history.com/svg?repos=datawhalechina/daily-interview&type=Date&theme=dark)](https://star-history.com/#datawhalechina/daily-interview&Date) </div> ## 🚀 使用指南 ### 📖 在线阅读 访问 [https://datawhalechina.github.io/daily-interview/](https://datawhalechina.github.io/daily-interview/) 获得最佳阅读体验。 ### 🎯 按岗位复习 #### 🤖 算法岗位 ``` 重点模块:AI算法 + 数据结构与算法 辅助模块:数学基础 + 计算机基础 复习时间:面试前1-2天重点复习 ``` #### 💻 开发岗位 ``` 重点模块:开发技术 + 数据结构与算法 + 计算机基础 辅助模块:系统设计(高级岗位) 复习时间:面试前半天快速过一遍 ``` #### 📋 通用准备 ``` 必备模块:项目经验 + 行为面试 适用对象:所有技术岗位 建议:提前准备,形成自己的表达模板 ``` ### 💡 使用技巧 1. **🔖 收藏重点**:标记自己薄弱的知识点,重点复习 2. **🔄 反复练习**:算法题要动手实现,不能只看不练 3. **🗣️ 模拟面试**:找朋友或同事进行模拟面试练习 4. **📝 个人笔记**:基于本项目内容,整理自己的面试笔记 ## 🤝 招募贡献者 我们欢迎所有对面试准备有经验的朋友参与贡献! ### 🎯 我们需要你的帮助 - 📝 **内容贡献**:补充面试题目、优化答案解析 - 🐛 **问题反馈**:发现错误或改进建议 - 🌐 **技术支持**:网站优化、功能开发 - 📚 **经验分享**:分享面试经验和技巧 ### 📧 联系方式 - **项目负责人**:[@muxiaoxiong](https://github.com/muxiaoxiong) - **Issue**:[GitHub Issues](https://github.com/datawhalechina/daily-interview/issues) - **讨论**:[GitHub Discussions](https://github.com/datawhalechina/daily-interview/discussions) ## 👥 贡献者 感谢所有为这个项目做出贡献的朋友们! ### 🏆 特别贡献者 - **[@muxiaoxiong](https://github.com/muxiaoxiong)** - 项目负责人,主要维护者 - **[@heitao](https://github.com/heitao)** - 项目发起人,核心内容贡献者 (66+ commits) - **[@xiaorrancs](https://github.com/xiaorrancs)** - 主要内容贡献者,算法题目整理 (39+ commits) - **[@1985312383](https://github.com/1985312383)** - VitePress迁移,网站重构,内容整理 ## 📅 更新日志 ### 🎉 2025-08-26 - 重大更新 - ✨ **技术栈升级**:从Docsify迁移到VitePress,构建速度提升99%+ - 🎨 **界面重构**:全新的双侧边栏设计,支持VS Code Dark主题 - 🔍 **搜索优化**:新增本地搜索功能,支持中文搜索 - 📱 **响应式设计**:完美适配各种屏幕尺寸 - 🧮 **数学公式**:支持LaTeX数学公式渲染 - 🗂️ **内容重组**:系统性重组所有文档,修复乱码问题 - 🖼️ **图片优化**:统一图片路径,确保所有图片正常显示 - 💻 **代码高亮**:为所有代码块添加语言标识,提升阅读体验 - 🚀 **部署优化**:更新GitHub Actions,支持自动化部署 - 📋 **导航重构**:从Docsify的侧边栏导航升级为VitePress的双侧边栏设计 ### 📚 历史版本 - **2025-07-15**:新增大语言模型相关面试资料 ## 🌟 关注我们 <div align="center"> ### 📱 微信公众号 扫描下方二维码关注 **Datawhale** 公众号,获取更多学习资源 <img src="https://raw.githubusercontent.com/datawhalechina/pumpkin-book/master/res/qrcode.jpeg" width="200" height="200" alt="Datawhale公众号"> ### 🔗 相关链接 [![GitHub](https://img.shields.io/badge/GitHub-datawhalechina-black?style=for-the-badge&logo=github)](https://github.com/datawhalechina) [![Website](https://img.shields.io/badge/Website-datawhale.cn-blue?style=for-the-badge&logo=internet-explorer)](https://datawhale.cn) </div> ## 📄 开源协议 <div align="center"> <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"> <img alt="知识共享许可协议" style="border-width:0" src="https://img.shields.io/badge/license-CC%20BY--NC--SA%204.0-lightgrey?style=for-the-badge" /> </a> 本作品采用 [知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议](http://creativecommons.org/licenses/by-nc-sa/4.0/) 进行许可。 **这意味着你可以:** - ✅ **分享** - 在任何媒介以任何形式复制、发行本作品 - ✅ **演绎** - 修改、转换或以本作品为基础进行创作 **但需要遵循以下条件:** - 📝 **署名** - 必须给出适当的署名 - 🚫 **非商业性使用** - 不得用于商业目的 - 🔄 **相同方式共享** - 如果修改、转换或以本作品为基础进行创作,必须基于与原先许可协议相同的许可协议分布 </div> --- <div align="center"> **⭐ 如果这个项目对你有帮助,请给我们一个Star!⭐** **💪 祝愿所有使用这份面经的朋友都能拿到心仪的offer!💪** </div>

Education & Learning Utilities & System
3.7K Github Stars
pumpkin-book
Open Source

pumpkin-book

<div align=center> <img src="https://raw.githubusercontent.com/datawhalechina/pumpkin-book/master/res/pumpkin.png" > <h1>南瓜书(pumpkin-book)</h1> </div> “周志华老师的《机器学习》(西瓜书)是机器学习领域的经典入门教材之一,周老师为了使尽可能多的读者通过西瓜书对机器学习有所了解, 所以在书中对部分公式的推导细节没有详述,但是这对那些想深究公式推导细节的读者来说可能“不太友好”,本书旨在对西瓜书里比较难理解的公式加以解析,以及对部分公式补充具体的推导细节。” 读到这里,大家可能会疑问为啥前面这段话加了引号,因为这只是我们最初的遐想,后来我们了解到,周老师之所以省去这些推导细节的真实原因是,他本尊认为“理工科数学基础扎实点的大二下学生应该对西瓜书中的推导细节无困难吧,要点在书里都有了,略去的细节应能脑补或做练习”。所以......本南瓜书只能算是我等数学渣渣在自学的时候记下来的笔记,希望能够帮助大家都成为一名合格的“理工科数学基础扎实点的大二下学生”。 ## 使用说明 - 南瓜书的所有内容都是以西瓜书的内容为前置知识进行表述的,所以南瓜书的最佳使用方法是以西瓜书为主线,遇到自己推导不出来或者看不懂的公式时再来查阅南瓜书; - 对于初学机器学习的小白,西瓜书第1章和第2章的公式**强烈不建议深究**,简单过一下即可,等你学得有点飘的时候再回来啃都来得及; - 每个公式的解析和推导我们都力争以本科数学基础的视角进行讲解,所以超纲的数学知识我们通常都会以附录和参考文献的形式给出,感兴趣的同学可以继续沿着我们给的资料进行深入学习; - 若南瓜书里没有你想要查阅的公式,或者你发现南瓜书哪个地方有错误,请毫不犹豫地去我们GitHub的Issues( 地址:[https://github.com/datawhalechina/pumpkin-book/issues](https://github.com/datawhalechina/pumpkin-book/issues) )进行反馈,在对应版块提交你希望补充的公式编号或者勘误信息,我们通常会在24小时以内给您回复,超过24小时未回复的话可以微信联系我们(微信号:at-Sm1les); ## 配套资源 视频教程:[https://www.bilibili.com/video/BV1Mh411e7VU](https://www.bilibili.com/video/BV1Mh411e7VU) PDF版本下载:[https://github.com/datawhalechina/pumpkin-book/releases](https://github.com/datawhalechina/pumpkin-book/releases) 组队学习:[https://www.datawhale.cn/learn/summary/2](https://www.datawhale.cn/learn/summary/2) ## 纸质版 <img src="https://raw.githubusercontent.com/datawhalechina/pumpkin-book/master/res/nangua_v2.jpg" width="300" height="316"> 购买链接:[京东](https://item.jd.com/13989990.html) | [当当](http://product.dangdang.com/29579286.html) | [天猫](https://detail.tmall.com/item.htm?abbucket=12&id=720482241470) 勘误表:[https://datawhalechina.github.io/pumpkin-book/#/errata](https://datawhalechina.github.io/pumpkin-book/#/errata) ### 纸质版和开源版的区别 开源版本是我们寄送出版社的全书初稿,经由人民邮电出版社的编辑老师们对初稿进行了反复修缮最终诞生了纸质书籍,在此向人民邮电出版社的编辑老师的认真严谨表示衷心的感谢!(附:校对样稿) <img src="https://raw.githubusercontent.com/datawhalechina/pumpkin-book/master/res/yanggao1.jpg" width="300" height="225"> <img src="https://raw.githubusercontent.com/datawhalechina/pumpkin-book/master/res/yanggao2.jpg" width="300" height="225"> ## 配套的西瓜书版本 <img src="https://raw.githubusercontent.com/datawhalechina/pumpkin-book/master/res/xigua.jpg" width="300" height= "350"> 版次:2016年1月第1版 勘误表:[http://cs.nju.edu.cn/zhouzh/zhouzh.files/publication/MLbook2016.htm](http://cs.nju.edu.cn/zhouzh/zhouzh.files/publication/MLbook2016.htm) ## 编委会 | 职责 | 名单 | | :---: | :---: | | **主编** | [@Sm1les](https://github.com/Sm1les) [@archwalker](https://github.com/archwalker) [@jbb0523](https://blog.csdn.net/jbb0523)| | **编委** | [@juxiao](https://github.com/juxiao) [@Majingmin](https://github.com/Majingmin) [@MrBigFan](https://github.com/MrBigFan) [@shanry](https://github.com/shanry) [@Ye980226](https://github.com/Ye980226) | ## 封面设计 | 构思 | 创作 | | :---: | :---: | | [@Sm1les](https://github.com/Sm1les) | 林王茂盛 | ## 致谢 特别感谢[@awyd234](https://github.com/awyd234)、[@feijuan](https://github.com/feijuan)、[@Ggmatch](https://github.com/Ggmatch)、[@Heitao5200](https://github.com/Heitao5200)、[@xhqing](https://github.com/xhqing)、[@LongJH](https://github.com/LongJH)、[@LilRachel](https://github.com/LilRachel)、[@LeoLRH](https://github.com/LeoLRH)、[@Nono17](https://github.com/Nono17)、[@spareribs](https://github.com/spareribs)、[@sunchaothu](https://github.com/sunchaothu)、[@StevenLzq](https://github.com/StevenLzq) 在最早期的时候对南瓜书所做的贡献。 <div align=center> <h2>关注我们</h2> 扫描下方二维码关注公众号:Datawhale,然后发送“南瓜书”,即可获取“南瓜书读者交流群”入群方式 <img src="https://raw.githubusercontent.com/datawhalechina/pumpkin-book/master/res/qrcode.jpeg" width="180" height="180"> <h2>LICENSE</h2> 本作品采用 <a href="http://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank">知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议(CC BY-NC-SA 4.0)</a> 进行许可 </div>

Education & Learning
25.9K Github Stars
leedl-tutorial
Open Source

leedl-tutorial

[![GitHub issues](https://img.shields.io/github/issues/datawhalechina/leedl-tutorial)](https://github.com/datawhalechina/leedl-tutorial/issues) [![GitHub stars](https://img.shields.io/github/stars/datawhalechina/leedl-tutorial)](https://github.com/datawhalechina/leedl-tutorial/stargazers) [![GitHub forks](https://img.shields.io/github/forks/datawhalechina/leedl-tutorial)](https://github.com/datawhalechina/leedl-tutorial/network)![Downloads](https://img.shields.io/github/downloads/datawhalechina/leedl-tutorial/total) <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="知识共享许可协议" style="border-width:0" src="https://img.shields.io/badge/license-CC%20BY--NC--SA%204.0-lightgrey" /></a> # 李宏毅深度学习教程LeeDL-Tutorial(苹果书) 李宏毅老师是台湾大学的教授,其[《机器学习》(2021年春)](https://speech.ee.ntu.edu.tw/~hylee/ml/2021-spring.html)是深度学习领域经典的中文视频之一。李老师幽默风趣的授课风格深受大家喜爱,让晦涩难懂的深度学习理论变得轻松易懂,他会通过很多动漫相关的有趣例子来讲解深度学习理论。李老师的课程内容很全面,覆盖了到深度学习必须掌握的常见理论,能让学生对于深度学习的绝大多数领域都有一定了解,从而可以进一步选择想要深入的方向进行学习,培养深度学习的直觉,对于想入门深度学习又想看中文讲解的同学是非常推荐的。 本教程主要内容源于[《机器学习》(2021年春)](https://speech.ee.ntu.edu.tw/~hylee/ml/2021-spring.html),并在其基础上进行了一定的原创。比如,为了尽可能地降低阅读门槛,笔者对这门公开课的精华内容进行选取并优化,对所涉及的公式都给出详细的推导过程,对较难理解的知识点进行了重点讲解和强化,以方便读者较为轻松地入门。此外,为了丰富内容,笔者在教程中选取了[《机器学习》(2017年春)](https://speech.ee.ntu.edu.tw/~hylee/ml/2017-spring.php) 的部分内容,并补充了不少除这门公开课之外的深度学习相关知识。 <!-- 注: - 基于《机器学习》(2017年春)的李宏毅机器学习笔记在线阅读地址:https://datawhalechina.github.io/leedl-tutorial/#/ - 基于《机器学习》(2017年春)的李宏毅机器学习笔记源文件:https://github.com/datawhalechina/leedl-tutorial/tree/pre_master --> >ℹ️ **[李宏毅老师推荐](https://twitter.com/HungyiLee2/status/1754042391211004235):** <div align=center><img src="https://github.com/datawhalechina/leedl-tutorial/blob/master/assets/prof._lee_twitter.jpg?raw=true" height = "450" alt="李宏毅老师推荐。"></div> ## 贡献者 <table border="0"> <tbody> <tr align="center" > <td> <a href="https://github.com/qiwang067"><img width="70" height="70" src="https://github.com/qiwang067.png?s=40" alt="pic"></a><br> <a href="https://github.com/qiwang067">Qi Wang</a> <p> 上海交通大学博士生<br>中国科学院大学硕士</p> </td> <td> <a href="https://yyysjz1997.github.io/"><img width="70" height="70" src="https://github.com/yyysjz1997.png?s=40" alt="pic"></a><br> <a href="https://yyysjz1997.github.io/">Yiyuan Yang</a> <p> 牛津大学博士生<br>清华大学硕士</p> </td> <td> <a href="https://github.com/JohnJim0816"><img width="70" height="70" src="https://github.com/JohnJim0816.png?s=40" alt="pic"></a><br> <a href="https://github.com/JohnJim0816">John Jim</a> <p>北京大学硕士</p> </td> </tr> </tbody> </table> ## 纸质版 <img src="https://github.com/datawhalechina/leedl-tutorial/blob/master/assets/apple.png?raw=true" width="300"> 推荐购买链接:[京东](https://u.jd.com/ta2MD1R) | [当当](https://product.dangdang.com/29766946.html) <table border="0"> <tbody> <tr align="center" > <td> <img width="120" height="120" src="https://github.com/datawhalechina/leedl-tutorial/blob/master/assets/apple_jingdong.jpg" alt="pic"> <br> <p>推荐京东扫码购买</p> </td> <td> <img width="120" height="120" src="https://github.com/datawhalechina/leedl-tutorial/blob/master/assets/apple_dangdang_QR.jpg" alt="pic"><br> <p>当当扫码购买</p> </td> </tr> </tbody> </table> 豆瓣评分:https://book.douban.com/subject/36997460/ > [!IMPORTANT] **勘误修订表**:https://datawhalechina.github.io/leedl-tutorial/#/errata ## 最新版PDF下载 地址:https://github.com/datawhalechina/leedl-tutorial/releases 国内地址:https://pan.baidu.com/s/1qgAIFblbSn4MxnwzALJXPg 提取码: 1cnm ## 纸质版和PDF版的区别 PDF版本是全书初稿,人民邮电出版社的编辑老师们对初稿进行了反复修缮,最终诞生了纸质书籍,在此向人民邮电出版社的编辑老师的认真严谨表示衷心的感谢!(附:校对样稿) <center class="half"><img src="https://github.com/datawhalechina/leedl-tutorial/blob/master/assets/yanggao.png" width="680"></center> ## 内容介绍 * **引言** @王琦 * **深度学习** @王琦 * [x] 局部最小值与鞍点 * [x] 训练技巧 * [x] 自适应学习率 * [x] 分类问题损失函数 * [x] 归一化 * **卷积神经网络和自注意力机制** @王琦 * [x] 卷积神经网络 * [x] 自注意力机制 * **循环神经网络** @王琦 * **Transformer** @王琦 * [x] Transformer * **生成模型** @杨毅远 * [x] 生成对抗网络基础 * [x] 生成对抗网络理论与 Wasserstein 生成对抗网络 * [x] 生成对抗网络的评估与有条件的生成对抗网络 * [x] 循环生成对抗网络 * **自监督学习** @王琦 * [x] 芝麻街的模型 * [x] BERT * [x] GPT-3 * **自动编码器概念及其应用** @江季 * **扩散模型**@王琦 * **对抗攻击** @杨毅远 * [x] 对抗攻击基本概念 * [x] 白盒攻击vs黑盒攻击 * [x] 被动防守vs主动防守 * **可解释人工智能** @杨毅远 * [x] 可解释人工智能概念与案例 * [x] 可解释人工智能中的局部可解释性 * [x] 可解释人工智能中的全局可解释性 * **迁移学习** @王琦 * [x] 领域自适应 * [x] 领域对抗训练 * **深度强化学习** @王琦 * **终身学习** @江季 * [x] 灾难性遗忘 * [x] 缓解灾难性遗忘 * **网络压缩** @王琦 * [x] 剪枝与彩票假设 * [x] 知识蒸馏 * **元学习** @杨毅远 * [x] 元学习的概念 * [x] 元学习的实例算法 * [x] 元学习的应用 * **ChatGPT** @杨毅远 * [x] 对于ChatGPT的误解 * [x] ChatGPT背后的关键技术——预训练 * [x] ChatGPT带来的研究问题 ## 配套代码 [点击](https://github.com/datawhalechina/leedl-tutorial/tree/master/Homework)或者网页点击```Homework```文件夹进入配套代码 ## 扩展资源 - 对**强化学习玩我的世界(Minecraft)游戏**感兴趣的读者,可阅读 [LS-Imagine](https://github.com/qiwang067/LS-Imagine) - 对**强化学习**感兴趣的读者,可阅读[蘑菇书EasyRL](https://github.com/datawhalechina/easy-rl) - 对**视觉强化学习**感兴趣的读者,可阅读 [Awesome Visual RL](https://github.com/qiwang067/awesome-visual-rl) ## 引用信息 ``` 王琦,杨毅远,江季,深度学习详解,人民邮电出版社,https://github.com/datawhalechina/leedl-tutorial, 2024. Qi Wang, Yiyuan Yang, Ji Jiang,LeeDL Tutorial,Posts & Telecom Press,https://github.com/datawhalechina/leedl-tutorial, 2024. ``` ```bibtex @book{wang2024leedltutorial, title = {深度学习详解}, publisher = {人民邮电出版社}, year = {2024}, author = {王琦,杨毅远,江季}, address = {北京}, isbn = {9787115642110}, url = {https://github.com/datawhalechina/leedl-tutorial} } ``` ```bibtex @book{wang2024leedltutorialen, title = {LeeDL Tutorial}, publisher = {Posts & Telecom Press}, year = {2024}, author = {Qi Wang,Yiyuan Yang,Ji Jiang}, address = {Beijing}, isbn = {9787115642110}, url = {https://github.com/datawhalechina/leedl-tutorial} } ``` 若该教程对您有所帮助,可以在页面右上角点个Star :star: 支持一下,谢谢 :blush:! 如果您需要转载该教程的内容,请注明出处:[https://github.com/datawhalechina/leedl-tutorial](https://github.com/datawhalechina/leedl-tutorial)。 ## 致谢 特别感谢 [@Sm1les](https://github.com/Sm1les)、[@LSGOMYP](https://github.com/LSGOMYP)、[FuWeiru](https://github.com/FuWeiru) 对本项目的帮助与支持。 另外,十分感谢大家对于LeeDL-Tutorial的关注。 [![Stargazers repo roster for @datawhalechina/leedl-tutorial](https://reporoster.com/stars/datawhalechina/leedl-tutorial)](https://github.com/datawhalechina/leedl-tutorial/stargazers) [![Forkers repo roster for @datawhalechina/leedl-tutorial](https://reporoster.com/forks/datawhalechina/leedl-tutorial)](https://github.com/datawhalechina/leedl-tutorial/network/members) ## 关注我们 扫描下方二维码关注公众号:Datawhale,回复关键词“李宏毅深度学习”,即可加入“LeeDL-Tutorial读者交流群” <div align=center><img src="https://raw.githubusercontent.com/datawhalechina/easy-rl/master/docs/res/qrcode.jpeg" width = "250" height = "270" alt="Datawhale是一个专注AI领域的开源组织,以“for the learner,和学习者一起成长”为愿景,构建对学习者最有价值的开源学习社区。关注我们,一起学习成长。"></div> ## LICENSE <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="知识共享许可协议" style="border-width:0" src="https://img.shields.io/badge/license-CC%20BY--NC--SA%204.0-lightgrey" /></a><br />本作品采用<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/">知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议</a>进行许可。 ## Star History [![Star History](https://api.star-history.com/svg?repos=datawhalechina/leedl-tutorial)](https://star-history.com/#datawhalechina/leedl-tutorial&Date)

Education & Learning ML Frameworks
16.6K Github Stars
fun-rec
Open Source

fun-rec

<div align=center> <img src="imgs/wheat.png" width="100%"/> <h3>深度推荐算法实践(小麦书)</h3> <p>从级联架构到生成式范式</p> </div> <div align="center"> 中文 | [English](./README_en.md) </div> > **注意:本项目仍在开发中,代码与内容更新较为频繁,暂不接受 Pull Request。** > 如果您有任何建议或问题,欢迎通过 [Issue](https://github.com/datawhalechina/fun-rec/issues) 进行反馈。 本书系统介绍了推荐系统从传统级联架构到生成式范式的完整技术演进。内容分为两大板块:上篇覆盖协同过滤、向量召回、序列召回等候选检索技术,以及特征交叉、多目标建模、多场景建模等精排与重排方法;下篇聚焦前沿生成式推荐,涵盖大模型基础、Scaling Law 架构探索、端到端生成式建模、思维链推理与扩散模型推荐等最新范式,并附有完整的生产级系统实战项目。适合具备机器学习基础、希望系统掌握推荐算法核心原理与工程实践的读者。 ## 📖 章节目录 **上篇:级联架构** - **1. 推荐系统概述** - 推荐系统是什么?/ 本书概览 - **2. 快速候选召回** - 协同过滤:物品CF / 用户CF / 矩阵分解 - 向量召回:I2I / U2I - 序列召回:用户兴趣表示 / 全量兴趣建模与流式索引 - **3. 精准偏好预测** - 记忆与泛化 - 特征交叉:二阶 / 高阶 - 序列建模:局部激活注意力机制 / 兴趣演化建模 / 行为到会话序列建模 - 多目标建模:基础结构演进 / 任务依赖建模 / 多目标损失融合 - 多场景建模:多塔结构 / 动态权重建模 - **4. 重排多样性建模** - 基于贪心的重排:最大边际相关性 / 行列式点过程 - 基于个性化的重排:Transformer重排模型 / 基于排列组合的重排模型 **下篇:生成式范式** - **5. 生成式推荐基础** - 推荐范式的演进:判别式建模 / 生成式核心思想 / 两种范式的本质区别 - 生成式架构的基石:Transformer / Diffusion模型 - LLM建模的基本流程:三阶段范式 / 从LLM到生成式推荐 - 推荐中的Tokenizer技术:范式演进 / 端到端离散化 / 工业级方案 / 核心挑战 - **6. Scaling Law架构探索** - HSTU架构演进:Scaling Law首次探索 / 生成式推荐的工程突破 / 混合范式的突破 - 硬件感知架构设计:Hardware-Aware统一架构 / 统一序列与特征交叉建模 - **7. 端到端生成式建模** - OneRec的架构演进:OneRec-V1开创性探索 / OneRec-V2效率与性能突破 - 查询补全与商品检索:OneSug查询补全生成 / OneSearch商品检索生成 - 竞价机制与多场景广告:EGA统一竞价与生成 / GPR预训练驱动广告生成 - **8. 会思考的推荐模型** - 协同语义与语言语义的统一:物品索引学习 / 语义对齐训练 / PLUM框架 - OneRec-Think的思考框架:物品对齐 / 推理激活 / 推理增强 / Think-Ahead架构 - 自主推理的探索:RecZero / RecOne / 未来图景 - **9. 基于扩散的推荐模型** - 推荐中的扩散模型基础:Diffusion分类 / 前向加噪与反向去噪 / 训练与采样 / 条件生成 - 基于扩散的数据增强:DiffuASR序列增强 / Diff-MSR跨场景增强 - 特征增强与多样性优化:AsymDiffRec特征增强 / DMSG多样性优化 - **10. 生产级推荐系统构建** - 项目背景与目标 / 系统架构设计 / 离线流水线 / 在线流程 / 前端与交互 / 部署与运维 为了方便学习和交流,**我们建立了FunRec学习社区(微信群+知识星球)**,微信群方便大家平时日常交流和讨论,知识星球方便沉淀内容,B站上还有一些早期录制的相关视频[跟技术相关的分享内容都放在了B站](https://space.bilibili.com/431850986/channel/collectiondetail?sid=339597)。由于微信群的二维码只有7天内有效,所以直接加下面这个微信,备注:**Fun-Rec**,会被拉到Fun-Rec交流群,如果觉得微信群比较吵建议直接加知识星球!。 <div align=center> <img src="imgs/join_community.png" alt="image-20220408193745249" width="400px";" /> </div> ## 致谢 **核心贡献者** <table border="0"> <tbody> <tr align="center" > <td> <a href="https://github.com/ruyiluo"><img width="70" height="70" src="https://github.com/ruyiluo.png?s=40" alt="pic"></a><br> <a href="https://github.com/ruyiluo">Ruyi Luo</a> <p><br> 西安电子科技大学硕士 <br> 推荐算法工程师 </p> </td> <td> <a href="https://github.com/bokang-ugent"><img width="70" height="70" src="https://github.com/bokang-ugent.png?s=40" alt="pic"></a><br> <a href="https://bokang.io">Bo Kang</a> <p><br> 比利时根特大学访问教授 <br> nobl.ai 联合创始人 </p> </td> </tr> </tbody> </table> 特别感谢[kenken-xr](https://github.com/kenken-xr)、[swallown1](https://github.com/swallown1)、[Lyons-T](https://github.com/Lyons-T)、[zhongqiangwu960812](https://github.com/zhongqiangwu960812)、[@wangych6](https://github.com/wangych6)、[@morningsky](https://github.com/morningsky)、[@hilbert-yaa](https://github.com/hilbert-yaa)、[@maxxbaba](https://github.com/maxxbaba)、[@pearfl](https://github.com/pearfl)、[@ChungKingExpress](https://github.com/ChungKingExpress)、[@storyandwine](https://github.com/storyandwine)、[@SYC1123](https://github.com/SYC1123)、[@luzixiao](https://github.com/luzixiao)、[@Evan-wyl](https://github.com/Evan-wyl)、[@Sm1les](https://github.com/Sm1les)、[@LSGOMYP](https://github.com/LSGOMYP)等人早期对本项目的帮助与支持。 ## 关注我们 <div align=center> <p>扫描下方二维码关注公众号:Datawhale</p> <img src="imgs/datawhale_qrcode.jpg" width = "180" height = "180"> </div> Datawhale,一个专注于AI领域的学习圈子。初衷是for the learner,和学习者一起成长。目前加入学习社群的人数已经数千人,组织了机器学习,深度学习,数据分析,数据挖掘,爬虫,编程,统计学,Mysql,数据竞赛等多个领域的内容学习,微信搜索公众号Datawhale可以加入我们。 ## LICENSE <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="知识共享许可协议" style="border-width:0" src="https://img.shields.io/badge/license-CC%20BY--NC--SA%204.0-lightgrey" /></a> 本作品采用<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/">知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议</a>进行许可。

Education & Learning ML Frameworks
7.2K Github Stars
competition-baseline
Open Source

competition-baseline

# 数据竞赛Baseline & Topline分享 假如你是数据竞赛的初学者、爱好者,比赛的baseline不仅是比赛思路分享,同时也是一类数据问题的方法总结。本Repo想做的就是将收集并整理并分享各种比赛的baseline方案。 你可能会问为什么是baseline,而不是获胜者的代码分享?相比于获胜者的代码baseline代码都比较简单,容易整理和学习;其次baseline代码更加实用和简洁,适合入门学习。 ## 数据竞赛 竞赛日历:http://coggle.club/ 最新的竞赛信息和baseline推送,请关注: - 竞赛公众号:[**Coggle数据科学**](https://t.zsxq.com/Eyn6EQr) - 知乎专栏:[机器学习理论与数据竞赛实战](https://zhuanlan.zhihu.com/DataAI) ## 竞赛分享 每个比赛的详细分享请见[competition文件夹](https://github.com/datawhalechina/competition-baseline/tree/master/competition); 如果本仓库访问速度慢,可以访问国内备份:https://gitee.com/coggle/competition-baseline --- ### 2025科大讯飞AI开发者大赛 本届大赛赛题全面升级,涵盖算法赛、应用赛、高校赛等类型,聚焦大模型应用、AI工业、元宇宙、企业数字化等前沿领域。本届大赛在延续72道数据算法赛、36道创新应用赛的基础上,开设2道高校创新赛。  赛题报名链接:[https://challenge.xfyun.cn/?ch=dw24_AtTCK9](https://challenge.xfyun.cn/competition?ch=dwsf259) --- ### [全球AI攻防挑战赛](https://github.com/datawhalechina/competition-baseline/tree/master/competition/%E5%85%A8%E7%90%83AI%E6%94%BB%E9%98%B2%E6%8C%91%E6%88%98%E8%B5%9B) 在全球人工智能发展和治理广受关注的大趋势下,由中国图象图形学学会、蚂蚁集团、云安全联盟CSA大中华区主办,广泛联合学界、机构共同组织发起全球AI攻防挑战赛。本次比赛包含攻防两大赛道,分别聚焦大模型自身安全和大模型生成内容的防伪检测,涉及信用成长、凭证审核、商家入驻、智能助理等多个业务场景,覆盖机器学习、图像处理与计算机视觉、数据处理等多个算法领域,旨在聚合行业及学界力量共同守护AI及大模型的安全,共同推动AI安全可信技术的发展。 - 赛题 1:https://tianchi.aliyun.com/s/24acb952f488f1f713a5294cf585bea3 - 赛题 2:https://tianchi.aliyun.com/s/14a815673dc09ef786edf5794bf3bce2 --- ### 外滩大会·全球Deepfake攻防挑战赛 本赛事由蚂蚁集团主办,在全球知名的数据科学竞赛平台Kaggle进行。赛事针对“AI换脸”的欺诈风险进行攻防实战演练,设立了100万元人民币的奖金池,鼓励推动AI向善的技术人才。 近年来,“AI换脸”诈骗事件频发,面对全球范围的技术挑战,大赛设立了百万奖金池,分设图片赛道和音视频赛道,在此诚邀全球的学者、工程师、教育者、学生及独立开发者积极参与。 - 赛道一:图像赛道,确定给定的人脸图像是否是深度伪造图像,并输出其为深度伪造图像的概率。 - 赛道二:音视频赛道,确定包含人脸的视频(带音频)是否是Deepfake视频,并输出其深度伪造音视频的概率。 赛事地址:https://www.atecup.cn/deepfake --- ### 2024科大讯飞AI开发者大赛 2024科大讯飞AI开发者大赛算法赛延续与高校及企业合作出题的模式,吸引产、学、研多方参与,以真实场景数据集为基础,提出业务实际生产难点,鼓励开发者们构建算法模型或数据创新方案,低成本、个性化、高效率地解决问题。 赛题报名链接:[https://challenge.xfyun.cn/?ch=dw24_AtTCK9](https://challenge.xfyun.cn/?ch=dw24_AtTCK9) --- ### 2024数字中国创新大赛DCIC-海上风电出力预测 本赛题要求选手基于风力海况气象数据、风机性能数据等,针对复杂多变气象和海况条件的深度耦合影响,提出海上风电出力预测模型,提升模型精度以及在工程应用中的可信度,为大规模风电接入下的能源安全可靠运行提供保障。 赛题报名链接:[https://www.dcic-china.com/competitions/10098](https://www.dcic-china.com/competitions/10098) - [无外部数据方案B榜0.0715](https://github.com/datawhalechina/competition-baseline/tree/master/competition/2024%E6%95%B0%E5%AD%97%E4%B8%AD%E5%9B%BD%E5%88%9B%E6%96%B0%E5%A4%A7%E8%B5%9BDCIC/%E6%B5%B7%E4%B8%8A%E9%A3%8E%E7%94%B5%E5%87%BA%E5%8A%9B%E9%A2%84%E6%B5%8B%E8%B5%9B%E9%81%93) --- ### 2023科大讯飞AI开发者大赛 2023科大讯飞AI开发者大赛正式启动,现开始报名。本次大赛在“36道应用赛+72道算法赛”的基础上,还开设了高校认知大模型场景创新赛和机器人设计赛,覆盖大模型、智能语音、计算机视觉、自然语言、先进智造、VR等人工智能热门技术,涵盖多行业领域,总奖金池累计超400万。 赛题报名链接:[https://challenge.xfyun.cn/?ch=vWxQGFU](https://challenge.xfyun.cn/?ch=vWxQGFU) --- ### 2022年人民网算法挑战赛 为推进人工智能领域的学术交流、人才培养、技术发展,鼓励广大学生积极学习和研发符合我国主流价值观的优秀算法, 2022年11-12月举办“2022人民网人工智能算法大赛”,赛事由人民网股份有限公司主办,传播内容认知全国重点实验室承办。 [http://data.sklccc.com/2022](http://data.sklccc.com/2022) - 赛题一:对话生成,[https://aistudio.baidu.com/aistudio/projectdetail/5563450](https://aistudio.baidu.com/aistudio/projectdetail/5563450) - 赛题二:微博话题识别,[https://aistudio.baidu.com/aistudio/projectdetail/5563970](https://aistudio.baidu.com/aistudio/projectdetail/5563970) - 赛题三:微博流行度预测,[https://aistudio.baidu.com/aistudio/projectdetail/5567567](https://aistudio.baidu.com/aistudio/projectdetail/5567567) - 赛题四:微博转发行为预测 - 赛题五:社交媒体机器人识别,[https://aistudio.baidu.com/aistudio/projectdetail/5563450](https://aistudio.baidu.com/aistudio/projectdetail/5563450) --- ### 2022年度 iFLYTEK A.I. 开发者大赛 2022年度 iFLYTEK A.I. 开发者大赛来了。本届大赛的总奖金池已升级到了超420万元,除此外还将进一步开放海量数据与核心技术,汇聚更多人工智能开发者,提供创孵平台,培育优质团队,给予扶持政策等。 本届大赛按照算法、应用、编程赛、虚拟形象选拔、辩论赛、创意集市创意赛等等方向设置众多赛道;覆盖了智能语音、视觉、自然语言、图文识别等AI热门技术;涵盖了元宇宙、遗址文化、生物与环保、医疗健康、智能家居、电商销售等众多领域。大赛地址:[https://challenge.xfyun.cn/?ch=ds22-dw-sq04](https://challenge.xfyun.cn/?ch=ds22-dw-sq04) --- ### AIWIN 秋季竞赛 - 赛题1- 手写体 OCR 识别竞赛 手写体 OCR 识别竞赛由交通银行命题,设立两个任务,其中任务一由第四范式提供开放数据集,特别针对金额和日期做识别,任务二要求在指定训练环境完成不可下载训练集的训练,增加了银行机构的文本内容。任务一适合新手,并配套学习营和特别的学习奖励。 比赛地址:http://ailab.aiwin.org.cn/competitions/65 baseline地址:https://aistudio.baidu.com/aistudio/projectdetail/2612313 - 赛题2- 心电图智能诊断竞赛 心电图智能诊断竞赛由数创医疗和复旦大学附属中山医院共同命题,设立两个任务,其中任务一诊断心电图的正常异常与否,任务二对10+种不同症状予以判断综合分类。任务一同步设有学习营和配套的学习奖励,欢迎新手参与。 比赛地址:http://ailab.aiwin.org.cn/competitions/64 baseline地址:https://aistudio.baidu.com/aistudio/projectdetail/2653802 --- ### 2021阿里云供应链大赛——需求预测及单级库存优化 报名链接:https://tianchi.aliyun.com/competition/entrance/531934/introduction 比赛baseline:https://github.com/datawhalechina/competition-baseline/tree/master/competition/2021阿里云供应链大赛——需求预测及单级库存优化 --- ### CCF BDCI 2021 baseline汇总:https://github.com/datawhalechina/competition-baseline/tree/master/competition/DataFountain-CCFBDI-2021 - 基于飞桨实现花样滑冰选手骨骼点动作识别,计算机视觉、姿态估计 - 千言-问题匹配鲁棒性评测,自然语言处理、文本匹配 - 基于MindSpore AI框架实现零售商品识别,计算机视觉、图像分类 - 产品评论观点提取,自然语言处理、实体抽取 - 个贷违约预测,结构化数据挖掘、金融风控 - 剧本角色情感识别,自然语言处理、实体抽取 - 基于UEBA的用户上网异常行为分析,结构化数据挖掘、异常检测 - POI名称生成,计算机视觉、OCR - 客服通话文本摘要提取,自然语言处理、文本摘要 - 系统认证风险预测,结构化数据挖掘、风险检测 - 泛在感知数据关联融合计算,结构化数据挖掘、相似度计算 - openLooKeng跨域数据分析性能提升,数据仓储SQL优化 - 大规模金融仿真图数据中金融交易环路查询的设计与性能优化,金融交易图谱挖掘 - 基于BERT的大模型容量挑战赛,深度学习模型优化 --- ### 华为DIGIX2021:全球校园AI算法精英大赛 报名链接:https://developer.huawei.com/consumer/cn/activity/digixActivity/digixdetail/201621215957378831?ha_source=gb_sf&ha_sourceId=89000073 - 赛题1:基于多目标多视图的用户留存周期预测 - 赛题2:基于多模型迁移预训练文章质量判别 - 赛题3:基于多目标优化的视频推荐 - 赛题4:基于多模态多语言的搜索排序 - 赛题5:小样本菜单识别 比赛baseline和学习资料:https://github.com/datawhalechina/competition-baseline/tree/master/competition/DIGIX2021 --- ### 科大讯飞AI开发者大赛2021 - [中文问题相似度挑战赛](http://challenge.xfyun.cn/topic/info?type=chinese-question-similarity&ch=dw-sq-1), [学习资料](https://github.com/datawhalechina/competition-baseline/blob/master/competition/%E7%A7%91%E5%A4%A7%E8%AE%AF%E9%A3%9EAI%E5%BC%80%E5%8F%91%E8%80%85%E5%A4%A7%E8%B5%9B2021/%E4%B8%AD%E6%96%87%E9%97%AE%E9%A2%98%E7%9B%B8%E4%BC%BC%E5%BA%A6%E6%8C%91%E6%88%98%E8%B5%9B/bert-nsp-xunfei.ipynb) - [线下商店销量预测挑战赛](http://challenge.xfyun.cn/topic/info?type=offline-store-sales-forecast&ch=dw-sq-1), [学习资料](https://github.com/datawhalechina/competition-baseline/tree/master/competition/%E7%A7%91%E5%A4%A7%E8%AE%AF%E9%A3%9EAI%E5%BC%80%E5%8F%91%E8%80%85%E5%A4%A7%E8%B5%9B2021/%E7%A7%91%E5%A4%A7%E8%AE%AF%E9%A3%9E%E5%95%86%E5%BA%97%E9%94%80%E9%87%8F%E9%A2%84%E6%B5%8B) - [电商图像检索挑战赛](http://challenge.xfyun.cn/topic/info?type=e-commerce-image-retrieval&ch=dw-sq-1), [学习资料](https://github.com/datawhalechina/competition-baseline/tree/master/competition/%E7%A7%91%E5%A4%A7%E8%AE%AF%E9%A3%9EAI%E5%BC%80%E5%8F%91%E8%80%85%E5%A4%A7%E8%B5%9B2021/%E7%94%B5%E5%95%86%E5%9B%BE%E5%83%8F%E6%A3%80%E7%B4%A2%E6%8C%91%E6%88%98%E8%B5%9B) - [人脸情绪识别挑战赛](http://challenge.xfyun.cn/topic/info?type=facial-emotion-recognition&ch=dw-sq-1), [学习资料](https://github.com/datawhalechina/competition-baseline/tree/master/competition/%E7%A7%91%E5%A4%A7%E8%AE%AF%E9%A3%9EAI%E5%BC%80%E5%8F%91%E8%80%85%E5%A4%A7%E8%B5%9B2021/%E4%BA%BA%E8%84%B8%E6%83%85%E7%BB%AA%E8%AF%86%E5%88%AB%E6%8C%91%E6%88%98%E8%B5%9B) - [学术论文分类挑战赛](http://challenge.xfyun.cn/topic/info?type=academic-paper-classification&ch=dw-sq-1), [学习资料](https://github.com/datawhalechina/competition-baseline/tree/master/competition/%E7%A7%91%E5%A4%A7%E8%AE%AF%E9%A3%9EAI%E5%BC%80%E5%8F%91%E8%80%85%E5%A4%A7%E8%B5%9B2021/%E5%AD%A6%E6%9C%AF%E8%AE%BA%E6%96%87%E5%88%86%E7%B1%BB%E6%8C%91%E6%88%98%E8%B5%9B) - [车辆贷款违约预测挑战赛](http://challenge.xfyun.cn/topic/info?type=car-loan&ch=dw-sq-1), [学习资料](https://github.com/datawhalechina/competition-baseline/tree/master/competition/%E7%A7%91%E5%A4%A7%E8%AE%AF%E9%A3%9EAI%E5%BC%80%E5%8F%91%E8%80%85%E5%A4%A7%E8%B5%9B2021/%E8%BD%A6%E8%BE%86%E8%B4%B7%E6%AC%BE%E8%BF%9D%E7%BA%A6%E9%A2%84%E6%B5%8B%E6%8C%91%E6%88%98%E8%B5%9B) - [广告图片素材分类算法挑战赛](http://challenge.xfyun.cn/topic/info?type=ad-2021&ch=dw-sq-1),[基础的分类思路](https://github.com/datawhalechina/competition-baseline/tree/master/competition/%E7%A7%91%E5%A4%A7%E8%AE%AF%E9%A3%9EAI%E5%BC%80%E5%8F%91%E8%80%85%E5%A4%A7%E8%B5%9B2021) - [农作物生长情况识别挑战赛](http://challenge.xfyun.cn/topic/info?type=crop&ch=dw-sq-1), [keras](https://github.com/datawhalechina/competition-baseline/blob/master/competition/%E7%A7%91%E5%A4%A7%E8%AE%AF%E9%A3%9EAI%E5%BC%80%E5%8F%91%E8%80%85%E5%A4%A7%E8%B5%9B2021/%E4%B8%AD%E5%9B%BD%E5%86%9C%E4%B8%9A%E5%A4%A7%E5%AD%A6_%E5%86%9C%E4%BD%9C%E7%89%A9%E7%94%9F%E9%95%BF%E6%83%85%E5%86%B5%E8%AF%86%E5%88%AB%E6%8C%91%E6%88%98%E8%B5%9B.ipynb) - [引导拍照挑战赛](http://challenge.xfyun.cn/topic/info?type=guide-photo&ch=dw-sq-1), [keras](https://github.com/datawhalechina/competition-baseline/blob/master/competition/%E7%A7%91%E5%A4%A7%E8%AE%AF%E9%A3%9EAI%E5%BC%80%E5%8F%91%E8%80%85%E5%A4%A7%E8%B5%9B2021/%E4%B8%AD%E5%9B%BD%E5%86%9C%E4%B8%9A%E5%A4%A7%E5%AD%A6_%E5%BC%95%E5%AF%BC%E6%8B%8D%E7%85%A7%E6%8C%91%E6%88%98%E8%B5%9B.ipynb) - [脑部PETMR图像疾病预测挑战赛](http://challenge.xfyun.cn/topic/info?type=PET&ch=dw-sq-1), [keras](https://github.com/datawhalechina/competition-baseline/blob/master/competition/%E7%A7%91%E5%A4%A7%E8%AE%AF%E9%A3%9EAI%E5%BC%80%E5%8F%91%E8%80%85%E5%A4%A7%E8%B5%9B2021/%E5%AE%89%E5%BE%BD%E5%A4%A7%E5%AD%A6-%E8%84%91%E9%83%A8PETMR%E5%9B%BE%E5%83%8F%E7%96%BE%E7%97%85%E9%A2%84%E6%B5%8B%E6%8C%91%E6%88%98%E8%B5%9B.ipynb) - [智能硬件语音控制的时频图分类挑战赛](http://challenge.xfyun.cn/topic/info?type=time-frequency&ch=dw-sq-1), [pytorch](https://github.com/datawhalechina/competition-baseline/blob/master/competition/%E7%A7%91%E5%A4%A7%E8%AE%AF%E9%A3%9EAI%E5%BC%80%E5%8F%91%E8%80%85%E5%A4%A7%E8%B5%9B2021/%E6%99%BA%E8%83%BD%E7%A1%AC%E4%BB%B6%E8%AF%AD%E9%9F%B3%E6%8E%A7%E5%88%B6%E7%9A%84%E6%97%B6%E9%A2%91%E5%9B%BE%E5%88%86%E7%B1%BB%E6%8C%91%E6%88%98%E8%B5%9B.ipynb) - [基于用户画像的商品推荐挑战赛](http://challenge.xfyun.cn/topic/info?type=user-portrait&ch=dw-sq-1), [LSTM-0.6786](https://mp.weixin.qq.com/s/KDH_klH_74726S8gX4FEyQ) - [蛋白质结构预测挑战赛算法](http://challenge.xfyun.cn/topic/info?type=protein&ch=dw-sq-1), [CNN-0.21](https://mp.weixin.qq.com/s/0oGWD0O5ARokxrAiW2T9uQ), [XGB基础代码](https://github.com/datawhalechina/competition-baseline/blob/master/competition/%E7%A7%91%E5%A4%A7%E8%AE%AF%E9%A3%9EAI%E5%BC%80%E5%8F%91%E8%80%85%E5%A4%A7%E8%B5%9B2021/%E4%B8%8A%E6%B5%B7%E6%B5%B7%E4%BA%8B%E5%A4%A7%E5%AD%A6_%E8%9B%8B%E7%99%BD%E8%B4%A8%E7%BB%93%E6%9E%84%E9%A2%84%E6%B5%8B%E8%B5%9B.ipynb) - [环境空气质量评价挑战赛](http://challenge.xfyun.cn/topic/info?type=air-quality&ch=dw-sq-1), [LR-0.04385](https://mp.weixin.qq.com/s/9gZJ6ScwW1urRMc-6p6n5A) - [猪只盘点挑战赛](http://challenge.xfyun.cn/topic/info?type=pig-check&ch=dw-sq-1), [预训练模型](https://github.com/datawhalechina/competition-baseline/blob/master/competition/%E7%A7%91%E5%A4%A7%E8%AE%AF%E9%A3%9EAI%E5%BC%80%E5%8F%91%E8%80%85%E5%A4%A7%E8%B5%9B2021/%E7%A7%91%E5%A4%A7%E8%AE%AF%E9%A3%9E%E8%82%A1%E4%BB%BD%E6%9C%89%E9%99%90%E5%85%AC%E5%8F%B8_%E7%8C%AA%E5%8F%AA%E7%9B%98%E7%82%B9%E6%8C%91%E6%88%98%E8%B5%9B.ipynb) - [新冠肺炎声音诊断挑战赛](http://challenge.xfyun.cn/topic/info?type=covid-19&ch=dw-sq-1),[baseline 0.53532 Top20](https://github.com/zfs1998/data-science/blob/main/IFLYTEK/%E4%B8%AD%E5%9B%BD%E7%A7%91%E5%AD%A6%E6%8A%80%E6%9C%AF%E5%A4%A7%E5%AD%A6_%E6%96%B0%E5%86%A0%E8%82%BA%E7%82%8E%E5%A3%B0%E9%9F%B3%E8%AF%8A%E6%96%AD%E6%8C%91%E6%88%98%E8%B5%9B.ipynb) --- ### [腾讯广告算法大赛](https://algo.qq.com/) #### 2021年度腾讯赛 本届从广告应用场景痛点出发,开设“视频广告秒级语义解析”和“多模态视频广告标签”两大赛道,兼具算法挑战性和商业应用价值。 - [TI-ONE 产品使用教程](https://cloud.tencent.com/developer/article/1807916) - [如何使用 Notebook 功能完成赛事训练](https://cloud.tencent.com/developer/article/1807942?from=10680) - [腾讯广告算法大赛参赛手册](https://algo-1256087447.cos.ap-nanjing.myqcloud.com/admin/20210430/cf48d04caf878b9d2773fda0e60ba8a8.pdf) - [腾讯广告算法大赛FAQ]( https://docs.qq.com/doc/DV1hFUGpMV1l3eVdV) #### 2020年度腾讯赛 本届以用户在广告系统中的交互行为作为输入来预测用户的人口统计学属性。 - [冠军分享](https://mp.weixin.qq.com/s/-lizDyP2y357plcG1M64TA),[开源代码](https://github.com/guoday/Tencent2020_Rank1st ) - [亚军分享](https://mp.weixin.qq.com/s/UWt4hZitX9bW1Y_RNyCJCg) - [季军分享](https://mp.weixin.qq.com/s/rkhwLsCKTIDzUkjVIEj3LQ) - [第5名分享](https://zhuanlan.zhihu.com/p/170603281),[开源代码](https://github.com/zhangqibot/Tencent2020_Top5) - 第11名:[开源代码1](https://github.com/wujiekd/2020-Tencent-advertising-algorithm-contest-rank11), [开源代码2](https://github.com/llllllyu/Tencent2020_Rank11) - 第12名:[开源代码](https://github.com/LogicJake/Tencent_Ads_Algo_2020_TOP12) - 第19名:[开源代码](https://github.com/PerpetualSmile/2020-Tencent-Advertisement-Algorithm-Competition-Rank19) --- ### [2021世界人工智能创新大赛](http://ailab.aiwin.org.cn/) - [互联网舆情企业风险事件的识别和预警](https://github.com/datawhalechina/competition-baseline/tree/master/competition/AIWIN2021), NLP类型比赛 - [保险文本视觉认知问答竞赛](https://github.com/datawhalechina/competition-baseline/tree/master/competition/AIWIN2021), CV/NLP,多模态类型比赛 --- ### [CCF BDCI2020大数据与计算智能大赛](https://www.datafountain.cn/special/BDCI2020) - 通用音频分类, [LGB](https://github.com/zjuzpw/baseline/blob/CCF2020BDCI/baseline_lgb.ipynb), [CNN, 0.9+](https://blog.csdn.net/wherewegogo/article/details/110369729) - 遥感影像地块分割, [U-Net](https://aistudio.baidu.com/aistudio/projectdetail/1090790) - 房产行业聊天问答匹配, [Bert](https://github.com/syzong/2020_ccf_qa_match), [RoBERTa](https://github.com/LogicJake/competition_baselines/tree/master/competitions/property_chat_pair) - 小学数学应用题自动解题, [规则思路](https://discussion.datafountain.cn/questions/3169?new=0) - 路况状态时空预测, [OTTO Lab](https://github.com/juzstu/ccf2020_didi), [异度侵入](https://mp.weixin.qq.com/s/1vJDOInUOdBgXtLdVcpsEA) - 企业非法集资风险预测, [第一次打比赛](https://github.com/LogicJake/competition_baselines/tree/master/competitions/fund_raising_risk_prediction), [DLLXW](https://github.com/DLLXW/data-science-competition/tree/main/datafountain), [阿水](https://github.com/datawhalechina/competition-baseline/tree/master/competition/DataFountain-%E4%BC%81%E4%B8%9A%E9%9D%9E%E6%B3%95%E9%9B%86%E8%B5%84%E9%A3%8E%E9%99%A9%E9%A2%84%E6%B5%8B) - 大数据时代的Serverless工作负载预测, [第一次打比赛(A榜0.208)](https://github.com/LogicJake/competition_baselines/tree/master/competitions/serverless_load_prediction), [siguo(A榜0.211)](https://blog.csdn.net/qq_48081601/article/details/109338443), [CNN-LSTM](https://zhuanlan.zhihu.com/p/301092469),[鱼佬(0.285)](https://mp.weixin.qq.com/s/Ovb1pic2nleQhTObIaj2Ww), [siliconx(0.311)](https://github.com/siliconx/serverless) - 重点区域人群密度预测, [第1名方案](https://github.com/agave233/2020-CCF-Crowd-Flow-Prediction) --- ### [第四届工业大数据创新竞赛——算法赛道](http://www.industrial-bigdata.com/Challenge/title?competitionId=GKLEW707XP2O58KZNLO4UPYKCOIEQONH) - 学习手册:https://coggle.club/learn/industrial-bigdata-4th/ - [注塑成型工艺的虚拟量测和调机优化](https://github.com/datawhalechina/competition-baseline/blob/master/competition/%E7%AC%AC%E5%9B%9B%E5%B1%8A%E5%B7%A5%E4%B8%9A%E5%A4%A7%E6%95%B0%E6%8D%AE%E5%88%9B%E6%96%B0%E7%AB%9E%E8%B5%9B%EF%BC%9A%E7%AE%97%E6%B3%95%E8%B5%9B%E9%81%93/%E6%B3%A8%E5%A1%91%E6%88%90%E5%9E%8B%E8%B5%9B%E9%81%93baseline.ipynb) --- ### [2020数字中国创新大赛大数据赛道](https://data.xm.gov.cn/opendata-competition/index.html#/) - 入门注册手册:https://mp.weixin.qq.com/s/NurvUDyGwVC4sSwzEzDrwg - 高德地图城市交通健康榜:https://report.amap.com/diagnosis/index.do - 赛题1数据分析:[链接](https://github.com/datawhalechina/competition-baseline/tree/master/competition/2020DCIC-%E5%88%9B%E6%96%B0%E5%A4%A7%E8%B5%9B%E5%A4%A7%E6%95%B0%E6%8D%AE%E8%B5%9B%E9%81%93) - 赛题2学习内容:[链接](https://coggle.club/learn/DCIC2020/), [录屏](https://www.bilibili.com/video/BV1tz4y1f7Wg/) --- ### [科大讯飞AI开发者大赛(2020年度)](http://challenge.xfyun.cn/) - [脑PET图像分析和疾病预测挑战赛算法挑战大赛](https://github.com/datawhalechina/competition-baseline/tree/master/competition/%E7%A7%91%E5%A4%A7%E8%AE%AF%E9%A3%9EAI%E5%BC%80%E5%8F%91%E8%80%85%E5%A4%A7%E8%B5%9B-%E8%84%91PET%E5%9B%BE%E5%83%8F%E5%88%86%E6%9E%90%E5%92%8C%E7%96%BE%E7%97%85%E9%A2%84%E6%B5%8B%E6%8C%91%E6%88%98%E8%B5%9B%E7%AE%97%E6%B3%95%E6%8C%91%E6%88%98%E5%A4%A7%E8%B5%9B), CV类型比赛 - [温室温度预测挑战赛](https://github.com/datawhalechina/competition-baseline/tree/master/competition/%E7%A7%91%E5%A4%A7%E8%AE%AF%E9%A3%9EAI%E5%BC%80%E5%8F%91%E8%80%85%E5%A4%A7%E8%B5%9B-%E6%B8%A9%E5%AE%A4%E6%B8%A9%E5%BA%A6%E9%A2%84%E6%B5%8B%E6%8C%91%E6%88%98%E8%B5%9B), 结构化数据比赛 - [婴儿啼哭声识别挑战赛](https://github.com/datawhalechina/competition-baseline/tree/master/competition/%E7%A7%91%E5%A4%A7%E8%AE%AF%E9%A3%9EAI%E5%BC%80%E5%8F%91%E8%80%85%E5%A4%A7%E8%B5%9B-%E5%A9%B4%E5%84%BF%E5%95%BC%E5%93%AD%E5%A3%B0%E8%AF%86%E5%88%AB%E6%8C%91%E6%88%98%E8%B5%9B), 语音赛题比赛 - [事件抽取挑战赛](https://github.com/datawhalechina/competition-baseline/tree/master/competition/%E7%A7%91%E5%A4%A7%E8%AE%AF%E9%A3%9EAI%E5%BC%80%E5%8F%91%E8%80%85%E5%A4%A7%E8%B5%9B-%E4%BA%8B%E4%BB%B6%E6%8A%BD%E5%8F%96%E6%8C%91%E6%88%98), NLP类型比赛 --- ### 结构化比赛 - [第三届 Apache Flink 极客挑战赛暨AAIG CUP](https://tianchi.aliyun.com/s/ea4fbcbaadab849b7389354501f38e2e), [TF2 baseline](https://gitee.com/coggle/tianchi-3rd-AAIG-CUP) - [山东省第二届数据应用创新创业大赛-临沂分赛场-供水管网压力预测](http://data.sd.gov.cn/cmpt/cmptDetail.html?id=24), [ChallengeHub](https://github.com/China-ChallengeHub/ChallengeHub-Baselines/tree/main/shandong_shuiguan/code) - [山东省第二届数据应用创新创业大赛-济南分赛场-健康医疗](http://data.sd.gov.cn/cmpt/cmptDetail.html?id=22), [ChallengeHub](https://github.com/China-ChallengeHub/ChallengeHub-Baselines/tree/main/%E5%B1%B1%E4%B8%9C%E5%81%A5%E5%BA%B7%E5%8C%BB%E7%96%97) - [山东省第二届数据应用创新创业大赛-日照分赛场-公积金贷款逾期预测](http://data.sd.gov.cn/cmpt/cmptDetail.html?id=26), [ChallengeHub](https://github.com/China-ChallengeHub/ChallengeHub-Baselines/tree/main/shandong_gongjijin/code) - [2020厦门国际银行数创金融杯建模大赛](https://www.dcjingsai.com/v2/cmptDetail.html?id=439&=76f6724e6fa9455a9b5ef44402c08653), [第一次打比赛](https://github.com/LogicJake/competition_baselines/tree/master/competitions/xiamen_international_bank_2020), [OTTO Lab](https://github.com/cXPromise/Datacasle_2020XM_Baseline), [0.46](https://github.com/BirderEric/XianmenBank) - [2019厦门国际银行“数创金融杯”数据建模大赛](https://m.dcjingsai.com/cmptDetail.html?id=319), [yanqiangmiffy](https://github.com/yanqiangmiffy/Data-Finance-Cup), [shenxiangzhuang](https://github.com/shenxiangzhuang/Bank-Competition) - [天池-零基础入门数据挖掘 - 二手车交易价格预测](https://tianchi.aliyun.com/competition/entrance/231784/introduction), [baseline链接](https://github.com/yangjiada/used_cars) - [天池-2020数字中国创新大赛—算法赛:智慧海洋建设](https://github.com/datawhalechina/competition-baseline/tree/master/competition/Tianchi-2020%E6%95%B0%E5%AD%97%E4%B8%AD%E5%9B%BD%E5%88%9B%E6%96%B0%E5%A4%A7%E8%B5%9B%E2%80%94%E7%AE%97%E6%B3%95%E8%B5%9B%EF%BC%9A%E6%99%BA%E6%85%A7%E6%B5%B7%E6%B4%8B%E5%BB%BA%E8%AE%BE), 结构化数据比赛 - [DataFountain-乘用车细分市场销量预测](https://github.com/datawhalechina/competition-baseline/tree/master/competition/DataFountain-%E4%B9%98%E7%94%A8%E8%BD%A6%E7%BB%86%E5%88%86%E5%B8%82%E5%9C%BA%E9%94%80%E9%87%8F%E9%A2%84%E6%B5%8B), 结构化 数据比赛 - [DataFountain-离散制造过程中典型工件的质量符合率预测](https://github.com/datawhalechina/competition-baseline/tree/master/competition/DataFountain-%E7%A6%BB%E6%95%A3%E5%88%B6%E9%80%A0%E8%BF%87%E7%A8%8B%E4%B8%AD%E5%85%B8%E5%9E%8B%E5%B7%A5%E4%BB%B6%E7%9A%84%E8%B4%A8%E9%87%8F%E7%AC%A6%E5%90%88%E7%8E%87%E9%A2%84%E6%B5%8B), 结构化数据比赛 - [腾讯-2018腾讯广告算法大赛 Rank11](https://github.com/datawhalechina/competition-baseline/tree/master/competition/%E8%85%BE%E8%AE%AF-2018%E8%85%BE%E8%AE%AF%E5%B9%BF%E5%91%8A%E7%AE%97%E6%B3%95%E5%A4%A7%E8%B5%9B),结构化数据比赛 - [腾讯-2018腾讯广告算法大赛 冠军](https://github.com/datawhalechina/competition-baseline/tree/master/competition/%E8%85%BE%E8%AE%AF-2019%E8%85%BE%E8%AE%AF%E5%B9%BF%E5%91%8A%E7%AE%97%E6%B3%95%E5%A4%A7%E8%B5%9B),结构化数据比赛 - [天池-安泰杯跨境电商智能算法大赛](https://github.com/datawhalechina/competition-baseline/tree/master/competition/Tianchi-%E5%AE%89%E6%B3%B0%E6%9D%AF%E8%B7%A8%E5%A2%83%E7%94%B5%E5%95%86%E6%99%BA%E8%83%BD%E7%AE%97%E6%B3%95%E5%A4%A7%E8%B5%9B),结构化数据比赛,**冠军法国南部**分享 - [点石-Retention Rate of Baidu Hao Kan APP Users](https://github.com/datawhalechina/competition-baseline/tree/master/competition/%E7%82%B9%E7%9F%B3-Retention%20Rate%20of%20Baidu%20Hao%20Kan%20APP%20Users),结构化数据比赛 - [kaggle-two-sigma-connect-rental-listing-inquiries](https://github.com/datawhalechina/competition-baseline/tree/master/competition/kaggle-two-sigma-connect-rental-listing-inquiries),结构化数据比赛 - [kaggle-allstate-claims-severity](https://github.com/datawhalechina/competition-baseline/tree/master/competition/kaggle-allstate-claims-severity),结构化数据比赛 - [AI研习社-白葡萄酒品质预测](https://github.com/datawhalechina/competition-baseline/tree/master/competition/yanxishe-%E7%99%BD%E8%91%A1%E8%90%84%E9%85%92%E5%93%81%E8%B4%A8%E9%A2%84%E6%B5%8B),结构化数据比赛 - [AI研习社-肌肉活动电信号推测手势](https://github.com/datawhalechina/competition-baseline/tree/master/competition/yanxishe-%E8%82%8C%E8%82%89%E6%B4%BB%E5%8A%A8%E7%94%B5%E4%BF%A1%E5%8F%B7%E6%8E%A8%E6%B5%8B%E6%89%8B%E5%8A%BF),结构化数据比赛 --- ### CV类型比赛 - [“英特尔创新大师杯”深度学习挑战赛 赛道1:通用场景OCR文本识别任务](https://tianchi.aliyun.com/competition/entrance/531902/introduction), OCR比赛, [baseline](https://gitee.com/coggle/tianchi-intel-PaddleOCR) - [2021全国数字生态创新大赛-智能算法赛](https://tianchi.aliyun.com/competition/entrance/531860/introduction), 语义分割比赛, [34.5-Unet](https://tianchi.aliyun.com/notebook-ai/detail?postId=169396), [38.5-Unet++](https://github.com/DLLXW/data-science-competition/tree/main/%E5%A4%A9%E6%B1%A0/2021%E5%85%A8%E5%9B%BD%E6%95%B0%E5%AD%97%E7%94%9F%E6%80%81%E5%88%9B%E6%96%B0%E5%A4%A7%E8%B5%9B-%E9%AB%98%E5%88%86%E8%BE%A8%E7%8E%87%E9%81%A5%E6%84%9F%E5%BD%B1%E5%83%8F%E5%88%86%E5%89%B2) - [DC竞赛-AI助疫·口罩佩戴检测大赛](https://github.com/datawhalechina/competition-baseline/tree/master/competition/DC%E7%AB%9E%E8%B5%9B-AI%E5%8A%A9%E7%96%AB%C2%B7%E5%8F%A3%E7%BD%A9%E4%BD%A9%E6%88%B4%E6%A3%80%E6%B5%8B%E5%A4%A7%E8%B5%9B), CV类型比赛 - [Kesci-中国华录杯人群密度检测](https://github.com/datawhalechina/competition-baseline/tree/master/competition/Kesci-%E4%B8%AD%E5%9B%BD%E5%8D%8E%E5%BD%95%E6%9D%AF%E4%BA%BA%E7%BE%A4%E5%AF%86%E5%BA%A6%E6%A3%80%E6%B5%8B), CV类型比赛 - [天池-心电人机智能大赛心电异常事件预测](https://github.com/datawhalechina/competition-baseline/tree/master/competition/Tianchi-%E5%BF%83%E7%94%B5%E4%BA%BA%E6%9C%BA%E6%99%BA%E8%83%BD%E5%A4%A7%E8%B5%9B%E5%BF%83%E7%94%B5%E5%BC%82%E5%B8%B8%E4%BA%8B%E4%BB%B6%E9%A2%84%E6%B5%8B), CV类型比赛 - [DataFountain-多人种人脸识别](https://github.com/datawhalechina/competition-baseline/tree/master/competition/DataFountain-%E5%A4%9A%E4%BA%BA%E7%A7%8D%E4%BA%BA%E8%84%B8%E8%AF%86%E5%88%AB), CV类型比赛 - [DataFountain-基于OCR的身份证要素提取](https://github.com/datawhalechina/competition-baseline/tree/master/competition/DataFountain-%E5%9F%BA%E4%BA%8EOCR%E7%9A%84%E8%BA%AB%E4%BB%BD%E8%AF%81%E8%A6%81%E7%B4%A0%E6%8F%90%E5%8F%96), CV类型比赛 - [DataFountain-视频版权检测算法](https://github.com/datawhalechina/competition-baseline/tree/master/competition/DataFountain-%E8%A7%86%E9%A2%91%E7%89%88%E6%9D%83%E6%A3%80%E6%B5%8B%E7%AE%97%E6%B3%95),CV类型比赛 - [kaggle-quickdraw-doodle-recognition](https://github.com/datawhalechina/competition-baseline/tree/master/competition/kaggle-quickdraw-doodle-recognition),CV类型比赛 - [TinyMind人民币面值&冠字号编码识别挑战赛](https://github.com/datawhalechina/competition-baseline/tree/master/competition/TinyMind%E4%BA%BA%E6%B0%91%E5%B8%81%E9%9D%A2%E5%80%BC%26%E5%86%A0%E5%AD%97%E5%8F%B7%E7%BC%96%E7%A0%81%E8%AF%86%E5%88%AB%E6%8C%91%E6%88%98%E8%B5%9B),CV类型比赛 - [AI研习社-胸腔X光肺炎检测](https://github.com/datawhalechina/competition-baseline/tree/master/competition/yanxishe-%E8%83%B8%E8%85%94X%E5%85%89%E8%82%BA%E7%82%8E%E6%A3%80%E6%B5%8B),CV类型比赛 - [AI研习社-肺炎X光病灶识别](https://github.com/datawhalechina/competition-baseline/tree/master/competition/yanxishe-%E8%82%BA%E7%82%8EX%E5%85%89%E7%97%85%E7%81%B6%E8%AF%86%E5%88%AB),CV类型比赛 - [AI研习社-人脸年龄识别](https://github.com/datawhalechina/competition-baseline/tree/master/competition/yanxishe-%E4%BA%BA%E8%84%B8%E5%B9%B4%E9%BE%84%E8%AF%86%E5%88%AB),CV类型比赛 - [AI研习社-美食识别挑战(1):豆腐VS土豆](https://github.com/datawhalechina/competition-baseline/tree/master/competition/yanxishe-%E7%BE%8E%E9%A3%9F%E8%AF%86%E5%88%AB%E6%8C%91%E6%88%98%EF%BC%881%EF%BC%89%EF%BC%9A%E8%B1%86%E8%85%90VS%E5%9C%9F%E8%B1%86),CV类型比赛 - [AI研习社-猫脸关键点检测](https://github.com/datawhalechina/competition-baseline/tree/master/competition/yanxishe-%E5%96%B5%E8%84%B8%E5%85%B3%E9%94%AE%E7%82%B9%E6%A3%80%E6%B5%8B),CV类型比赛 --- ### NLP类型比赛 - [AI研习社-IMDB评论剧透检测](https://github.com/datawhalechina/competition-baseline/tree/master/competition/yanxishe-IMDB%E8%AF%84%E8%AE%BA%E5%89%A7%E9%80%8F%E6%A3%80%E6%B5%8B),NLP类型比赛 - [DataFountain-金融信息负面及主体判定](https://github.com/datawhalechina/competition-baseline/tree/master/competition/DataFountain-%E9%87%91%E8%9E%8D%E4%BF%A1%E6%81%AF%E8%B4%9F%E9%9D%A2%E5%8F%8A%E4%B8%BB%E4%BD%93%E5%88%A4%E5%AE%9A), NLP类型比赛 - [DataFountain-互联网金融新实体发现](https://github.com/datawhalechina/competition-baseline/tree/master/competition/DataFountain-%E4%BA%92%E8%81%94%E7%BD%91%E9%87%91%E8%9E%8D%E6%96%B0%E5%AE%9E%E4%BD%93%E5%8F%91%E7%8E%B0),NLP类型比赛 - [DataFountain-技术需求与技术成果项目之间关联度计算模型](https://github.com/datawhalechina/competition-baseline/tree/master/competition/DataFountain-%E6%8A%80%E6%9C%AF%E9%9C%80%E6%B1%82%E4%B8%8E%E6%8A%80%E6%9C%AF%E6%88%90%E6%9E%9C%E9%A1%B9%E7%9B%AE%E4%B9%8B%E9%97%B4%E5%85%B3%E8%81%94%E5%BA%A6%E8%AE%A1%E7%AE%97%E6%A8%A1%E5%9E%8B),NLP类型比赛 - [DataFountain-互联网新闻情感分析](https://github.com/datawhalechina/competition-baseline/tree/master/competition/DataFountain-%E4%BA%92%E8%81%94%E7%BD%91%E6%96%B0%E9%97%BB%E6%83%85%E6%84%9F%E5%88%86%E6%9E%90),NLP类型比赛 - [biendata-智源&计算所-互联网虚假新闻检测挑战赛](https://github.com/datawhalechina/competition-baseline/tree/master/competition/biendata-%E6%99%BA%E6%BA%90%26%E8%AE%A1%E7%AE%97%E6%89%80-%E4%BA%92%E8%81%94%E7%BD%91%E8%99%9A%E5%81%87%E6%96%B0%E9%97%BB%E6%A3%80%E6%B5%8B%E6%8C%91%E6%88%98%E8%B5%9B),NLP类型比赛 - [Tianchi-第三届阿里云安全算法挑战赛](https://github.com/datawhalechina/competition-baseline/tree/master/competition/Tianchi-%E7%AC%AC%E4%B8%89%E5%B1%8A%E9%98%BF%E9%87%8C%E4%BA%91%E5%AE%89%E5%85%A8%E7%AE%97%E6%B3%95%E6%8C%91%E6%88%98%E8%B5%9B),NLP类型比赛 --- ### 其他类型 - [DataFountain-企业网络资产及安全事件分析与可视化](https://github.com/datawhalechina/competition-baseline/tree/master/competition/DataFountain-%E4%BC%81%E4%B8%9A%E7%BD%91%E7%BB%9C%E8%B5%84%E4%BA%A7%E5%8F%8A%E5%AE%89%E5%85%A8%E4%BA%8B%E4%BB%B6%E5%88%86%E6%9E%90%E4%B8%8E%E5%8F%AF%E8%A7%86%E5%8C%96) - [DataFountain-三角形图计算算法设计及性能优化](https://github.com/datawhalechina/competition-baseline/tree/master/competition/DataFountain-%E4%B8%89%E8%A7%92%E5%BD%A2%E5%9B%BE%E8%AE%A1%E7%AE%97%E7%AE%97%E6%B3%95%E8%AE%BE%E8%AE%A1%E5%8F%8A%E6%80%A7%E8%83%BD%E4%BC%98%E5%8C%96), 计算优化 - [DataFountain-云计算时代的大数据查询分析优化](https://github.com/datawhalechina/competition-baseline/tree/master/competition/DataFountain-%E4%BA%91%E8%AE%A1%E7%AE%97%E6%97%B6%E4%BB%A3%E7%9A%84%E5%A4%A7%E6%95%B0%E6%8D%AE%E6%9F%A5%E8%AF%A2%E5%88%86%E6%9E%90%E4%BC%98%E5%8C%96), 查询优化 其他链接: - [Smile整理的竞赛优胜者代码分享](https://github.com/Smilexuhc/Data-Competition-TopSolution) - [chizhu开源的高校赛2019 文本点击预测](https://github.com/chizhu/BDC2019) ## 贡献者(按照贡献ID排序) - [阿水](https://www.zhihu.com/people/finlayliu/) - [DOTA](https://www.zhihu.com/people/yuconan/) - [Rain](https://www.zhihu.com/people/kingdoms/activities) - [鱼遇雨欲语与余](https://www.zhihu.com/people/wang-he-13-93/) - [yphacker](https://github.com/yphacker) ## 协作规范 欢迎大家fork并贡献代码,但请大家遵守以下规范和建议: 1. 代码请按照比赛的形式进行整理,写明比赛的网址、数据类型和解题赛题; 2. 代码请注明运行的环境,以及机器最低配置,如: - 操作系统:Linux,内存16G,硬盘无要求; - Python环境:Python2/3 - Pytorch版本:0.4.0 3. baseline代码只能提供可运行的代码和思路,**请不要提供直接可以提交的结果文件;** 4. 代码提供者应对代码版权和共享权负责; 5. 如果发现Repo存在版权等相关问题,请邮件联系[email protected] ## 关注我们 <div align=center><img src="https://cdn.coggle.club/dw_qrcode.jpeg" width = "250" height = "270" alt="Datawhale是一个专注AI领域的开源组织,以“for the learner,和学习者一起成长”为愿景,构建对学习者最有价值的开源学习社区。关注我们,一起学习成长。"></div> ## LICENSE [GNU General Public License v3.0](https://github.com/datawhalechina/competition-baseline/blob/master/LICENSE) ## Star History [![Star History Chart](https://api.star-history.com/svg?repos=datawhalechina/competition-baseline&type=Date)](https://star-history.com/#datawhalechina/competition-baseline&Date)

Education & Learning ML Frameworks
4.7K Github Stars
learn-nlp-with-transformers
Open Source

learn-nlp-with-transformers

# 基于transformers的自然语言处理(NLP)入门 Natural Language Processing with transformers. 本项目面向的对象是: - NLP初学者、transformer初学者 - 有一定的python、pytorch编程基础 - 对前沿的transformer模型感兴趣 - 了解和知道简单的深度学习模型 本项目的愿景是: 希望结合形象生动的原理讲解和多个动手实践项目,帮助初学者快速入门深度学习时代的NLP。 本项目的主要参考资料是: - Huggingface/Transformers代码库 - 多个优秀的Transformer讲解和分享 项目成员: - erenup([多多笔记](https://www.zhihu.com/people/nai-ping-46-76)),北京大学,负责人 - [张帆](https://github.com/zhangfanTJU),Datawhale,天津大学,篇章4 - 张贤,哈尔滨工业大学,篇章2 - 李泺秋,浙江大学,篇章3 - 蔡杰,北京大学,篇章4 - hlzhang,麦吉尔大学,篇章4 - 台运鹏 篇章2 - 张红旭 篇章2 本项目总结和学习了多篇优秀文档和分享,在各个章节均有标注来源,如有侵权,请及时联系项目成员,谢谢。去[Github点完Star](https://github.com/datawhalechina/learn-nlp-with-transformers)再学习事半功倍哦😄,谢谢。 # 项目内容 ## 篇章1-前言 * [1.0-本地阅读和代码运行环境配置.md](./篇章1-前言/1.0-本地阅读和代码运行环境配置.md) * [1.1-Transformers在NLP中的兴起](./篇章1-前言/1.1-Transformers在NLP中的兴起.md) ## 篇章2-Transformer相关原理 * [2.1-图解attention](./篇章2-Transformer相关原理/2.1-图解attention.md) * [2.2-图解transformer](./篇章2-Transformer相关原理/2.2-图解transformer.md) * [2.2.1-Pytorch编写Transformer.md](./篇章2-Transformer相关原理/2.2.1-Pytorch编写Transformer.md) * [2.2.2-Pytorch编写Transformer-选读.md](./篇章2-Transformer相关原理/2.2.1-Pytorch编写Transformer-选读.md) * [2.3-图解BERT](./篇章2-Transformer相关原理/2.3-图解BERT.md) * [2.4-图解GPT](./篇章2-Transformer相关原理/2.4-图解GPT.md) * [2.5-篇章小测](./篇章2-Transformer相关原理/2.5-篇章小测.md) ## 篇章3-编写一个Transformer模型:BERT * [3.1-如何实现一个BERT](./篇章3-编写一个Transformer模型:BERT/3.1-如何实现一个BERT.md) * [3.2-如何应用一个BERT](./篇章3-编写一个Transformer模型:BERT/3.2-如何应用一个BERT.md) * [3.3-篇章小测](./篇章3-编写一个Transformer模型:BERT/3.3-篇章小测.md) ## 篇章4-使用Transformers解决NLP任务 * [4.0-前言](./篇章4-使用Transformers解决NLP任务/4.0-前言.md) * [4.1-文本分类](./篇章4-使用Transformers解决NLP任务/4.1-文本分类.md) * [4.2-序列标注](./篇章4-使用Transformers解决NLP任务/4.2-序列标注.md) * [4.3-问答任务-抽取式问答](./篇章4-使用Transformers解决NLP任务/4.3-问答任务-抽取式问答.md) * [4.4-问答任务-多选问答](./篇章4-使用Transformers解决NLP任务/4.4-问答任务-多选问答.md) * [4.5-生成任务-语言模型](./篇章4-使用Transformers解决NLP任务/4.5-生成任务-语言模型.md) * [4.6-生成任务-机器翻译](./篇章4-使用Transformers解决NLP任务/4.6-生成任务-机器翻译.md) * [4.7-生成任务-摘要生成](./篇章4-使用Transformers解决NLP任务/4.7-生成任务-摘要生成.md) * [4.8-篇章小测](./篇章4-使用Transformers解决NLP任务/4.8-篇章小测.md)

Education & Learning ML Frameworks
3.3K Github Stars
diy-llm
Open Source

diy-llm

<div align='center'> <img src="./docs/public/diy-llm.png" alt="alt text" width="100%"> <h1>Diy-LLM</h1> </div> <div align="center"> <img src="https://img.shields.io/github/stars/datawhalechina/diy-llm?style=flat&logo=github" alt="GitHub stars"/> <img src="https://img.shields.io/github/forks/datawhalechina/diy-llm?style=flat&logo=github" alt="GitHub forks"/> <img src="https://img.shields.io/badge/language-Chinese-brightgreen?style=flat" alt="Language"/> <a href="https://github.com/datawhalechina/diy-llm"><img src="https://img.shields.io/badge/GitHub-Project-blue?style=flat&logo=github" alt="GitHub Project"></a> </div> <div align="center"> <p><a href="https://datawhalechina.github.io/diy-llm/">📚 在线阅读地址</a></p> <h3>📚 带你系统性学习大语言模型</h3> <p><em>一座为中文学习者量身打造的"LLM炼丹工坊"</em></p> </div> 我们希望这门 CS336 中文课程,不只是斯坦福原版的"汉化版",而是一座为中文学习者量身打造的"LLM炼丹工坊"。在这里,你亲手锻造理解、打磨代码、调控火候,最终炼出属于自己的大模型真丹。 ## 📋 前置要求 - **Python 编程**:熟练掌握 Python 和软件工程能力 - **深度学习基础**:熟悉 PyTorch,了解神经网络基本原理 - **数学基础**:线性代数、概率统计、微积分 - **机器学习**:需对机器学习与深度学习的基础知识有扎实掌握 - **GPU 编程(可选)**:了解 CUDA 基础概念会更佳,不懂也没关系,本项目也有入门教程 ## 📚 课程愿景 - **硬核理论与动手实战并重**:我们会完整保留原版课程的技术深度,但会用更符合中文学习者思维的方式重构知识体系。对于必要的数学、深度学习前置知识,我们会帮你补齐,确保学习曲线平滑,让每个认真投入的人都能跟上。 - **搭建一套循序渐进的知识体系**:将构建LLM这个庞大工程,拆解成一个个可以上手、可以理解的模块。学完后,你将拥有一个关于LLM的完整知识图谱。 - **代码驱动,知行合一**:课程的核心是"用代码思考"。所有作业,我们不仅会提供实现代码,更会分享写下每一行代码时的思考过程。 - **贴近国内环境的本土化改造**:考虑到国内的网络环境、大家手头的计算资源以及独特的开源生态,我们会提供更接地气的解决方案和案例(比如,多聊聊Qwen、DeepSeek等国产优秀模型)。 ## 🎯 项目意义 学完这门课,你能得到什么? - **扎实的技术地基**:你将能亲手"造"出自己的LLM,对每个核心组件都了然于胸。 - **宝贵的工程经验**:掌握从数据处理、模型训练到部署优化,堪比大厂的全流程实战技能。 - **突出的行业竞争力**:具备大模型研发的核心能力,为你进入心仪的大厂或团队铺平道路。 - **清晰的科研视野**:对LLM领域有体系化的认知,为未来深入研究打下坚实的基础。 ## 📖 课程目录 | 章节 | 关键内容 | 配套作业 | 状态 | |------|----------|----------|------| | [前言](docs/zh/前言.md) | 项目背景、学习路线、前置知识 | - | ✅ | | [第1章 工具使用](docs/zh/chapter1) | W&B 实验追踪、超参数搜索、可视化面板 | - | 📝 | | [第2章 分词器](docs/zh/chapter2/chapter2_分词器.md) | BPE 算法原理、Unicode 规范化、手写 tokenizer 训练代码 | [作业1](coursework/assignment1-basics/) | ✅ | | [第3章 PyTorch 与资源核算](docs/zh/chapter3/chapter3_pytorch与资源核算.md) | 混合精度训练、梯度累积、FLOPs/显存估算 | - | ✅ | | [第4章 语言模型架构与训练细节](docs/zh/chapter4/chapter4_第四章语言模型架构和训练的技术细节.md) | RoPE、RMSNorm、SwiGLU、AdamW、Pre-Norm vs Post-Norm、学习率调度 | [作业1](coursework/assignment1-basics/) | ✅ | | [第5章 混合专家模型](docs/zh/chapter5/chapter5_混合专家模型.md) | Top-K 路由、负载均衡、辅助损失、Expert Parallelism、DeepSeekMoE | - | ✅ | | [第6章 GPU 与相关优化](docs/zh/chapter6/chapter6_第六章GPU和GPU相关的优化.md) | 显存带宽与计算强度、Flash Attention、Kernel Fusion、混合精度、BF16/TF32 | [作业2](coursework/assignment2-systems/) | ✅ | | [第7章 GPU 高性能编程](docs/zh/chapter7/chapter7_第七章GPU高性能编程.md) | CUDA 编程模型、Tensor Cores、Shared Memory、Triton 入门 | [作业2](coursework/assignment2-systems/) | ✅ | | [第8章 分布式训练](docs/zh/chapter8/chapter8_第八章分布式训练.md) | 数据并行/模型并行/流水线并行、ZeRO-1/2/3、FSDP、梯度累积、All-Reduce | [作业2](coursework/assignment2-systems/) | ✅ | | [第9章 Scaling Laws](docs/zh/chapter9/chapter9_Scaling_Laws.md) | Chinchilla 定律、计算最优配置、Scaling 实验设计、Extrapolation | [作业3](coursework/assignment3-scaling/) | ✅ | | [第10章 推理](docs/zh/chapter10/推理.md) | KV Cache、投机解码、量化 (GPTQ/AWQ)、PagedAttention、Continuous Batching | [作业6](coursework/assignment6-evaluation/) | ✅ | | [第11章 数据工程](docs/zh/chapter11/chapter11_数据工程.md) | 数据质量过滤、MinHash 去重、PII 脱敏、数据配比、Data Curriculum | [作业4](coursework/assignment4-data/) | ✅ | | [第12章 评估与基准测试](docs/zh/chapter12/chapter12_评估与基准测试.md) | MMLU、HumanEval、HELM、CEval、AlpacaEval、Arena 排名 | [作业6](coursework/assignment6-evaluation/) | ✅ | | [第13章 大模型的基本训练流程](docs/zh/chapter13/chapter13_第十三章大模型的基本训练流程.md) | Pre-training、SFT、DPO、RLHF PPO 流程、Alignment Tax | [作业5](coursework/assignment5-alignment/) | ✅ | | [第14章 可验证奖励的强化学习](docs/zh/chapter14/chapter14_可验证奖励的强化学习.md) | GRPO、Rule-based Verifier、Outcome/Process Reward、RLVR 与 R1 训练方案 | [作业5](coursework/assignment5-alignment/) | ✅ | | [第15章 扩展内容](docs/zh/chapter15/) | 1. LLM 推理的本质是什么?(黎又榛)<br>2. LeCun 眼中 LLM 的未来在哪里?(黎又榛、jiangyinhe、李盛康、徐虎) | - | 🔄 | > 状态图例说明:✅ 已完成 🔄 更新中 📝 待完善 🚧 筹备中 ⏸️ 暂缓 ## 📝 作业概览 | 作业 | 核心任务 |状态 | |------|----------|------| | [作业1:手搓大模型](coursework/assignment1-basics/) | 实现 tokenizer、model architecture、optimizer,训练一个极简语言模型 | ✅ | | [作业2:系统优化](coursework/assignment2-systems/) | 性能分析与基准测试;用 Triton 实现 FlashAttention-2;构建分布式训练代码 | ✅ | | [作业3:扩展定律](coursework/assignment3-scaling/) | 理解 Transformer 各组件功能;拟合 scaling law 预测模型扩展效果 | ✅ | | [作业4:数据处理](coursework/assignment4-data/) | 将 Common Crawl 原始数据转换为预训练数据集,执行过滤与去重 | ✅ | | [作业5:模型对齐](coursework/assignment5-alignment/) | 应用 SFT 与强化学习(如 GRPO)训练模型解决数学问题 | ✅ | | [作业6:模型评估](coursework/assignment6-evaluation/) | 使用 lm-evaluation-harness 和 evalscope 进行多维度评测(语言理解、常识推理、代码、数学推理) | ✅ | ## 🚀 快速开始 ```bash # 克隆仓库 git clone https://github.com/datawhalechina/diy-llm.git cd diy-llm # 安装基础依赖(根据具体作业需求安装) ``` ### 学习路径 1️⃣ 理论学习 → 按章节顺序阅读 `docs/zh/` 目录下的中文文档(English version in `docs/en/`) 2️⃣ 实践练习 → 完成 `coursework/` 目录下的 6 个作业 3️⃣ 深入理解 → 阅读代码实现,理解每个组件的设计 ### 项目结构 ``` diy-llm/ ├── docs/ # 在线文档 │ ├── zh/ # 中文文档(默认) │ │ ├── 前言.md │ │ ├── chapter1/ # 工具使用 │ │ ├── chapter2/ # 分词器 │ │ ├── chapter3/ # PyTorch 与资源核算 │ │ ├── chapter4/ # 语言模型架构与训练细节 │ │ ├── chapter5/ # 混合专家模型 │ │ ├── chapter6/ # GPU 与相关优化 │ │ ├── chapter7/ # GPU 高性能编程 │ │ ├── chapter8/ # 分布式训练 │ │ ├── chapter9/ # Scaling Laws │ │ ├── chapter10/ # 推理 │ │ ├── chapter11/ # 数据工程 │ │ ├── chapter12/ # 评估与基准测试 │ │ ├── chapter13/ # 大模型的基本训练流程 │ │ ├── chapter14/ # 可验证奖励的强化学习 │ │ └── chapter15/ # 前沿扩展内容 │ ├── en/ # English documentation │ │ └── ... │ └── .vitepress/ # VitePress 配置 ├── coursework/ # 实践作业 │ ├── assignment1-basics/ # 作业1:手搓大模型 │ ├── assignment2-systems/ # 作业2:系统优化 │ ├── assignment3-scaling/ # 作业3:扩展定律 │ ├── assignment4-data/ # 作业4:预训练数据处理 │ ├── assignment5-alignment/ # 作业5:对齐 │ └── assignment6-evaluation/ # 作业6:评估 ├── README.md # 项目说明 └── .gitignore # Git忽略配置 ``` ### PDF 版本下载 本教程提供 PDF 版本,方便离线阅读和打印学习。为防止各类营销号加水印后贩卖给 LLM 的读者,我们特地在 PDF 文件中添加了不影响阅读的 Datawhale 开源标志水印,敬请谅解~ > 📥 **Diy-LLM 课程讲义 PDF**: [https://github.com/datawhalechina/diy-llm/releases/latest/](https://github.com/datawhalechina/diy-llm/releases/latest/) ## 🔗 相关链接 - **仓库地址**:https://github.com/datawhalechina/diy-llm - **在线阅读地址**:https://datawhalechina.github.io/diy-llm/ - **原版课程主页**:[Stanford CS336 (Spring 2025)](https://stanford-cs336.github.io/spring2025/) - **原版课程项目**:https://github.com/stanford-cs336/spring2025-lectures/tree/main ## ❓ 常见问题 <details> <summary><b>Q: 没有 GPU 可以学习吗?</b></summary> 理论部分可以正常学习,作业中的部分内容可以在 CPU 上调试,但完整训练需要 GPU。建议使用云服务平台。 </details> <details> <summary><b>Q: 与原版 CS336 有什么区别?</b></summary> 我们在保留原版技术深度的基础上,针对中文学习者进行了本土化改造,包括中文讲解、作业实现、更详细的参考内容来源、国产模型案例等。 </details> ## 👥 贡献者 ### 贡献者名单 <table border="0"> <tbody> <tr align="center" > <td> <a href="https://github.com/xuhu0115"><img width="70" height="70" src="https://github.com/xuhu0115.png?s=40" alt="pic"></a><br> <a href="https://github.com/xuhu0115">徐虎</a> <p>项目负责人<br> Datawhale 成员<br> 上海交通大学 <br> 负责内容:第1、3、9、12、14章;作业5、6;全文内容审核</p> </td> <td> <a href="https://github.com/kangkang-Adam"><img width="70" height="70" src="https://github.com/kangkang-Adam.png?s=40" alt="pic"></a><br> <a href="https://github.com/kangkang-Adam">李盛康</a> <p>项目负责人<br> Datawhale 成员<br> 西安邮电大学 <br> 负责内容:第4、6、7、8、13章;作业2、4</p> </td> <td> <a href="https://github.com/1iyouzhen"><img width="70" height="70" src="https://github.com/1iyouzhen.png?s=40" alt="pic"></a><br> <a href="https://github.com/1iyouzhen">黎又榛</a> <p>项目负责人<br> Datawhale-鲸英助教 <br>负责内容:第2、5、10、11、13章;作业1、3; </p> </td> </tr> </tbody> </table> - 感谢 [@aimetrics](https://github.com/aimetrics) 在[作业1 的 train.py](https://github.com/datawhalechina/diy-llm/blob/main/coursework/assignment1-basics/train.py) 中,增加了在 Macbook 设备上的 MPS 支持 - 感谢[@FuTseYi](https://github.com/FuTseYi)(Datawhale成员)对网站迁移、部署和重构的支持 - 感谢[@jiangyinhe](https://github.com/jiangyinhe)参与第 15 章扩展内容《LLM 的未来 - Lecun》的整理 *注:我们感谢每一位为项目做出贡献的开发者!* 我们欢迎所有形式的贡献!无论是文档改进、代码优化、bug修复还是新内容添加,都是对项目的宝贵支持。 ### 如何贡献 1. **报告问题**:如果发现文档错误、代码bug或改进建议,欢迎提交 [Issue](https://github.com/datawhalechina/diy-llm/issues) 2. **提交代码**:Fork 本仓库,创建你的特性分支,提交更改后发起 Pull Request 3. **完善文档**:帮助改进文档、翻译内容或添加示例 4. **分享经验**:在讨论区分享学习心得和实践经验 ### 贡献指南 - 提交代码前请确保代码风格一致 - 添加新内容时请遵循现有的文档格式 - 提交PR时请提供清晰的描述和变更说明 - 欢迎在Issue中讨论大的改动方案 ## 📝 更新日志 项目持续更新中,最新进展请查看 [GitHub Releases](https://github.com/datawhalechina/diy-llm/releases) 或提交记录。 ## 📄 许可证 <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="知识共享许可协议" style="border-width:0" src="https://img.shields.io/badge/license-CC%20BY--NC--SA%204.0-lightgrey" /></a> 本作品采用 [知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议](http://creativecommons.org/licenses/by-nc-sa/4.0/) 进行许可。 ## 🙏 致谢 - 感谢 Stanford CS336 课程团队提供优秀的原版课程 - 特别感谢[@Sm1les](https://github.com/Sm1les)对本项目的帮助与支持 - 感谢所有为项目做出贡献的开发者 - 感谢开源社区的支持与反馈 ## ⭐ Star History 如果这个项目对你有帮助,欢迎给个 Star ⭐️! [![Star History Chart](https://api.star-history.com/svg?repos=datawhalechina/diy-llm&type=Date)](https://star-history.com/#datawhalechina/diy-llm&Date) --- <div align="center"> <p>让更多人能够系统性地学习大语言模型构建技术</p> <p>Made with ❤️ by the Datawhale</p> </div>

Education & Learning
914 Github Stars
base-llm
Open Source

base-llm

<div align="center"> <h1>Base LLM | 从 NLP 到 LLM 的算法全栈教程</h1> </div> <div align='center'> <img src="./logo.svg" alt="base-llm Logo" width="70%"> </div> <div align="center"> <h2>大模型前世今生</h2> <p><em>Base LLM is all you need</em></p> </div> <div align="center"> <img src="https://img.shields.io/github/stars/datawhalechina/base-llm?style=for-the-badge&logo=github&color=ff6b6b" alt="GitHub stars"/> <img src="https://img.shields.io/github/forks/datawhalechina/base-llm?style=for-the-badge&logo=github&color=4ecdc4" alt="GitHub forks"/> <img src="https://img.shields.io/badge/Python-3.10+-blue?style=for-the-badge&logo=python&logoColor=white" alt="Python"/> </div> <div align="center"> <a href="https://github.com/datawhalechina/base-llm/releases"> <img src="https://img.shields.io/github/v/release/datawhalechina/base-llm?style=for-the-badge&logo=github&color=brightgreen" alt="GitHub release"/> </a> <a href="https://datawhalechina.github.io/base-llm/"> <img src="https://img.shields.io/badge/📖_在线阅读-立即开始-success?style=for-the-badge&logoColor=white" alt="在线阅读"/> </a> <a href="https://github.com/datawhalechina"> <img src="https://img.shields.io/badge/💬_讨论交流-加入我们-purple?style=for-the-badge&logoColor=white" alt="讨论交流"/> </a> </div> > **注意:** > - **关于 Pull Request**:本项目目前主要接受 `Extra-chapter` 的共建,提交 PR 前请参阅 [Extra-chapter/README.md](./Extra-chapter/README.md)。 > - **问题反馈**:如果您对主教程有任何建议或发现任何问题,欢迎通过 [Issue](https://github.com/datawhalechina/base-llm/issues) 进行反馈。 ## 📖 项目简介 本项目是一个**从传统自然语言处理(NLP)到大语言模型(LLM)的全栈式学习教程**,旨在为开发者提供一条从理论入门到工程实战的清晰路径。 在 LLM 爆发的今天,许多开发者直接上手调用 API 或微调大模型,却往往忽视了底层的自然语言处理(NLP)基础。本项目主张 **“Base LLM is all you need”**,通过系统性地回顾 NLP 发展历程中的核心技术——从早期的词向量、循环神经网络(RNN),到变革性的 Transformer 架构,再到如今的 BERT、GPT 及 Llama 系列大模型——帮助读者构建坚实的技术护城河。 **核心内容覆盖:** 1. **NLP 理论基石**:深入浅出地讲解分词、词向量(Word2Vec)、RNN/LSTM 等经典算法。 2. **Transformer 架构**:剖析 Attention 机制,详解 Encoder-Decoder 架构,奠定大模型认知基础。 3. **预训练语言模型**:全面覆盖 BERT、GPT、T5 等里程碑式模型的设计与应用。 4. **大模型进阶实战**:从零手搓 Llama2 模型,掌握参数高效微调(PEFT/LoRA)、RLHF 等前沿技术。 5. **工程化落地**:涵盖模型量化、推理加速、Docker 容器化及服务部署的全流程实战。 6. **大模型安全与多模态**:探索模型安全挑战、伦理问题,以及图文多模态模型的前沿技术。 ## 🌟 项目意义 随着人工智能技术的飞速发展,掌握大语言模型已成为 AI 工程师的必备技能。然而,市面上的教程往往存在断层。要么过于偏重学术理论,晦涩难懂;要么仅停留在 API 调用的应用层,缺乏底层原理的支撑。 本项目致力于填补这一空白,通过**理论与代码并重**的方式,帮助开发者: * **打通知识脉络**:理解技术演进的内在逻辑(如:为什么从 RNN 发展到 Transformer?)。 * **掌握核心原理**:不仅会用,更懂其“所以然”,具备排查复杂问题和优化模型结构的能力。 * **学习代码演进**:采用“提出问题-迭代重构”的教学模式,展示从简易脚本到工业级框架的演变过程,培养真正的工程化思维。 * **提升工程能力**:通过 NER、文本分类及 LLM 微调部署等实战项目,积累生产环境下的开发经验。 * **拓宽技术视野**:探索大模型安全、多模态等前沿领域,紧跟 AI 技术发展的最新趋势。 ## 🎯 项目受众 **本项目适合以下人群学习:** * 🎓 **在校学生**:希望系统学习 NLP 知识,为科研或求职打下基础。 * 💻 **AI 算法工程师**:需要从传统机器学习/深度学习转型到大模型领域的开发者。 * 🤔 **LLM 爱好者**:对大模型底层原理感兴趣,希望深入理解大模型架构运行机制的极客。 * 🔬 **研究人员**:需要快速回顾 NLP 经典算法或寻找基线代码实现的学者。 **前置要求:** * 🟢 **Python 基础**:熟练掌握 Python 语法及常用数据结构。 * 🔵 **PyTorch 框架**:具备基本的 PyTorch 深度学习框架使用经验。 * 🟠 **深度学习基础**:理解神经网络基本原理、反向传播机制及模型训练的基础流程。 * 🟡 **数学基础**:了解基本的线性代数、概率论及梯度下降等深度学习概念。 ## ✨ 项目亮点 1. **体系化进阶路径**:从基础的文本表示到 RLHF 和量化技术,内容层层递进。 2. **手写核心代码**:拒绝"调包侠",带领读者手写 Llama2、Transformer 等核心架构代码。 3. **实战导向**:包含文本分类、命名实体识别(NER)、私有数据微调 Qwen2.5 等多个完整项目。 4. **全流程覆盖**:不仅教你怎么训练,还教你怎么用 Docker 和 FastAPI 将模型部署成服务。 5. **图文并茂**:配合大量图解,将抽象的算法原理可视化,降低学习门槛。 6. **直观易懂**:尽量弱化复杂的数学公式推导,让数学基础薄弱的读者也能轻松掌握算法原理。 ## 内容大纲 ### 第一部分:理论篇 - **第 1 章:NLP 简介** - [x] [NLP 概述](./docs/chapter1/01_nlp_intro.md) - [x] [环境准备](./docs/chapter1/02_preparation.md) - **第 2 章:文本表示与词向量** - [x] [初级分词技术](./docs/chapter2/03_tokenization.md) - [x] [词向量表示](./docs/chapter2/04_word_vector.md) - [x] [从主题模型到 Word2Vec](./docs/chapter2/05_Word2Vec.md) - [x] [基于 Gensim 的词向量实战](./docs/chapter2/06_gensim.md) - **第 3 章:循环神经网络** - [x] [循环神经网络](./docs/chapter3/08_RNN.md) - [x] [LSTM 与 GRU](./docs/chapter3/09_LSTM&GRU.md) - **第 4 章:注意力机制与Transformer** - [x] [Seq2Seq 架构](./docs/chapter4/10_seq2seq.md) - [x] [注意力机制](./docs/chapter4/11_attention.md) - [x] [深入解析 Transformer](./docs/chapter4/12_transformer.md) - **第 5 章:预训练模型** - [x] [BERT 结构及应用](./docs/chapter5/13_Bert.md) - [x] [GPT 结构及应用](./docs/chapter5/14_GPT.md) - [x] [T5 结构及应用](./docs/chapter5/15_T5.md) - [x] [Hugging Face 生态与核心库](./docs/chapter5/16_HuggingFace.md) - **第 6 章:深入大模型架构** - [x] [手搓一个大模型](./docs/chapter6/17_handcraft_llama2.md) - [x] [MOE 架构解析](./docs/chapter6/18_MoE.md) - [x] [手撕大模型生成策略](./docs/chapter6/19_text_generation.md) - [x] [上下文学习与提示词技术](./docs/chapter6/20_in_context_learning.md) ### 第二部分:实战篇 - **第 1 章:文本分类** - [x] [文本分类简单实现](./docs/chapter7/01_text_classification.md) - [x] [基于 LSTM 的文本分类](./docs/chapter7/02_lstm_text_classification.md) - [x] [微调 BERT 模型进行文本分类](./docs/chapter7/03_bert_text_classification.md) - **第 2 章:命名实体识别** - [x] [命名实体识别概要](./docs/chapter8/01_named_entity_recognition.md) - [x] [NER 项目的数据处理](./docs/chapter8/02_data_processing.md) - [x] [模型构建、训练与推理](./docs/chapter8/03_model_building_and_training.md) - [x] [模型的推理与优化](./docs/chapter8/04_evaluation_and_prediction.md) ### 第三部分:微调量化篇 - **第 1 章:参数高效微调** - [x] [PEFT 技术综述](./docs/chapter11/01_PEFT.md) - [x] [LoRA 方法详解](./docs/chapter11/02_lora.md) - [x] [基于 peft 库的 LoRA 实战](./docs/chapter11/03_peft_lora.md) - [x] [Qwen2.5 微调私有数据](./docs/chapter11/04_qwen2.5_qlora.md) - **第 2 章:高级微调技术** - [x] [RLHF 技术详解](./docs/chapter12/01_RLHF.md) - [x] [LLaMA-Factory RLHF(DPO)实战](./docs/chapter12/02_llama_factory.md) - **第 3 章:大模型训练与量化** - [x] [模型量化实战](./docs/chapter13/01_quantization.md) - [x] [Deepspeed 框架介绍](./docs/chapter13/02_deepspeed.md) ### 第四部分:应用部署篇 - **第 1 章:模型服务部署** - [x] [FastAPI 模型部署实战](./docs/chapter14/01_fastapi.md) - [x] [云服务器模型部署实战](./docs/chapter14/02_uv_linux.md) - [x] [使用 Docker Compose 部署模型服务](./docs/chapter14/03_docker_deploy.md) - **第 2 章:自动化与性能优化** - [x] [Git 与 GitHub 版本控制基础](./docs/chapter15/01_Git.md) - [x] [搭建 Jenkins CI/CD 自动化部署流水线](./docs/chapter15/02_Jenkins.md) ### 第五部分:大模型安全 - **第 1 章:安全全景与威胁建模** - [x] [大模型安全总览](./docs/chapter16/01_LLM_safety_overview.md) - [x] [威胁建模及风险分析](./docs/chapter16/02_threat_modeling_analysis.md) - **第 2 章:安全工程:对齐与架构设计** - [ ] 行为对齐工程(建设中) - [ ] 安全架构设计(建设中) ### 第六部分:多模态前沿 - **第 1 章:认识多模态边界** - [x] [多模态概述](./docs/chapter19/01_multimodal_definition.md) - [x] [图文多模态](./docs/chapter19/02_ViT_CLIP.md) - **第 2 章:视觉问答** - [x] [BLIP-2 与 LLaVA](./docs/chapter20/01_blip2_llava.md) - [x] [原生统一架构](./docs/chapter20/02_native_unified.md) - [x] [从 0 训练简化版 Omni 模型](./docs/chapter20/03_simplified_omni.md) ### Extra-chapter - []() ## 致谢 **核心贡献者** - [dalvqw-项目负责人](https://github.com/FutureUnreal)(项目发起人与主要贡献者) ### 特别感谢 - 感谢 [@Sm1les](https://github.com/Sm1les) 对本项目的帮助与支持 - 感谢所有为本项目做出贡献的开发者们 - 感谢开源社区提供的优秀工具和框架支持 - 特别感谢以下为教程做出贡献的开发者! [![Contributors](https://contrib.rocks/image?repo=datawhalechina/base-llm)](https://github.com/datawhalechina/base-llm/graphs/contributors) *Made with [contrib.rocks](https://contrib.rocks).* ## 参与贡献 - 发现问题请提交 Issue。 ## Star History [![Star History Chart](https://api.star-history.com/svg?repos=datawhalechina/base-llm&type=Date)](https://star-history.com/#datawhalechina/base-llm&Date) <div align="center"> <p>如果这个项目对你有帮助,请给我们一个 ⭐️</p> <p>让更多人发现这个项目(护食?发来!)</p> </div> ## 关注我们 <div align=center> <p>扫描下方二维码关注公众号:Datawhale</p> <img src="https://raw.githubusercontent.com/datawhalechina/pumpkin-book/master/res/qrcode.jpeg" width = "180" height = "180"> </div> ## 许可证 <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="知识共享许可协议" style="border-width:0" src="https://img.shields.io/badge/license-CC%20BY--NC--SA%204.0-lightgrey" /></a><br />本作品采用<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/">知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议</a>进行许可。

Education & Learning LLM Tools & Chat UIs
816 Github Stars
llm-universe
Open Source

llm-universe

# LLM Universe | 动手学大模型应用开发 <div align=center> <img src="figures/C0-0-logo.png" width = "1000"> </div> ## 项目简介 [![Stars](https://img.shields.io/github/stars/datawhalechina/llm-universe?style=social)](https://github.com/datawhalechina/llm-universe/stargazers) ![GitHub forks](https://img.shields.io/github/forks/datawhalechina/llm-universe) [![Contributors](https://img.shields.io/badge/Contributors-21-brightgreen)](https://github.com/datawhalechina/llm-universe/graphs/contributors) [![Python](https://img.shields.io/badge/Python-3.8+-blue)](https://www.python.org/) [![Jupyter Notebook](https://img.shields.io/badge/Jupyter%20Notebook-1.0-orange)](https://jupyter.org/) [![Online Reading](https://img.shields.io/badge/Online%20Reading-Click%20Here-blue)](https://datawhalechina.github.io/llm-universe/) [![Download PDF](https://img.shields.io/badge/Download%20PDF-Click%20Here-red)](https://github.com/datawhalechina/llm-universe/releases/tag/v1) 本项目是一个面向小白开发者的大模型应用开发教程,旨在基于阿里云服务器,结合个人知识库助手项目,通过一个课程完成大模型开发的重点入门,主要内容包括: 1. **大模型简介**,何为大模型、大模型特点是什么、LangChain 是什么,如何开发一个 LLM 应用,针对小白开发者的简单介绍; 2. **如何调用大模型 API**,本节介绍了国内外知名大模型产品 API 的多种调用方式,包括调用原生 API、封装为 LangChain LLM、封装为 Fastapi 等调用方式,同时将包括百度文心、讯飞星火、智谱AI等多种大模型 API 进行了统一形式封装; 3. **知识库搭建**,不同类型知识库文档的加载、处理,向量数据库的搭建; 4. **构建 RAG 应用**,包括将 LLM 接入到 LangChain 构建检索问答链,使用 Streamlit 进行应用部署 5. **验证迭代**,大模型开发如何实现验证迭代,一般的评估方法有什么; 本项目主要包括三部分内容: 1. **LLM 开发入门**。V1 版本的简化版,旨在帮助初学者最快、最便捷地入门 LLM 开发,理解 LLM 开发的一般流程,可以搭建出一个简单的 Demo。 2. **LLM 开发技巧**。LLM 开发更进阶的技巧,包括但不限于:Prompt Engineering、多类型源数据的处理、优化检索、召回精排、Agent 框架等 3. **LLM 应用实例**。引入一些成功的开源案例,从本课程的角度出发,解析这些应用范例的 Idea、核心思路、实现框架,帮助初学者明白其可以通过 LLM 开发什么样的应用。 目前,第一部分已经完稿,欢迎大家阅读学习;第二、三部分正在创作中。 **目录结构说明:** requirements.txt:官方环境下的安装依赖 notebook:Notebook 源代码文件 docs:Markdown 文档文件 figures:图片 data_base:所使用的知识库源文件 ## 项目意义 LLM 正逐步成为信息世界的新革命力量,其通过强大的自然语言理解、自然语言生成能力,为开发者提供了新的、更强大的应用开发选择。随着国内外井喷式的 LLM API 服务开放,如何基于 LLM API 快速、便捷地开发具备更强能力、集成 LLM 的应用,开始成为开发者的一项重要技能。 目前,关于 LLM 的介绍以及零散的 LLM 开发技能课程已有不少,但质量参差不齐,且没有很好地整合,开发者需要搜索大量教程并阅读大量相关性不强、必要性较低的内容,才能初步掌握大模型开发的必备技能,学习效率低,学习门槛也较高。 本项目从实践出发,结合最常见、通用的个人知识库助手项目,深入浅出逐步拆解 LLM 开发的一般流程、步骤,旨在帮助没有算法基础的小白通过一个课程完成大模型开发的基础入门。同时,我们也会加入 RAG 开发的进阶技巧以及一些成功的 LLM 应用案例的解读,帮助完成第一部分学习的读者进一步掌握更高阶的 RAG 开发技巧,并能够通过对已有成功项目的借鉴开发自己的、好玩的应用。 ## 项目受众 所有具备基础 Python 能力,想要掌握 LLM 应用开发技能的开发者。 **本项目对学习者的人工智能基础、算法基础没有任何要求,仅需要掌握基本 Python 语法、掌握初级 Python 开发技能即可。** 考虑到环境搭建问题,本项目提供了阿里云服务器学生免费领取方式,学生读者可以免费领取阿里云服务器,并通过阿里云服务器完成本课程的学习;本项目同时也提供了个人电脑及非阿里云服务器的环境搭建指南;本项目对本地硬件基本没有要求,不需要 GPU 环境,个人电脑及服务器均可用于学习。 **注:本项目主要使用各大模型厂商提供的 API 来进行应用开发,如果你想要学习部署应用本地开源 LLM,欢迎学习同样由 Datawhale 出品的 [Self LLM | 开源大模型食用指南](https://github.com/datawhalechina/self-llm),该项目将手把手教你如何速通开源 LLM 部署微调全链路!** **注:考虑到学习难度,本项目主要面向初学者,介绍如何使用 LLM 来搭建应用。如果你想要进一步深入学习 LLM 的理论基础,并在理论的基础上进一步认识、应用 LLM,欢迎学习同样由 Datawhale 出品的 [So Large LM | 大模型基础](https://github.com/datawhalechina/so-large-lm),该项目将为你提供全面而深入的 LLM 理论知识及实践方法!** ## 项目亮点 1. 充分面向实践,动手学习大模型开发。相较于其他从理论入手、与实践代差较大的类似教程,本教程基于具有通用性的个人知识库助手项目打造,将普适的大模型开发理念融合在项目实践中,帮助学习者通过动手搭建个人项目来掌握大模型开发技能。 2. 从零开始,全面又简短的大模型教程。本项目针对个人知识库助手项目,对相关大模型开发理论、概念和基本技能进行了项目主导的重构,删去不需要理解的底层原理和算法细节,涵盖所有大模型开发的核心技能。教程整体时长在数小时之内,但学习完本教程,可以掌握基础大模型开发的所有核心技能。 3. 兼具统一性与拓展性。本项目对 GPT、百度文心、讯飞星火、智谱GLM 等国内外主要 LLM API 进行了统一封装,支持一键调用不同的 LLM,帮助开发者将更多的精力放在学习应用与模型本身的优化上,而不需要花时间在繁琐的调用细节上;同时,本教程拟上线 [奇想星球 | AIGC共创社区平台](https://1aigc.cn/),支持学习者自定义项目为本教程增加拓展内容,具备充分的拓展性。 ## 在线阅读地址 [https://datawhalechina.github.io/llm-universe/](https://datawhalechina.github.io/llm-universe/) ## PDF 地址 [https://github.com/datawhalechina/llm-universe/releases/tag/v1](https://github.com/datawhalechina/llm-universe/releases/tag/v1) ## 内容大纲 ### 第一部分 LLM 开发入门 负责人:邹雨衡 1. [LLM 介绍](./notebook/C1%20大型语言模型%20LLM%20介绍/) @高立业 1. [x] [LLM 的理论介绍](https://github.com/datawhalechina/llm-universe/blob/main/notebook/C1%20%E5%A4%A7%E5%9E%8B%E8%AF%AD%E8%A8%80%E6%A8%A1%E5%9E%8B%20LLM%20%E4%BB%8B%E7%BB%8D/C1.md#11-%E5%A4%A7%E5%9E%8B%E8%AF%AD%E8%A8%80%E6%A8%A1%E5%9E%8Bllm%E7%AE%80%E4%BB%8B) 2. [x] [什么是 RAG](https://github.com/datawhalechina/llm-universe/blob/main/notebook/C1%20%E5%A4%A7%E5%9E%8B%E8%AF%AD%E8%A8%80%E6%A8%A1%E5%9E%8B%20LLM%20%E4%BB%8B%E7%BB%8D/C1.md#12-%E4%BB%80%E4%B9%88%E6%98%AF-rag) 3. [x] [什么是 LangChain](https://github.com/datawhalechina/llm-universe/blob/main/notebook/C1%20%E5%A4%A7%E5%9E%8B%E8%AF%AD%E8%A8%80%E6%A8%A1%E5%9E%8B%20LLM%20%E4%BB%8B%E7%BB%8D/C1.md#13-langchain) 4. [x] [开发 LLM 应用的整体流程](https://github.com/datawhalechina/llm-universe/blob/main/notebook/C1%20%E5%A4%A7%E5%9E%8B%E8%AF%AD%E8%A8%80%E6%A8%A1%E5%9E%8B%20LLM%20%E4%BB%8B%E7%BB%8D/C1.md#14-%E5%A4%A7%E6%A8%A1%E5%9E%8B%E5%BC%80%E5%8F%91) 5. [x] [阿里云服务器的基本使用](https://github.com/datawhalechina/llm-universe/blob/main/notebook/C1%20%E5%A4%A7%E5%9E%8B%E8%AF%AD%E8%A8%80%E6%A8%A1%E5%9E%8B%20LLM%20%E4%BB%8B%E7%BB%8D/C1.md#15-%E9%98%BF%E9%87%8C%E4%BA%91%E6%9C%8D%E5%8A%A1%E5%99%A8%E7%9A%84%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8) 6. [x] [GitHub Codespaces 的基本使用(选修)](https://github.com/datawhalechina/llm-universe/blob/main/notebook/C1%20%E5%A4%A7%E5%9E%8B%E8%AF%AD%E8%A8%80%E6%A8%A1%E5%9E%8B%20LLM%20%E4%BB%8B%E7%BB%8D/C1.md#16-github-codespaces-%E6%A6%82%E8%BF%B0%E7%8E%AF%E5%A2%83%E9%85%8D%E7%BD%AE%E9%80%89%E4%BF%AE) 7. [x] [环境配置](https://github.com/datawhalechina/llm-universe/blob/main/notebook/C1%20%E5%A4%A7%E5%9E%8B%E8%AF%AD%E8%A8%80%E6%A8%A1%E5%9E%8B%20LLM%20%E4%BB%8B%E7%BB%8D/C1.md#17-%E7%8E%AF%E5%A2%83%E9%85%8D%E7%BD%AE) 2. [使用 LLM API 开发应用](./notebook/C2%20使用%20LLM%20API%20开发应用/) @毛雨 1. [x] 基本概念 2. [x] 使用 LLM API - ChatGPT - 文心一言 - 讯飞星火 - 智谱 GLM 3. [x] Prompt Engineering 3. [搭建知识库](./notebook/C3%20搭建知识库/) @娄天奥 1. [x] 词向量及向量知识库介绍 2. [x] 使用 Embedding API 3. [x] 数据处理:读取、清洗与切片 4. [x] 搭建并使用向量数据库 4. [构建 RAG 应用](./notebook/C4%20构建%20RAG%20应用/) @徐虎 1. [x] 将 LLM 接入 LangChain - ChatGPT - 文心一言 - 讯飞星火 - 智谱 GLM 2. [x] 基于 LangChain 搭建检索问答链 3. [x] 基于 Streamlit 部署知识库助手 5. [系统评估与优化](./notebook/C5%20系统评估与优化/) @邹雨衡 1. [x] 如何评估 LLM 应用 2. [x] 评估并优化生成部分 3. [x] 评估并优化检索部分 ### 第二部分 进阶 RAG 技巧(正在创作) 负责人:高立业 1. 背景 1. [ ] 架构概览 2. [ ] 存在的问题 3. [ ] 解决方法 2. [数据处理](./notebook/C7%20高级%20RAG%20技巧/2.%20数据处理/) 1. [x] 多类型文档处理 2. [x] 分块优化 3. [x] 向量模型的选择 4. [x] 微调向量模型(进阶) 3. 索引层面 1. [ ] 索引结构 2. [ ] 混合检索 3. [ ] 假设性问题 4. 检索阶段 1. [ ] query 过滤 2. [ ] 对齐 query 和 文档 3. [ ] 对齐检索和 LLM 5. 生成阶段 1. [ ] 后处理 2. [ ] 微调 LLM(进阶) 3. [ ] 参考引用 6. 增强阶段 1. [ ] 上下文增强 2. [ ] 增强流程 7. RAG 工程化评估 ### 第三部分 开源 LLM 应用解读 负责人:徐虎 1. ChatWithDatawhale——个人知识库助手解读 2. 天机——人情世故大模型解读 ## 致谢 **核心贡献者** - [娄天奥-项目负责人](https://github.com/lta155)(Datawhale成员-中国科学院大学研究生) - [邹雨衡-项目负责人](https://github.com/logan-zou)(Datawhale成员-对外经济贸易大学研究生) - [高立业-第二部分负责人](https://github.com/0-yy-0)(DataWhale成员-算法工程师) - [徐虎-第三部分负责人](https://github.com/xuhu0115)(Datawhale成员-算法工程师) **主要贡献者** - [毛雨-内容创作者](https://github.com/Myoungs )(后端开发工程师) - [崔腾松-项目支持者](https://github.com/2951121599)(Datawhale成员-奇想星球联合发起人) - [June-项目支持者](https://github.com/JuneYaooo)(Datawhale成员-奇想星球联合发起人) **其他** 1. 特别感谢 [@Sm1les](https://github.com/Sm1les)、[@LSGOMYP](https://github.com/LSGOMYP) 对本项目的帮助与支持; 2. 特别感谢[奇想星球 | AIGC共创社区平台](https://1aigc.cn/)提供的支持,欢迎大家关注; 3. 如果有任何想法可以联系我们 DataWhale 也欢迎大家多多提出 issue; 4. 特别感谢以下为教程做出贡献的同学! <a href="https://github.com/datawhalechina/llm-universe/graphs/contributors"> <img src="https://contrib.rocks/image?repo=datawhalechina/llm-universe" /> </a> Made with [contrib.rocks](https://contrib.rocks). ## Star History [![Star History Chart](https://api.star-history.com/svg?repos=datawhalechina/llm-universe&type=Date)](https://star-history.com/#datawhalechina/llm-universe&Date)

AI & Machine Learning Education & Learning
13.2K Github Stars
handy-ollama
Open Source

handy-ollama

<div align='center'> <img src="./images/header.svg" alt="alt text" width="100%"> <h1>💻 handy-ollama 🦙 (🧪Beta公测版)</h1> </div> <div align="center"> <img src="https://img.shields.io/github/stars/datawhalechina/handy-ollama?style=flat&logo=github" alt="GitHub stars"/> <img src="https://img.shields.io/github/forks/datawhalechina/handy-ollama?style=flat&logo=github" alt="GitHub forks"/> <img src="https://img.shields.io/github/issues/datawhalechina/handy-ollama?style=flat&logo=github" alt="GitHub issues"/> <img src="https://img.shields.io/badge/license-CC%20BY--NC--SA%204.0-brighgreen?style=flat&logo=github" alt="GitHub license"/> <a href="https://datawhalechina.github.io/handy-ollama/"><img src="https://img.shields.io/badge/在线阅读-Online%20Reading-green?style=flat&logo=gitbook" alt="Online Reading"></a> </div> <div align="center"> <h3>📚 从零开始实现 CPU 玩转大模型部署!</h3> <p><em>动手学 Ollama,快速实现大模型本地部署</em></p> </div> 简体中文 | [English](README_en.md) > [!WARNING] > 🧪 Beta 公测版本提示:教程主体已完成,正在优化细节,欢迎大家提 Issue 反馈问题或建议。 ## 🎉官方收录 **2025.11.06,本项目被 Ollama 官方仓库收录,且是目前唯一的 Tutorial:https://github.com/ollama/ollama#tutorial** ## 🚀 项目简介 动手学 Ollama 教程,轻松上手实现大模型本地化部署,快速在本地管理以及运行大模型,让 CPU 也可以玩转大模型推理部署! 本教程涵盖从基础入门到进阶使用的全方位内容,并通过实际应用案例深入理解和掌握大模型部署以及应用技术。我们的教程提供清晰的步骤和实用的技巧,无论是刚刚接触大模型部署的小白,还是有一定经验的开发者,都可以从零开始学习 Ollama ,实现本地部署大模型以及相关应用。 本项目主要内容: 1. Ollama 介绍、安装和配置,包括在 macOS、Windows、Linux 和 Docker 下的安装与配置; 2. Ollama 自定义导入模型,包括从 GGUF 导入、从 Pytorch 或 Safetensors 导入、由模型直接导入、自定义 Prompt; 3. Ollama REST API,包括 Ollama API 使用指南、在 Python、Java、JavaScript 和 C++ 等语言中使用 Ollama API; 4. Ollama 在 LangChain 中的使用,包括在 Python 和 JavaScript 中的集成; 5. Ollama 可视化界面部署和应用案例,包括使用 FastAPI 和 WebUI 部署可视化对话界面,以及本地 RAG 应用、Agent 应用等。 **热忱欢迎感兴趣的同学或者开发者们 提出 issue 或者 提交 pull request,让我们一起完善这个项目!** **我们坚信:每一位对大模型充满热情的学习者,都应该有机会探索和实践。无论你的编程语言背景如何,无论你的计算资源如何,我们都希望能帮助你使用个人 PC 实现大模型部署。 让我们携手打破技术壁垒,共同开启 LLM 探索之旅!** 目录结构说明: docs ---------------------- Markdown 文档文件 notebook ------------------ Notebook 源代码文件以及部分 Python、Java 和 JavaScript 源文件 images -------------------- 图片 📖 在线阅读:https://datawhalechina.github.io/handy-ollama/ ## 💡 立项理由 随着大模型的飞速发展,市面上出现了越来越多的开源大模型,但是许多模型的部署需要利用 GPU 资源,如何让大模型时代的红利普惠到每一个人,让每一个人都可以部署属于自己的大模型。Ollama 是一个开源的大语言部署服务工具,只需 CPU 即可部署大模型。我们希望通过动手学 Ollama 这一开源教程,帮助学习者快速上手 Ollama ,让每一位大模型爱好者、学习者以及开发者都能在本地部署自己的大模型,进而开发一些大模型应用,让大模型赋能千行百业! ## 🎯 项目受众 - 希望不受 GPU 资源限制,在本地运行大模型; - 希望在消费级硬件上进行大模型有效的推理; - 希望在本地部署大模型,开发大模型应用; - 希望在本地管理大模型,让本地模型安全可靠。 ## ✨ 项目亮点 本项目旨在使用 CPU 部署本地大模型,虽然目前已经有很多 LLM 相关的教程,但是这些教程中模型基本上都需要 GPU 资源,这对于很多资源受限的学习者不是很友好。因此,本项目通过动手学 Ollama ,帮助学习者快速上手本地 CPU 部署大模型。 ## 📖 内容导航 | 章节 | 关键内容 | 状态 | |------------------------------------------------------------------------------------------------------|---------------------------|-----| | <strong>第一章 Ollama 介绍</strong> | | | | [1.1 Ollama 介绍](docs/C1/1.%20Ollama%20介绍.md) | 基础概念、核心特性 | ✅ | | <strong>第二章 Ollama 安装与配置</strong> | | ✅ | | [2.1 macOS 安装与配置](docs/C2/1.%20Ollama%20在%20macOS%20下的安装与配置.md) | macOS 安装、配置 | ✅ | | [2.2 Windows 安装与配置](docs/C2/2.%20Ollama%20在%20Windows%20下的安装与配置.md) | Windows 安装、配置 | ✅ | | [2.3 Linux 安装与配置](docs/C2/3.%20Ollama%20在%20Linux%20下的安装与配置.md) | Linux 安装、配置 | ✅ | | [2.4 Docker 安装与配置](docs/C2/4.%20Ollama%20在%20Docker%20下的安装与配置.md) | Docker 安装、配置 | ✅ | | <strong>第三章 自定义使用 Ollama</strong> | 个性化使用 | ✅ | | [3.1 自定义导入模型](docs/C3/1.%20自定义导入模型.md) | 外部模型导入 | ✅ | | [3.2 自定义模型存储位置](docs/C3/2.%20自定义模型存储位置.md) | 存储路径更改 | ✅ | | [3.3 自定义在 GPU 中运行](docs/C3/3.%20自定义在%20GPU%20中运行.md) | GPU 加速配置 | ✅ | | <strong>第四章 Ollama REST API</strong> | | | | [4.1 Ollama API 使用指南](docs/C4/1.%20Ollama%20API%20使用指南.md) | 调用规则、参数说明 | ✅ | | [4.2 Python 中使用 Ollama API](docs/C4/2.%20在%20Python%20中使用%20Ollama%20API.md) | Python 调用 | ✅ | | [4.3 Java 中使用 Ollama API](docs/C4/3.%20在%20Java%20中使用%20Ollama%20API.md) | Java 调用 | ✅ | | [4.4 JavaScript 中使用 Ollama API](docs/C4/4.%20在%20JavaScript%20中使用%20Ollama%20API.md) | JavaScript 调用 | ✅ | | [4.5 C++ 中使用 Ollama API](docs/C4/5.%20在%20C++%20中使用%20Ollama%20API.md) | C++ 调用 | ✅ | | [4.6 Golang 中使用 Ollama API](docs/C4/6.%20在%20Golang%20中使用%20Ollama%20API.md) | Golang 调用 | ✅ | | C# 中使用 Ollama API | C# 调用(待更) | 🚧 | | Rust 中使用 Ollama API | Rust 调用(待更) | 🚧 | | Ruby 中使用 Ollama API | Ruby 调用(待更) | 🚧 | | R 中使用 Ollama API | R 调用(待更) | 🚧 | | <strong>第五章 Ollama 在 LangChain 中的使用</strong> | | | | [5.1 Python 中的集成](docs/C5/1.%20Ollama%20在%20LangChain%20中的使用%20-%20Python%20集成.md) | Python + LangChain 集成 | ✅ | | [5.2 JavaScript 中的集成](docs/C5/2.%20Ollama%20在%20LangChain%20中的使用%20-%20JavaScript%20集成.md) | JavaScript + LangChain 集成 | ✅ | | <strong>第六章 Ollama 可视化界面部署</strong> | | | | [6.1 FastAPI 部署可视化界面](docs/C6/1.%20使用%20FastAPI%20部署%20Ollama%20可视化对话界面.md) | FastAPI 部署 | ✅ | | [6.2 WebUI 部署可视化界面](docs/C6/2.%20使用%20WebUI%20部署%20Ollama%20可视化对话界面.md) | WebUI 部署 | ✅ | | <strong>第七章 应用案例</strong> | | | | [7.1 搭建本地 AI Copilot 编程助手](docs/C7/1.%20搭建本地的%20AI%20Copilot%20编程助手.md) | 本地编程助手 | ✅ | | [7.2 Dify 接入本地模型](docs/C7/2.%20Dify%20接入%20Ollama%20部署的本地模型.md) | Dify 集成本地模型 | ✅ | | [7.3 LangChain 搭建本地 RAG 应用](docs/C7/3.%20使用%20LangChain%20搭建本地%20RAG%20应用.md) | LangChain + 本地 RAG | ✅ | | [7.4 LlamaIndex 搭建本地 RAG 应用](docs/C7/4.%20使用%20LlamaIndex%20搭建本地%20RAG%20应用.md) | LlamaIndex + 本地 RAG | ✅ | | [7.5 LangChain 实现本地 Agent](docs/C7/5.%20使用%20LangChain%20实现本地%20Agent.md) | LangChain + 本地 Agent | ✅ | | [7.6 LlamaIndex 实现本地 Agent](docs/C7/6.%20使用%20LlamaIndex%20实现本地%20Agent.md) | LlamaIndex + 本地 Agent | ✅ | | [7.7 DeepSeek R1 + Ollama 本地 RAG](docs/C7/7.%20使用%20DeepSeek%20R1%20和%20Ollama%20实现本地%20RAG%20应用.md) | DeepSeek R1 + 本地 RAG | ✅ | | ... | ... | ... | **_注:所有标记(待更新)的内容,以及其他相关的内容,热忱欢迎感兴趣的开发者们 提出 issue 或者 提交 pull request,让我们一起完善这个项目!_** **想要深度参与的同学可以联系我们,我们会将你加入到项目的维护者中。** ## 🙏 致谢 ### 核心贡献者 - [张友东](https://github.com/AXYZdong)(Datawhale成员) - [林通](https://github.com/kjlintong)(Datawhale成员) - [柴春阳](https://github.com/Springff)(内容创作者) - [王莹莹](https://github.com/fuyueagain)(Datawhale成员) - [曾鑫民](https://github.com/fancyboi999)(内容创作者) - [娄天奥](https://github.com/lta155)(Datawhale成员) - [杨卓](https://github.com/little1d)(内容创作者) - [姜舒凡](https://github.com/Tsumugii24)(Datawhale成员) - [曹越](https://github.com/rainsubtime)(内容创作者) - [王晓亮](https://github.com/tomowang)(Datawhale成员) ### 特别感谢 - Ollama 官方仓库:https://github.com/ollama/ollama - 感谢 [@Sm1les](https://github.com/Sm1les) 对本项目的帮助与支持 - 感谢所有为本项目做出贡献的开发者们 ❤️ <a href="https://github.com/AXYZdong/handy-ollama/graphs/contributors"> <img src="https://contrib.rocks/image?repo=AXYZdong/handy-ollama" /> </a> ## Star History [![Star History Chart](https://api.star-history.com/svg?repos=datawhalechina/handy-ollama&type=Date)](https://star-history.com/#datawhalechina/handy-ollama&Date) ## LICENSE <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="知识共享许可协议" style="border-width:0" src="https://img.shields.io/badge/license-CC%20BY--NC--SA%204.0-lightgrey" /></a><br />本作品采用<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/">知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议</a>进行许可。

Education & Learning LLM Tools & Chat UIs
2.4K Github Stars
easy-langent
Open Source

easy-langent

<div align='center'> <img src="./logo.png" alt="alt text" width="100%"> <h1>Easy-langent</h1> </div> <div align="center"> [![GitHub stars](https://img.shields.io/github/stars/datawhalechina/easy-langent?style=flat-square)](https://github.com/datawhalechina/easy-langent/stargazers) [![GitHub forks](https://img.shields.io/github/forks/datawhalechina/easy-langent?style=flat-square)](https://github.com/datawhalechina/easy-langent/network/members) [![GitHub issues](https://img.shields.io/github/issues/datawhalechina/easy-langent?style=flat-square)](https://github.com/datawhalechina/easy-langent/issues) [![GitHub license](https://img.shields.io/github/license/datawhalechina/easy-langent?style=flat-square)](https://github.com/datawhalechina/easy-langent/blob/main/LICENSE) </div> <div align="center"> 📚 在线阅读: <a href="https://datawhalechina.github.io/easy-langent/" target="_blank" style="text-decoration: none; color: #007bff; margin: 0 5px;"><strong>GitHub Pages</strong></a> | <a href="https://easy-langent.datawhale.cc/" target="_blank" style="text-decoration: none; color: #28a745; margin: 0 5px;"><strong>国内镜像</strong></a> </div> ## 🚀项目介绍 当大模型技术从“单点能力突破”迈向“场景化应用落地”,智能体(Agent)已成为连接技术与实际需求的核心载体。然而,多数初学者在接触智能体开发时,常陷入“框架概念繁杂、实操无从下手、技术与应用脱节”的困境——要么被复杂的理论体系吓退,要么掌握了框架基础却不知如何落地真实项目。 “langent”由“lang”(代表LangChain、LangGraph等语言大模型开发框架)与“agent”(智能体)合并而来,核心目标是打破“理论学习”与“实战开发”的壁垒:让读者在系统掌握智能体核心逻辑的同时,真正学会运用LangChain、LangGraph框架解决实际开发问题,实现“从懂概念到会开发”的跨越。 我们摒弃冗余的理论堆砌,聚焦“用框架做开发”的核心需求,每一章都配套针对性的实操任务,确保读者在学习过程中能够动手实践、深化理解。 本项目配套的学习大纲遵循“循序渐进、实践导向”的设计原则,从框架基础认知入手,逐步深入核心组件实操、进阶应用开发,再到多智能体协作与系统优化,最终完成综合实战项目。 ## 📌项目受众 无论你是希望入门智能体开发的高校学生,还是寻求技术落地的开发者,都能通过本项目找到清晰的学习路径。 **前置知识要求:** - 熟悉Python编程语言基础 - 对大模型技术有基本了解 - 对智能体的核心概念有基本了解 如果你还不掌握上述前置知识,建议先完成以下课程: - [Happy-llm](https://github.com/datawhalechina/happy-llm) - [Hello-Agents](https://github.com/datawhalechina/hello-agents) ## 📖 内容导航 | 章节 | 关键内容 | 状态 | | ------------------------------------------------- | ---------------------------- | ---- | | <strong>第一部分:前言</strong> | | | | [前言](./docs/guide/前言.md) | 前言与读者建议 | ✅ | | [第一章 LangChain与LangGraph框架认知](./docs/guide/chapter1.md) | 框架介绍、环境安装、lang框架体验| ✅ | | <strong>第二部分:LangChain组件与实战</strong> | | | | [第二章 LangChain核心组件实操](./docs/guide/chapter2.md) | 模型调用、提示词模板、输出解析 | ✅ | | [第三章 LangChain进阶组件实操](./docs/guide/chapter3.md) | 记忆、工具、组合实践 | ✅ | | [第四章 LangChain应用级系统设计与RAG实践](./docs/guide/chapter4.md) | 链式工作流、RAG实践 | ✅ | | [第五章 课程中期综合实践:智能体应用设计与实现](./docs/guide/chapter5.md) | 中期综合实践 | ✅ | | <strong>第三部分:LangGraph组件与实战</strong> | | | | [第六章 LangGraph基础:有状态工作流与核心概念实操](./docs/guide/chapter6.md) | 有状态工作流、节点、边、状态管理 | ✅ | | [第七章 LangGraph进阶:多智能体协作与复杂流程管控](./docs/guide/chapter7.md) | 多智能体协作、复杂流程管控 | ✅ | | [第八章 综合实战:构建"谁是卧底"游戏智能体](./docs/guide/chapter8.md) | 综合实战 | ✅ | | [结语](./docs/guide/结语.md) | 项目总结与展望 | ✅ | ## 🤖 智能体 Agent 项目合集 **📌 内测组队学习优秀课程项目** | 项目名称 | 备注 | 作者 | | -------------------------------------------------------- | ----------------- | ------- | | [狼人杀(上帝视角)](./project/werewolfGameAi/README.md) | 基于langgraph开发 | 内测组 | **📌 202604组队学习优秀课程项目** | 项目名称 | 备注 | 作者 | | -------------------------------------------------------- | ----------------- | ------- | | [剧本杀4人版](./project/ScriptedMurderGame/README.md) | 基于langgraph开发 | winnerFlyer | | [智能知识库问答](./project/AgenticRag/README.md) | 基于langchain开发 | jspi-fu | | [MCPChat](./project/MCPChat/README.md) | 基于langchain开发 | jspi-fu | | [数据处理智能体](./project/DataAgent/README.md) | 基于langchain开发 | jspi-fu | | [医疗RAG诊断](./project/MedicalRag/README.md) | 基于langchain开发 |道法自然| | [谁是卧底增强版](./project/WhoIsTheSpyBaocaiLi/readme.md) | 基于langgraph开发 |道法自然| | [个人助手](./project/PersonalMemoryAssistant/README.md) | 基于langchain开发 |念安| | [AI面试官](./project/RecruitingInterviewAgentDemo/Readme.md) | 基于langgraph开发 |念安| | [客服工单智能处理](./project/TicketReviewAgentDemo/Readme.md) | 基于langgraph开发 |念安| | [辩论赛4人版](./project/DebateGame/README.md) | 基于langgraph开发 |WangDF2022| | [哈尔滨冰雪大世界舆情分析](./project/HarbinIceSnowOpinionDecision/README.md) | 基于langgraph开发 |tian09150714| ## ✨核心贡献者 - [牧小熊-项目负责人](https://github.com/muxiaoxiong)(Datawhale成员) - [柯慕灵-项目贡献者](https://github.com/1985312383)(Datawhale成员) ## ❤️特别感谢 - 感谢 [@Sm1les](https://github.com/Sm1les) 对本项目的帮助与支持 - 感谢内测组对本项目的帮助与支持 [Zeno](https://github.com/ZENO-CHOW) - 感谢所有为本项目做出贡献的开发者们 ❤️ <div align="left"> <a href="https://github.com/datawhalechina/easy-langent/graphs/contributors"> <img src="https://contrib.rocks/image?repo=datawhalechina/easy-langent&v=1" /> </a> </div> ## 🧑‍💻参与贡献 - 如果你发现了一些问题,可以提Issue进行反馈,如果提完没有人回复你可以联系[保姆团队](https://github.com/datawhalechina/DOPMC/blob/main/OP.md)的同学进行反馈跟进~ - 如果你想参与贡献本项目,可以提Pull request,如果提完没有人回复你可以联系[保姆团队](https://github.com/datawhalechina/DOPMC/blob/main/OP.md)的同学进行反馈跟进~ - 如果你对 Datawhale 很感兴趣并想要发起一个新的项目,请按照[Datawhale开源项目指南](https://github.com/datawhalechina/DOPMC/blob/main/GUIDE.md)进行操作即可~ ## 📊 Star History <div align="center"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=datawhalechina/easy-langent&type=Date&theme=dark" /> <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=datawhalechina/easy-langent&type=Date" /> <img alt="Star History Chart" src="https://api.star-history.com/svg?repos=datawhalechina/easy-langent&type=Date" /> </picture> </div> ## 🌟关注我们 <div align=center> <p>扫描下方二维码关注公众号:Datawhale</p> <img src="https://raw.githubusercontent.com/datawhalechina/pumpkin-book/master/res/qrcode.jpeg" width = "180" height = "180"> </div> ## LICENSE <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="知识共享许可协议" style="border-width:0" src="https://img.shields.io/badge/license-CC%20BY--NC--SA%204.0-lightgrey" /></a><br />本作品采用<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/">知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议</a>进行许可。

Education & Learning AI Agents
300 Github Stars
tiny-universe
Open Source

tiny-universe

<div align=center> <img src="./images/tiny-universe-head2.png" > <h1><strong>大模型白盒子构建指南</strong></h1> </div> &emsp;&emsp;本项目是一个从原理出发、以“白盒”为导向、围绕大模型全链路的“手搓”大模型指南,旨在帮助有传统深度学习基础的读者从底层原理出发,“纯手搓”搭建一个清晰、可用的大模型系统,包括大模型本身、RAG 框架、Agent 系统及大模型评估体系。本项目将从基础原理出发,深入剖析每一个技术点并附以完整的代码实现,以细致讲解和代码注释帮助读者独立复现大模型核心部分,并在复现中实现对大模型的深入理解与掌握。 &emsp;&emsp;本项目旨在为广大学习者搭建一个清晰的、可用的、可复现的大模型世界,帮助每一位有兴趣的学习者纯手工独立搭建自己的 **Tiny LLM Universe**。 &emsp;&emsp;本项目的主要内容包括: ### 主体部分 主题部分主要为对经典技术的从零实现,旨在带领学习者深度掌握经典工作的实现细节: 1. 手写图像生成模型--Tiny Diffusion 2. 深入剖析大模型原理——Qwen Blog 3. 逐步预训练一个手搓大模型——Tiny Llama3 4. 如何评估你的大模型——Tiny Eval 5. 纯手工搭建 RAG 框架——Tiny RAG 6. 手搓一个最小的 Agent 系统——Tiny Agent 7. 深入理解大模型基础——Tiny Transformer 8. 手搓一个基本的 GraphRAG 系统——Tiny GraphRAG ### 探索部分 探索部分主要为新颖的**学术作品/生产阶段**的优秀作品进行从零复现,旨在带领学习者深度感知如何从`会做->创新`: 1. 使用细粒度语义元素指导增强的RAG检索方法--CDDRS (ADVEI25) ## 项目意义 &emsp;&emsp;随着百模大战的经久不衰,开源或是闭源的大模型正不断刷新着模型能力上限,逼近 AGI 的宏伟未来。随着大模型能力的不断增强,基于大模型进行二次微调、应用开发的门槛也不断降低,大模型正在不断深入各行各业,为生产生活赋予智能力量。飞速成熟的大模型生态正不断带来更多的开源或闭源框架、API,层出不穷的各式教程让更多的开发者可以快速、便捷地实现大模型的应用。但生态愈是成熟,深入理解框架之内的细节,实现独立于框架的开发、应用能力愈是关键。只有从核心原理出发,尽可能地脱离框架,实现大模型系统的“纯手搓”,才能真正理解模型的核心能力、关键部分,也才能够对框架实现自由的修改应用,随心所欲地将大模型应用到各行各业各类任务。 &emsp;&emsp;目前,大部分教程目标在于指导开发者如何基于高度封装的 API、开源框架实现便捷、快速的开发和训练,有利于初学者入门,却忽视了掌握模型原理、框架内部细节的重要性。不管是大模型本身,还是基于大模型的赋能系统 RAG 或者是 Agent,又或者是开发应用大模型的必备组件评估体系,都有丰富的基于工具包的使用教程,使很多学习者“知其然而不知其所以然”,只能机械地使用工具包而无法从原理出发进行自由的魔改。本项目旨在抛弃高度封装的工具包与 API,从底层(Pytorch 层)出发,“纯手搓”一个大模型系统,完成大模型的 RAG 、 Agent 、Eval 任务,帮助具备一定的大模型基础的学习者进一步掌握大模型原理,拥抱更自由、更丰富也更精彩的大模型世界。 ## 项目受众 &emsp;本项目适合以下学习者: - 掌握了大模型的基本应用,想要学习原理,但不知从何开始 - 好奇心旺盛、求知欲强的同学,具备一定的学习热情的同学 - 对大模型的RAG、Agent、Eval任务感兴趣,并想要从原理层面了解 - 喜欢动手实践写代码,想要从零开始手写大模型的RAG、Agent、Eval任务 - 想要了解大模型的底层原理,提升自己的大模型技术水平 &emsp;&emsp;***我们希望本项目能为广大学习者提供一个可以看得见、够得着、跟得上的大模型实践机会。让大家在实践中学习,不断提升自己的技术水平。*** &emsp;&emsp;***我们希望为更多学习者打开 LLM 的神奇世界,以“知其然更知其所以然”的心态,搭建属于自己的“Tiny LLM Universe”。*** ## 项目亮点 - 本项目旨在全流程 **从零手搓** - 本项目包含LLM全流程,从Model,到RAG,Agent,Eval,打造LLM **全栈教程** - 区别于大型的算法包,我们的项目代码对初级开发者更 **简洁清晰** ,更"白盒子" - 后续会持续迭代更新项目,如动手训练一个 **Tiny-llama3** ,动手制作 **垂直领域数据集** 等等。 - 欢迎大家参与贡献哦,一起打造一个更好的LLM生态! ## *News* - ***2025.8.12:发布TinyGraphRAG,从零上手GraphRAG!*** - ***2024.12.25:TinyDiffusion,从零上手Diffusion震撼发布!两小时完成图像生成预训练!*** - ***2024.10.28:TinyLlama3,从零上手Llama预训练到加载模型推理,2G显存即可完成!*** - ***2024.6.26:增加选修内容——高考数学评测,使TinyEval接入高考题目评测!!*** - ***2024.5.20:增加选修内容——Tiny Transformer,纯手工搭建 Transformer 模型*** - ***2024.5.1:发布 Tiny-Universe V1 版本,劳动节帕鲁献礼!*** ## 项目结构 ### [*TinyGraphRAG*](./content/TinyGraphRAG/) &emsp;&emsp;GraphRAG 作为近年来新兴的检索增强生成(RAG)技术,将图结构与大语言模型相结合,在复杂关系推理、知识关联检索等任务中展现出强大的能力。然而,对于初学者来说,GraphRAG 的概念体系庞杂,涉及图数据库、向量检索、图算法与LLM协同等多个环节,从原理到落地实现存在较高的理解门槛。 &emsp;&emsp;***本项目手工搭建了一个最简化版本的 GraphRAG 系统,从原理公式与架构图出发,对应到具体的图构建、检索、推理与生成代码实现,旨在帮助学习者更直观地理解 GraphRAG 的工作机制,掌握数据准备、查询处理、生成整合的完整流程。*** <p align="center"> <img src="./content/TinyGraphRAG/images/workflow.png" style="width:60%;"> </p> ### [*TinyDiffusion*](./content/TinyDiffusion/) &emsp;&emsp;Diffusion模型作为当下最流行的图像生成模型,其图像生成效果优秀、训练过程稳定,已经成为了图像生成领域的主流方案。然而,对于初学者来说,Diffusion模型的公式原理过于复杂,对于如何从公式出发实现对应的代码也很困惑。 &emsp;&emsp;***本项目手工搭建了一个最简化版本的DDPM模型,从论文中的公式出发,对应到具体的训练与采样过程代码实现,旨在帮助学习者更好地理解Diffusion模型的原理,熟悉训练、推理、评估的整套流程。*** <div aligh=center> <img src="./content/TinyDiffusion/fig/ddpm.png" style="width:90%;"> </div> ### [*Qwen-Blog*](./content/Qwen-blog/) ([对应讲解视频](https://meeting.tencent.com/v2/cloud-record/share?id=0be29bb2-0648-4aeb-9baa-c9dc91dfc7a6&from=3&is-single=false&record_type=2)) &emsp;&emsp;初学者在学习LLM时,往往对庞大的代码与各种封装的功能"谈码色变"~ &emsp;&emsp;但其实,LLM的网络架构并没有想象的那么复杂! 本项目以Qwen2为例,带大家深入LLM模型结构内部,以输入tensor为第一视角,带大家经过Model的各个操作块,点亮LLM的"黑匣子"。 &emsp;&emsp;***项目内除了Model内容外,也添加了嵌入模型内部的GQA,ROPE与Attention Mask等机制的细致讲解,促进大家对LLM的全面理解!*** <div align=center> <img src="./content/Qwen-blog/img/framework.JPG" style="width:90%;"> </div> ### [*TinyRAG*](./content/TinyRAG/)([对应讲解视频](https://meeting.tencent.com/v2/cloud-record/share?id=4306b90c-d772-4faa-baeb-1f4e0bf4569f&from=3&is-single=false&record_type=2)) &emsp;&emsp;LLM会产生误导性的 “幻觉”,依赖的信息可能过时,处理特定知识时效率不高,缺乏专业领域的深度洞察,同时在推理能力上也有所欠缺。 &emsp;&emsp;正是在这样的背景下,检索增强生成技术(Retrieval-Augmented Generation,RAG)应时而生,成为 AI 时代的一大趋势。 &emsp;&emsp;RAG 通过在语言模型生成答案之前,先从广泛的文档数据库中检索相关信息,然后利用这些信息来引导生成过程,极大地提升了内容的准确性和相关性。RAG 有效地缓解了幻觉问题,提高了知识更新的速度,并增强了内容生成的可追溯性,使得大型语言模型在实际应用中变得更加实用和可信。 &emsp;&emsp;***RAG 已经成为 LLM 应用的重要组成部分,但其他RAG项目都基于封装框架提供完整服务,虽然易于使用,却隐藏了 RAG 的底层原理,也难以随心所欲地魔改升级。本项目抛弃高度封装的 RAG 框架,手搓一个从零开始的RAG项目,帮助学习者更好地理解RAG的原理。*** > *镜像地址:https://www.codewithgpu.com/i/datawhalechina/tiny-universe/tiny-universe-tiny-rag* <div align=center> <img src="./content/TinyRAG/images/RAG.png" style="width:90%;"> </div> ### [*TinyAgent*](./content/TinyAgent/)(暂无录播,Datawhale视频号搜索“动手搭建一个最小Agent系统”) &emsp;&emsp;大模型具有出人意料的强大能力,却也有其固定缺陷,在逻辑推理、现实事件、高度垂直领域等方面仍然存在薄弱之处。因此,通过针对性的工具来为大模型赋能,给大模型一个抓手,让大模型和现实世界发生的事情对齐颗粒度,从而打造一个更智能、更专业、更全面的大模型应用,是大模型未来的重要发展方向。Agent 就基于这样的理念,将 LLM 打造为能自主理解、规划决策、执行复杂任务的智能体,给予其丰富的专业工具,从而真正让大模型走入现实生活,为未来赋能。 &emsp;&emsp;***本项目基于 React 的方式,手动制作了一个最小的 Agent 结构(其实更多的是调用工具),通过一步一步手写`Agent`,让读者对`Agent`的构成和运作更加的了解,也让后续自由地搭建个性化的 Agent 系统成为可能。暑假的时候我们会尝试将 React 结构修改为 SOP 结构,欢迎大家一起加入进来啊~!*** <div align=center> <img src="./content/TinyAgent/images/React.png" style="width:90%;"> </div> ### [*TinyEval*](./content/TinyEval)([对应讲解视频](https://meeting.tencent.com/v2/cloud-record/share?id=8b9cf6ca-add6-477b-affe-5b62e2d8f27e&from=3)) &emsp;&emsp;随着LLM的推广,越来越多的小伙伴已经熟悉了模型sft微调流程,但是对于微调的结果,尤其是如何判断各大模型在当前数据集上的表现,仍然是一个待解决的问题。并且,对于选择式、判别式、生成式等不同的生成任务,如何才能够客观地评价模型生成质量,仍是一个需要明确的问题。 &emsp;&emsp;***基于上述问题,我们搭建了一个完善的评测体系介绍,让大家能够学会根据自身的任务量身定做合适的评测指标,并使用该指标进行客观评测,为模型能力提供准确可量化的数据支持!*** <div align=center> <img src="./content/TinyEval/Eval/docs/compass.png" style="width:70%;"> </div> ### [*TinyLLM*](./content/TinyLLM) &emsp;&emsp;此项目在于实现一个简单的大语言模型,从训练tokenizer开始,到训练模型,再到使用模型生成文本。仅使用Numpy和Pytorch即可实现一个简单的大语言模型训练,显存使用2G左右。以下为项目效果展示。 &emsp;&emsp;训练模型所需要的资源也是很少的,仅需要一个显卡即可,显存使用2G左右。训练模型的时间也不长,仅需要几个小时即可完成。 <div align="center"> <img src="images/model_show.png" alt="RAG" width="85%"> </div> ### [*TinyTransformer*](./content/TinyTransformer) &emsp;&emsp;目前,所有 LLM 几乎都以 Transformer 提出的 Attention 机制作为基础,要深入理解 LLM 的原理和结构,深入、全面地理解 Transformer 是必经之路。 &emsp;&emsp;***基于 Transformer 经典论文《Attention is All You Need》,我们在 pytorch 层手工搭建了一个完整、可复现、可运行的 Transformer 模型,帮助学习者更深入地理解 Transformer 原理结构,打牢 LLM 基础。*** ## 致谢 #### 项目创作管理者 - [肖鸿儒-项目负责人](https://github.com/Hongru0306)(Datawhale成员-同济大学) - [宋志学-项目负责人](https://github.com/KMnO4-zx)(Datawhale成员-中国矿业大学(北京)) - [邹雨衡-项目负责人](https://github.com/logan-zou)(Datawhale成员-对外经济贸易大学) #### 项目贡献者 - [刘啸宇-核心贡献者](https://github.com/lxysl)(华中科技大学) - [潘笃驿-核心贡献者](https://github.com/lxysl)(香港科技大学(广州)) - [葛继前](https://github.com/Lukas-Calvin)(同济大学) #### 其他 - 特别感谢[@Sm1les](https://github.com/Sm1les)对本项目的帮助与支持 - 如果有任何想法可以联系我们 DataWhale 也欢迎大家多多提出 issue - 特别感谢以下为教程做出贡献的同学! <div align=center style="margin-top: 30px;"> <a href="https://github.com/datawhalechina/tiny-universe/graphs/contributors"> <img src="https://contrib.rocks/image?repo=datawhalechina/tiny-universe" /> </a> </div> ## 关注我们 <div align=center> <p>扫描下方二维码关注公众号:Datawhale</p> <img src="images/qrcode.jpeg" width = "180" height = "180"> </div> &emsp;&emsp;Datawhale,一个专注于AI领域的学习圈子。初衷是for the learner,和学习者一起成长。目前加入学习社群的人数已经数千人,组织了机器学习,深度学习,数据分析,数据挖掘,爬虫,编程,统计学,Mysql,数据竞赛等多个领域的内容学习,微信搜索公众号Datawhale可以加入我们。 ## LICENSE <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="知识共享许可协议" style="border-width:0" src="https://img.shields.io/badge/license-CC%20BY--NC--SA%204.0-lightgrey" /></a><br />本作品采用<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/">知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议</a>进行许可。 *注:默认使用CC 4.0协议,也可根据自身项目情况选用其他协议*

Education & Learning ML Frameworks
4.9K Github Stars
self-dify
Open Source

self-dify

# 🤓 self-dify 2.0 📚 《Dify 应用开发指南》——从零开始学习并掌握基于 Dify 的大模型应用开发 ## 📖 教程介绍 > self-dify 2.0 致力于成为你的大模型应用开发全流程指南。 本教程将全面指导你如何快速搭建自己的 AI 应用环境,从 Docker 的安装与配置开始,到本地部署 Dify 并自定义 AI 助手功能,让你轻松实现“猜病例”、“甜蜜哄人”、“新生入学指南”、“小红书读书卡片”与“面试宝典”等多种特色 AI 应用。并教会你从基础智能体到使用工作流,再到知识库、DeepResearch、数据库、MCP、复杂任务编排等高阶任务,由浅入深地学习掌握基于 Dify 的大模型应用开发。 ## 💡 如何学习 欢迎你,未来的 AI 应用构建者!在开启这段旅程之前,请参考以下指引: 本项目内容兼顾基础与进阶,旨在帮助你系统性地掌握 Dify 应用开发的全流程。因此,特别适合 **AI 开发者、产品经理、在校学生** 以及对 **AI 自动化** 抱有浓厚兴趣的自学者。 ### 🛠️ 学习前提 - **基础环境**:本地具备安装 Docker 的环境(Windows/Mac/Linux 均可)。 - **模型支持**:建议准备好可用的 LLM API Key(如 OpenAI, DeepSeek, 智谱 AI, 文心一言等),或者本地部署 Ollama。 - **背景知识**:无需深厚的编程背景,但需要对大模型基本概念(如提示词、RAG、Agent)有初步了解。 ### 👨‍🏫 学习路线建议 #### 🆕 零基础新手 1. **环境先行**:务必先完成 [Dify本地部署](doc/1.%20Dify本地部署.md),这是所有实践的基石。 2. **掌握提示词**:通过 [掌握提示词设计](doc/2.%20掌握提示词(prompt)设计.md) 学习如何给 AI 下达精准指令。 3. **循序渐进**:按照 **入门任务 -> 进阶任务 -> 工具使用** 的顺序逐一实践。建议在复现教程的基础上,尝试修改配置或提示词,观察 AI 行为的变化。 #### 💻 有经验的开发者 1. **快速复现**:已有 Dify 环境的可直接挑选感兴趣的 [入门任务] 进行复现。 2. **核心攻克**:重点研究 **工作流 (Workflow)**、**Agent 编排** 和 **知识库 (RAG)** 的高级技巧(第 6-9 章)。 3. **前沿探索**:深入研究 **MCP** 和 **DeepResearch**(第 10-11 章),探索 Dify 在处理复杂任务和多模态应用中的无限可能。 ## 📚 学习清单 | 序号 | 教程名称 | 难度 | 类别 | 核心知识点 | 文档链接 | |:---:|:---:|:---:|:---:|:---|:---| | 1 | Dify本地部署 | ⭐ | 环境配置 | Docker安装与配置、Dify本地部署 | [📖](doc/1.%20Dify本地部署.md) | | 2 | 掌握提示词(prompt)设计 | ⭐ | 入门任务 | 提示词设计、角色模拟、AI交互控制 | [📖](doc/2.%20掌握提示词(prompt)设计.md) | | 3 | 哄哄模拟器 | ⭐⭐ | 入门任务 | 提示词设计、数值反馈、互动游戏、情感交互 | [📖](doc/3.%20哄哄模拟器.md) | | 4 | 新生入学指南助手 | ⭐⭐ | 入门任务 | 知识库导入、知识库检索、信息问答应用 | [📖](doc/4.%20新生入学指南助手.md) | | 5 | 快速批处理小问题 | ⭐⭐ | 入门任务 | 批量任务编排、数据处理分析、词云制作 | [📖](doc/5.快速批处理小问题.md) | | 6 | 小红书读书卡片 | ⭐⭐⭐ | 进阶任务 | Agent工作流、信息检索、内容生成、格式转换 | [📖](doc/6.小红书读书卡片.md) | | 7 | 面试宝典 | ⭐⭐⭐ | 进阶任务 | 知识库索引、Agent应用、专业知识检索 | [📖](doc/7.面试宝典.md) | | 8 | text2sql及echart数据分析 | ⭐⭐⭐ | 进阶任务 | 数据库交互、SQL生成、echart图表展示、数据分析 | [📖](doc/8.text2sql及echart数据分析.md) | | 9 | DeepResearch | ⭐⭐⭐⭐ | 进阶任务 | DeepResearch原理、高阶应用开发 | [📖](doc/9.deepresearch%20设计.md) | | 10 | MCP | ⭐⭐⭐ | 工具使用 | MCP client配置、MCP应用原理 | [📖](doc/10.mcp.md) | | 11 | 多模态入门(语音文本转化) | ⭐⭐⭐ | 工具使用 | 语音文本转化、语音智能体开发 | [📖](doc/11.多模态入门(语音文本转化).md) | **难度说明:** - ⭐ 基础:适合初学者,无需前置知识 - ⭐⭐ 入门:需要基础概念理解 - ⭐⭐⭐ 进阶:需要掌握前置知识 - ⭐⭐⭐⭐ 高级:需要深入理解相关原理 ## 教程目录 ### 环境配置 1. [Dify本地部署](doc/1.%20Dify本地部署.md)教程涵盖以下内容: * **Docker安装与配置**:包含Mac和Windows系统安装步骤,Docker镜像源加速技巧。 * **Dify本地部署**:详细介绍使用Docker Compose快速启动AI应用服务。 ### 入门任务 2. [掌握提示词(prompt)设计](doc/2.%20掌握提示词(prompt)设计.md),角色模拟及AI交互控制。 3. [哄哄模拟器](doc/3.%20哄哄模拟器.md) 学习如何利用提示词与数值反馈设计互动游戏,增强AI响应的情感交互效果。 4. [新生入学指南助手](doc/4.%20新生入学指南助手.md)熟悉如何导入并高效检索知识库,创建基于知识库索引的精准信息问答应用。 5. [快速批处理小问题](doc/5.快速批处理小问题.md),带领大家学习dify批量任务编排,并学习数据处理分析制作词云。 ### 进阶任务 6. [小红书读书卡片](doc/6.小红书读书卡片.md),掌握如何创建和配置Agent工作流,实现输入处理、信息检索、内容生成及格式转换的自动化,优化任务执行效率。 7. [面试宝典](doc/7.面试宝典.md),深入理解如何创建高效知识库索引,搭配Agent实现精准的专业知识咨询和检索。 8. [text2sql及echart数据分析](doc/8.text2sql及echart数据分析.md),学习dify与数据库交互,打开数据与AI交互新思路。了解echart数据分析图表展示,上手数据分析大模型应用任务。 9. [DeepResearch](doc/9.deepresearch%20设计.md),学习DeepResearch原理,快速上手一个自己的DeepResearch应用项目。带你了解dify的高阶玩法。 ### 工具使用 10. [MCP](doc/10.mcp.md),学习MCP clicent在dify的配置与应用,掌握MCP应用原理,在dify玩转mcp~ 11. [多模态入门(语音文本转化)](doc/11.多模态入门(语音文本转化).md),了解dify语音文本转化的实现方案,快速完成自己的语音智能体,给大模型发个小嘴巴~ ## 🙏 致谢 ### 核心贡献者 * **王熠明** * **高增玉** * **刘伟鸿** * **甘小琦** * **杨若朴** * **陈欣婧** * **邓宇文** * **潘笃驿** * **王浩** * **张友东** * **周理璇** ## 🤝 如何贡献 我们是一个开放的开源社区,欢迎任何形式的贡献! * 🐛 **报告 Bug** - 发现教程内容或操作步骤有问题,请提交 Issue。 * 💡 **提出建议** - 对项目有好的想法,欢迎发起讨论。 * 📝 **完善内容** - 帮助改进教程,提交你的 Pull Request。 ## 往期教程 大家可以下载后: `git checkout v1.0.0` 即可。 ## 关于 Datawhale Datawhale 是一个专注于数据科学与 AI 领域的开源组织,汇集了众多领域专家和热血志愿者,秉承“for the learner,和学习者一起成长”的愿景,致力于构建一个纯粹的学习圈子。 --- ## 📜 许可证 本项目内容遵循 [知识共享署名-相同方式共享 4.0 国际许可协议](LICENSE-CC-BY-SA)。

Education & Learning Documentation
484 Github Stars
hello-claw
Open Source

hello-claw

<div align="center"> <img src="asset/logo.png" alt="Hello Claw Logo" width="400"> <p align="center"><em>一个不起眼的仓库里,龙虾诞生了。<br>选一只,送它上学堂;或动手写一只不被定义的龙虾。<br>它的梦想,从第一天起就很大。</em></p> # 哈喽!龙虾 👋 <p align="center"><em>Hello Claw:领养你的 AI 龙虾助理,上龙虾大学学 Skills,从零构建属于你的智能助理</em></p> <p align="center"> 📌 <a href="https://datawhalechina.github.io/hello-claw/">在线阅读</a> | <a href="https://github.com/datawhalechina/easy-vibe">还想学 Vibe Coding</a> </p> <p align="center"> <a href="https://github.com/datawhalechina/hello-claw/stargazers" target="_blank"> <img src="https://img.shields.io/github/stars/datawhalechina/hello-claw?color=660874&style=for-the-badge&logo=star&logoColor=white&labelColor=1a1a2e" alt="Stars"></a> <a href="https://github.com/datawhalechina/hello-claw/network/members" target="_blank"> <img src="https://img.shields.io/github/forks/datawhalechina/hello-claw?color=660874&style=for-the-badge&logo=git-fork&logoColor=white&labelColor=1a1a2e" alt="Forks"></a> <a href="LICENSE" target="_blank"> <img src="https://img.shields.io/badge/License-CC_BY_NC_SA_4.0-4ecdc4?style=for-the-badge&logo=creative-commons&logoColor=white&labelColor=1a1a2e" alt="License"></a> </p> <p align="center"> <a href="README.md"><img alt="简体中文" src="https://img.shields.io/badge/简体中文-d9d9d9"></a> <a href="README_EN.md"><img alt="English" src="https://img.shields.io/badge/English-d9d9d9"></a> <a href="README_JA.md"><img alt="日本語" src="https://img.shields.io/badge/日本語-d9d9d9"></a> </p> </div> ## 在线阅读 https://datawhalechina.github.io/hello-claw ## 项目简介 本项目是一个面向 OpenClaw 的完整学习教程,帮助你从零开始掌握这个强大的命令行 AI 助理系统。无论你是想快速上手使用 OpenClaw 提升效率,还是想深入理解其原理并构建自己的版本,本教程都能为你提供清晰的学习路径。 **本项目包含三大核心模块:** 1. **领养龙虾(使用篇)**:11 章 + 7 个附录,安装(Ch1-3)+ 核心配置(Ch4-6)+ 扩展运维(Ch7-9)+ 安全与客户端(Ch10-11),按需选读 2. **龙虾大学(场景实战篇)**:围绕 Skills 选型与典型工作流,给出可直接复用的实战案例 3. **构建龙虾(开发篇)**:11 章,先拆解 OpenClaw 源码与替代方案,再进入 Skills、渠道和完整定制 **谁适合学习:** - 零基础用户:想要一个随时待命的 AI 助手,不需要任何编程经验 - 效率达人:希望通过 QQ / 飞书 / Telegram 远程控制 AI - 技术爱好者:对 OpenClaw 的技能系统和自动化能力感兴趣 - 开发者:想深入理解 Agent 架构并构建自己的版本 **学习建议:** - 零基础用户:从第一部分“领养龙虾”开始,先把安装与基础自动化跑通 - 想做场景闭环:直接进入“龙虾大学”,按场景挑 5~10 个 Skills 快速落地 - 开发者:进入“构建龙虾”,拆解底层实现原理并定制自己的 Claw ## 🔥 最新动态 - **[2026-03-25]** ✅ 龙虾大学完成一轮场景扩充与新手化重写,新增个人效率、编程开发、内容创作、商务销售、多智能体协作和更多场景共 11 篇可直接上手的实战案例,并同步按 README 分类整理 - **[2026-03-25]** 🔥 OpenClaw v2026.3.24:Gateway OpenAI 兼容端点(`/v1/models`、`/v1/embeddings`)、Microsoft Teams 官方 SDK 集成(流式回复/欢迎卡片/消息编辑删除)、Skills 一键安装配方与 Control UI 状态过滤、Slack 富回复恢复、CLI `--container` 容器内执行、Discord LLM 自动线程命名、`before_dispatch` 插件钩子、沙箱媒体安全修复,教程全章节同步 - **[2026-03-23]** 🔥 OpenClaw 3.22 大版本:插件 SDK 重构(旧 extension-api 废弃)、安全加固(SMB 凭证泄露/环境变量注入/Unicode 伪装等修复)、GPT-5.4 默认上位、飞书交互卡片/Telegram 话题自动命名、Agent 超时延长至 48h - **[2026-03-12]** ✅ 完成构建 Claw 第1-10章:核心架构解析(提示词系统、工具系统、消息循环、多渠道接入)、替代方案探索(轻量化、安全加固、硬件方案)、站在山巅回望总结 - **[2026-03-10]** ✅ 完成构建 Claw 第13章:Skill 文件结构、Frontmatter、异步处理与调试 - **[2026-03-10]** ✅ 新增龙虾大学:菜单式 Skills 选修指南,让龙虾装上"战斗外挂" - **[2026-03-08]** ✅ 完成领养 Claw 第1-11章:安装(AutoClaw + 手动安装 + 配置向导)、核心配置(聊天平台、模型、智能体)、扩展运维(工具与定时任务、网关、远程访问)、安全与客户端(安全防护、Web 界面) - **[2026-03-04]** 🦞 项目启动,规划"领养 Claw"和"构建 Claw"两大核心模块 ## 📖 目录 ### 龙虾大学 <table align="center"> <tr> <td valign="top" width="33%"> <b>🌅 个人效率</b><br> • <a href="./docs/cn/university/email-assistant/index.md">邮箱助手实战(163)</a><br> • <a href="./docs/cn/university/local-health-assistant/index.md">Skill 开发实战:本地健康管理助手</a><br> • <a href="./docs/cn/university/daily-briefing/index.md">早间简报自动化</a><br> • <a href="./docs/cn/university/calendar-ops/index.md">智能日程管理</a> </td> <td valign="top" width="33%"> <b>💻 编程开发</b><br> • <a href="./docs/cn/university/vibe-coding/index.md">Vibe Coding 实战</a><br> • <a href="./docs/cn/university/ci-cd-assistant/index.md">自动化测试与部署:CI/CD 助手实战</a><br> • <a href="./docs/cn/university/docs-automation/index.md">文档自动生成:从代码变更到可发布文档</a> </td> <td valign="top" width="33%"> <b>📢 内容创作</b><br> • <a href="./docs/cn/university/vibe-research/index.md">自动化科研实战</a><br> • <a href="./docs/cn/university/content-studio/index.md">内容创作工作室:社媒运营、写作润色与多平台发布</a> </td> </tr> <tr> <td valign="top" width="33%"> <b>🏢 商务销售</b><br> • <a href="./docs/cn/university/revops-assistant/index.md">商务销售实战:客户支持与 CRM 协同助手</a><br> • <a href="./docs/cn/university/meeting-ops/index.md">商务销售实战:会议预约与纪要自动化</a> </td> <td valign="top" width="33%"> <b>🤖 多智能体协作</b><br> • <a href="./docs/cn/university/multi-claw-hiclaw/index.md">多智能体协作(Multi OpenClaw / HiClaw)</a><br> • <a href="./docs/cn/university/knowledge-base/index.md">多智能体协作实战:知识库共享与检索</a><br> • <a href="./docs/cn/university/one-person-company/index.md">一人公司实战(一个人,一支团队)</a> </td> <td valign="top" width="33%"> <b>🔧 更多场景</b><br> • <a href="./docs/cn/university/security/index.md">安全防护清单</a><br> • <a href="./docs/cn/university/paper-assistant/index.md">Agent 论文推送助手</a><br> • <a href="./docs/cn/university/smart-home-control/index.md">更多场景实战:智能家居控制助手</a><br> • <a href="./docs/cn/university/finance-research/index.md">更多场景实战:金融数据分析助手</a><br> • <a href="./docs/cn/university/training-assistant/index.md">更多场景实战:教育培训辅助助手</a> </td> </tr> </table> ### 第一部分:领养 Claw(使用篇,11 章 + 附录 A-G) | 章节 | 简介 | 状态 | | ------------------------------ | --------------------------------------------------------- | ---- | | **写在开头** | **OpenClaw 是什么、领养四步法、学习路线图** | ✅ | | **🔵 安装** | | | | 第 1 章 AutoClaw 一键安装 | 下载 AutoClaw 桌面客户端,5 分钟零门槛体验 | ✅ | | 第 2 章 OpenClaw 手动安装 | 终端介绍、Node.js 安装、npm install、onboard 配置向导 | ✅ | | 第 3 章 初始配置向导 | CLI 向导、macOS 引导、Custom Provider、重新配置 | ✅ | | **🟢 核心配置** | | | | 第 4 章 聊天平台接入 | 支持平台总览、以飞书为例完整接入、配对与群聊 | ✅ | | 第 5 章 模型管理 | 模型概念、CLI 管理、多提供商配置、API Key 轮换、故障转移 | ✅ | | 第 6 章 智能体管理 | 多 Agent 管理、工作区、心跳、绑定规则 | ✅ | | **🟡 扩展运维** | | | | 第 7 章 工具与定时任务 | 工具集级别、定时任务(cron/at/every)、Web 搜索 | ✅ | | 第 8 章 网关运维 | 启动管理、热更新、认证安全、密钥管理、沙箱策略、日志监控 | ✅ | | 第 9 章 远程访问与网络 | SSH 隧道、Tailscale 组网、部署架构、安全最佳实践 | ✅ | | **🔴 安全与客户端** | | | | 第 10 章 安全防护与威胁模型 | 威胁全景、VM 隔离、信任边界、MITRE ATLAS、供应链安全 | ✅ | | 第 11 章 Web 界面与客户端 | Dashboard、WebChat、Control UI、TUI、第三方客户端 | ✅ | | **附录** | | | | 附录 A:学习资源汇总 | 8 大类学习资源,80+ 链接,编者精选 | ✅ | | 附录 B:社区之声与生态展望 | 6 大议题深度讨论 + 金句精选 | ✅ | | 附录 C:类 Claw 方案对比与选型 | 桌面客户端 / 托管服务 / 云厂商 / 开源自建 / 移动端 5 大类 | ✅ | | 附录 D:技能开发与发布指南 | SKILL.md 格式 + skill-creator + ClawHub 发布流程 | ✅ | | 附录 E:模型提供商选型指南 | 聚合网关 / 国内 / 国际 / 本地 4 大类系统对比 | ✅ | | 附录 F:命令速查表 | 安装、配置、日志、cron、渠道等全部 CLI 命令参考 | ✅ | | 附录 G:配置文件详解 | openclaw.json 各项参数逐项解读 | ✅ | --- 构建 Claw(开发篇,13章) ### 第二部分:构建 Claw(开发篇,13章) | 章节 | 简介 | 状态 | | -------------------------------------------------- | -------------------------------------------------------------------- | ---- | | **写在开头** | **为什么要从零构建你的 Claw、OpenClaw 复杂度困境与学习路线图** | ✅ | | **🔵 OpenClaw 内部拆解**(第 1~7 章) | | | | 第 1 章 架构设计哲学 | AI Agent 架构演化、OpenClaw 六大架构创新 | ✅ | | 第 2 章 ReAct 循环 | Agent 的"思考-行动"引擎、循环执行流程 | ✅ | | 第 3 章 提示词系统 | 提示词架构与热更新机制、持久人格设计 | ✅ | | 第 4 章 工具系统 | 四大原语工具详解、工具注册与组合能力 | ✅ | | 第 5 章 消息循环与事件驱动 | 泳道模型、心跳机制、并发安全与时间主动性 | ✅ | | 第 6 章 统一网关 | Gateway 架构、多渠道接入与消息标准化 | ✅ | | 第 7 章 安全沙箱 | 自由与约束的平衡、执行环境隔离与权限控制 | ✅ | | **🟢 定制方案**(第 8~10 章) | | | | 第 8 章 轻量化方案 | NanoClaw、Nanobot、ZeroClaw 等社区变体 | ✅ | | 第 9 章 安全加固方案 | IronClaw 安全架构、沙箱隔离与审计日志 | ✅ | | 第 10 章 硬件方案 | PicoClaw 硬件选型、低功耗嵌入式部署 | ✅ | | **🟡 第三层:定制你的 Claw**(第 13 章) | | | | 第 13 章 Skill 编写 | Skill 文件结构、Frontmatter 格式、异步处理与调试 | ✅ | --- > 🎉 **欢迎大家来贡献案例!** > > 如果你有独特的 OpenClaw 使用场景或实践经验,欢迎通过以下方式分享: > > - 提交 PR 添加你的案例到本章节 > - 提 Issue 描述你的使用场景 > - 加入社区讨论,与其他开发者交流 > > 每一份贡献都能帮助更多人发现 OpenClaw 的可能性! ## 贡献者名单 | 姓名 | 职责 | | :-------------------------------------- | :--------- | | [桂子轩](https://github.com/zixuangui-rgb) | 核心贡献者 | | [赵志民](https://github.com/zhimin-z) | 核心贡献者 | | [李秀奇](https://github.com/li-xiu-qi) | 核心贡献者 | | [刘丽欣](https://github.com/liulx25xx) | 核心贡献者 | | [刘思怡](https://github.com/liusiyi77m) | 核心贡献者 | | [散步](https://github.com/sanbuphy) | 核心贡献者 | *欢迎更多贡献者加入* ## 🤝 参与贡献 - 如果你发现了一些问题,可以提 Issue 进行反馈,如果提完没有人回复你可以联系[保姆团队](https://github.com/datawhalechina/DOPMC/blob/main/OP.md)的同学进行反馈跟进 - 如果你想参与贡献本项目,可以提 Pull Request,如果提完没有人回复你可以联系[保姆团队](https://github.com/datawhalechina/DOPMC/blob/main/OP.md)的同学进行反馈跟进 - 如果你对 Datawhale 很感兴趣并想要发起一个新的项目,请按照 [Datawhale 开源项目指南](https://github.com/datawhalechina/DOPMC/blob/main/GUIDE.md)进行操作即可 ## 关注我们 <div align=center> <p>扫描下方二维码关注公众号:Datawhale</p> <img src="https://raw.githubusercontent.com/datawhalechina/pumpkin-book/master/res/qrcode.jpeg" width = "180" height = "180"> </div> ## 📄 LICENSE <div align="center"> <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"> <img alt="知识共享许可协议" style="border-width:0" src="https://img.shields.io/badge/license-CC%20BY--NC--SA%204.0-lightgrey" /> </a> <br /> 本作品采用 <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"> 知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议 </a> 进行许可。 </div> --- <div align="center"> <h3>⭐ 如果这个项目对你有帮助,请给我们一个 Star ❤️</h3> </div> ## ⭐ Star History [![Star History Chart](https://api.star-history.com/svg?repos=datawhalechina/hello-claw&type=Date)](https://star-history.com/?type=date&legend=top-left&repos=datawhalechina%2Fhello-claw)

Developer Tools AI Agents
2.1K Github Stars
handy-n8n
Open Source

handy-n8n

<div align='center'> <img src="./images/handy-n8n.svg" alt="alt text" width="100%"> <h1>💻 handy-n8n 🤖</h1> </div> ## 项目介绍 在自动化工作流日益重要的当下,n8n 凭借其强大的集成能力和灵活的配置方式,成为众多开发者和企业的 首选工具。本课程以 “理论 + 实操” 为核心,通过系统的内容编排,带你从入门到精通 n8n,解锁自动化 工作流的无限可能。 1. 多维度对比与深度解析:开篇将 n8n 与 dify 等工具进行全面对比,帮助你快速掌握 n8n 的独特优 势,明确其适用场景,为后续学习奠定基础。 2. 全场景部署教学:覆盖多种部署模式,无论你处于何种技术环境,都能轻松完成 n8n 部署,开启 n8n 之旅 3. 系统化知识体系:从界面操作、节点功能(Trigger、控制流、数据处理等十余类节点)到代码处理 (变量、表达式、第三方库)、鉴权机制,循序渐进构建完整知识框架,助你快速上手 n8n 核心功能。 4. 前沿高阶应用:深入探索 RAG、向量存储、Chat 模式、MCP 等前沿技术,结合 Human in the loop 与异常处理实践,带你突破常规,掌握 n8n 在复杂场景下的高级玩法。 5. 自定义开发与实战:手把手教学开发自定义节点,满足个性化需求;通过丰富的案例分析与实践课题, 将所学知识转化为实际生产力,真正做到学以致用。 ## 适合人群 - 希望提升工作效率,实现业务流程自动化的职场人士 - 对自动化工作流、低代码开发感兴趣的开发者 - 计划使用 n8n 搭建复杂集成系统的技术团队成员 ### 前置要求 n8n 虽主打低代码、无代码的工作流编排,但若想更好地理解和运用它,我们建议你具备以下基础: - 提问与解决问题的能力,以及动手能力: 善于发现问题、提出疑问并亲自动手尝试解决,是高效使用任何工具的关键。 - 科学的网络环境 - 基本的编程知识: 理解条件、循环、函数等编程概念,能让你更好地理解 n8n 的逻辑构建。 - 了解 HTTP 请求、JSON 数据格式、Webhook: 这些是现代网络应用中数据交互的核心,掌握它们能让你轻松集成各种服务。 - 了解 AI、Agent、RAG 等概念: 如果你计划使用 n8n 来构建与人工智能相关的流程,对这些概念的理解会非常有帮助。 - 英语阅读能力: 由于 n8n 暂时没有官方支持的中文版本,查阅官方文档和社区资源时,良好的英语阅读能力必不可少。 - 命令行、容器化知识(针对私有部署): 如果你希望将 n8n 部署到自己的服务器,了解命令行操作和容器化技术(如 Docker)会大有裨益。 - 编程语言阅读能力: 能够读懂 JavaScript、Python 等常见编程语言的代码,将有助于你理解代码节点相关的内容。 - JavaScript、TypeScript 编程知识(针对高阶课程内容): 如果你希望参与高阶课程,进行自定义节点开发,那么掌握 JavaScript 和 TypeScript 是必备技能。 当然,相关的要求,如英语、代码解释等,可以通过翻译工具或者大语言模型,辅助理解。 ## 课程大纲 - [C01 - n8n 初识](c01/ "Chapter01 n8n 初识") - [n8n 简介](c01/?id=n8n-%e7%ae%80%e4%bb%8b) - [n8n 与其他工具对比](c01/?id=n8n-%e4%b8%8e%e5%85%b6%e4%bb%96%e5%b7%a5%e5%85%b7%e7%9a%84%e5%af%b9%e6%af%94) - [C02 - n8n 安装与配置](c02/ "Chapter02 n8n 安装与配置") - [官方 SaaS](c02/saas) - [本地 PC 部署](c02/local-pc-deploy?id=%e6%9c%ac%e5%9c%b0-pc-%e9%83%a8%e7%bd%b2) - [云主机部署](c02/cloud-host-deploy?id=%e4%ba%91%e4%b8%bb%e6%9c%ba%e9%83%a8%e7%bd%b2) - [HF Space 部署](c02/hf-space-deploy?id=huggingface-space-%e9%83%a8%e7%bd%b2) - [C03 - n8n 基本概念](c03/ "Chapter03 n8n 基本概念") - [n8n 平台介绍](c03/n8n-workspace?id=n8n-%e5%b9%b3%e5%8f%b0%e4%bb%8b%e7%bb%8d) - [n8n 触发器节点](c03/n8n-trigger-nodes?id=n8n-%e8%a7%a6%e5%8f%91%e5%99%a8%e8%8a%82%e7%82%b9) - [n8n 核心节点](c03/n8n-core-nodes?id=n8n-%e6%a0%b8%e5%bf%83%e8%8a%82%e7%82%b9) - [n8n 中的代码](c03/n8n-code?id=n8n-%e4%b8%ad%e7%9a%84%e4%bb%a3%e7%a0%81) - [C04 - n8n 高阶用法](c04/ "Chapter04 n8n 高阶用法") - [n8n 子工作流与错误处理](c04/n8n-sub-workflows-and-error-handling) - [n8n AI 相关概念](c04/n8n-ai-concepts) - [C05 - n8n 社区节点与节点开发](c05/ "Chapter05 n8n 社区节点与节点开发") - [n8n 社区节点](c05/?id=%e7%a4%be%e5%8c%ba%e8%8a%82%e7%82%b9) - [n8n 节点开发](c05/?id=%e8%87%aa%e5%ae%9a%e4%b9%89%e8%8a%82%e7%82%b9%e5%bc%80%e5%8f%91) - [C06 - n8n 案例分享](c06/ "Chapter06 n8n 案例分享") ## 贡献者名单 | 姓名 | 职责 | 简介 | | :----- | :--------- | :------------------------------------------------------------ | | 王晓亮 | 项目负责人 | [@tomowang](https://github.com/tomowang) 🌐<https://tomo.dev> | ## 参与贡献 - 如果你发现了一些问题,可以提 Issue 进行反馈,如果提完没有人回复你可以联系[保姆团队](https://github.com/datawhalechina/DOPMC/blob/main/OP.md)的同学进行反馈跟进~ - 如果你想参与贡献本项目,可以提 Pull request,如果提完没有人回复你可以联系[保姆团队](https://github.com/datawhalechina/DOPMC/blob/main/OP.md)的同学进行反馈跟进~ - 如果你对 Datawhale 很感兴趣并想要发起一个新的项目,请按照[Datawhale 开源项目指南](https://github.com/datawhalechina/DOPMC/blob/main/GUIDE.md)进行操作即可~ ## 关注我们 <div align=center> <p>扫描下方二维码关注公众号:Datawhale</p> <img src="https://raw.githubusercontent.com/datawhalechina/pumpkin-book/master/res/qrcode.jpeg" width = "180" height = "180"> </div> ## LICENSE <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="知识共享许可协议" style="border-width:0" src="https://img.shields.io/badge/license-CC%20BY--NC--SA%204.0-lightgrey" /></a><br />本作品采用<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/">知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议</a>进行许可。

Education & Learning AI Agents
116 Github Stars