-
Notifications
You must be signed in to change notification settings - Fork 568
text generation webui_zh
iMountTai edited this page Aug 3, 2023
·
4 revisions
用于运行大模型(如LLaMA, lama.cpp等)的gradio web UI。
text-generation-webui目前支持Windows/Linux/macOS/WSL系统,请参考webui installation选择适合自身环境的安装方式
将下载后的chinese-alpaca-2完整版权重(下载地址)或者之前已执行了merge_llama2_with_chinese_lora_low_mem.py脚本将LoRA(下载地址)与原版Llama-2(下载地址)合并后的完整版权重放到text-generation-webui models文件夹下,目录文件如下所示
>>> ls models/chinese-alpaca-2-7b
config.json
generation_config.json
pytorch_model-00001-of-00002.bin
pytorch_model-00002-of-00002.bin
pytorch_model.bin.index.json
special_tokens_map.json
tokenizer_config.json
tokenizer.json
tokenizer.model运行以下命令:
python server.py --model chinese-alpaca-2-7b --chat在打开的网页中,依次选择Chat setting-> Instruction template,在Instruction template中下拉选择Llama-v2,并将Context输入框中的Answer the questions.提示语替换为You are a helpful assistant. 你是一个乐于助人的助手。,最后回到Text generation界面,在input输入框中输入你的指令,即可与chinese-alpaca-2对话了。
更详细的官方说明请参考webui using docs。如果遇到安装或者运行问题还请到原repo下提问,该流程已在commit-id 32a2bbe下跑通。