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

Please use params.SetInputs for phi3v. AppendTokens is not supported for this model type. #1151

Closed
shahizat opened this issue Dec 16, 2024 · 7 comments · Fixed by #1152
Closed

Comments

@shahizat
Copy link

Greetings to all,

I was running an inference of the Phi-3.5-vision-instruct-onnx model on the NVIDIA Jetson AGX Orin 64GB Developer Kit, following the guide provided by @kunal-vaishnavi. Thank you, I was successful in building ONNX Runtime GenAI on NVIDIA JetPack 6.1, but I encountered the issue below.

I ran the command:

python phi3v.py -m ./gpu/gpu-int4-rtn-block-32/ -p cuda

The log output was:
Loading model... Model loaded Image Path (comma separated; leave empty if no image): test2.jpg Using image: test2.jpg Prompt: describe Processing images and prompt... Generating response... Traceback (most recent call last): File "/home/jetson/Projects/tensorrtllm/Phi-3.5-vision-instruct-onnx/phi3v.py", line 141, in <module> run(args) File "/home/jetson/Projects/tensorrtllm/Phi-3.5-vision-instruct-onnx/phi3v.py", line 99, in run generator = og.Generator(model, params) RuntimeError: Please use params.SetInputs for phi3v. AppendTokens is not supported for this model type.

Thanks in advance for your help!

@kunal-vaishnavi kunal-vaishnavi linked a pull request Dec 16, 2024 that will close this issue
aciddelgado added a commit that referenced this issue Dec 18, 2024
### Fix SetInputs for Multi-Modal Models

#### Description
This PR addresses an issue where `SetInputs`, which is used with
multi-modal models like phi3v and whisper, was broken. The error
encountered was:

```
RuntimeError: Please use params.SetInputs for phi3v. AppendTokens is not supported for this model type.
```

#### Root Cause
The error was caused because `AppendTokens` is an API only meant to be
used by models that support it. However, in the case of multi modal
models, it was called internally during the construction of the
generator to process inputs, leading to the runtime error.

#### Fix
This PR avoids calling `AppendTokens` internally, thereby fixing the
issue with `SetInputs` on multi-modal models. It also fixes this issue:
#1151.
@kunal-vaishnavi
Copy link
Contributor

Thanks for reporting this issue. The linked PR fixes this error.

@shahizat
Copy link
Author

Hello @kunal-vaishnavi, thanks for your prompt help!!

@shahizat
Copy link
Author

Hello @kunal-vaishnavi, I mentioned you in my blog post. Thanks a lot for your help!!

https://www.hackster.io/shahizat/running-microsoft-s-phi-3-5-vision-on-nvidia-jetson-platform-8c69a6

@kunal-vaishnavi
Copy link
Contributor

Hello @kunal-vaishnavi, I mentioned you in my blog post. Thanks a lot for your help!!

https://www.hackster.io/shahizat/running-microsoft-s-phi-3-5-vision-on-nvidia-jetson-platform-8c69a6

Thank you for the mention! Great blog post!

@shahizat
Copy link
Author

shahizat commented Jan 3, 2025

Hi @kunal-vaishnavi, I'm happy to inform you that @johnnynunez has successfully dockerized the onnxruntime-genai. And it's now ready to be used within the @dusty-nv 's jetson-containers project, thanks to his efforts.

dusty-nv/jetson-containers#767

@kunal-vaishnavi
Copy link
Contributor

Hi @kunal-vaishnavi, I'm happy to inform you that @johnnynunez has successfully dockerized the onnxruntime-genai. And it's now ready to be used within the @dusty-nv 's jetson-containers project, thanks to his efforts.

dusty-nv/jetson-containers#767

That's great to see! As a heads up, a new stable release is expected to be published this month.

@shahizat
Copy link
Author

hello @kunal-vaishnavi, Thanks for your information. If possible, you can join our Jetson AI Lab Research Group Discord channel: https://discord.gg/N4E5UCb2 ,I'd be glad to see you there. @dusty-nv and @johnnynunez are also there.

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

Successfully merging a pull request may close this issue.

2 participants