Skip to content

[Bug] GLM-4.5-Air-Lora-不要葱姜蒜-trainer = Trainer提示 Cannot copy out of meta tensor #448

@Skypow2012

Description

@Skypow2012

出bug的具体模型

GLM-4.5-Air

出bug的具体模型教程

03-GLM-4.5-Air-Lora.ipynb

教程负责人

不要葱姜蒜

Bug描述

trainer = Trainer(
model=model,
args=args,
train_dataset=tokenized_id,
data_collator=DataCollatorForSeq2Seq(tokenizer=tokenizer, padding=True),
callbacks=[swanlab_callback]
)
这一步提示:
NotImplementedError: Cannot copy out of meta tensor; no data! Please use torch.nn.Module.to_empty() instead of torch.nn.Module.to() when moving module from meta to a different device.

复现步骤

在Ucloud用h20租用单卡,在ipynb切换到py310后,把huanhuan.json上传到【03-GLM-4.5-Air-Lora 及 Swanlab 可视化微调.ipynb】同级目录,并一键运行全部。在 【trainer = Trainer(】这一步报错

期望行为

能开始训练GLM-4.5-Air的Lora

环境信息

python3.10
CUDA 12.4
GPU H20

其他信息

Image

确认事项 / Verification

  • 此问题未在过往Issue中被报告过 / This issue hasn't been reported before

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions