如何得到vicuna-13B的模型权重
-
按
FastChat
的教程,git clone后先安装fastchat包:
pip3 install -e .
-e参数, --editable <path/url> Install a project in editable mode (i.e. setuptools "develop mode") from a local project path or a VCS url.
We release Vicuna weights as delta weights to comply with the LLaMA model license.
所有基于LLaMA的模型都只能给delta权重( 下载地址 ),再将这个delta权重加到original LLaMA权重(下面给出磁链地址)上,得到最终release模型的权重。
模型权重融合的步骤:
- 准备一个至少60G内存的机器
- 下载 delta模型 ,记为vicuna-13b-delta-v0
- 下载llama-13B原始模型
- 将原始llama-13B模型转出huggingface格式的模型(简称hf),记为llama-13b-hf
- FastChat项目clone下来,cd进去
- pip安装依赖和pip安装FastChat
- 在FastChat目录下运行如下命令:
python3 -m fastchat.model.apply_delta \
--base /path/to/llama-13b-hf \
--delta lmsys/vicuna-13b-delta-v0 \
--target /output/path/to/vicuna-13b
# 例如有网友运行如下:
python3 -m fastchat.model.apply_delta \
--base /root/llama-13b-hf \
--delta /root/vicuna-13b-delta-v0 \
--target /root/vicuna-13b
- 最后得到vicuna-13B的模型,存放在vicuna-13b目录下
- 因此,需要自行下载LLaMA的7B、13B等等的模型权重,需要填form找facebook申请,但很难得到回复。有人放出了 权重下载地址 ,自取吧。
For the 7B model...
aria2c --select-file 21-23,25,26 'magnet:?xt=urn:btih:b8287ebfa04f879b048d4d4404108cf3e8014352&dn=LLaMA'
https://huggingface.co/nyanko7/LLaMA-7B/tree/main
For the 13B model...
aria2c --select-file 1-4,25,26 'magnet:?xt=urn:btih:b8287ebfa04f879b048d4d4404108cf3e8014352&dn=LLaMA'
For the 30B model...
aria2c --select-file 5-10,25,26 'magnet:?xt=urn:btih:b8287ebfa04f879b048d4d4404108cf3e8014352&dn=LLaMA'
For the 65B model...
aria2c --select-file 11-20,25,26 'magnet:?xt=urn:btih:b8287ebfa04f879b048d4d4404108cf3e8014352&dn=LLaMA'
And for everything...