Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InternLM-XComposer2-4KHD-7B 多卡推理 #274

Open
Cloopen-ReLiNK opened this issue Apr 17, 2024 · 2 comments
Open

InternLM-XComposer2-4KHD-7B 多卡推理 #274

Cloopen-ReLiNK opened this issue Apr 17, 2024 · 2 comments
Assignees

Comments

@Cloopen-ReLiNK
Copy link

No description provided.

@Cloopen-ReLiNK
Copy link
Author

RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:2 and cuda:0! (when checking argument for argument weight in method wrapper_CUDA__cudnn_convolution)

@Kyoani-0718
Copy link

Kyoani-0718 commented May 31, 2024

Did you use lora to fine-tune it? Just load your model like this:

model = AutoPeftModelForCausalLM.from_pretrained(
    '//InternLM-XComposer/finetune/output/lora_finetune_1',
    # device_map="auto",
    trust_remote_code=True
).cuda().eval()

tokenizer = AutoTokenizer.from_pretrained('internlm/internlm-xcomposer2-4khd-7b', trust_remote_code=True)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants