模型概述
模型特點
模型能力
使用案例
🚀 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的慷慨資助。



