Langchain-Chatchat大语言模型本地知识库的踩坑、部署、使用

Langchain-Chatchat

概述

Langchain-Chatchat是一个基于ChatGLM大语言模型与Langchain应用框架实现,开源、可离线部署的检索增强生成(RAG)大模型的本地知识库问答应用项目。

GitHub:https://github.com/chatchat-space/Langchain-Chatchat

实现原理

本项目实现原理如下图所示,过程包括加载文件 -> 读取文本 -> 文本分割 -> 文本向量化 -> 问句向量化 -> 在文本向量中匹配出与问句向量最相似的 top k个 -> 匹配出的文本作为上下文和问题一起添加到 prompt中 -> 提交给 LLM生成回答。

在这里插入图片描述

开发环境准备

软件要求

使用Ubuntu系统,其他系统可能出现系统兼容性问题

Linux Ubuntu 22.04.5 kernel version 6.7


最低要求

该要求仅针对标准模式,轻量模式使用在线模型,不需要安装torch等库,也不需要显卡即可运行。

Python 版本: >= 3.8(很不稳定), < 3.11
CUDA 版本: >= 12.1


推荐要求

开发者在以下环境下进行代码调试,在该环境下能够避免最多环境问题。

Python 版本 == 3.10.12
CUDA 版本: == 12.3


硬件要求

如果为了体验使用该项目,可以使用线上模型,不需要太高的硬件要求。

如果想要顺利在GPU运行本地模型的 int4 量化版本,至少需要以下的硬件配置

ChatGLM2-6B & LLaMA-7B

最低显存要求: 7GB

推荐显卡: RTX 3060, RTX 2060



LLaMA-13B

最低显存要求: 11GB

推荐显卡: RTX 2060 12GB, RTX 3060 12GB, RTX 3080, RTX A2000


Qwen-14B-Chat

最低显存要求: 13GB

推荐显卡: RTX 3090


LLaMA-30B

最低显存要求: 22GB

推荐显卡: RTX A5000, RTX 3090, RTX 4090, RTX 6000, Tesla V100, RTX Tesla P40


LLaMA-65B

最低显存要求: 40GB

推荐显卡: A100, A40, A6000


注意:

若使用 int8 推理,则显存大致为 int4 推理要求的 1.5 倍

若使用 fp16 推理,则显存大致为 int4 推理要求的 2.5 倍

数据仅为估算,实际情况以 nvidia-smi 占用为准。

同时,Embedding 模型将会占用 1-2G 的显存,历史记录最多会占用数 G 显存,因此,需要多冗余一些显存。

内存最低要求: 内存要求至少应该比模型运行的显存大。


部署

拉取仓库

git clone https://github.com/chatchat-space/Langchain-Chatchat.git

# 进入目录
cd Langchain-Chatchat


创建虚拟环境

创建一个虚拟环境,使项目与项目间进行软件版本隔离

conda create -n chat python=3.10

# 激活使用虚拟环境
conda activate chat 


安装全部依赖

在虚拟环境内安装项目的依赖

pip install -r requirements.txt 
pip install -r requirements_api.txt
pip install -r requirements_webui.txt  


默认依赖包括基本运行环境(FAISS向量库)。如果要使用 milvus/pg_vector 等向量库,请将 requirements.txt 中相应依赖取消注释再安装。

初始化配置文件

python copy_config_example.py


脚本将会将所有config目录下的配置文件样例复制一份到config目录下,方便开发者进行配置。 接着,开发者可以根据自己的需求,对配置文件进行修改。

在这里插入图片描述

basic_config.py:基础配置项:配置记录日志的格式和储存路径,通常不需要修改。

kb_config.py:数据库配置:配置分词器、知识库、向量数据库等信息

model_config.py:模型配置项:包含本地LLM模型、本地Embeddings模型、在线LLM模型API的相关配置

prompt_config.py:提示词配置项:提示词配置分为三个板块,分别对应三种聊天类型:基础的对话提示词、与知识库对话的提示词、与Agent对话的提示词。

server_config.py:服务和端口配置项:不需要进行大量的修改,仅需确保对应的端口打开,并不互相冲突即可。server_config.py中的配置优先于startup.py中的默认值,注意避免配置文件覆盖


模型下载

模型下载取决于自己的网络情况,这里需要提前下载THUDM/chatglm2-6bBAAI/bge-large-zh到本地,然后在model_config.py中配置

1.若网络良好(全球畅通无阻)则完全不需要先下载模型,在执行过程中会自动下载相关模型。

2.如果网络存在问题,则可以事先下载好需要的模型,然后在model_config.py文件中配置,具体配置参考异常3中的处理办法

注意:

Windows环境下,会默认自动将该模型下载到C:\Users\Admin\.cache\torch\sentence_transformers目录下,若下载失败,参考异常3中的处理办法

初始化知识库

第一次运行本项目,知识库尚未建立,或者配置文件中的知识库类型、嵌入模型发生变化,需要以下命令初始化或重建知识库:

python init_database.py --recreate-vs


如果已经有创建过知识库,可以先执行以下命令创建或更新数据库表:

$ python init_database.py --create-tables


第一次使用时,会自动下载BAAI/bge-large-zh模型,用于知识库的初始化构建

(chat) root@master:~/Langchain-Chatchat# python init_database.py --recreate-vs
recreating all vector stores
2023-12-20 21:40:48,647 - faiss_cache.py[line:80] - INFO: loading vector store in 'samples/vector_store/bge-large-zh' from disk.
2023-12-20 21:40:48,999 - SentenceTransformer.py[line:66] - INFO: Load pretrained SentenceTransformer: /root/models/bge-large-zh
Batches: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00,  1.80it/s]
2023-12-20 21:40:51,466 - loader.py[line:54] - INFO: Loading faiss with AVX2 support.
2023-12-20 21:40:51,751 - loader.py[line:56] - INFO: Successfully loaded faiss with AVX2 support.
2023-12-20 21:40:51,761 - faiss_cache.py[line:80] - INFO: loading vector store in 'samples/vector_store/bge-large-zh' from disk.
Batches: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 72.05it/s]
2023-12-20 21:40:51,783 - utils.py[line:286] - INFO: RapidOCRLoader used for /root/onethingai-tmp/Langchain-Chatchat/knowledge_base/samples/content/llm/img/分布式训练技术原理-幕布图片-124076-270516.jpg
2023-12-20 21:40:51,784 - utils.py[line:286] - INFO: RapidOCRLoader used for /root/onethingai-tmp/Langchain-Chatchat/knowledge_base/samples/content/llm/img/分布式训练技术原理-幕布图片-20096-279847.jpg
2023-12-20 21:40:51,785 - utils.py[line:286] - INFO: RapidOCRLoader used for /root/onethingai-tmp/Langchain-Chatchat/knowledge_base/samples/content/llm/img/分布式训练技术原理-幕布图片-220157-552735.jpg
2023-12-20 21:40:51,785 - utils.py[line:286] - INFO: RapidOCRLoader used for /root/onethingai-tmp/Langchain-Chatchat/knowledge_base/samples/content/llm/img/分布式训练技术原理-幕布图片-36114-765327.jpg
2023-12-20 21:40:51,786 - utils.py[line:286] - INFO: RapidOCRLoader used



Batches: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 6/6 [00:01<00:00,  3.43it/s]
正在将 samples//root/onethingai-tmp/Langchain-Chatchat/knowledge_base/samples/content/test_files/test.txt 添加到向量库,共包含59条文档████████████████████████████████████▋                               | 5/6 [00:01<00:00,  3.05it/s]
Batches: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00,  2.41it/s]
正在将 samples//root/onethingai-tmp/Langchain-Chatchat/knowledge_base/samples/content/llm/img/大模型推理优化策略-幕布图片-930255-616209.jpg 添加到向量库,共包含3条文档███████████████████████████████████| 2/2 [00:00<00:00,  2.52it/s]
Batches: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 43.48it/s]
正在将 samples//root/onethingai-tmp/Langchain-Chatchat/knowledge_base/samples/content/llm/img/大模型推理优化策略-幕布图片-789705-122117.jpg 添加到向量库,共包含1条文档                                           | 0/1 [00:00<?, ?it/s]
Batches: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 63.58it/s]
RapidOCRPDFLoader context page index: 7: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 8/8 [00:48<00:00,  6.11s/it]
文档切分示例:page_content='See discussions, stats, and author profiles for this publication at: https://www.researchgate.net/publication/372669736\nCreating Large Language Model Applications Utilizing LangChain: A Primer on\nDeveloping LLM Apps Fast\nArticle\xa0\xa0in\xa0\xa0International Conference on Applied Engineering and Natural Sciences · July 2023\nDOI: 10.59287/icaens.1127\nCITATIONS\n0\nREADS\n47\n2 authors:\nSome of the authors of this publication are also working on these related projects:\nTHALIA: Test Harness for the Assessment of Legacy Information Integration Approaches View project\nAnalysis of Feroresonance with Signal Processing Technique View project\nOguzhan Topsakal' metadata={'source': '/root/onethingai-tmp/Langchain-Chatchat/knowledge_base/samples/content/test_files/langchain.pdf'}
正在将 samples//root/onethingai-tmp/Langchain-Chatchat/knowledge_base/samples/content/test_files/langchain.pdf 添加到向量库,共包含52条文档
Batches: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00,  3.70it/s]
2023-12-20 21:44:07,719 - faiss_cache.py[line:24] - INFO: 已将向量库 ('samples', 'bge-large-zh') 保存到磁盘
总计用时: 0:03:19.085059


启动项目

启动项目整个过程中,坑也比较多,参考异常2与异常3中的处理办法。

一键启动脚本 startup.py, 一键启动所有 Fastchat 服务、API 服务、WebUI 服务

python startup.py -a   


启动时,如果没用在model_config.py中配置配置模型信息,则会自动模型下载THUDM/chatglm3-6b到本地使用

==============================Langchain-Chatchat Configuration==============================
操作系统:Linux-6.1.56-1.2.3-x86_64-with-glibc2.35.
python版本:3.10.13 | packaged by conda-forge | (main, Oct 26 2023, 18:07:37) [GCC 12.3.0]
项目版本:v0.2.8
langchain版本:0.0.344. fastchat版本:0.2.34

当前使用的分词器:ChineseRecursiveTextSplitter
当前启动的LLM模型:['chatglm3-6b', 'zhipu-api', 'openai-api'] @ cuda
{'device': 'cuda',
 'host': '0.0.0.0',
 'infer_turbo': False,
 'model_path': '/root/models/chatglm3-6b',
 'model_path_exists': True,
 'port': 20002}
{'api_key': '',
 'device': 'auto',
 'host': '0.0.0.0',
 'infer_turbo': False,
 'online_api': True,
 'port': 21001,
 'provider': 'ChatGLMWorker',
 'version': 'chatglm_turbo',
 'worker_class': <class 'server.model_workers.zhipu.ChatGLMWorker'>}
{'api_base_url': 'https://api.openai.com/v1',
 'api_key': '',
 'device': 'auto',
 'host': '0.0.0.0',
 'infer_turbo': False,
 'model_name': 'gpt-3.5-turbo',
 'online_api': True,
 'openai_proxy': '',
 'port': 20002}
当前Embbedings模型: bge-large-zh @ cuda
==============================Langchain-Chatchat Configuration==============================

