adapt llava pipeline to latest Transformers #1344
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
OH main branch is using a old Transformers version which causes a security issue. This PR upgrades this microservice to use latest TF and use the
image-text-to-text
pipeline for general VLM image understanding QA tasks.There are existing code that handle multi-image/non-image cases. However, the handling logics does not work with the new
image-text-to-text
task name. Furthermore, explicitly overwriting the preprocess method only works with specific TF version and is prone to version upgrade. Batching inference also cannot explain the coherence between images (e.g. What are the differences between those 2 given images). Therefore for simplicity, we decide to remove that handling of multi-image inputs but keep the non-image inputs.Issues
n/a
Type of change
List the type of change like below. Please delete options that are not relevant.
Dependencies
latest TF instead of 4.45.2 that currently used by OH
Tests
UT