0


大模型Llama2部署,基于text-generation-webui、Llama2-Chinese

支持windows、linux,显存要求10G左右

一、使用text-generation-webui部署

参考安装教程:傻瓜式!一键部署llama2+chatglm2,集成所有环境和微调功能,本地化界面操作!

Github地址:GitHub - oobabooga/text-generation-webui: A Gradio web UI for Large Language Models. Supports transformers, GPTQ, llama.cpp (ggml/gguf), Llama models.

模型下载地址:meta-llama/Llama-2-13b-chat-hf at main

遇到的问题:

Traceback (most recent call last):

File "D:\oobabooga_windows\text-generation-webui\server.py", line 12, in <module>

import gradio as gr

ModuleNotFoundError: No module named 'gradio'

--配置python环境变量,路径:D:\oobabooga_windows\installer_files\env(自带python环境),使用python -m pip install gradio安装环境

ModuleNotFoundError: No module named 'markdown'

--使用python -m pip install markdown安装环境

--又缺少module,直接install requirements文件

ValueError: When localhost is not accessible, a shareable link must be created. Please set share=True or check your proxy settings to allow access to localhost.

--关闭代理,重新运行

To create a public link, set share=True in launch().

二、使用Llama2-Chinese部署

下载FlagAlpha/Llama2-Chinese-13b-Chat模型库:meta-llama/Llama-2-13b-chat-hf at main

cd D:Llama2-Chinese

Llama2-Chinese只支持4bit的数据模型,可正常运行:

python examples/chat_gradio.py --model_name_or_path D:\oobabooga_windows\text-generation-webui\models\Llama-2-7b-chat-hf

python examples/chat_gradio.py --model_name_or_path D:\model\Llama2-Chinese-7b-Chat

标签: llama ai 语言模型

本文转载自: https://blog.csdn.net/cheng_tc/article/details/132713009
版权归原作者 cheng_tc 所有, 如有侵权,请联系我们删除。

“大模型Llama2部署,基于text-generation-webui、Llama2-Chinese”的评论:

还没有评论