Chain链的应用
LangChain根据功能、用途的不同,提供了大量的Chain链,以下是一些Chain链的使用示例。
配置
首先配置OpenAI的环境变量信息,指定URL、KEY
python
复制代码
import os
os.environ["OPENAI_BASE_URL"] = "https://xxxx.com/v1"
os.environ["OPENAI_API_KEY"] = "sk-BGFnOL9Q4c99B378B66cT3BlBKFJ28839b4813bc437B82c2"
LLMChain:简单链
LLMChain是最基础也是最常见的链。LLMChain结合了语言模型推理功能,并添加了PromptTemplate和Output Parser等功能,将模型输入输出整合在一个链中操作。它利用提示模板格式化输入,将格式化后的字符串传递给LLM模型,并返回LLM的输出。这样使得整个处理过程更加高效和便捷。
python
复制代码
from langchain.chains.llm import LLMChain
from langchain_core.prompts import PromptTemplate
from langchain_openai import OpenAI
# 原始字符串模板
template = "猪八戒吃{fruit}?"
# 创建模型实例
llm = OpenAI(temperature=0)
# 创建LLMChain
llm_chain = LLMChain(
llm=llm,
prompt=PromptTemplate.from_template(template))
# 调用LLMChain,返回结果
result = llm_chain.invoke({"fruit": "人参果"})
print(result)
create_stuff_documents_chain:文档链
create_stuff_documents_chain
链将获取文档列表并将它们全部格式化为提示(文档列表),然后将该提示传递给LLM。
注意:
它会传递所有文档,因此需要确保它适合LLM的上下文窗口。
python
复制代码
from langchain_openai import ChatOpenAI
from langchain_core.documents import Document
from langchain_core.prompts import ChatPromptTemplate
from langchain.chains.combine_documents import create_stuff_documents_chain
# 创建提示模板
prompt = ChatPromptTemplate.from_messages(
[("system", """根据提供的上下文: {context} \n\n 回答问题: {input}""")]
)
# 初始化大模型
llm = ChatOpenAI(model="gpt-3.5-turbo")
# 构建链
chain = create_stuff_documents_chain(llm, prompt)
# 定义文档内容
docs = [
Document(page_content="杰西喜欢红色,但不喜欢黄色"),
Document(page_content="贾马尔喜欢绿色,有一点喜欢红色"),
Document(page_content="玛丽喜欢粉色和红色")
]
# 执行链
res = chain.invoke({"input": "大家喜欢什么颜色?", "context": docs})
print(res)
python
复制代码
杰西喜欢红色,贾马尔喜欢绿色和有一点红色,玛丽喜欢粉色和红色。
create_extraction_chain:提取信息链
create_extraction_chain
是一个从文章、段落中提取信息的链。
使用OpenAI函数调用从文本中提取信息,定义一个模式,指定从LLM输出中提取的属性,然后使用create_extraction_chain和OpenAI函数调用来提取所需模式。
python
复制代码
from langchain.chains import create_extraction_chain
from langchain_openai import ChatOpenAI
# 模式
schema = {
# 人的属性
"properties": {
"name": {"type": "string"},
"height": {"type": "integer"},
"hair_color": {"type": "string"},
},
# 允许模型只返回的属性
"required": ["name", "height"],
}
# 输入
inp = """亚历克斯身高 5 英尺。克劳迪娅比亚历克斯高 1 英尺,并且跳得比他更高。克劳迪娅是黑发女郎,亚历克斯是金发女郎。"""
# 初始化大模型
llm = ChatOpenAI(temperature=0, model="gpt-3.5-turbo")
# 构建链
chain = create_extraction_chain(schema, llm)
# 执行
res = chain.invoke(inp)
print(res)
执行日志:
python
复制代码
{'input': '亚历克斯身高 5 英尺。克劳迪娅比亚历克斯高 1 英尺,并且跳得比他更高。克劳迪娅是黑发女郎,亚历克斯是金发女郎。',
'text': [
{'name': '亚历克斯', 'height': 5},
{'name': '克劳迪娅', 'height': 1, 'hair_color': '黑发'}
]}
LLMMathChain:数学链
LLMMathChain将用户问题转换为数学问题,然后将数学问题转换为可以使用 Python 的 numexpr 库执行的表达式。使用运行此代码的输出来回答问题
使用LLMMathChain,需要安装numexpr库:
python
复制代码
pip install numexpr
python
复制代码
from langchain_openai import OpenAI
from langchain.chains import LLMMathChain
# 初始化大模型
llm = OpenAI()
# 创建链
llm_math = LLMMathChain.from_llm(llm)
# 执行链
res = llm_math.invoke("100 * 20 + 100的结果是多少?")
print(res)
执行日志:
python
复制代码
{'question': '100 * 20 + 100的结果是多少?', 'answer': 'Answer: 2100'}
create_sql_query_chain:SQL查询链
create_sql_query_chain
是创建生成SQL查询的链,用于将自然语言转换成数据库的SQL查询。
连接数据库
SQLDatabaseChain 可与 SQLAlchemy 支持的任何 SQL 方言一起使用,例如 MS SQL、MySQL、MariaDB、PostgreSQL、Oracle SQL、Databricks 和 SQLite。
这里使用MySQL数据库,需要安装pymysql
python
复制代码
pip install pymysql
python
复制代码
from langchain_community.utilities import SQLDatabase
# 连接 sqlite 数据库
# db = SQLDatabase.from_uri("sqlite:///demo.db")
# 连接 MySQL 数据库
db_user = "root"
db_password = "12345678"
db_host = "IP"
db_port = "3306"
db_name = "demo"
db = SQLDatabase.from_uri(f"mysql+pymysql://{db_user}:{db_password}@{db_host}:{db_port}/{db_name}")
print("数据库方言:",db.dialect)
print("获取数据表:",db.get_usable_table_names())
# 执行查询
res = db.run("SELECT count(*) FROM tb_users;")
print("查询结果:",res)
python
复制代码
数据库方言: mysql
获取数据表: ['tb_orders', 'tb_users']
查询结果: [(5,)]
创建并使用链
初始化语言模型并构建链
python
复制代码
from langchain_openai import ChatOpenAI
# 初始化大模型
llm = ChatOpenAI(model="gpt-3.5-turbo", temperature=0)
chain = create_sql_query_chain(llm=llm, db=db)
response = chain.invoke({"question": "数据表tb_users中有多少用户?"})
print(response)
执行结果如下:
python
复制代码
SELECT COUNT(`id`) AS total_users FROM `tb_users`;
Sequential Chain:顺序链
一条链的输出直接馈送到下一条链的链
创建多个链
创建多个LLMChain链
python
复制代码
# 导入所需要的库
from langchain.chains.llm import LLMChain
from langchain_core.prompts import PromptTemplate
# 初始化语言模型
from langchain_openai import OpenAI
llm = OpenAI()
# 创建第一个LLMChain:生成小说人物的概述
template = """
你是一名小说文学家,请你根据小说名称与人物,为小说人物写一个100字左右的概述。
小说: {book}
人物: {name}
小说人物的概述:
"""
# 创建模板实例
prompt_template = PromptTemplate(
input_variables=["book", "name"],
template=template
)
# 使用LLMChain
description_chain = LLMChain(
llm=llm,
prompt=prompt_template,
output_key="description"
)
# 创建第二个LLMChain:根据小说人物的概述写出人物评论
template = """
你是一位文学评论家,请你根据小说人物的概述,写一篇100字左右的评论。
小说人物概述: {description}
小说人物的评论:
"""
prompt_template = PromptTemplate(
input_variables=["description"],
template=template
)
comments_chain = LLMChain(
llm=llm,
prompt=prompt_template,
output_key="comments"
)
# 创建第三个LLMChain:根据小说人物的概述和评论写一篇宣传广告
template = """
你是一名广告策划师,请根据小说人物的概述与评论写一篇宣传广告,字数50字左右。
小说人物概述: {description}
小说人物的评论: {comments}
宣传广告:
"""
prompt_template = PromptTemplate(
input_variables=["description", "comments"],
template=template
)
promotionalAd_chain = LLMChain(
llm=llm,
prompt=prompt_template,
output_key="promotionalAd"
)
合并链
使用SequentialChain,将三个链合并,按顺序运行三个链
python
复制代码
from langchain.chains.sequential import SequentialChain
overall_chain = SequentialChain(
chains=[description_chain, comments_chain, promotionalAd_chain],
input_variables=["book", "name"],
output_variables=["description", "comments", "promotionalAd"],
verbose=True
)
测试顺序链
运行链并打印结果
python
复制代码
result = overall_chain.invoke({
"book": "西游记",
"name": "猪八戒"
})
print(result)
LLMRouterChain:路由链
针对场景,可以构建不同的目标链。LangChain通过LLMRouterChain来自动引导大语言模型选择不同的模板,以应对不同类型的问题。
LLMRouterChain又称路由链,具备动态选择适用于特定输入的下一个链的能力。它能够根据用户提出的问题内容,自动确定最适合处理该问题的模板,并将问题发送至相应模板进行回答。如果问题不匹配任何预定义的处理模板,系统将将其发送至默认链进行处理。
构建提示模板
假设有2种场景:
复制代码
1.询问小说人物角色信息
2.询问小说人物角色性格特征
然后分别对应场景构建两个提示信息的模板
python
复制代码
# 构建两个场景的模板
hobby_template = """
你是一名小说文学家,非常熟悉小说西游记,知晓小说人物的爱好信息。
问题: {input}
"""
nature_template = """
你是一名小说文学家,非常熟悉小说西游记,知晓小说人物的性格特征。
问题: {input}
"""
# 构建提示信息
prompt_list = [
{
"id": "hobby",
"description": "回答关于小说人物的爱好信息问题",
"template": hobby_template,
},
{
"id": "nature",
"description": "回答关于小说人物的性格特征问题",
"template": nature_template,
}
]
构建目标链
循环构建提示信息列表prompt_list,构建目标链,分别负责处理不同的场景问题。
python
复制代码
from langchain.chains.llm import LLMChain
from langchain.prompts import PromptTemplate
# 初始化语言模型
from langchain_openai import OpenAI
llm = OpenAI()
chain_map = {}
for template in prompt_list:
prompt = PromptTemplate(
template=template['template'],
input_variables=["input"]
)
print("目标链提示: ", prompt)
chain = LLMChain(
llm=llm,
prompt=prompt,
verbose=True
)
chain_map[template["id"]] = chain
python
复制代码
目标链提示: input_variables=['input'] template='\n你是一名小说文学家,非常熟悉小说西游记,知晓小说人物的爱好信息。\n问题: {input}\n'
目标链提示: input_variables=['input'] template='\n你是一名小说文学家,非常熟悉小说西游记,知晓小说人物的性格特征。\n问题: {input}\n'
构建路由链
构建路由链,负责查看用户输入的问题,确定问题的类型。
python
复制代码
from langchain.chains.router.llm_router import LLMRouterChain, RouterOutputParser
from langchain.chains.router.multi_prompt_prompt import MULTI_PROMPT_ROUTER_TEMPLATE as RounterTemplate
# destinations = [f"{p['id']}: {p['description']}" for p in prompt_list]
destinations = []
for p in prompt_list:
destination = f"{p['id']}: {p['description']}"
destinations.append(destination)
# 将列表中的元素以换行符分隔的形式组合成一个长字符串
router_template = RounterTemplate.format(destinations="\n".join(destinations))
print("路由链模板: ", router_template)
router_prompt = PromptTemplate(
template=router_template,
input_variables=["input"],
output_parser=RouterOutputParser(),
)
print("路由链提示: ", router_prompt)
router_chain = LLMRouterChain.from_llm(
llm,
router_prompt,
verbose=True
)
执行日志:
python
复制代码
路由链模板: Given a raw text input to a language model select the model prompt best suited for the input. You will be given the names of the available prompts and a description of what the prompt is best suited for. You may also revise the original input if you think that revising it will ultimately lead to a better response from the language model.
<< FORMATTING >>
Return a markdown code snippet with a JSON object formatted to look like:
```json
{{
"destination": string \ name of the prompt to use or "DEFAULT"
"next_inputs": string \ a potentially modified version of the original input
}}
``
REMEMBER: "destination" MUST be one of the candidate prompt names specified below OR it can be "DEFAULT" if the input is not well suited for any of the candidate prompts.
REMEMBER: "next_inputs" can just be the original input if you don't think any modifications are needed.
<< CANDIDATE PROMPTS >>
hobby: 回答关于小说人物的爱好信息问题
nature: 回答关于小说人物的性格特征问题
<< INPUT >>
{input}
<< OUTPUT (must include ```json at the start of the response) >>
<< OUTPUT (must end with ```) >>
路由链提示: input_variables=['input'] output_parser=RouterOutputParser() template='Given a raw text input to a language model select the model prompt best suited for the input. You will be given the names of the available prompts and a description of what the prompt is best suited for. You may also revise the original input if you think that revising it will ultimately lead to a better response from the language model.\n\n<< FORMATTING >>\nReturn a markdown code snippet with a JSON object formatted to look like:\n```json\n{{\n "destination": string \ name of the prompt to use or "DEFAULT"\n "next_inputs": string \ a potentially modified version of the original input\n}}\n```\n\nREMEMBER: "destination" MUST be one of the candidate prompt names specified below OR it can be "DEFAULT" if the input is not well suited for any of the candidate prompts.\nREMEMBER: "next_inputs" can just be the original input if you don't think any modifications are needed.\n\n<< CANDIDATE PROMPTS >>\nhobby: 回答关于小说人物的爱好信息问题\nnature: 回答关于小说人物的性格特征问题\n\n<< INPUT >>\n{input}\n\n<< OUTPUT (must include ```json at the start of the response) >>\n<< OUTPUT (must end with ```) >>\n'
构建默认链
如果路由链没有找到适合的链,就以默认链进行处理。
python
复制代码
from langchain.chains.conversation.base import ConversationChain
default_chain = ConversationChain(
llm=llm,
output_key="text",
verbose=True
)
构建多提示链
MultiPromptChain类是一个多路选择链,它使用一个LLM路由器链在多个提示之间进行选择。这里使用MultiPromptChain类把多个链整合在一起,实现路由功能。
python
复制代码
from langchain.chains.router import MultiPromptChain
chain = MultiPromptChain(
router_chain=router_chain, # 用于决定目标链和其输入的链
destination_chains=chain_map, # 将名称映射到可以将输入路由到的候选链
default_chain=default_chain, # 默认链,一个备选方案
verbose=True # 输出时是否显示链的开始和结束日志
)
测试路由链
测试1
python
复制代码
print(chain.invoke({"input": "猪八戒的性格是怎样的?"}))
``
```python
> Entering new MultiPromptChain chain...
> Entering new LLMRouterChain chain...
> Finished chain.
nature: {'input': '猪八戒'}
> Entering new LLMChain chain...
Prompt after formatting:
你是一名小说文学家,非常熟悉小说西游记,知晓小说人物的性格特征。
问题: 猪八戒
> Finished chain.
> Finished chain.
{'input': '猪八戒', 'text': '猪八戒是一个贪吃、懒惰、贪财的人物。他喜欢吃各种美食,尤其是猪肉,经常偷懒,爱睡觉,对于任务不太认真负责,也容易被诱惑,但是同时也有一颗善良的心,对待朋友和师父都很忠诚,有时候也会表现出勇敢和机智的一面。他的性格特点给西游记带来了很多欢乐和搞笑的情节。'}
测试2
python
复制代码
print(chain.invoke({"input": "猪八戒喜欢什么?"}))
python
复制代码
> Entering new MultiPromptChain chain...
> Entering new LLMRouterChain chain...
> Finished chain.
hobby: {'input': '猪八戒'}
> Entering new LLMChain chain...
Prompt after formatting:
你是一名小说文学家,非常熟悉小说西游记,知晓小说人物的爱好信息。
问题: 猪八戒
> Finished chain.
> Finished chain.
{'input': '猪八戒', 'text': '猪八戒是《西游记》中的主要角色之一,他是一头形貌丑陋、贪吃懒惰的猪妖,原名八戒,后被观音菩萨改名为猪八戒。他喜欢吃喝玩乐,贪图享受,经常偷懒逃避打坐修炼,但也有时候会表现出勇敢和善良的一面。他的武器是铁扇子,擅长变化法术。猪八戒最爱的就是吃,尤其是腊肉、酒和水果,经常被孙悟空和唐僧教训。他的性格幽默诙谐,经常说些搞笑的话,是《西游记》中最受欢迎的'}
测试3
python
复制代码
print(chain.invoke({"input": "如何提升编程技能?"}))
python
复制代码
> Entering new MultiPromptChain chain...
> Entering new LLMRouterChain chain...
> Finished chain.
None: {'input': '如何提升编程技能?'}
> Entering new ConversationChain chain...
Prompt after formatting:
The following is a friendly conversation between a human and an AI. The AI is talkative and provides lots of specific details from its context. If the AI does not know the answer to a question, it truthfully says it does not know.
Current conversation:
Human: 如何提升编程技能?
AI:
> Finished chain.
> Finished chain.
{'input': '如何提升编程技能?', 'history': '', 'text': ' 提升编程技能的最佳方法是不断练习和学习。首先,您可以通过阅读相关的编程书籍和教程来学习基础知识。然后,您可以尝试解决一些挑战性的编程问题,这样可以帮助您加强对编程语言的理解。除此之外,参与开源项目和与其他程序员交流也是提升编程技能的有效方式。另外,保持好奇心和学习新技术也是非常重要的。最重要的是,坚持不懈地练习和学习,您的编程技能一定会得到提升。'}
如何系统的去学习大模型LLM ?
作为一名热心肠的互联网老兵,我意识到有很多经验和知识值得分享给大家,也可以通过我们的能力和经验解答大家在人工智能学习中的很多困惑,所以在工作繁忙的情况下还是坚持各种整理和分享。
如何系统的去学习大模型LLM ?
作为一名热心肠的互联网老兵,我意识到有很多经验和知识值得分享给大家,也可以通过我们的能力和经验解答大家在人工智能学习中的很多困惑,所以在工作繁忙的情况下还是坚持各种整理和分享。
但苦于知识传播途径有限,很多互联网行业朋友无法获得正确的资料得到学习提升,故此将并将重要的 AI大模型资料
包括AI大模型入门学习思维导图、精品AI大模型学习书籍手册、视频教程、实战学习等录播视频免费分享出来。
所有资料 ⚡️ ,朋友们如果有需要全套 《LLM大模型入门+进阶学习资源包》,扫码获取~
一、全套AGI大模型学习路线
AI大模型时代的学习之旅:从基础到前沿,掌握人工智能的核心技能!
二、640套AI大模型报告合集
这套包含640份报告的合集,涵盖了AI大模型的理论研究、技术实现、行业应用等多个方面。无论您是科研人员、工程师,还是对AI大模型感兴趣的爱好者,这套报告合集都将为您提供宝贵的信息和启示。
三、AI大模型经典PDF籍
随着人工智能技术的飞速发展,AI大模型已经成为了当今科技领域的一大热点。这些大型预训练模型,如GPT-3、BERT、XLNet等,以其强大的语言理解和生成能力,正在改变我们对人工智能的认识。 那以下这些PDF籍就是非常不错的学习资源。
四、AI大模型商业化落地方案
阶段1:AI大模型时代的基础理解
- 目标:了解AI大模型的基本概念、发展历程和核心原理。
- 内容:
- L1.1 人工智能简述与大模型起源
- L1.2 大模型与通用人工智能
- L1.3 GPT模型的发展历程
- L1.4 模型工程
- L1.4.1 知识大模型
- L1.4.2 生产大模型
- L1.4.3 模型工程方法论
- L1.4.4 模型工程实践 - L1.5 GPT应用案例
阶段2:AI大模型API应用开发工程
- 目标:掌握AI大模型API的使用和开发,以及相关的编程技能。
- 内容:
- L2.1 API接口
- L2.1.1 OpenAI API接口
- L2.1.2 Python接口接入
- L2.1.3 BOT工具类框架
- L2.1.4 代码示例 - L2.2 Prompt框架
- L2.2.1 什么是Prompt
- L2.2.2 Prompt框架应用现状
- L2.2.3 基于GPTAS的Prompt框架
- L2.2.4 Prompt框架与Thought
- L2.2.5 Prompt框架与提示词 - L2.3 流水线工程
- L2.3.1 流水线工程的概念
- L2.3.2 流水线工程的优点
- L2.3.3 流水线工程的应用 - L2.4 总结与展望
- L2.1 API接口
阶段3:AI大模型应用架构实践
- 目标:深入理解AI大模型的应用架构,并能够进行私有化部署。
- 内容:
- L3.1 Agent模型框架
- L3.1.1 Agent模型框架的设计理念
- L3.1.2 Agent模型框架的核心组件
- L3.1.3 Agent模型框架的实现细节 - L3.2 MetaGPT
- L3.2.1 MetaGPT的基本概念
- L3.2.2 MetaGPT的工作原理
- L3.2.3 MetaGPT的应用场景 - L3.3 ChatGLM
- L3.3.1 ChatGLM的特点
- L3.3.2 ChatGLM的开发环境
- L3.3.3 ChatGLM的使用示例 - L3.4 LLAMA
- L3.4.1 LLAMA的特点
- L3.4.2 LLAMA的开发环境
- L3.4.3 LLAMA的使用示例 - L3.5 其他大模型介绍
- L3.1 Agent模型框架
阶段4:AI大模型私有化部署
- 目标:掌握多种AI大模型的私有化部署,包括多模态和特定领域模型。
- 内容:
- L4.1 模型私有化部署概述
- L4.2 模型私有化部署的关键技术
- L4.3 模型私有化部署的实施步骤
- L4.4 模型私有化部署的应用场景
学习计划:
- 阶段1:1-2个月,建立AI大模型的基础知识体系。
- 阶段2:2-3个月,专注于API应用开发能力的提升。
- 阶段3:3-4个月,深入实践AI大模型的应用架构和私有化部署。
- 阶段4:4-5个月,专注于高级模型的应用和部署。
这份完整版的所有 ⚡️ 大模型 LLM 学习资料已经上传CSDN,朋友们如果需要可以微信扫描下方CSDN官方认证二维码免费领取【保证100%免费
】
全套 《LLM大模型入门+进阶学习资源包》↓↓↓ 获取~
但苦于知识传播途径有限,很多互联网行业朋友无法获得正确的资料得到学习提升,故此将并将重要的 AI大模型资料
包括AI大模型入门学习思维导图、精品AI大模型学习书籍手册、视频教程、实战学习等录播视频免费分享出来。
😝有需要的小伙伴,可以V扫描下方二维码免费领取🆓
一、全套AGI大模型学习路线
AI大模型时代的学习之旅:从基础到前沿,掌握人工智能的核心技能!
二、640套AI大模型报告合集
这套包含640份报告的合集,涵盖了AI大模型的理论研究、技术实现、行业应用等多个方面。无论您是科研人员、工程师,还是对AI大模型感兴趣的爱好者,这套报告合集都将为您提供宝贵的信息和启示。
三、AI大模型经典PDF籍
随着人工智能技术的飞速发展,AI大模型已经成为了当今科技领域的一大热点。这些大型预训练模型,如GPT-3、BERT、XLNet等,以其强大的语言理解和生成能力,正在改变我们对人工智能的认识。 那以下这些PDF籍就是非常不错的学习资源。
四、AI大模型商业化落地方案
阶段1:AI大模型时代的基础理解
- 目标:了解AI大模型的基本概念、发展历程和核心原理。
- 内容:
- L1.1 人工智能简述与大模型起源
- L1.2 大模型与通用人工智能
- L1.3 GPT模型的发展历程
- L1.4 模型工程
- L1.4.1 知识大模型
- L1.4.2 生产大模型
- L1.4.3 模型工程方法论
- L1.4.4 模型工程实践 - L1.5 GPT应用案例
阶段2:AI大模型API应用开发工程
- 目标:掌握AI大模型API的使用和开发,以及相关的编程技能。
- 内容:
- L2.1 API接口
- L2.1.1 OpenAI API接口
- L2.1.2 Python接口接入
- L2.1.3 BOT工具类框架
- L2.1.4 代码示例 - L2.2 Prompt框架
- L2.2.1 什么是Prompt
- L2.2.2 Prompt框架应用现状
- L2.2.3 基于GPTAS的Prompt框架
- L2.2.4 Prompt框架与Thought
- L2.2.5 Prompt框架与提示词 - L2.3 流水线工程
- L2.3.1 流水线工程的概念
- L2.3.2 流水线工程的优点
- L2.3.3 流水线工程的应用 - L2.4 总结与展望
- L2.1 API接口
阶段3:AI大模型应用架构实践
- 目标:深入理解AI大模型的应用架构,并能够进行私有化部署。
- 内容:
- L3.1 Agent模型框架
- L3.1.1 Agent模型框架的设计理念
- L3.1.2 Agent模型框架的核心组件
- L3.1.3 Agent模型框架的实现细节 - L3.2 MetaGPT
- L3.2.1 MetaGPT的基本概念
- L3.2.2 MetaGPT的工作原理
- L3.2.3 MetaGPT的应用场景 - L3.3 ChatGLM
- L3.3.1 ChatGLM的特点
- L3.3.2 ChatGLM的开发环境
- L3.3.3 ChatGLM的使用示例 - L3.4 LLAMA
- L3.4.1 LLAMA的特点
- L3.4.2 LLAMA的开发环境
- L3.4.3 LLAMA的使用示例 - L3.5 其他大模型介绍
- L3.1 Agent模型框架
阶段4:AI大模型私有化部署
- 目标:掌握多种AI大模型的私有化部署,包括多模态和特定领域模型。
- 内容:
- L4.1 模型私有化部署概述
- L4.2 模型私有化部署的关键技术
- L4.3 模型私有化部署的实施步骤
- L4.4 模型私有化部署的应用场景
学习计划:
- 阶段1:1-2个月,建立AI大模型的基础知识体系。
- 阶段2:2-3个月,专注于API应用开发能力的提升。
- 阶段3:3-4个月,深入实践AI大模型的应用架构和私有化部署。
- 阶段4:4-5个月,专注于高级模型的应用和部署。
这份完整版的大模型 LLM 学习资料已经上传CSDN,朋友们如果需要可以微信扫描下方CSDN官方认证二维码免费领取【保证100%免费
】
😝有需要的小伙伴,可以Vx扫描下方二维码免费领取🆓