#1354·ChatGLM3

lora微调报错

Author: jiyuanxiaotulingCreated Mar 3, 2025Updated Mar 10, 2025

System Info / 系統信息

TypeError: empty() received an invalid combination of arguments - got (tuple, dtype=str, device=NoneType), but expected one of:

  • (tuple of ints size, *, tuple of names names, torch.memory_format memory_format = None, torch.dtype dtype = None, torch.layout layout = None, torch.device device = None, bool pin_memory = False, bool requires_grad = False)
  • (tuple of ints size, *, torch.memory_format memory_format = None, Tensor out = None, torch.dtype dtype = None, torch.layout layout = None, torch.device device = None, bool pin_memory = False, bool requires_grad = False)

Who can help? / 谁可以帮助到您?

No response

Information / 问题信息

  • The official example scripts / 官方的示例脚本
  • My own modified scripts / 我自己修改的脚本和任务

Reproduction / 复现过程

python finetune_hf.py后出现bug

Expected behavior / 期待表现

什么问题