2023-12-20 21:44:16,058 - startup.py[line:650] - INFO: 正在启动服务:
2023-12-20 21:44:16,058 - startup.py[line:651] - INFO: 如需查看 llm_api 日志,请前往 /root/Langchain-Chatchat/logs
2023-12-20 21:44:20 | INFO | model_worker | Register to controller
2023-12-20 21:44:20 | ERROR | stderr | INFO:     Started server process [8455]
2023-12-20 21:44:20 | ERROR | stderr | INFO:     Waiting for application startup.
2023-12-20 21:44:20 | ERROR | stderr | INFO:     Application startup complete.
2023-12-20 21:44:20 | ERROR | stderr | INFO:     Uvicorn running on http://0.0.0.0:20000 (Press CTRL+C to quit)
2023-12-20 21:44:21 | INFO | model_worker | Loading the model ['chatglm3-6b'] on worker 6c239f49 ...
Loading checkpoint shards:   0%|                                                                                                                                                                                  | 0/7 [00:00<?, ?it/s]
Loading checkpoint shards:  14%|████████████████████████▎                                                                                                                                                 | 1/7 [00:02<00:14,  2.42s/it]
Loading checkpoint shards:  29%|████████████████████████████████████████████████▌                                                                                                                         | 2/7 [00:04<00:12,  2.42s/it]
Loading checkpoint shards:  43%|████████████████████████████████████████████████████████████████████████▊                                                                                                 | 3/7 [00:06<00:07,  1.98s/it]
Loading checkpoint shards:  57%|█████████████████████████████████████████████████████████████████████████████████████████████████▏                                                                        | 4/7 [00:08<00:05,  1.91s/it]
Loading checkpoint shards:  71%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▍                                                | 5/7 [00:10<00:04,  2.09s/it]
Loading checkpoint shards:  86%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▋                        | 6/7 [00:12<00:02,  2.19s/it]
Loading checkpoint shards: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 7/7 [00:14<00:00,  1.95s/it]
Loading checkpoint shards: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 7/7 [00:14<00:00,  2.05s/it]
2023-12-20 21:44:35 | ERROR | stderr | 
2023-12-20 21:44:38 | INFO | model_worker | Register to controller
INFO:     Started server process [9192]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
ERROR:    [Errno 98] error while attempting to bind on address ('0.0.0.0', 7861): address already in use
INFO:     Waiting for application shutdown.
INFO:     Application shutdown complete.


==============================Langchain-Chatchat Configuration==============================
操作系统:Linux-6.1.56-1.2.3-x86_64-with-glibc2.35.
python版本:3.10.13 | packaged by conda-forge | (main, Oct 26 2023, 18:07:37) [GCC 12.3.0]
项目版本:v0.2.8
langchain版本:0.0.344. fastchat版本:0.2.34

当前使用的分词器:ChineseRecursiveTextSplitter
当前启动的LLM模型:['chatglm3-6b', 'zhipu-api', 'openai-api'] @ cuda
{'device': 'cuda',
 'host': '0.0.0.0',
 'infer_turbo': False,
 'model_path': '/root/models/chatglm3-6b',
 'model_path_exists': True,
 'port': 20002}
{'api_key': '',
 'device': 'auto',
 'host': '0.0.0.0',
 'infer_turbo': False,
 'online_api': True,
 'port': 21001,
 'provider': 'ChatGLMWorker',
 'version': 'chatglm_turbo',
 'worker_class': <class 'server.model_workers.zhipu.ChatGLMWorker'>}
{'api_base_url': 'https://api.openai.com/v1',
 'api_key': '',
 'device': 'auto',
 'host': '0.0.0.0',
 'infer_turbo': False,
 'model_name': 'gpt-3.5-turbo',
 'online_api': True,
 'openai_proxy': '',
 'port': 20002}
当前Embbedings模型: bge-large-zh @ cuda


服务端运行信息:
    OpenAI API Server: http://127.0.0.1:20000/v1
    Chatchat  API  Server: http://127.0.0.1:7861
    Chatchat WEBUI Server: http://0.0.0.0:8501
