MiniGPT-4
MiniGPT-4 copied to clipboard
RuntimeError: The size of tensor a (32000) must match the size of tensor b (32001) at non-singleton dimension 0
RuntimeError: The size of tensor a (32000) must match the size of tensor b (32001) at non-singleton dimension 0 after I execute this command:python -m fastchat.model.apply_delta --base llama-7b-hf/ --target vicuna-7b/ --delta vicuna-7b-delta-v0/
I encountered same problem. I tried to expand para.data using torch.cat, then problem solved.
torch.cat
Can you tell me which file to modify that line of code? I'm a newcomer
hi, the file is: fastchat/model/apply_delta.py line: 137, right before code param.data += delta.state_dict()[name] hope this can help you!
hi, the file is: fastchat/model/apply_delta.py line: 137, right before code
param.data += delta.state_dict()[name]hope this can help you!
can u show the code please,I am not familiar with Python!I am afraid to change the code in package.
hi, the file is: fastchat/model/apply_delta.py line: 137, right before code
param.data += delta.state_dict()[name]hope this can help you!
Thank u! I can find that code,but how to Modify code. And are you Chinese?Can we add a WeChat account?
hi, the file is: fastchat/model/apply_delta.py line: 137, right before code
param.data += delta.state_dict()[name]hope this can help you!Thank u!Are you Chinese?Can we add a WeChat account?
你是国人嘛,这咋改那版代码,或者可以加微信沟通~
hi, the file is: fastchat/model/apply_delta.py line: 137, right before code
param.data += delta.state_dict()[name]hope this can help you!Thank u!Are you Chinese?Can we add a WeChat account?
你是国人嘛,这咋改那版代码,或者可以加微信沟通~
hhhh, 18622563703 微信加我吧
hi, the file is: fastchat/model/apply_delta.py line: 137, right before code
param.data += delta.state_dict()[name]hope this can help you!Thank u!Are you Chinese?Can we add a WeChat account?
你是国人嘛,这咋改那版代码,或者可以加微信沟通~
hhhh, 18622563703 微信加我吧
加了~
Use version v1.1 rather than v0
hi, the file is: fastchat/model/apply_delta.py line: 137, right before code
param.data += delta.state_dict()[name]hope this can help you!Thank u!Are you Chinese?Can we add a WeChat account?
你是国人嘛,这咋改那版代码,或者可以加微信沟通~
hhhh, 18622563703 微信加我吧
加了~
hi. what was the solution?
model version mismatch~
hi, the file is: fastchat/model/apply_delta.py line: 137, right before code
param.data += delta.state_dict()[name]hope this can help you!can u show the code please,I am not familiar with Python!I am afraid to change the code in package.
print("Applying the delta")
for name, param in tqdm(base.state_dict().items(), desc="Applying delta"):
assert name in delta.state_dict()
# param.data += delta.state_dict()[name]
param.data = torch.cat((param.data, delta.state_dict()[name]), dim=0)
My setting is same as u, u can just low your fastchat version with the command ' pip install fschat==0.1.10', which can fix this issue. You can see 'FastChat version compatibility' docs in this site: click this
My setting is same as u, u can just low your fastchat version with the command ' pip install fschat==0.1.10', which can fix this issue. You can see 'FastChat version compatibility' docs in this site: click this
My terminal command is like: python -m fastchat.model.apply_delta --base /home/yinhang/minigpt4/llama_hf_7b --target /home/yinhang/minigpt4/vicuna --delta /home/yinhang/minigpt4/vicuna-7b-delta-v0 And my fastchat==0.1.10