Skip to content

Latest commit

 

History

History
45 lines (39 loc) · 24.4 KB

schedule.md

File metadata and controls

45 lines (39 loc) · 24.4 KB

大模型(LLMs)应用开发快速入门指南

课程表

课表 描述 课程资料 任务
第1节 大模型基础:理论与技术的演进
- 初探大模型:起源与发展
- 预热篇:解码注意力机制
- 变革里程碑:Transformer的崛起
- 走向不同:GPT与BERT的选择
建议阅读:
- Attention Mechanism: Neural Machine Translation by Jointly Learning to Align and Translate
- An Attentive Survey of Attention Models
- Transformer:Attention is All you Need
- [BERT:Pre-training of Deep Bidirectional Transformers for Language Understanding(https://arxiv.org/abs/1810.04805)
[作业]
第2节 GPT 模型家族:从始至今
- 从GPT-1到GPT-3.5:一路的风云变幻
- ChatGPT:赢在哪里
- GPT-4:一个新的开始
提示学习(Prompt Learning)
- 思维链(Chain-of-Thought, CoT):开山之作
- 自洽性(Self-Consistency):多路径推理
- 思维树(Tree-of-Thoughts, ToT):续写佳话
建议阅读:
- GPT-1: Improving Language Understanding by Generative Pre-training
- GPT-2: Language Models are Unsupervised Multitask Learners
- GPT-3: Language Models are Few-Shot Learners


额外阅读:
- GPT-4: Architecture, Infrastructure, Training Dataset, Costs, Vision, MoE
- GPTs are GPTs: An Early Look at the Labor Market Impact Potential of Large Language Models
- Sparks of Artificial General Intelligence: Early experiments with GPT-4

[作业]
第3节 大模型开发基础:OpenAI Embedding
- 通用人工智能的前夜
- "三个世界"和"图灵测试"
- 计算机数据表示
- 表示学习和嵌入
Embeddings Dev 101
- 课程项目:GitHub openai-quickstart
- 快速上手 OpenAI Embeddings
建议阅读:
- Representation Learning: A Review and New Perspectives
- Word2Vec: Efficient Estimation of Word Representations in Vector Space
- GloVe: Global Vectors for Word Representation

额外阅读:

- Improving Distributional Similarity with Lessons Learned from Word Embeddings
- Evaluation methods for unsupervised word embeddings
[作业]
代码:
[embedding]
第4节 OpenAI 大模型开发与应用实践
- OpenAI大型模型开发指南
- OpenAI 语言模型总览
- OpenAI GPT-4, GPT-3.5, GPT-3, Moderation
- OpenAI Token 计费与计算
OpenAI API 入门与实战
- OpenAI Models API
- OpenAI Completions API
- OpenAI Chat Completions API
- Completions vs Chat Completions
OpenAI 大模型应用实践
- 文本内容补全初探(Text Completion)
- 聊天机器人初探(Chat Completion)
建议阅读:

- OpenAI Models
- OpenAI Completions API
- OpenAI Chat Completions API
代码:
[models]
[tiktoken]
第5节 AI大模型应用最佳实践
- 如何提升GPT模型使用效率与质量
- AI大模型应用最佳实践
- 文本创作与生成
- 文章摘要和总结
- 小说生成与内容监管
- 分步骤执行复杂任务
- 评估模型输出质量
- 构造训练标注数据
- 代码调试助手
- 新特性: Function Calling 介绍与实战
建议阅读
- GPT Best Practices
- Function Calling
代码:
Function Calling
第6节 实战:OpenAI-Translator
- OpenAI-Translator 市场需求分析
- OpenAI-Translator 产品定义与功能规划
- OpenAI-Translator 技术方案与架构设计
- OpenAI 模块设计
- OpenAI-Translator 实战
代码:
pdfplumber
第7节 实战:ChatGPT Plugin 开发
- ChatGPT Plugin 开发指南
- ChatGPT Plugin 介绍
- ChatGPT Plugin 介绍
- 样例项目:待办(Todo)管理插件
- 实战样例部署与测试
- ChatGPT 开发者模式
- 实战:天气预报(Weather Forecast)插件开发
- Weather Forecast Plugin 设计与定义
- 天气预报函数服务化
- 第三方天气查询平台对接
- 实战 Weather Forecast Plugin
- Function Calling vs ChatGPT plugin
代码:
[todo list]
[Weather Forecast]
第8节 大模型应用开发框架 LangChain (上)
- LangChain 101
- LangChain 是什么
- 为什么需要 LangChain
- LangChain 典型使用场景
- LangChain 基础概念与模块化设计
- LangChain 核心模块入门与实战
- 标准化的大模型抽象:Mode I/O
- 模板化输入:Prompts
- 语言模型:Models
- 规范化输出:Output Parsers
代码:
[model io]
第9节 大模型应用开发框架 LangChain (中)
- 大模型应用的最佳实践 Chains
- 上手你的第一个链:LLM Chain
- 串联式编排调用链:Sequential Chain
- 处理超长文本的转换链:Transform Chain
- 实现条件判断的路由链:Router Chain
- 赋予应用记忆的能力: Memory
- Momory System 与 Chain 的关系
- 记忆基类 BaseMemory 与 BaseChatMessageMemory
- 服务聊天对话的记忆系统
- ConversationBufferMemory
- ConversationBufferWindowMemory
- ConversationSummaryBufferMemory
代码:
[chains]
[memory]
第10节 大模型应用开发框架 LangChain (下)
- 框架原生的数据处理流 Data Connection
- 文档加载器(Document Loaders)
- 文档转换器(Document Transformers)
- 文本向量模型(Text Embedding Models)
- 向量数据库(Vector Stores)
- 检索器(Retrievers)
- 构建复杂应用的代理系统 Agents
- Agent 理论基础:ReAct
- LLM 推理能力:CoT, ToT
- LLM 操作能力:WebGPT, SayCan
- LangChain Agents 模块设计与原理剖析
- Module: Agent, Tools, Toolkits,
- Runtime: AgentExecutor, PlanAndExecute , AutoGPT,
- 上手第一个Agent:Google Search + LLM
- 实战 ReAct:SerpAPI + LLM-MATH
代码:
[data connection]
[agents]
第11节 实战: LangChain 版 OpenAI-Translator v2.0
- 深入理解 Chat Model 和 Chat Prompt Template
- 温故:LangChain Chat Model 使用方法和流程
- 使用 Chat Prompt Template 设计翻译提示模板
- 使用 Chat Model 实现双语翻译
- 使用 LLMChain 简化构造 Chat Prompt
- 基于 LangChain 优化 OpenAI-Translator 架构设计
- 由 LangChain 框架接手大模型管理
- 聚焦应用自身的 Prompt 设计
- 使用 TranslationChain 实现翻译接口
- 更简洁统一的配置管理
- OpenAI-Translator v2.0 功能特性研发
- 基于Gradio的图形化界面设计与实现
- 基于 Flask 的 Web Server 设计与实现
代码:
[openai-translator]
第12节 实战: LangChain 版Auto-GPT
- Auto-GPT 项目定位与价值解读
- Auto-GPT 开源项目介绍
- Auto-GPT 定位:一个自主的 GPT-4 实验
- Auto-GPT 价值:一种基于 Agent 的 AGI 尝试
- LangChain 版 Auto-GPT 技术方案与架构设计
- 深入理解 LangChain Agents
- LangChain Experimental 模块
- Auto-GPT 自主智能体设计
- Auto-GPT Prompt 设计
- Auto-GPT Memory 设计
- 深入理解 LangChain VectorStore
- Auto-GPT OutputParser 设计
- 实战 LangChain 版 Auto-GPT
代码:
[autogpt]
第13节 Sales-Consultant 业务流程与价值分析
- Sales-Consultant 技术方案与架构设计
- 使用 GPT-4 生成销售话术
- 使用 FAISS 向量数据库存储销售问答话术
- 使用 RetrievalQA 检索销售话术数据
- 使用 Gradio 实现聊天机器人的图形化界面
- 实战 LangChain 版 Sales-Consultant
代码:
[sales_chatbot]
第14节 大模型时代的开源与数据协议
- 什么是开源?
- 广泛使用的开源协议和数据协议
- Llama 是不是伪开源?
- ChatGLM2-6B 的开源协议
大语言模型的可解释性
- 提高模型决策过程的透明度
- Stanford Alpaca 的相关研究
大语言模型应用的法规合规性
- 中国大陆:生成式人工智能服务备案
- 国际化:数据隐私与保护(以 GDPR 为例)
- 企业合规性应对要点
第15节 大模型时代的Github:Hugging Face
- Hugging Face 是什么?
- Hugging Face Transformers 库
- Hugging Face 开源社区:Models, Datasets, Spaces, Docs
- 大模型横向对比
- Open LLM Leaderboard(大模型天梯榜)
显卡选型推荐指南
- GPU vs 显卡
- GPU Core vs AMD CU
- CUDA Core vs Tensor Core
- N卡的架构变迁
- 显卡性能天梯榜
第16节 清华 GLM 大模型家族
- 最强基座模型 GLM-130B
- 增强对话能力 ChatGLM
- 开源聊天模型 ChatGLM2-6B
- 联网检索能力 WebGLM
- 初探多模态 VisualGLM-6B
- 代码生成模型 CodeGeex2
ChatGLM2-6B 大模型应用开发
- ChatGLM2-6B 私有化部署
- HF Transformers Tokenizer
- HF Transformers Model
- 将模型同步至 Hugging Face
- 使用 Gradio 赋能 ChatGLM2-6B 图形化界面 <

Schedule

Lesson Description Course Materials Events
Lesson 1 Fundamentals of Large Models: Evolution of Theory and Technology
- An Initial Exploration of Large Models: Origin and Development
- Warm-up: Decoding Attention Mechanism
- Milestone of Transformation: The Rise of Transformer
- Taking Different Paths: The Choices of GPT and Bert
Suggested Readings:
- Attention Mechanism: Neural Machine Translation by Jointly Learning to Align and Translate
- An Attentive Survey of Attention Models
- Transformer: Attention is All you Need
- BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
[Homework]
Lesson 2 The GPT Model Family: From Start to Present
- From GPT-1 to GPT-3.5: The Evolution
- ChatGPT: Where It Wins
- GPT-4: A New Beginning
Prompt Learning
- Chain-of-Thought (CoT): The Pioneering Work
- Self-Consistency: Multi-path Reasoning
- Tree-of-Thoughts (ToT): Continuing the Story
Suggested Readings:
- GPT-1: Improving Language Understanding by Generative Pre-training
- GPT-2: Language Models are Unsupervised Multitask Learners
- GPT-3: Language Models are Few-Shot Learners


Additional Readings:
- GPT-4: Architecture, Infrastructure, Training Dataset, Costs, Vision, MoE
- GPTs are GPTs: An Early Look at the Labor Market Impact Potential of Large Language Models
- Sparks of Artificial General Intelligence: Early experiments with GPT-4

[Homework]
Lesson 3 Fundamentals of Large Model Development: OpenAI Embedding
- The Eve of General Artificial Intelligence
- "Three Worlds" and "Turing Test"
- Computer Data Representation
- Representation Learning and Embedding
Embeddings Dev 101
- Course Project: GitHub openai-quickstart
- Getting Started with OpenAI Embeddings
Suggested Readings:
- Representation Learning: A Review and New Perspectives
- Word2Vec: Efficient Estimation of Word Representations in Vector Space
- GloVe: Global Vectors for Word Representation

Additional Readings:

- Improving Distributional Similarity with Lessons Learned from Word Embeddings
- Evaluation methods for unsupervised word embeddings
[Homework]
Code:
[embedding]
Lesson 4 OpenAI Large Model Development and Application Practice
- OpenAI Large Model Development Guide
- Overview of OpenAI Language Models
- OpenAI GPT-4, GPT-3.5, GPT-3, Moderation
- OpenAI Token Billing and Calculation
OpenAI API Introduction and Practice
- OpenAI Models API
- OpenAI Completions API
- OpenAI Chat Completions API
- Completions vs Chat Completions
OpenAI Large Model Application Practice
- Initial Exploration of Text Completion
- Initial Exploration of Chatbots
Suggested Readings:

- OpenAI Models
- OpenAI Completions API
- OpenAI Chat Completions API
Code:
[models]
[tiktoken]
Lesson 5 Best Practices for Applying Large AI Models
- How to Improve the Efficiency and Quality of GPT Model Use
- Best Practices for Applying Large AI Models
- Text Creation and Generation
- Article Abstract and Summary
- Novel Generation and Content Supervision
- Executing Complex Tasks Step by Step
- Evaluating the Quality of Model Output
- Constructing Training Annotation Data
- Code Debugging Assistant
- New Features: Function Calling Introduction and Practical Application
Suggested Readings
- GPT Best Practices
- Function Calling
Code:
Function Calling
Lesson 6 Practical: OpenAI-Translator
- Market demand analysis for OpenAI-Translator
- Product definition and feature planning for OpenAI-Translator
- Technical solutions and architecture design for OpenAI-Translator
- OpenAI module design
- OpenAI-Translator practical application
Code:
pdfplumber
Lesson 7 ChatGPT Plugin Development Guide
- Introduction to ChatGPT Plugin
- Sample project: Todo management plugin
- Deployment and testing of practical examples
- ChatGPT developer mode
- Practical: Weather Forecast plugin development
- Weather Forecast Plugin design and definition
- Weather Forecast function service
- Integration with third-party weather query platform
- Practical Weather Forecast Plugin
Code:
[todo list]
[weather forecast]
Lesson 8 LLM Application Development Framework LangChain (Part 1)
- LangChain 101
- What is LangChain
- Why LangChain is Needed
- Typical Use Cases of LangChain
- Basic Concepts and Modular Design of LangChain
- Introduction and Practice of LangChain Core Modules
- Standardized Large-Scale Model Abstraction: Mode I/O
- Template Input: Prompts
- Language Model: Models
- Standardized Output: Output Parsers
Code:
[model io]
Lesson 9 LLM Application Development Framework LangChain (Part 2)
- Best Practices for LLM Chains
- Getting Started with Your First Chain: LLM Chain
- Sequential Chain: A Chained Call with Sequential Arrangement
- Transform Chain: A Chain for Processing Long Texts
- Router Chain: A Chain for Implementing Conditional Judgments
- Memory: Endowing Applications with Memory Capabilities
- The Relationship between Memory System and Chain
- BaseMemory and BaseChatMessageMemory: Memory Base Classes
- Memory System for Service Chatting
- ConversationBufferMemory
- ConversationBufferWindowMemory
- ConversationSummaryBufferMemory
Code:
[chains]
[memory]
Lesson 10 LLM Application Development Framework LangChain (Part 3)
- Native data processing flow of the framework: Data Connection
- Document Loaders
- Document Transformers
- Text Embedding Models
- Vector Stores
- Retrievers
- Agent Systems for Building Complex Applications: Agents
- Theoretical Foundation of Agents: ReAct
- LLM Reasoning Capabilities: CoT, ToT
- LLM Operation Capabilities: WebGPT, SayCan
- LangChain Agents Module Design and Principle Analysis
- Module: Agent, Tools, Toolkits
- Runtime: AgentExecutor, PlanAndExecute, AutoGPT
- Getting Started with Your First Agent: Google Search + LLM
- Practice with ReAct: SerpAPI + LLM-MATH
Code:
[data connection]
[agents]
Lesson 11 Practical: LangChain version OpenAI-Translator v2.0
- In-depth understanding of Chat Model and Chat Prompt Template
- Review: LangChain Chat Model usage and process
- Design translation prompt templates using Chat Prompt Template
- Implement bilingual translation using Chat Model
- Simplify Chat Prompt construction using LLMChain
- Optimize OpenAI-Translator architecture design based on LangChain
- Hand over large model management to LangChain framework
- Focus on application-specific Prompt design
- Implement translation interface using TranslationChain
- More concise and unified configuration management
- Development of OpenAI-Translator v2.0 feature
- Design and implementation of graphical interface based on Gradio
- Design and implementation of Web Server based on Flask
Code:
[openai-translator]
Lesson 12 Practical: LangChain version Auto-GPT
- Auto-GPT project positioning and value interpretation
- Introduction to Auto-GPT open source project
- Auto-GPT positioning: an independent GPT-4 experiment
- Auto-GPT value: an attempt at AGI based on Agent
- LangChain version Auto-GPT technical solution and architecture design
- In-depth understanding of LangChain Agents
- LangChain Experimental module
- Auto-GPT autonomous agent design
- Auto-GPT Prompt design
- Auto-GPT Memory design
- In-depth understanding of LangChain VectorStore
- Auto-GPT OutputParser design
- Practical LangChain version Auto-GPT
Code:
[autogpt]
Lesson 13 Sales-Consultant business process and value analysis
- Technical solution and architecture design of Sales-Consultant
- Use GPT-4 to generate sales pitches
- Store sales Q&A pitches in FAISS vector database
- Retrieve sales pitches data using RetrievalQA
- Implement chatbot graphical interface using Gradio
- Practical LangChain version Sales-Consultant
Code:
[sales_chatbot]
Lesson 14 Era of large models: Open source and data protocols
- What is open source?
- Widely used open source and data protocols
- Is Llama pseudo-open source?
- Open source protocol of ChatGLM2-6B
Interpretability of large language models
- Enhancing transparency in model decision-making
- Related research of Stanford Alpaca
Regulatory compliance of large language model applications
- Mainland China: Registration of generative AI services
- International: Data privacy and protection (taking GDPR as an example)
- Key points of corporate compliance
Lesson 15 Github in the era of large models: Hugging Face
- What is Hugging Face?
- Hugging Face Transformers library
- Hugging Face open community: Models, Datasets, Spaces, Docs
- Comparative analysis of large models
- Open LLM Leaderboard (Large Model Ladder)
Graphics card selection guide
- GPU vs Graphics card
- GPU Core vs AMD CU
- CUDA Core vs Tensor Core
- Evolution of Nvidia architectures
- Graphics card performance ladder
Lesson 16 Tsinghua GLM large model family
- Strongest base model GLM-130B
- Enhanced dialogue capability ChatGLM
- Open source chat model ChatGLM2-6B
- Internet search capability WebGLM
- Initial exploration of multimodal VisualGLM-6B
- Code generation model CodeGeex2
Application development of ChatGLM2-6B large model
- Private deployment of ChatGLM2-6B
- HF Transformers Tokenizer
- HF Transformers Model
- Synchronize the model to Hugging Face
- Empower ChatGLM2-6B graphical interface using Gradio
- Fine-tuning of ChatGLM2-6B model
- Practical assignment: Implement graphical interface of openai-translator based on ChatGLM2-6B