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

Updates in VisionLanguageCollator and in coco_captions #563

Merged
merged 27 commits into from
Oct 1, 2024

Conversation

nikg4
Copy link
Collaborator

@nikg4 nikg4 commented Sep 27, 2024

-- Update coco_captions to load image bytes from example["image"]["bytes"] if available (i.e., prefer to use IMAGE_BINARY over IMAGE_PATH when possible)
-- Raise more descriptive error messages if one of expected keys is missing in examples /items respectively
-- Add minimal_multimodal_training.py to VSCode launch config
-- Misc minor clean-ups

Tested with local coco_captions dataset.

Towards OPE-353
Fixes OPE-354

Copy link

linear bot commented Sep 27, 2024

OPE-353 Make sure HuggingFace vision models are supported with lema platform

List of model architectures supported by HuggingFace that we could support.

Model that were tested with this script:

  • "blip-2"

  • "blip"

  • "chameleon"

  • "idefics"

  • "idefics2"

  • "idefics3"

  • "instructblip"

  • "llava"

  • "paligemma"

  • "qwen2_vl"

  • "vipllava"

@nikg4 nikg4 changed the title Updates in coco_captions dataset and in VisionLanguageCollator Updates in VisionLanguageCollator and in coco_captions Sep 27, 2024
@nikg4 nikg4 marked this pull request as ready for review September 27, 2024 22:31
Copy link

linear bot commented Sep 27, 2024

images = []
text_inputs = []
for item in batch:
for required_key in (_PIXEL_VALUES_KEY, _INPUT_IDS_KEY):
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure if these are necessarily always required -- a vision/language model can handle text only inputs (e.g. a follow-up to an answer) and image only inputs (e.g. captioning)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added TODO to reconsider this . Note that this PR just raises a better error message, it doesn't change validation condition

@nikg4 nikg4 merged commit 4cc82d6 into main Oct 1, 2024
1 check passed
@nikg4 nikg4 deleted the xrdaukar/gx-llava-gcp branch October 1, 2024 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants