huggingface / transformers

🤗 Transformers: State-of-the-art Machine Learning for Pytorch, TensorFlow, and JAX.
https://huggingface.co/transformers
Apache License 2.0
134.67k stars 26.93k forks source link

Supporting Padding in llava processor #33175

Open BiEchi opened 2 months ago

BiEchi commented 2 months ago

Feature request

https://github.com/haotian-liu/LLaVA uses padding for pre-processing the images by default. Current transformers implementation does not support that.

Motivation

Request per @NielsRogge at (https://huggingface.co/llava-hf/llava-1.5-7b-hf/discussions/26#66cf46a5a523b74b5f90fa72).

Your contribution

I successfully reproduced logits after conversion if we add padding in the Transformers library.

LysandreJik commented 2 months ago

Thanks for the request @BiEchi! cc @zucchini-nlp