fix: partially support image-text-to-text models on HuggingFaceLocalChatGenerator#10928
Open
srini047 wants to merge 1 commit intodeepset-ai:mainfrom
Open
fix: partially support image-text-to-text models on HuggingFaceLocalChatGenerator#10928srini047 wants to merge 1 commit intodeepset-ai:mainfrom
srini047 wants to merge 1 commit intodeepset-ai:mainfrom
Conversation
|
@srini047 is attempting to deploy a commit to the deepset Team on Vercel. A member of the Team first needs to authorize it. |
8030e14 to
4d345be
Compare
anakin87
requested changes
Mar 26, 2026
| - `text-generation`: Supported by decoder models, like GPT. | ||
| - `text2text-generation`: Deprecated as of Transformers v5; use `text-generation` instead. | ||
| Previously supported by encoder–decoder models such as T5. | ||
| - `image-text-to-text`: Supported by vision-language models, like Qwen2-VL. |
Member
There was a problem hiding this comment.
Suggested change
| - `image-text-to-text`: Supported by vision-language models, like Qwen2-VL. | |
| - `image-text-to-text`: Supported by vision-language models. |
This would need less updates in the future
Comment on lines
+168
to
+170
| @patch("haystack.components.generators.chat.hugging_face_local.transformers") | ||
| def test_init_text2text_generation_raises_error(self, version_mock): | ||
| version_mock.__version__ = "5.0.0" |
Member
There was a problem hiding this comment.
should not be needed since we run tests with >=5.0.0
Comment on lines
+856
to
+857
| @patch("haystack.components.generators.chat.hugging_face_local.pipeline") | ||
| def test_run_image_text_to_text(self, pipeline_init_mock, model_info_mock, chat_messages): |
Member
There was a problem hiding this comment.
1.test_run_image_text_to_text test can be removed
2. I'd add a very simple test like this: if the initialization is successful, we are OK (it's currently failing on main)
llm = HuggingFaceLocalChatGenerator(model="Qwen/Qwen3.5-0.8B")
assert llm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Related Issues
image-text-to-texttask support toHuggingFaceLocalChatGenerator#10926Proposed Changes:
Currently haystack doesn't support
image-text-to-textgeneration. Hence, adding support for the same.How did you test it?
Add test cases and mocked those by validating it.
Notes to the reviewer
If you want me to revert the changes for
test_init_text2text_generation_raises_errorlet me know.Checklist
fix:,feat:,build:,chore:,ci:,docs:,style:,refactor:,perf:,test:and added!in case the PR includes breaking changes.