问题描述:
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/