You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to convert my llama2 7b model following Readme
In STEP1,
I set my command like below, python3 /home/ghlee/transformers/models/llama/convert_llama_weights_to_hf.py --input_dir /home/ghlee/llama/llama-2-7b --model_size 7B --output_dir /home/ghlee/llama.onnx/onnx_converted
and this kind of error occured
Traceback (most recent call last):
File "/home/ghlee/transformers/models/llama/convert_llama_weights_to_hf.py", line 407, in
main()
File "/home/ghlee/transformers/models/llama/convert_llama_weights_to_hf.py", line 396, in main
write_model(
File "/home/ghlee/transformers/models/llama/convert_llama_weights_to_hf.py", line 178, in write_model
f"model.layers.{layer_i}.self_attn.k_proj.weight": permute(
File "/home/ghlee/transformers/models/llama/convert_llama_weights_to_hf.py", line 154, in permute
return w.view(n_heads, dim1 // n_heads // 2, 2, dim2).transpose(1, 2).reshape(dim1, dim2)
RuntimeError: shape '[32, 2, 2, 4096]' is invalid for input of size 16777216
it seems like shape are not matched
but I never had modified the params.jason and config.jason
Is there any way to fix ti?
The text was updated successfully, but these errors were encountered:
I'm trying to convert my llama2 7b model following Readme
In STEP1,
I set my command like below,
python3 /home/ghlee/transformers/models/llama/convert_llama_weights_to_hf.py --input_dir /home/ghlee/llama/llama-2-7b --model_size 7B --output_dir /home/ghlee/llama.onnx/onnx_converted
and this kind of error occured
Traceback (most recent call last):
File "/home/ghlee/transformers/models/llama/convert_llama_weights_to_hf.py", line 407, in
main()
File "/home/ghlee/transformers/models/llama/convert_llama_weights_to_hf.py", line 396, in main
write_model(
File "/home/ghlee/transformers/models/llama/convert_llama_weights_to_hf.py", line 178, in write_model
f"model.layers.{layer_i}.self_attn.k_proj.weight": permute(
File "/home/ghlee/transformers/models/llama/convert_llama_weights_to_hf.py", line 154, in permute
return w.view(n_heads, dim1 // n_heads // 2, 2, dim2).transpose(1, 2).reshape(dim1, dim2)
RuntimeError: shape '[32, 2, 2, 4096]' is invalid for input of size 16777216
it seems like shape are not matched
but I never had modified the params.jason and config.jason
Is there any way to fix ti?
The text was updated successfully, but these errors were encountered: