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
报错:
File "python3.10/site-packages/transformers/tokenization_utils_base.py", line 803, in
self.data = {k: v.to(device=device) for k, v in self.data.items() if v is not None}
AttributeError: 'list' object has no attribute 'to'
我打印了self.data,是一个字典,其中一些 value 是 tensor,一些 value 是被 list 包裹起来的 tensor , 直接 to.('cuda') 就会报这个错误
是否已有关于该错误的issue或讨论? | Is there an existing issue / discussion for this?
该问题是否在FAQ中有解答? | Is there an existing answer for this in FAQ?
当前行为 | Current Behavior
环境配置好之后,运行 :
CUDA_VISIBLE_DEVICES=0 llamafactory-cli train configs/minicpmo_2_6_lora_sft.yaml
报错:
File "python3.10/site-packages/transformers/tokenization_utils_base.py", line 803, in
self.data = {k: v.to(device=device) for k, v in self.data.items() if v is not None}
AttributeError: 'list' object has no attribute 'to'
我打印了self.data,是一个字典,其中一些 value 是 tensor,一些 value 是被 list 包裹起来的 tensor , 直接 to.('cuda') 就会报这个错误
期望行为 | Expected Behavior
正常运行
复现方法 | Steps To Reproduce
照着官方给的 llama-factory 运行
运行环境 | Environment
备注 | Anything else?
No response
The text was updated successfully, but these errors were encountered: