amrrs / llama-4bit-colab

llama-4bit-colab
64 stars 34 forks source link

RuntimeError: Error(s) in loading state_dict for LlamaForCausalLM: #5

Open joohayoung opened 1 year ago

joohayoung commented 1 year ago

I am getting this error:

Loading model ... Traceback (most recent call last): File "/content/GPTQ-for-LLaMa/llama_inference.py", line 112, in <module> model = load_quant(args.model, args.load, args.wbits, args.groupsize) File "/content/GPTQ-for-LLaMa/llama_inference.py", line 52, in load_quant model.load_state_dict(torch.load(checkpoint)) File "/usr/local/lib/python3.9/dist-packages/torch/nn/modules/module.py", line 1671, in load_state_dict raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format( RuntimeError: Error(s) in loading state_dict for LlamaForCausalLM: Missing key(s) in state_dict: "model.layers.0.self_attn.q_proj.qzeros", "model.layers.0.self_attn.k_proj.qzeros", "model.layers.0.self_attn.v_proj.qzeros", "model.layers.0.self_attn.o_proj.qzeros", "model.layers.0.mlp.gate_proj.qzeros", "model.layers.0.mlp.down_proj.qzeros", "model.layers.0.mlp.up_proj.qzeros", "model.layers.1.self_attn.q_proj.qzeros", "model.layers.1.self_attn.k_proj.qzeros", "model.layers.1.self_attn.v_proj.qzeros", "model.layers.1.self_attn.o_proj.qzeros", "model.layers.1.mlp.gate_proj.qzeros", "model.layers.1.mlp.down_proj.qzeros", "model.layers.1.mlp.up_proj.qzeros", "model.layers.2.self_attn.q_proj.qzeros", "model.layers.2.self_attn.k_proj.qzeros", "model.layers.2.self_attn.v_proj.qzeros", "model.layers.2.self_attn.o_proj.qzeros", "model.layers.2.mlp.gate_proj.qzeros", "model.layers.2.mlp.down_proj.qzeros", "model.layers.2.mlp.up_proj.qzeros", "model.layers.3.self_attn.q_proj.qzeros", "model.layers.3.self_attn.k_proj.qzeros", "model.layers.3.self_attn.v_proj.qzeros", "model.layers.3.self_attn.o_proj.qzeros", "model.layers.3.mlp.gate_proj.qzeros", "model.layers.3.mlp.down_proj.qzeros", "model.layers.3.mlp.up_proj.qzeros", "model.layers.4.self_attn.q_proj.qzeros", "model.layers.4.self_attn.k_proj.qzeros", "model.layers.4.self_attn.v_proj.qzeros", "model.layers.4.self_attn.o_proj.qzeros", "model.layers.4.mlp.gate_proj.qzeros", "model.layers.4.mlp.down_proj.qzeros", "model.layers.4.mlp.up_proj.qzeros", "model.layers.5.self_attn.q_proj.qzeros", "model.layers.5.self_attn.k_proj.qzeros", "model.layers.5.self_attn.v_proj.qzeros", "model.layers.5.self_attn.o_proj.qzeros", "model.layers.5.mlp.gate_proj.qzeros", "model.layers.5.mlp.down_proj.qzeros", "model.layers.5.mlp.up_proj.qzeros", "model.layers.6.self_attn.q_proj.qzeros", "model.layers.6.self_attn.k_proj.qzeros", "model.layers.6.self_attn.v_proj.qzeros", "model.layers.6.self_attn.o_proj.qzeros", "model.layers.6.mlp.gate_proj.qzeros", "model.layers.6.mlp.down_proj.qzeros", "model.layers.6.mlp.up_proj.qzeros", "model.layers.7.self_attn.q_proj.qzeros", "model.layers.7.self_attn.k_proj.qzeros", "model.layers.7.self_attn.v_proj.qzeros", "model.layers.7.self_attn.o_proj.qzeros", "model.layers.7.mlp.gate_proj.qzeros", "model.layers.7.mlp.down_proj.qzeros", "model.layers.7.mlp.up_proj.qzeros", "model.layers.8.self_attn.q_proj.qzeros", "model.layers.8.self_attn.k_proj.qzeros", "model.layers.8.self_attn.v_proj.qzeros", "model.layers.8.self_attn.o_proj.qzeros", "model.layers.8.mlp.gate_proj.qzeros", "model.layers.8.mlp.down_proj.qzeros", "model.layers.8.mlp.up_proj.qzeros", "model.layers.9.self_attn.q_proj.qzeros", "model.layers.9.self_attn.k_proj.qzeros", "model.layers.9.self_attn.v_proj.qzeros", "model.layers.9.self_attn.o_proj.qzeros", "model.layers.9.mlp.gate_proj.qzeros", "model.layers.9.mlp.down_proj.qzeros", "model.layers.9.mlp.up_proj.qzeros", "model.layers.10.self_attn.q_proj.qzeros", "model.layers.10.self_attn.k_proj.qzeros", "model.layers.10.self_attn.v_proj.qzeros", "model.layers.10.self_attn.o_proj.qzeros", "model.layers.10.mlp.gate_proj.qzeros", "model.layers.10.mlp.down_proj.qzeros", "model.layers.10.mlp.up_proj.qzeros", "model.layers.11.self_attn.q_proj.qzeros", "model.layers.11.self_attn.k_proj.qzeros", "model.layers.11.self_attn.v_proj.qzeros", "model.layers.11.self_attn.o_proj.qzeros", "model.layers.11.mlp.gate_proj.qzeros", "model.layers.11.mlp.down_proj.qzeros", "model.layers.11.mlp.up_proj.qzeros", "model.layers.12.self_attn.q_proj.qzeros", "model.layers.12.self_attn.k_proj.qzeros", "model.layers.12.self_attn.v_proj.qzeros", "model.layers.12.self_attn.o_proj.qzeros", "model.layers.12.mlp.gate_proj.qzeros", "model.layers.12.mlp.down_proj.qzeros", "model.layers.12.mlp.up_proj.qzeros", "model.layers.13.self_attn.q_proj.qzeros", "model.layers.13.self_attn.k_proj.qzeros", "model.layers.13.self_attn.v_proj.qzeros", "model.layers.13.self_attn.o_proj.qzeros", "model.layers.13.mlp.gate_proj.qzeros", "model.layers.13.mlp.down_proj.qzeros", "model.layers.13.mlp.up_proj.qzeros", "model.layers.14.self_attn.q_proj.qzeros", "model.layers.14.self_attn.k_proj.qzeros", "model.layers.14.self_attn.v_proj.qzeros", "model.layers.14.self_attn.o_proj.qzeros", "model.layers.14.mlp.gate_proj.qzeros", "model.layers.14.mlp.down_proj.qzeros", "model.layers.14.mlp.up_proj.qzeros", "model.layers.15.self_attn.q_proj.qzeros", "model.layers.15.self_attn.k_proj.qzeros", "model.layers.15.self_attn.v_proj.qzeros", "model.layers.15.self_attn.o_proj.qzeros", "model.layers.15.mlp.gate_proj.qzeros", "model.layers.15.mlp.down_proj.qzeros", "model.layers.15.mlp.up_proj.qzeros", "model.layers.16.self_attn.q_proj.qzeros", "model.layers.16.self_attn.k_proj.qzeros", "model.layers.16.self_attn.v_proj.qzeros", "model.layers.16.self_attn.o_proj.qzeros", "model.layers.16.mlp.gate_proj.qzeros", "model.layers.16.mlp.down_proj.qzeros", "model.layers.16.mlp.up_proj.qzeros", "model.layers.17.self_attn.q_proj.qzeros", "model.layers.17.self_attn.k_proj.qzeros", "model.layers.17.self_attn.v_proj.qzeros", "model.layers.17.self_attn.o_proj.qzeros", "model.layers.17.mlp.gate_proj.qzeros", "model.layers.17.mlp.down_proj.qzeros", "model.layers.17.mlp.up_proj.qzeros", "model.layers.18.self_attn.q_proj.qzeros", "model.layers.18.self_attn.k_proj.qzeros", "model.layers.18.self_attn.v_proj.qzeros", "model.layers.18.self_attn.o_proj.qzeros", "model.layers.18.mlp.gate_proj.qzeros", "model.layers.18.mlp.down_proj.qzeros", "model.layers.18.mlp.up_proj.qzeros", "model.layers.19.self_attn.q_proj.qzeros", "model.layers.19.self_attn.k_proj.qzeros", "model.layers.19.self_attn.v_proj.qzeros", "model.layers.19.self_attn.o_proj.qzeros", "model.layers.19.mlp.gate_proj.qzeros", "model.layers.19.mlp.down_proj.qzeros", "model.layers.19.mlp.up_proj.qzeros", "model.layers.20.self_attn.q_proj.qzeros", "model.layers.20.self_attn.k_proj.qzeros", "model.layers.20.self_attn.v_proj.qzeros", "model.layers.20.self_attn.o_proj.qzeros", "model.layers.20.mlp.gate_proj.qzeros", "model.layers.20.mlp.down_proj.qzeros", "model.layers.20.mlp.up_proj.qzeros", "model.layers.21.self_attn.q_proj.qzeros", "model.layers.21.self_attn.k_proj.qzeros", "model.layers.21.self_attn.v_proj.qzeros", "model.layers.21.self_attn.o_proj.qzeros", "model.layers.21.mlp.gate_proj.qzeros", "model.layers.21.mlp.down_proj.qzeros", "model.layers.21.mlp.up_proj.qzeros", "model.layers.22.self_attn.q_proj.qzeros", "model.layers.22.self_attn.k_proj.qzeros", "model.layers.22.self_attn.v_proj.qzeros", "model.layers.22.self_attn.o_proj.qzeros", "model.layers.22.mlp.gate_proj.qzeros", "model.layers.22.mlp.down_proj.qzeros", "model.layers.22.mlp.up_proj.qzeros", "model.layers.23.self_attn.q_proj.qzeros", "model.layers.23.self_attn.k_proj.qzeros", "model.layers.23.self_attn.v_proj.qzeros", "model.layers.23.self_attn.o_proj.qzeros", "model.layers.23.mlp.gate_proj.qzeros", "model.layers.23.mlp.down_proj.qzeros", "model.layers.23.mlp.up_proj.qzeros", "model.layers.24.self_attn.q_proj.qzeros", "model.layers.24.self_attn.k_proj.qzeros", "model.layers.24.self_attn.v_proj.qzeros", "model.layers.24.self_attn.o_proj.qzeros", "model.layers.24.mlp.gate_proj.qzeros", "model.layers.24.mlp.down_proj.qzeros", "model.layers.24.mlp.up_proj.qzeros", "model.layers.25.self_attn.q_proj.qzeros", "model.layers.25.self_attn.k_proj.qzeros", "model.layers.25.self_attn.v_proj.qzeros", "model.layers.25.self_attn.o_proj.qzeros", "model.layers.25.mlp.gate_proj.qzeros", "model.layers.25.mlp.down_proj.qzeros", "model.layers.25.mlp.up_proj.qzeros", "model.layers.26.self_attn.q_proj.qzeros", "model.layers.26.self_attn.k_proj.qzeros", "model.layers.26.self_attn.v_proj.qzeros", "model.layers.26.self_attn.o_proj.qzeros", "model.layers.26.mlp.gate_proj.qzeros", "model.layers.26.mlp.down_proj.qzeros", "model.layers.26.mlp.up_proj.qzeros", "model.layers.27.self_attn.q_proj.qzeros", "model.layers.27.self_attn.k_proj.qzeros", "model.layers.27.self_attn.v_proj.qzeros", "model.layers.27.self_attn.o_proj.qzeros", "model.layers.27.mlp.gate_proj.qzeros", "model.layers.27.mlp.down_proj.qzeros", "model.layers.27.mlp.up_proj.qzeros", "model.layers.28.self_attn.q_proj.qzeros", "model.layers.28.self_attn.k_proj.qzeros", "model.layers.28.self_attn.v_proj.qzeros", "model.layers.28.self_attn.o_proj.qzeros", "model.layers.28.mlp.gate_proj.qzeros", "model.layers.28.mlp.down_proj.qzeros", "model.layers.28.mlp.up_proj.qzeros", "model.layers.29.self_attn.q_proj.qzeros", "model.layers.29.self_attn.k_proj.qzeros", "model.layers.29.self_attn.v_proj.qzeros", "model.layers.29.self_attn.o_proj.qzeros", "model.layers.29.mlp.gate_proj.qzeros", "model.layers.29.mlp.down_proj.qzeros", "model.layers.29.mlp.up_proj.qzeros", "model.layers.30.self_attn.q_proj.qzeros", "model.layers.30.self_attn.k_proj.qzeros", "model.layers.30.self_attn.v_proj.qzeros", "model.layers.30.self_attn.o_proj.qzeros", "model.layers.30.mlp.gate_proj.qzeros", "model.layers.30.mlp.down_proj.qzeros", "model.layers.30.mlp.up_proj.qzeros", "model.layers.31.self_attn.q_proj.qzeros", "model.layers.31.self_attn.k_proj.qzeros", "model.layers.31.self_attn.v_proj.qzeros", "model.layers.31.self_attn.o_proj.qzeros", "model.layers.31.mlp.gate_proj.qzeros", "model.layers.31.mlp.down_proj.qzeros", "model.layers.31.mlp.up_proj.qzeros". Unexpected key(s) in state_dict: "model.layers.0.self_attn.q_proj.zeros", "model.layers.0.self_attn.k_proj.zeros", "model.layers.0.self_attn.v_proj.zeros", "model.layers.0.self_attn.o_proj.zeros", "model.layers.0.mlp.gate_proj.zeros", "model.layers.0.mlp.down_proj.zeros", "model.layers.0.mlp.up_proj.zeros", "model.layers.1.self_attn.q_proj.zeros", "model.layers.1.self_attn.k_proj.zeros", "model.layers.1.self_attn.v_proj.zeros", "model.layers.1.self_attn.o_proj.zeros", "model.layers.1.mlp.gate_proj.zeros", "model.layers.1.mlp.down_proj.zeros", "model.layers.1.mlp.up_proj.zeros", "model.layers.2.self_attn.q_proj.zeros", "model.layers.2.self_attn.k_proj.zeros", "model.layers.2.self_attn.v_proj.zeros", "model.layers.2.self_attn.o_proj.zeros", "model.layers.2.mlp.gate_proj.zeros", "model.layers.2.mlp.down_proj.zeros", "model.layers.2.mlp.up_proj.zeros", "model.layers.3.self_attn.q_proj.zeros", "model.layers.3.self_attn.k_proj.zeros", "model.layers.3.self_attn.v_proj.zeros", "model.layers.3.self_attn.o_proj.zeros", "model.layers.3.mlp.gate_proj.zeros", "model.layers.3.mlp.down_proj.zeros", "model.layers.3.mlp.up_proj.zeros", "model.layers.4.self_attn.q_proj.zeros", "model.layers.4.self_attn.k_proj.zeros", "model.layers.4.self_attn.v_proj.zeros", "model.layers.4.self_attn.o_proj.zeros", "model.layers.4.mlp.gate_proj.zeros", "model.layers.4.mlp.down_proj.zeros", "model.layers.4.mlp.up_proj.zeros", "model.layers.5.self_attn.q_proj.zeros", "model.layers.5.self_attn.k_proj.zeros", "model.layers.5.self_attn.v_proj.zeros", "model.layers.5.self_attn.o_proj.zeros", "model.layers.5.mlp.gate_proj.zeros", "model.layers.5.mlp.down_proj.zeros", "model.layers.5.mlp.up_proj.zeros", "model.layers.6.self_attn.q_proj.zeros", "model.layers.6.self_attn.k_proj.zeros", "model.layers.6.self_attn.v_proj.zeros", "model.layers.6.self_attn.o_proj.zeros", "model.layers.6.mlp.gate_proj.zeros", "model.layers.6.mlp.down_proj.zeros", "model.layers.6.mlp.up_proj.zeros", "model.layers.7.self_attn.q_proj.zeros", "model.layers.7.self_attn.k_proj.zeros", "model.layers.7.self_attn.v_proj.zeros", "model.layers.7.self_attn.o_proj.zeros", "model.layers.7.mlp.gate_proj.zeros", "model.layers.7.mlp.down_proj.zeros", "model.layers.7.mlp.up_proj.zeros", "model.layers.8.self_attn.q_proj.zeros", "model.layers.8.self_attn.k_proj.zeros", "model.layers.8.self_attn.v_proj.zeros", "model.layers.8.self_attn.o_proj.zeros", "model.layers.8.mlp.gate_proj.zeros", "model.layers.8.mlp.down_proj.zeros", "model.layers.8.mlp.up_proj.zeros", "model.layers.9.self_attn.q_proj.zeros", "model.layers.9.self_attn.k_proj.zeros", "model.layers.9.self_attn.v_proj.zeros", "model.layers.9.self_attn.o_proj.zeros", "model.layers.9.mlp.gate_proj.zeros", "model.layers.9.mlp.down_proj.zeros", "model.layers.9.mlp.up_proj.zeros", "model.layers.10.self_attn.q_proj.zeros", "model.layers.10.self_attn.k_proj.zeros", "model.layers.10.self_attn.v_proj.zeros", "model.layers.10.self_attn.o_proj.zeros", "model.layers.10.mlp.gate_proj.zeros", "model.layers.10.mlp.down_proj.zeros", "model.layers.10.mlp.up_proj.zeros", "model.layers.11.self_attn.q_proj.zeros", "model.layers.11.self_attn.k_proj.zeros", "model.layers.11.self_attn.v_proj.zeros", "model.layers.11.self_attn.o_proj.zeros", "model.layers.11.mlp.gate_proj.zeros", "model.layers.11.mlp.down_proj.zeros", "model.layers.11.mlp.up_proj.zeros", "model.layers.12.self_attn.q_proj.zeros", "model.layers.12.self_attn.k_proj.zeros", "model.layers.12.self_attn.v_proj.zeros", "model.layers.12.self_attn.o_proj.zeros", "model.layers.12.mlp.gate_proj.zeros", "model.layers.12.mlp.down_proj.zeros", "model.layers.12.mlp.up_proj.zeros", "model.layers.13.self_attn.q_proj.zeros", "model.layers.13.self_attn.k_proj.zeros", "model.layers.13.self_attn.v_proj.zeros", "model.layers.13.self_attn.o_proj.zeros", "model.layers.13.mlp.gate_proj.zeros", "model.layers.13.mlp.down_proj.zeros", "model.layers.13.mlp.up_proj.zeros", "model.layers.14.self_attn.q_proj.zeros", "model.layers.14.self_attn.k_proj.zeros", "model.layers.14.self_attn.v_proj.zeros", "model.layers.14.self_attn.o_proj.zeros", "model.layers.14.mlp.gate_proj.zeros", "model.layers.14.mlp.down_proj.zeros", "model.layers.14.mlp.up_proj.zeros", "model.layers.15.self_attn.q_proj.zeros", "model.layers.15.self_attn.k_proj.zeros", "model.layers.15.self_attn.v_proj.zeros", "model.layers.15.self_attn.o_proj.zeros", "model.layers.15.mlp.gate_proj.zeros", "model.layers.15.mlp.down_proj.zeros", "model.layers.15.mlp.up_proj.zeros", "model.layers.16.self_attn.q_proj.zeros", "model.layers.16.self_attn.k_proj.zeros", "model.layers.16.self_attn.v_proj.zeros", "model.layers.16.self_attn.o_proj.zeros", "model.layers.16.mlp.gate_proj.zeros", "model.layers.16.mlp.down_proj.zeros", "model.layers.16.mlp.up_proj.zeros", "model.layers.17.self_attn.q_proj.zeros", "model.layers.17.self_attn.k_proj.zeros", "model.layers.17.self_attn.v_proj.zeros", "model.layers.17.self_attn.o_proj.zeros", "model.layers.17.mlp.gate_proj.zeros", "model.layers.17.mlp.down_proj.zeros", "model.layers.17.mlp.up_proj.zeros", "model.layers.18.self_attn.q_proj.zeros", "model.layers.18.self_attn.k_proj.zeros", "model.layers.18.self_attn.v_proj.zeros", "model.layers.18.self_attn.o_proj.zeros", "model.layers.18.mlp.gate_proj.zeros", "model.layers.18.mlp.down_proj.zeros", "model.layers.18.mlp.up_proj.zeros", "model.layers.19.self_attn.q_proj.zeros", "model.layers.19.self_attn.k_proj.zeros", "model.layers.19.self_attn.v_proj.zeros", "model.layers.19.self_attn.o_proj.zeros", "model.layers.19.mlp.gate_proj.zeros", "model.layers.19.mlp.down_proj.zeros", "model.layers.19.mlp.up_proj.zeros", "model.layers.20.self_attn.q_proj.zeros", "model.layers.20.self_attn.k_proj.zeros", "model.layers.20.self_attn.v_proj.zeros", "model.layers.20.self_attn.o_proj.zeros", "model.layers.20.mlp.gate_proj.zeros", "model.layers.20.mlp.down_proj.zeros", "model.layers.20.mlp.up_proj.zeros", "model.layers.21.self_attn.q_proj.zeros", "model.layers.21.self_attn.k_proj.zeros", "model.layers.21.self_attn.v_proj.zeros", "model.layers.21.self_attn.o_proj.zeros", "model.layers.21.mlp.gate_proj.zeros", "model.layers.21.mlp.down_proj.zeros", "model.layers.21.mlp.up_proj.zeros", "model.layers.22.self_attn.q_proj.zeros", "model.layers.22.self_attn.k_proj.zeros", "model.layers.22.self_attn.v_proj.zeros", "model.layers.22.self_attn.o_proj.zeros", "model.layers.22.mlp.gate_proj.zeros", "model.layers.22.mlp.down_proj.zeros", "model.layers.22.mlp.up_proj.zeros", "model.layers.23.self_attn.q_proj.zeros", "model.layers.23.self_attn.k_proj.zeros", "model.layers.23.self_attn.v_proj.zeros", "model.layers.23.self_attn.o_proj.zeros", "model.layers.23.mlp.gate_proj.zeros", "model.layers.23.mlp.down_proj.zeros", "model.layers.23.mlp.up_proj.zeros", "model.layers.24.self_attn.q_proj.zeros", "model.layers.24.self_attn.k_proj.zeros", "model.layers.24.self_attn.v_proj.zeros", "model.layers.24.self_attn.o_proj.zeros", "model.layers.24.mlp.gate_proj.zeros", "model.layers.24.mlp.down_proj.zeros", "model.layers.24.mlp.up_proj.zeros", "model.layers.25.self_attn.q_proj.zeros", "model.layers.25.self_attn.k_proj.zeros", "model.layers.25.self_attn.v_proj.zeros", "model.layers.25.self_attn.o_proj.zeros", "model.layers.25.mlp.gate_proj.zeros", "model.layers.25.mlp.down_proj.zeros", "model.layers.25.mlp.up_proj.zeros", "model.layers.26.self_attn.q_proj.zeros", "model.layers.26.self_attn.k_proj.zeros", "model.layers.26.self_attn.v_proj.zeros", "model.layers.26.self_attn.o_proj.zeros", "model.layers.26.mlp.gate_proj.zeros", "model.layers.26.mlp.down_proj.zeros", "model.layers.26.mlp.up_proj.zeros", "model.layers.27.self_attn.q_proj.zeros", "model.layers.27.self_attn.k_proj.zeros", "model.layers.27.self_attn.v_proj.zeros", "model.layers.27.self_attn.o_proj.zeros", "model.layers.27.mlp.gate_proj.zeros", "model.layers.27.mlp.down_proj.zeros", "model.layers.27.mlp.up_proj.zeros", "model.layers.28.self_attn.q_proj.zeros", "model.layers.28.self_attn.k_proj.zeros", "model.layers.28.self_attn.v_proj.zeros", "model.layers.28.self_attn.o_proj.zeros", "model.layers.28.mlp.gate_proj.zeros", "model.layers.28.mlp.down_proj.zeros", "model.layers.28.mlp.up_proj.zeros", "model.layers.29.self_attn.q_proj.zeros", "model.layers.29.self_attn.k_proj.zeros", "model.layers.29.self_attn.v_proj.zeros", "model.layers.29.self_attn.o_proj.zeros", "model.layers.29.mlp.gate_proj.zeros", "model.layers.29.mlp.down_proj.zeros", "model.layers.29.mlp.up_proj.zeros", "model.layers.30.self_attn.q_proj.zeros", "model.layers.30.self_attn.k_proj.zeros", "model.layers.30.self_attn.v_proj.zeros", "model.layers.30.self_attn.o_proj.zeros", "model.layers.30.mlp.gate_proj.zeros", "model.layers.30.mlp.down_proj.zeros", "model.layers.30.mlp.up_proj.zeros", "model.layers.31.self_attn.q_proj.zeros", "model.layers.31.self_attn.k_proj.zeros", "model.layers.31.self_attn.v_proj.zeros", "model.layers.31.self_attn.o_proj.zeros", "model.layers.31.mlp.gate_proj.zeros", "model.layers.31.mlp.down_proj.zeros", "model.layers.31.mlp.up_proj.zeros". size mismatch for model.layers.0.self_attn.q_proj.scales: copying a param with shape torch.Size([4096, 1]) from checkpoint, the shape in current model is torch.Size([1, 4096]). size mismatch for model.layers.0.self_attn.k_proj.scales: copying a param with shape torch.Size([4096, 1]) from checkpoint, the shape in current model is torch.Size([1, 4096]). size mismatch for model.layers.0.self_attn.v_proj.scales: copying a param with shape torch.Size([4096, 1]) from checkpoint, the shape in current model is torch.Size([1, 4096]). size mismatch for model.layers.0.self_attn.o_proj.scales: copying a param with shape torch.Size([4096, 1]) from checkpoint, the shape in current model is torch.Size([1, 4096]). size mismatch for model.layers.0.mlp.gate_proj.scales: copying a param with shape torch.Size([11008, 1]) from checkpoint, the shape in current model is torch.Size([1, 11008]). size mismatch for model.layers.0.mlp.down_proj.scales: copying a param with shape torch.Size([4096, 1]) from checkpoint, the shape in current model is torch.Size([1, 4096]). size mismatch for model.layers.0.mlp.up_proj.scales: copying a param with shape torch.Size([11008, 1]) from checkpoint, the shape in current model is torch.Size([1, 11008]). size mismatch for model.layers.1.self_attn.q_proj.scales: copying a param with shape torch.Size([4096, 1]) from checkpoint, the shape in current model is torch.Size([1, 4096]). size mismatch for model.layers.1.self_attn.k_proj.scales: copying a param with shape torch.Size([4096, 1]) from checkpoint, the shape in current model is torch.Size([1, 4096]). size mismatch for model.layers.1.self_attn.v_proj.scales: copying a param with shape torch.Size([4096, 1]) from checkpoint, the shape in current model is torch.Size([1, 4096]). size mismatch for model.layers.1.self_attn.o_proj.scales: copying a param with shape torch.Size([4096, 1]) from checkpoint, the shape in current model is torch.Size([1, 4096]). size mismatch for model.layers.1.mlp.gate_proj.scales: copying a param with shape torch.Size([11008, 1]) from checkpoint, the shape in current model is torch.Size([1, 11008]). size mismatch for model.layers.1.mlp.down_proj.scales: copying a param with shape torch.Size([4096, 1]) from checkpoint, the shape in current model is torch.Size([1, 4096]). size mismatch for model.layers.1.mlp.up_proj.scales: copying a param with shape torch.Size([11008, 1]) from checkpoint, the shape in current model is torch.Size([1, 11008]). size mismatch for model.layers.2.self_attn.q_proj.scales: copying a param with shape torch.Size([4096, 1]) from checkpoint, the shape in current model is torch.Size([1, 4096]). size mismatch for model.layers.2.self_attn.k_proj.scales: copying a param with shape torch.Size([4096, 1]) from checkpoint, the shape in current model is torch.Size([1, 4096]). size mismatch for model.layers.2.self_attn.v_proj.scales: copying a param with shape torch.Size([4096, 1]) from checkpoint, the shape in current model is torch.Size([1, 4096]). size mismatch for model.layers.2.self_attn.o_proj.scales: copying a param with shape torch.Size([4096, 1]) from checkpoint, the shape in current model is torch.Size([1, 4096]).

infinitylogesh commented 1 year ago

+1 I am getting this error too. Any help on this would be great !

amrrs commented 1 year ago

Did you install the right version of transformers?

ka4on commented 1 year ago

Same issue here

wilson-go-3m41l commented 1 year ago

I got it working by reshaping the layer/weight in question.

It run fine until "Warming up autotune cache ..." and produce "python: /project/lib/Analysis/Allocation.cpp:42: std::pair<llvm::SmallVector, llvm::SmallVector > mlir::triton::getCvtOrder(const mlir::Attribute&, const mlir::Attribute&): Assertion `!(srcMmaLayout && dstMmaLayout) && "Unexpected mma -> mma layout conversion"' failed." error. I don't know if it is my gpu or something else. You could try it and give the heads up if it is any success.

the code for conversion.

filepath = "./error_log_layers"

file = open(filepath)

layers = []
for line in file:
    line = line.replace('\n', '')
    layers.append(line)

import torch

model = torch.load("./llama-7b-4bit.pt")

for layer in model:
    if layer in layers:
        model[layer] = torch.reshape(model[layer], (1, -1))`

torch.save(model, "./test.pt")

in this case the error log layers, are the layer in question.