大模型部署避坑指南--RuntimeError: The size of tensor a (32000) must match the size of tensor b (32001) ...

问题描述:

minigpt4模型权重准备:

python -m fastchat.model.apply_delta --base /path/to/llama-7b-hf/  --target /path/to/save/working/vicuna/weight/  --delta /path/to/vicuna-7b-delta-v0/

RuntimeError: The size of tensor a (32000) must match the size of tensor b (32001) at non-singleton dimension 0

 产生原因:

fastchat版本与模型版本 不兼容

解决办法:

将vicuna-7b-delta-v0 替换为 vicuna-7b-delta-v1.1 版本

下载地址:

lmsys/vicuna-7b-delta-v1.1 at main

python -m fastchat.model.apply_delta --base /path/to/llama-7b-hf/  --target /path/to/save/working/vicuna/weight/  --delta /path/to/vicuna-7b-delta-v1.1/

猜你喜欢

转载自blog.csdn.net/bulucc/article/details/130490460