大模型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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值