模型简介
模型特点
模型能力
使用案例
🚀 StableVicuna-13B-GPTQ
本项目包含 CarperAI的StableVicuna 13B 的4位GPTQ格式量化模型。该模型先将上述仓库中的增量与原始Llama 13B权重合并,再使用 GPTQ-for-LLaMa 量化为4位。
可用仓库
🚀 快速开始
提示模板
此模型使用以下提示模板效果最佳:
### Human: your prompt here
### Assistant:
在文本生成Web UI中轻松下载和使用此模型
按常规方式打开文本生成Web UI。
- 点击 Model tab。
- 在 Download custom model or LoRA 下,输入
TheBloke/stable-vicuna-13B-GPTQ
。 - 点击 Download。
- 等待下载完成。
- 点击左上角 Model 旁边的 Refresh 图标。
- 在 Model drop-down 中选择刚下载的模型
stable-vicuna-13B-GPTQ
。 - 显示加载完成后,点击 Text Generation tab 并输入提示!
📦 安装指南
提供的文件
已上传两个版本的GPTQ文件:
兼容文件 - stable-vicuna-13B-GPTQ-4bit.compat.no-act-order.safetensors
在 main
分支(默认分支)中,可找到 stable-vicuna-13B-GPTQ-4bit.compat.no-act-order.safetensors
。
此文件适用于所有版本的GPTQ-for-LLaMa,具有最大兼容性。它在创建时未使用 --act-order
参数,与另一个文件相比,推理质量可能略低,但保证可在所有版本的GPTQ-for-LLaMa和文本生成Web UI中使用。
stable-vicuna-13B-GPTQ-4bit.compat.no-act-order.safetensors
- 适用于所有版本的GPTQ-for-LLaMa代码,包括Triton和CUDA分支。
- 适用于文本生成Web UI一键安装程序。
- 参数:组大小 = 128g,无act-order。
- 创建GPTQ的命令:
CUDA_VISIBLE_DEVICES=0 python3 llama.py stable-vicuna-13B-HF c4 --wbits 4 --true-sequential --groupsize 128 --save_safetensors stable-vicuna-13B-GPTQ-4bit.no-act-order.safetensors
最新文件 - stable-vicuna-13B-GPTQ-4bit.latest.act-order.safetensors
为较新版本的GPTQ-for-LLaMa创建,使用 --act-order
标志以实现最大理论性能。
要访问此文件,请切换到本仓库的 latest
分支并从那里下载。
stable-vicuna-13B-GPTQ-4bit.latest.act-order.safetensors
- 仅适用于最新的GPTQ-for-LLaMa代码。
- 不适用于 文本生成Web UI一键安装程序。
- 参数:组大小 = 128g,act-order。
- 提供最高质量的量化,但需要最新的GPTQ-for-LLaMa代码。
- 创建GPTQ的命令:
CUDA_VISIBLE_DEVICES=0 python3 llama.py stable-vicuna-13B-HF c4 --wbits 4 --true-sequential --act-order --groupsize 128 --save_safetensors stable-vicuna-13B-GPTQ-4bit.act-order.safetensors
text-generation-webui
的手动说明
文件 stable-vicuna-13B-GPTQ-4bit.compat.no-act-order.safetensors
可像其他GPTQ文件一样加载,无需更新 oobaboogas text-generation-webui。
在文本生成Web UI中使用GPTQ 4位文件的说明在此。
另一个 safetensors
模型文件使用 --act-order
创建,以提供尽可能高的量化质量,但这意味着需要在UI中使用最新的GPTQ-for-LLaMa。
如果要使用act-order safetensors
文件并需要更新GPTQ-for-LLaMa的Triton分支,以下是克隆GPTQ-for-LLaMa的Triton分支、克隆文本生成Web UI并在UI中安装GPTQ的命令:
# 克隆text-generation-webui(如果尚未克隆)
git clone https://github.com/oobabooga/text-generation-webui
# 创建repositories目录
mkdir text-generation-webui/repositories
cd text-generation-webui/repositories
# 在text-generation-webui内克隆最新的GPTQ-for-LLaMa代码
git clone https://github.com/qwopqwop200/GPTQ-for-LLaMa
然后将此模型安装到 text-generation-webui/models
并按如下方式启动UI:
cd text-generation-webui
python server.py --model stable-vicuna-13B-GPTQ --wbits 4 --groupsize 128 --model_type Llama # 添加所需的其他命令行参数
上述命令假设已安装GPTQ-for-LLaMa和文本生成Web UI的所有依赖项。有关更多信息,请参阅各自的仓库。
如果无法更新GPTQ-for-LLaMa或不想更新,可以使用上述 stable-vicuna-13B-GPTQ-4bit.no-act-order.safetensors
,它应该可以在不升级文本生成Web UI的情况下正常工作。
📚 详细文档
原始StableVicuna-13B模型卡片
模型描述
StableVicuna-13B是一个 Vicuna-13B v0 模型,通过近端策略优化(PPO)在各种对话和指令数据集上进行基于人类反馈的强化学习(RLHF)微调。
模型详情
属性 | 详情 |
---|---|
模型类型 | StableVicuna-13B是一个基于LLaMA变压器架构的自回归语言模型。 |
训练者 | CarperAI 的 Duy Phung |
语言 | 英语 |
库 | trlX |
增量权重许可证 | CC-BY-NC-SA-4.0 注意:基础LLaMA模型权重的许可证是Meta的 非商业定制许可证。 |
联系方式 | 有关模型的问题和评论,请访问 CarperAI 和 StableFoundation 的Discord服务器。 |
超参数 | 值 |
---|---|
\(n_\text{parameters}\) | 13B |
\(d_\text{model}\) | 5120 |
\(n_\text{layers}\) | 40 |
\(n_\text{heads}\) | 40 |
训练
训练数据集
StableVicuna-13B在三个数据集的混合上进行微调:
- OpenAssistant Conversations Dataset (OASST1):一个由人类生成、人类注释的助手式对话语料库,包含161,443条消息,分布在66,497个对话树中,使用35种不同语言。
- GPT4All Prompt Generations:一个由GPT-4生成的包含400k提示和响应的数据集。
- Alpaca:一个由OpenAI的text-davinci-003引擎生成的包含52,000条指令和演示的数据集。
在RLHF期间使用的奖励模型也在 OpenAssistant Conversations Dataset (OASST1) 以及另外两个数据集上进行训练:
- Anthropic HH-RLHF:一个关于AI助手有用性和无害性偏好的数据集。
- Stanford Human Preferences Dataset:一个包含385K条人类对18个不同主题领域(从烹饪到法律建议)问题/指令响应的集体偏好的数据集。
训练过程
CarperAI/stable-vicuna-13b-delta
使用 trlX 中实现的PPO进行训练,配置如下:
超参数 | 值 |
---|---|
num_rollouts | 128 |
chunk_size | 16 |
ppo_epochs | 4 |
init_kl_coef | 0.1 |
target | 6 |
horizon | 10000 |
gamma | 1 |
lam | 0.95 |
cliprange | 0.2 |
cliprange_value | 0.2 |
vf_coef | 1.0 |
scale_reward | None |
cliprange_reward | 10 |
generation_kwargs | |
max_length | 512 |
min_length | 48 |
top_k | 0.0 |
top_p | 1.0 |
do_sample | True |
temperature | 1.0 |
使用和限制
预期用途
此模型旨在用于文本生成,专注于对话任务。用户可以根据非商业 许可证 在自己的数据上进一步微调模型,以提高模型在特定任务上的性能。
限制和偏差
基础LLaMA模型在各种数据上进行训练,其中一些数据可能包含冒犯性、有害和有偏差的内容,可能导致有毒行为。请参阅LLaMA 论文 的第5.1节。尚未进行任何研究来确定在上述数据集上进行微调如何影响模型的行为和毒性。请勿将此模型的聊天响应视为人类判断的替代品或事实来源,请谨慎使用。
致谢
如果没有 Stability AI 的支持,这项工作将无法完成。
引用
@article{touvron2023llama,
title={LLaMA: Open and Efficient Foundation Language Models},
author={Touvron, Hugo and Lavril, Thibaut and Izacard, Gautier and Martinet, Xavier and Lachaux, Marie-Anne and Lacroix, Timoth{\'e}e and Rozi{\`e}re, Baptiste and Goyal, Naman and Hambro, Eric and Azhar, Faisal and Rodriguez, Aurelien and Joulin, Armand and Grave, Edouard and Lample, Guillaume},
journal={arXiv preprint arXiv:2302.13971},
year={2023}
}
@misc{vicuna2023,
title = {Vicuna: An Open-Source Chatbot Impressing GPT-4 with 90%* ChatGPT Quality},
url = {https://vicuna.lmsys.org},
author = {Chiang, Wei-Lin and Li, Zhuohan and Lin, Zi and Sheng, Ying and Wu, Zhanghao and Zhang, Hao and Zheng, Lianmin and Zhuang, Siyuan and Zhuang, Yonghao and Gonzalez, Joseph E. and Stoica, Ion and Xing, Eric P.},
month = {March},
year = {2023}
}
@misc{gpt4all,
author = {Yuvanesh Anand and Zach Nussbaum and Brandon Duderstadt and Benjamin Schmidt and Andriy Mulyar},
title = {GPT4All: Training an Assistant-style Chatbot with Large Scale Data Distillation from GPT-3.5-Turbo},
year = {2023},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/nomic-ai/gpt4all}},
}
@misc{alpaca,
author = {Rohan Taori and Ishaan Gulrajani and Tianyi Zhang and Yann Dubois and Xuechen Li and Carlos Guestrin and Percy Liang and Tatsunori B. Hashimoto },
title = {Stanford Alpaca: An Instruction-following LLaMA model},
year = {2023},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/tatsu-lab/stanford_alpaca}},
}
@software{leandro_von_werra_2023_7790115,
author = {Leandro von Werra and
Alex Havrilla and
Max reciprocated and
Jonathan Tow and
Aman cat-state and
Duy V. Phung and
Louis Castricato and
Shahbuland Matiana and
Alan and
Ayush Thakur and
Alexey Bukhtiyarov and
aaronrmm and
Fabrizio Milo and
Daniel and
Daniel King and
Dong Shin and
Ethan Kim and
Justin Wei and
Manuel Romero and
Nicky Pochinkov and
Omar Sanseviero and
Reshinth Adithyan and
Sherman Siu and
Thomas Simonini and
Vladimir Blagojevic and
Xu Song and
Zack Witten and
alexandremuzio and
crumb},
title = {{CarperAI/trlx: v0.6.0: LLaMa (Alpaca), Benchmark
Util, T5 ILQL, Tests}},
month = mar,
year = 2023,
publisher = {Zenodo},
version = {v0.6.0},
doi = {10.5281/zenodo.7790115},
url = {https://doi.org/10.5281/zenodo.7790115}
}
📄 许可证
本模型使用的许可证为 CC-BY-NC-SA-4.0。
Discord
如需进一步支持,以及讨论这些模型和人工智能相关话题,请加入: TheBloke AI的Discord服务器
感谢与贡献方式
感谢 chirper.ai 团队!
很多人询问是否可以贡献。我喜欢提供模型并帮助他人,也希望能花更多时间做这些事,还能开展新的项目,如微调/训练。
如果您有能力且愿意贡献,我将不胜感激,这将帮助我继续提供更多模型,并开展新的人工智能项目。
捐赠者将在所有AI/LLM/模型问题和请求上获得优先支持,访问私人Discord房间,以及其他福利。
- Patreon: https://patreon.com/TheBlokeAI
- Ko-Fi: https://ko-fi.com/TheBlokeAI
特别感谢:Aemon Algiz。
Patreon特别提及:Sam, theTransient, Jonathan Leane, Steven Wood, webtim, Johann-Peter Hartmann, Geoffrey Montalvo, Gabriel Tamborski, Willem Michiel, John Villwock, Derek Yates, Mesiah Bishop, Eugene Pentland, Pieter, Chadd, Stephen Murray, Daniel P. Andersen, terasurfer, Brandon Frisco, Thomas Belote, Sid, Nathan LeClaire, Magnesian, Alps Aficionado, Stanislav Ovsiannikov, Alex, Joseph William Delisle, Nikolai Manek, Michael Davis, Junyu Yang, K, J, Spencer Kim, Stefan Sabev, Olusegun Samson, transmissions 11, Michael Levine, Cory Kujawski, Rainer Wilmers, zynix, Kalila, Luke @flexchar, Ajan Kanaga, Mandus, vamX, Ai Maven, Mano Prime, Matthew Berman, subjectnull, Vitor Caleffi, Clay Pascal, biorpg, alfie_i, 阿明, Jeffrey Morgan, ya boyyy, Raymond Fosdick, knownsqashed, Olakabola, Leonard Tan, ReadyPlayerEmma, Enrico Ros, Dave, Talal Aujan, Illia Dulskyi, Sean Connelly, senxiiz, Artur Olbinski, Elle, Raven Klaugh, Fen Risland, Deep Realms, Imad Khwaja, Fred von Graf, Will Dee, usrbinkat, SuperWojo, Alexandros Triantafyllidis, Swaroop Kallakuri, Dan Guido, John Detwiler, Pedro Madruga, Iucharbius, Viktor Bowallius, Asp the Wyvern, Edmond Seymore, Trenton Dambrowitz, Space Cruiser, Spiking Neurons AB, Pyrater, LangChain4j, Tony Hughes, Kacper Wikieł, Rishabh Srivastava, David Ziegler, Luke Pendergrass, Andrey, Gabriel Puliatti, Lone Striker, Sebastain Graf, Pierre Kircher, Randy H, NimbleBox.ai, Vadim, danny, Deo Leter
感谢所有慷慨的赞助者和捐赠者!再次感谢a16z的慷慨资助。



