ChatGLM-6B
ChatGLM-6B copied to clipboard
The following operation failed in the TorchScript interpreter.
Is there an existing issue for this?
- [X] I have searched the existing issues
Current Behavior
bash train.sh
Expected Behavior
No response
Steps To Reproduce
Traceback of TorchScript (most recent call last):
File "/root/.cache/huggingface/modules/transformers_modules/chatglm-6b/modeling_chatglm.py", line 201, in
F.embedding(position_id, sin.squeeze(1)).unsqueeze(2)
q, k = (q * cos) + (rotate_half(q) * sin), (k * cos) + (rotate_half(k) * sin)
~~~~~~~ <--- HERE
return q, k
RuntimeError: The size of tensor a (512) must match the size of tensor b (21) at non-singleton dimension 0
Environment
OS: Ubuntu 20.04
Python: 3.8
Transformers: 4.27.1
PyTorch: 1.12
CUDA Support: True
Anything else?
No response