Skip to content

RuntimeError: You can't move a model that has some modules offloaded to cpu or disk. #19

@MaggieLiuuu

Description

@MaggieLiuuu

Hi! I was trying to run the inference.ipynb notebook, and I got an RuntimeError.

While I ran model = LlamaForCausalLM.from_pretrained(train_config.model_name, device_map="auto", config=config).to(device) , I got RuntimeError: You can't move a model that has some modules offloaded to cpu or disk.

I guess it is related to the device = "cuda" if torch.cuda.is_available() else "cpu" , but my GPU RAM is available and not full.

How should I do to solve it? Thank you.

Best regards,
Maggie

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions