当前位置:首页 » 《随便一记》 » 正文

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

27 人参与  2024年02月20日 18:51  分类 : 《随便一记》  评论

点击全文阅读


支持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


点击全文阅读


本文链接:http://zhangshiyu.com/post/69246.html

<< 上一篇 下一篇 >>

  • 评论(0)
  • 赞助本站

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

关于我们 | 我要投稿 | 免责申明

Copyright © 2020-2022 ZhangShiYu.com Rights Reserved.豫ICP备2022013469号-1