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

Running the example code from Optimum documentation fails #88

Open
salembegic opened this issue Feb 25, 2024 · 4 comments
Open

Running the example code from Optimum documentation fails #88

salembegic opened this issue Feb 25, 2024 · 4 comments

Comments

@salembegic
Copy link

Hello,

I was just trying to get the example code from optimum documentation up and running before I try to get an LLM to run on the NPU, but I keep getting this error: ImportError: cannot import name 'AutoQuantizationConfig' from 'optimum.amd.ryzenai'.

I checked the files and I can't find AutoQuantizationConfig class anywhere. I also checked the versions, and I am on the latest one (optimum - 1.17.1, optimum-amd - 0.1.0)

@fxmarty
Copy link
Contributor

fxmarty commented Feb 26, 2024

Hi @salembegic thank you for the report. Could you try from main?

pip uninstall optimum-amd
pip install git+https://github.com/huggingface/optimum-amd.git

@salembegic
Copy link
Author

Yep, that worked. Thanks for the help.

Just a quick question while I have you here. Is process the same if I wanted to run an LLM on the NPU (so export the model to onnx, quantize for the NPU, and then run), or are there any special steps?

@fxmarty
Copy link
Contributor

fxmarty commented Feb 26, 2024

@salembegic https://github.com/amd/RyzenAI-SW/tree/main/example/transformers dropped last week with an API exposed to PyTorch so it may be easier than going through ONNX + ORT.

We're also working to enable quantization through Brevitas & usage in ONNX but this is WIP.

@salembegic
Copy link
Author

salembegic commented Feb 26, 2024

Awsome, I'll check it out later today. Once again, thanks for the help😁😁.

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

2 participants