• Stars
    star
    1,133
  • Rank 39,594 (Top 0.9 %)
  • Language
    Jupyter Notebook
  • Created 6 months ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

本项目是一个面向小白开发者的大模型应用开发教程,在线阅读地址:https://datawhalechina.github.io/llm-universe/

动手学大模型应用开发

项目简介

本项目是一个面向小白开发者的大模型应用开发教程,旨在结合个人知识库助手项目,通过一个课程完成大模型开发的重点入门,主要内容包括:

  1. 大模型简介,何为大模型、大模型特点是什么、LangChain 是什么,针对小白开发者的简单介绍;
  2. 如何调用大模型 API,本节介绍了国内外知名大模型产品 API 的多种调用方式,包括调用原生 API、封装为 LangChain LLM、封装为 Fastapi 等调用方式,同时将包括百度文心、讯飞星火、智谱AI等多种大模型 API 进行了统一形式封装;
  3. 大模型开发流程及架构,大模型应用开发的基本流程、一般思想和本项目的架构分析;
  4. 数据库搭建,不同类型知识库文档的加载、处理,向量数据库的搭建;
  5. Prompt 设计,如何设计 Prompt 来让大模型完成特定任务,Prompt Engineering 的原则和技巧有哪些;
  6. 验证迭代,大模型开发如何实现验证迭代,一般的评估方法有什么;
  7. 前后端开发,如何使用 Gradio、FastAPI 等框架快速开发大模型 Demo,展示应用能力。

目录结构说明:

notebook:教程源码,可运行的 Notebook,更新频率最高,更新速度最快。
docs:在线阅读版本,基于 notebook 源码订正。
figures:图片文件。
data_base:知识库文件和持久化向量数据库的地址。
project:个人知识库助手项目代码。
requirements.txt:环境依赖,请务必使用一致的版本号,避免版本更新带来的影响。

项目意义

LLM 正逐步成为信息世界的新革命力量,其通过强大的自然语言理解、自然语言生成能力,为开发者提供了新的、更强大的应用开发选择。随着国内外井喷式的 LLM API 服务开放,如何基于 LLM API 快速、便捷地开发具备更强能力、集成 LLM 的应用,开始成为开发者的一项重要技能。

目前,关于 LLM 的介绍以及零散的 LLM 开发技能课程已有不少,但质量参差不齐,且没有很好地整合,开发者需要搜索大量教程并阅读大量相关性不强、必要性较低的内容,才能初步掌握大模型开发的必备技能,学习效率低,学习门槛也较高。

本项目从实践出发,结合最常见、通用的个人知识库助手项目,深入浅出逐步拆解 LLM 开发的一般流程、步骤,旨在帮助没有算法基础的小白通过一个课程完成大模型开发的基础入门。同时,我们也对项目本身做了清晰、全面的逐层规划及封装,实现了不同 LLM API 到项目的统一整合,帮助开发者能够自由、统一调用不同 LLM,充分降低学习门槛。

项目受众

所有具备基础 Python 能力,想要掌握 LLM 应用开发技能的开发者。

本项目对学习者的人工智能基础、算法基础没有任何要求,仅需要掌握基本 Python 语法、掌握初级 Python 开发技能即可。

本项目对本地硬件基本没有要求,不需要 GPU 环境,个人电脑及服务器均可用于学习。

项目亮点

  1. 充分面向实践,动手学习大模型开发。相较于其他从理论入手、与实践代差较大的类似教程,本教程基于具有通用性的个人知识库助手项目打造,将普适的大模型开发理念融合在项目实践中,帮助学习者通过动手搭建个人项目来掌握大模型开发技能。

  2. 从零开始,全面又简短的大模型教程。本项目针对个人知识库助手项目,对相关大模型开发理论、概念和基本技能进行了项目主导的重构,删去不需要理解的底层原理和算法细节,涵盖所有大模型开发的核心技能。教程整体时长在数小时之内,但学习完本教程,可以掌握基础大模型开发的所有核心技能。

  3. 兼具统一性与拓展性。本项目对 GPT、百度文心、讯飞星火、智谱GLM 等国内外主要 LLM API 进行了统一封装,支持一键调用不同的 LLM,帮助开发者将更多的精力放在学习应用与模型本身的优化上,而不需要花时间在繁琐的调用细节上;同时,本教程拟上线 奇想星球 | AIGC共创社区平台,支持学习者自定义项目为本教程增加拓展内容,具备充分的拓展性。