==============================Langchain-Chatchat Configuration==============================


Collecting usage statistics. To deactivate, set browser.gatherUsageStats to False.


  You can now view your Streamlit app in your browser.

  URL: http://0.0.0.0:8501



访问Web UI

Web UI地址:http://127.0.0.1:8501

image.png

API服务

不是一键启动,则可以单独启动API服务:

python server/api.py


访问:http://0.0.0.0:7861/docs 在这里插入图片描述

Web UI服务

不是一键启动,则可以单独启动Web UI服务:

streamlit run webui.py


访问:http://localhost:8501/ 在这里插入图片描述

使用

对话功能

可以选择本地模型,线上模型,然后进行对话

在这里插入图片描述

知识库管理

可以新建知识库,上传相关资料信息 在这里插入图片描述 上传后会建立向量数据库 在这里插入图片描述 进行提问,回答基于知识库进行回答 在这里插入图片描述

文件对话

上传一个报销制度文件,然后提问 在这里插入图片描述

搜索引擎问答

在这里插入图片描述

异常集合

异常1

场景:

初始化配置文件

python init_database.py --recreate-vs


问题:

 cannot import name 'Doc' from 'typing_extensions'


解决:

因为安装的typing_extensions版本不正确,需要重新安装

pip install typing_extensions==4.8.0


异常2

场景:

启动项目

python startup.py -a


问题:

OMP: Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll already initialized.
OMP: Hint This means that multiple copies of the OpenMP runtime have been linked into the program. That is dangerous, since it can degrade performance or cause incorrect results. The best thing to do is to ensure that only a singl
e OpenMP runtime is linked into the process, e.g. by avoiding static linking of the OpenMP runtime in any library. As an unsafe, unsupported, undocumented workaround you can set the environment variable KMP_DUPLICATE_LIB_OK=TRUE t
o allow the program to continue to execute, but that may cause crashes or silently produce incorrect results. For more information, please see http://www.intel.com/software/products/support/.


解决1:

这里使用Anaconda创建虚拟环境,其中有ibiomp5md.dll文件,重命名以备份该文件,如:libiomp5md.dll.back

在这里插入图片描述

解决2:

startup.py文件上方设置环境变量,保证前后顺序

import os
os.environ['KMP_DUPLICATE_LIB_OK']='True'


异常3

场景:

启动项目过程中

python startup.py -a


问题:

| OSError: We couldn't connect to 'https://huggingface.co' to load this file, couldn't find it in the cached files and it looks like THUDM/chatglm3-6b is not the path to a directory containing 
a file named config.json.


解决:

默认使用的LLM 模型 THUDM/ChatGLM3-6B 与 Embedding 模型BAAI/bge-large-zh,会远程连接模型网站。这里使用魔法也不得行,不知为啥,具体模型网站能访问的。

下载LLM 模型THUDM/ChatGLM3-6B与Embedding模型BAAI/bge-large-zh

1.访问https://huggingface.co/BAAI/bge-large-zh下载 在这里插入图片描述 2.访问https://huggingface.co/THUDM/chatglm3-6b下载 在这里插入图片描述

然后修改configs/model_config.py文件,指定模型存放位置与使用模型名称,需保证存放模型目录下的模型文件名与model_config.py文件使用的名称一致。

# 统一存放模型位置
MODEL_ROOT_PATH = "../../../models"

# 选用的 Embedding 名称
EMBEDDING_MODEL = "bge-large-zh"

# 要运行的LLM名称,可以包括本地模型和在线模型
LLM_MODELS = ["chatglm3-6b", "zhipu-api", "openai-api"]

MODEL_PATH = {
    "embed_model": {
        "ernie-tiny": "nghuyong/ernie-3.0-nano-zh",
        "ernie-base": "nghuyong/ernie-3.0-base-zh",
        "text2vec-base": "shibing624/text2vec-base-chinese",
        "text2vec": "GanymedeNil/text2vec-large-chinese",
        "text2vec-paraphrase": "shibing624/text2vec-base-chinese-paraphrase",
        "text2vec-sentence": "shibing624/text2vec-base-chinese-sentence",
        "text2vec-multilingual": "shibing624/text2vec-base-multilingual",
        "text2vec-bge-large-chinese": "shibing624/text2vec-bge-large-chinese",
        "m3e-small": "moka-ai/m3e-small",
        "m3e-base": "moka-ai/m3e-base",
        "m3e-large": "moka-ai/m3e-large",
        "bge-small-zh": "BAAI/bge-small-zh",
        "bge-base-zh": "BAAI/bge-base-zh",
         # "bge-large-zh": "BAAI/bge-large-zh",
         # 如果模型目录名称和 MODEL_PATH 中的 key 或 value 相同,程序会自动检测加载,无需修改 MODEL_PATH 中的路径。
        "bge-large-zh": "bge-large-zh",
        "bge-large-zh-noinstruct": "BAAI/bge-large-zh-noinstruct",
        "bge-base-zh-v1.5": "BAAI/bge-base-zh-v1.5",
        "bge-large-zh-v1.5": "BAAI/bge-large-zh-v1.5",
        "piccolo-base-zh": "sensenova/piccolo-base-zh",
        "piccolo-large-zh": "sensenova/piccolo-large-zh",
        "nlp_gte_sentence-embedding_chinese-large": "damo/nlp_gte_sentence-embedding_chinese-large",
        "text-embedding-ada-002": "your OPENAI_API_KEY",
    },

    "llm_model": {
        # 以下部分模型并未完全测试,仅根据fastchat和vllm模型的模型列表推定支持 
        # "chatglm2-6b": "THUDM/chatglm2-6b",
        # 如果模型目录名称和 MODEL_PATH 中的 key 或 value 相同,程序会自动检测加载,无需修改 MODEL_PATH 中的路径。
        "chatglm2-6b": "chatglm2-6b",
        "chatglm2-6b-32k": "THUDM/chatglm2-6b-32k",

        "chatglm3-6b": "THUDM/chatglm3-6b",
        "chatglm3-6b-32k": "THUDM/chatglm3-6b-32k",
        "chatglm3-6b-base": "THUDM/chatglm3-6b-base",
    },


如何系统的去学习大模型LLM ?

作为一名热心肠的互联网老兵,我意识到有很多经验和知识值得分享给大家,也可以通过我们的能力和经验解答大家在人工智能学习中的很多困惑,所以在工作繁忙的情况下还是坚持各种整理和分享。

但苦于知识传播途径有限,很多互联网行业朋友无法获得正确的资料得到学习提升,故此将并将重要的 AI大模型资料 包括AI大模型入门学习思维导图、精品AI大模型学习书籍手册、视频教程、实战学习等录播视频免费分享出来

😝有需要的小伙伴,可以V扫描下方二维码免费领取🆓
在这里插入图片描述

一、全套AGI大模型学习路线

AI大模型时代的学习之旅:从基础到前沿,掌握人工智能的核心技能!

img

二、640套AI大模型报告合集

这套包含640份报告的合集,涵盖了AI大模型的理论研究、技术实现、行业应用等多个方面。无论您是科研人员、工程师,还是对AI大模型感兴趣的爱好者,这套报告合集都将为您提供宝贵的信息和启示。

img

三、AI大模型经典PDF籍

随着人工智能技术的飞速发展,AI大模型已经成为了当今科技领域的一大热点。这些大型预训练模型,如GPT-3、BERT、XLNet等,以其强大的语言理解和生成能力,正在改变我们对人工智能的认识。 那以下这些PDF籍就是非常不错的学习资源。

img

在这里插入图片描述

四、AI大模型商业化落地方案

img

阶段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 总结与展望

阶段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 其他大模型介绍

阶段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扫描下方二维码免费领取🆓

在这里插入图片描述

  • 6
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值