Skip to content

Add NPU support for Llava#1446

Open
HelloWorldBeginner wants to merge 1 commit intohaotian-liu:mainfrom
HelloWorldBeginner:main
Open

Add NPU support for Llava#1446
HelloWorldBeginner wants to merge 1 commit intohaotian-liu:mainfrom
HelloWorldBeginner:main

Conversation

@HelloWorldBeginner
Copy link
Copy Markdown

[NPU] Support Llava training and inference for Ascend NPU.

I've modified some codes to add support for NPU, allowing LLAVA to perform both training and inference on NPU.
It works fine on NPU.
NPU Training
image
NPU Evaluate
image
NPU Inference
image

@HelloWorldBeginner
Copy link
Copy Markdown
Author

HelloWorldBeginner commented May 6, 2024

Hi @haotian-liu
Can you review my codes?

@MengqingCao
Copy link
Copy Markdown

cool! It helps for NPU users like me, thx!

@xslasd
Copy link
Copy Markdown

xslasd commented May 23, 2024

非常棒,我运行起来了

@zmf2022
Copy link
Copy Markdown

zmf2022 commented May 27, 2024

when I run this code,RuntimeError: "slow_conv2d_cpu" not implemented for 'Half'

@ReyRen
Copy link
Copy Markdown

ReyRen commented Jun 4, 2024

size mismatch for O.weight: copying a param with shape torch.Size ([4096, 1024]) from checkpoint, the shape in current model is torch.!
size mismatch for O. bias: copying a param with shape torch.Size ( [4096]) from checkpoint, the shape in current model is torch.Size ([0]
size mismatch for 2.weight: copying a param with shape torch.Size([4096, 4096]) from checkpoint, the shape in current model is torch.
size mismatch for 2.bias: copying a param with shape torch.Size ([40961) from checkpoint,
the shape in current model is torch.Size([0].

@HelloWorldBeginner When I run with thses commits, the error occured like above. Can you please give me some hints? thx

@ReyRen
Copy link
Copy Markdown

ReyRen commented Jun 13, 2024

I get "RuntimeError: The size of tensor a (32) must match the size of tensor b (1258) at non-singleton dimension 3" error, need help, please.

@Yangr116
Copy link
Copy Markdown

Yangr116 commented Aug 5, 2024

Can you reproduce the results using NPU? @HelloWorldBeginner

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

Successfully merging this pull request may close these issues.

6 participants