Skip to content

你好,想问一下peft支持多卡吗? #4

Open

Description

@cs-liangchen-work

我这样改成多卡的:
model = get_peft_model(model, peft_config)
model.print_trainable_parameters()
model = torch.nn.DataParallel(model, device_ids=[0, 1, 2, 3, 4, 5, 6, 7])
model = model.half().cuda()
会报错:
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cuda:1! (when checking argument for argument index in method wrapper__index_select)

Activity

  1. thaumstrial commented on Mar 20, 2023

    @thaumstrial
    Owner

    目前正在添加trainer和deepspeed的支持,就可以支持多卡了,或者你换成trainer应该也能支持多卡

  2. thaumstrial commented on Mar 20, 2023

    @thaumstrial
    Owner
  3. cs-liangchen-work commented on Mar 26, 2023

    @cs-liangchen-work
    Author

    成功啦,多谢大佬

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions