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

Optimizing PaliGemma to TFLite / TorchScript #470

Open
DarioPTWR opened this issue Jun 24, 2024 · 5 comments
Open

Optimizing PaliGemma to TFLite / TorchScript #470

DarioPTWR opened this issue Jun 24, 2024 · 5 comments
Labels
component:documentation Update docs status:triaged Issue/PR triaged to the corresponding sub-team type:feature request New feature/request/enhancement

Comments

@DarioPTWR
Copy link

Description of the feature request:

Hi, I was wondering if anyone has a conversion script or method that can be used to convert PaliGemma from HuggingFace Transformers to TFLite or TorchScript? Am trying to use it in mobile devices but currently can't seem to find a method that works 100% for this model conversion. Any help is greatly appreciated, thanks!

What problem are you trying to solve with this feature?

No response

Any other information you'd like to share?

No response

@DarioPTWR DarioPTWR added the type:feature request New feature/request/enhancement label Jun 24, 2024
@singhniraj08 singhniraj08 added status:triaged Issue/PR triaged to the corresponding sub-team component:documentation Update docs labels Jun 27, 2024
@haozha111
Copy link

hi @DarioPTWR ,

please take a look at the AI Edge Torch generative API : https://github.com/google-ai-edge/ai-edge-torch/tree/main/ai_edge_torch/generative

@DarioPTWR
Copy link
Author

DarioPTWR commented Aug 23, 2024

hi @haozha111 have taken a look and tried it on my own but seemed to face significant errors in converting the model's layers, are there any working solutions for PaliGemma available that i could reference / get more help in detail? also seems like the generative API now only has working examples for LLMs, will it work for VLMs as well? Thanks and greatly appreciate

@haozha111
Copy link

hi @DarioPTWR

Yes we are actively working on adding multi-modal support for Generative API, and we aim to provide an update on this topic in the near future, thanks!

@DarioPTWR
Copy link
Author

hi @haozha111 thanks for your update! looking forward to the added support, but also want to ask if you are familiar with / aware of any other existing methods to efficiently run PaliGemma (or any VLM) using on-device inference in Android? preferably in TFLite format. thanks!

@yichunk
Copy link

yichunk commented Aug 27, 2024

Hi @DarioPTWR

We are actively working on the image modality support for VLM. At the same time, you can also stay tuned for AiCore from Android https://developer.android.com/ai/aicore, which may provide VLM integration in the near future as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:documentation Update docs status:triaged Issue/PR triaged to the corresponding sub-team type:feature request New feature/request/enhancement
Projects
None yet
Development

No branches or pull requests

4 participants