Skip to content

Conversation

NathanHB
Copy link
Member

@NathanHB NathanHB commented Apr 15, 2025

Aims to add multimodal support for transformers model by creating the VLMTransformersModel.

  • Adds the MMMU task

  • modify the prompt manager to support multimodal input (images for now)

  • adds a lighteval accelerate vlm cli entry for creating the right config and using the VLMTransformersModel

  • tests failing is because of shortcut it's normal

To test / use:

uv run lighteval accelerate "model_name=HuggingFaceTB/SmolVLM-Instruct" "lighteval|mmmu_pro|0|0" --use-chat-template

@HuggingFaceDocBuilderDev
Copy link
Collaborator

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need working will mainly be here, first is to have the greedy untill function working

Comment on lines 498 to 502
# TODO: What is the best option to pass images to the requests?
# dirty hack for now
for reqs in requests.values():
for req in reqs:
req.specific = formatted_doc.specific
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the best option to pass images to the requests?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for now it would be using specifics but we could also add an images field to the request that default to None

Copy link
Contributor

@qubvel qubvel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @NathanHB, thanks for reviewing the PR. As we discussed internally, the only thing left is the tests, and the rest can be merged in the current state.

I also plan to conduct more experiments to evaluate VLM models after my vacation, and maybe, we will already have some user feedback to improve the evaluation.

I also left some comments, feel free to resolve them (if needed) while adding tests 🤗 Thanks!

@NathanHB
Copy link
Member Author

hey @qubvel Taking care of adding tests and removing unneded stuff, thank you so much for the help in adding this feature :)

@NathanHB NathanHB linked an issue May 15, 2025 that may be closed by this pull request
@NathanHB NathanHB changed the title Adds multimodal support Adds multimodal support and MMMU pro May 19, 2025
@NathanHB NathanHB merged commit 1607dc1 into main May 19, 2025
5 checks passed
hynky1999 pushed a commit that referenced this pull request May 22, 2025
```
uv run lighteval accelerate "model_name=HuggingFaceTB/SmolVLM-Instruct" "lighteval|mmmu_pro|0|0" --use-chat-template --vision-model
```

---------

Co-authored-by: qubvel <[email protected]>
NathanHB added a commit that referenced this pull request Sep 19, 2025
```
uv run lighteval accelerate "model_name=HuggingFaceTB/SmolVLM-Instruct" "lighteval|mmmu_pro|0|0" --use-chat-template --vision-model
```

---------

Co-authored-by: qubvel <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FT] Add multimodal for transformers models

3 participants