在线阅读地址

在线阅读地址:动手学大模型应用开发

内容大纲

思维导图:

目录:

第一章 大模型简介 @徐虎

  1. 什么是大模型
  2. 大模型的能力、特点
  3. 常见大模型
  4. 什么是 LangChain

第二章 调用大模型 API @邹雨衡

  1. 基本概念
  2. 调用 ChatGPT
  3. 调用百度文心
  4. 调用讯飞星火
  5. 调用智谱GLM
  6. 总结

第三章 大模型开发流程及架构 @邹雨衡

  1. 大模型一般开发流程简介
  2. 个人知识库助手项目流程简析

第四章 数据库搭建 @高立业

  1. 知识库文档处理
  2. 向量数据库简介及使用
  3. 构建项目数据库

第五章 Prompt 设计 @徐虎

  1. Prompt 设计的原则及技巧
  2. 基于问答助手的 Prompt 构建
  3. 添加历史对话功能

第六章 验证迭代 @邹雨衡

  1. 验证迭代的一般思路
  2. 解决 Bad Case
  3. 大模型评估方法

第七章 前后端搭建 @高立业

  1. Gradio 简介与页面搭建
  2. FastAPI 进行前后端分离

第八章 总结及拓展 @邹雨衡

致谢

核心贡献者

其他

  1. 特别感谢 @Sm1les@LSGOMYP 对本项目的帮助与支持;
  2. 特别感谢奇想星球 | AIGC共创社区平台提供的支持,欢迎大家关注;
  3. 如果有任何想法可以联系我们 DataWhale 也欢迎大家多多提出 issue;
  4. 特别感谢以下为教程做出贡献的同学!

Made with contrib.rocks.

Star History

Star History Chart

More Repositories

1

pumpkin-book

《机器学习》(西瓜书)公式详解
22,983
star
2

leedl-tutorial

《李宏毅深度学习教程》(李宏毅老师推荐👍),PDF下载地址:https://github.com/datawhalechina/leedl-tutorial/releases
Jupyter Notebook
9,384
star
3

llm-cookbook

面向开发者的 LLM 入门教程,吴恩达大模型系列课程中文版
Jupyter Notebook
8,853
star
4

easy-rl

强化学习中文教程(蘑菇书🍄),在线阅读地址:https://datawhalechina.github.io/easy-rl/
Jupyter Notebook
8,032
star
5

joyful-pandas

pandas中文教程
Jupyter Notebook
4,304
star
6

competition-baseline

数据挖掘、计算机视觉、自然语言处理、推荐系统竞赛知识、代码、思路
Jupyter Notebook
3,978
star
7

fun-rec

推荐系统入门教程,在线阅读地址:https://datawhalechina.github.io/fun-rec/
Jupyter Notebook
3,304
star
8

hugging-llm

HuggingLLM, Hugging Future.
Jupyter Notebook
2,425
star
9

daily-interview

Datawhale成员整理的面经,内容包括机器学习,CV,NLP,推荐,开发等,欢迎大家star
HTML
2,258
star
10

team-learning

主要展示Datawhale的组队学习计划。
2,153
star
11

thorough-pytorch

PyTorch入门教程,在线阅读地址:https://datawhalechina.github.io/thorough-pytorch/
Jupyter Notebook
1,916
star
12

learn-nlp-with-transformers

we want to create a repo to illustrate usage of transformers in chinese
Shell
1,660
star
13

statistical-learning-method-solutions-manual

统计学习方法习题解答,在线阅读地址:https://datawhalechina.github.io/statistical-learning-method-solutions-manual
Jupyter Notebook
1,563
star
14

team-learning-data-mining

主要存储Datawhale组队学习中“数据挖掘/机器学习”方向的资料。
Jupyter Notebook
1,504
star
15

key-book

《机器学习理论导引》(宝箱书)的证明、案例、概念补充与参考文献讲解。
1,375
star
16

self-llm

《开源大模型食用指南》基于Linux环境快速部署开源大模型,更适合中国宝宝的部署教程
Jupyter Notebook
1,352
star
17

hands-on-data-analysis

动手学数据分析以项目为主线,知识点孕育其中,通过边学、边做、边引导来得到更好的学习效果
Jupyter Notebook
1,041
star
18

hugging-multi-agent

A tutorial based on MetaGPT to quickly help you understand the concept of agent and muti-agent and get started with coding development
CSS
917
star
19

team-learning-nlp

主要存储Datawhale组队学习中“自然语言处理”方向的资料。
Jupyter Notebook
827
star
20

team-learning-program

主要存储Datawhale组队学习中“编程、数据结构与算法”方向的资料。
Jupyter Notebook
803
star
21

dive-into-cv-pytorch

动手学CV-Pytorch版
Python
781
star
22

wonderful-sql

Follow me,从 0 到 1 掌握 SQL。
625
star
23

machine-learning-toy-code

《机器学习》(西瓜书)代码实战
Jupyter Notebook
520
star
24

so-large-lm

大模型理论基础
508
star
25

leetcode-notes

🐳 LeetCode 算法笔记:面试、刷题、学算法。在线阅读地址:https://datawhalechina.github.io/leetcode-notes/
490
star
26

fantastic-matplotlib

Matplotlib中文教程,在线阅读地址:https://datawhalechina.github.io/fantastic-matplotlib/
Python
436
star
27

torch-rechub

A Lighting Pytorch Framework for Recommendation Models, Easy-to-use and Easy-to-extend.
Python
341
star
28

powerful-numpy

巨硬的NumPy
Jupyter Notebook
324
star
29

whale-quant

本项目为量化开源课程,可以帮助人们快速掌握量化金融知识以及使用Python进行量化开发的能力。
Jupyter Notebook
322
star
30

learn-python-the-smart-way

聪明方法学Python,简明且系统的 Python 入门教程。
Jupyter Notebook
301
star
31

team-learning-cv

主要存储Datawhale组队学习中“计算机视觉”方向的资料。
Jupyter Notebook
288
star
32

vced

VCED 可以通过你的文字描述来自动识别视频中相符合的片段进行视频剪辑。该项目基于跨模态搜索与向量检索技术搭建,通过前后端分离的模式,帮助你快速的接触新一代搜索技术。
Python
270
star
33

d2l-ai-solutions-manual

《动手学深度学习》习题解答,在线阅读地址如下:
Jupyter Notebook
249
star
34

juicy-bigdata

🎉🎉🐳 Datawhale大数据处理导论教程 | 大数据技术方向的开篇课程🎉🎉
Python
226
star
35

office-automation

python自动化办公
Jupyter Notebook
211
star
36

team-learning-sql

主要存储Datawhale组队学习中“SQL”方向的资料。
172
star
37

DOPMC

Datawhale 开源项目管理委员会(Datawhale Open-source Project Management Committee,简称DOPMC)
169
star
38

learn-python-the-smart-way-v2

聪明办法学Python,简明且系统的 Python 入门教程第二版。
Jupyter Notebook
142
star
39

ensemble-learning

Jupyter Notebook
124
star
40

smoothly-vslam

VSLAM开源基础教程,各章节练习代码
C++
122
star
41

joyrl

An easier PyTorch deep reinforcement learning library.
Python
121
star
42

free-excel

开源Excel教程。
CSS
120
star
43

faster-git

a chinese tutorial of git
113
star
44

unusual-deep-learning

水很深的深度学习
105
star
45

agent-tutorial

96
star
46

grape-book

图深度学习(葡萄书),在线阅读地址: https://datawhalechina.github.io/grape-book
HTML
96
star
47

undingable-optimization

顶不住的运筹优化
92
star
48

sweetalk-design-pattern

基于《大话设计模式》对设计原则和设计模式进行解读。
C++
79
star
49

hugging-sd

Hugging StableDiffusion, Hugging Future.
Jupyter Notebook
76
star
50

hands-dirty-nlp

本课程面对具有一定机器学习基础,但尚未入门的NLPer或经验尚浅的NLPer,尽力避免陷入繁琐枯燥的公式讲解中,力求用代码展示每个模型背后的设计思想,同时也会带大家梳理每个模块下的技术演变,做到既知树木也知森林。
Jupyter Notebook
73
star
51

sora-tutorial

69
star
52

joyrl-book

Jupyter Notebook
66
star
53

huawei-od-python

华为OD算法题解
Python
64
star
54

paper-chart-tutorial

《科研论文配图》组队学习
50
star
55

wow-plotly

高级可视化神器plotly的学习
Jupyter Notebook
49
star
56

time-series-learning

天池”AI Earth“气象海洋预测竞赛的Topline学习教程
Jupyter Notebook
48
star
57

go-talent

Go天才小队
Go
47
star
58

zishu

wow-fullstack,令人惊叹的全栈开发教程
Jupyter Notebook
46
star
59

whale-anno

Datawhale自研数据标注工具
Vue
43
star
60

openmmlab-tutorial

帮助新手快速入门、快速使用、习惯 OpenMMLab 开源库官方文档且能够自主上手实验,自由选择阅读更深层的知识。
Jupyter Notebook
42
star
61

rl-papers

rl-papers
38
star
62

whale-paper

Datawhale论文分享,阅读前沿论文,分享技术创新
35
star
63

whale-starry

繁星点点,光芒万丈
C++
34
star
64

team-learning-rl

主要存储Datawhale组队学习中“强化学习”方向的资料。
28
star
65

llms-from-scratch-cn

Jupyter Notebook
28
star
66

whale-web

Python
27
star
67

ML-FTTI

机器学习 - 从原理到实现
Python
26
star
68

aima-notes

人工智能:现代方法(第4版)笔记
24
star
69

awesome-compression

模型压缩的小白入门教程
23
star
70

magic-cv

Jupyter Notebook
20
star
71

llm-research

16
star
72

coggle

Coggle数据科学
15
star
73

hugging-audio

Hugging Face Audio Course中文版,帮助学习者快速入门音频模态
Jupyter Notebook
14
star
74

easy-grokking-deep-learning

Easy-Grokking-Deep-Learning,意为轻松摸索深度学习,英文缩写可简称为EGDL。
Python
11
star
75

leeml-notes

leeml-notes已更名为leedl-tutorial,请访问:https://github.com/datawhalechina/leedl-tutorial
10
star
76

datawhale-linklearner

datawhale linklearner 网站
TypeScript
9
star
77

sweetalk-data-structure

电子书阅读地址
8
star
78

hugging-rl

Robot Learning Algorithms
8
star
79

what-is-vs

5
star
80

HandPoseKeyPoints

5
star
81

design-and-analysis-of-algorithm

4
star
82

hello-net

4
star
83

fun-marl

4
star
84

easy-ros2arm

Robotic arm with machine vision and its os is ROS2.
C++
3
star
85

ai-club

Datawhale 高校联盟
3
star
86

camel-agent-tutorial

This is a tutorial based on the CAMEL framework, aimed at understanding how to build an Agent Society from the ground up!
3
star
87

obsession-with-ai

2
star
88

latex-template

Datawhale LaTex Template
TeX
2
star
89

udl-tutorial

2
star
90

llm-deploy

2
star
91

whale-share

1
star
92

sweettalk-django

Python
1
star
93

whale-governance

Datawhale 组织治理小组负责推动组织持续发展,包括组织架构、文化、制度等工作
1
star
94

start-deep-learning-on-graphs

start-deep-learning-on-graphs
1
star
95

move-as-experts

Imitation Learning and Offline Reinforcement Learning.
1
star
96

datawhale-homepage

datawhale 官网介绍页
CSS
1
star
97

caublazer

Python
1
star
98

leegenai-tutorial

1
star