huggingface / transformers

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

Pre-training reference URL in Idefics2 codebase #31101

Closed BiliBraker closed 4 months ago

BiliBraker commented 5 months ago

The below snippet from the modeling_idefics2.py script points to "the original codebase", but the link is incorrect. https://github.com/huggingface/transformers/blob/a564d10afe1a78c31934f0492422700f61a0ffc0/src/transformers/models/idefics2/modeling_idefics2.py#L1347-L1349

Could you provide the correct link for the pre-training configuration for Idefics2?

NielsRogge commented 5 months ago

This is due to a Copied from statement from llava: https://github.com/haotian-liu/LLaVA/tree/main/llava.

The link in modeling_idefics2.py should actually be removed

Edit: actually 7 models have this comment, is only applicable for llava

Could you open a PR to remove these links?

BiliBraker commented 5 months ago

Sure, but I've only found 4 models (except llava) with this comment: https://github.com/huggingface/transformers/blob/a564d10afe1a78c31934f0492422700f61a0ffc0/src/transformers/models/llava_next/modeling_llava_next.py#L239 https://github.com/huggingface/transformers/blob/a564d10afe1a78c31934f0492422700f61a0ffc0/src/transformers/models/vipllava/modeling_vipllava.py#L142 https://github.com/huggingface/transformers/blob/a564d10afe1a78c31934f0492422700f61a0ffc0/src/transformers/models/video_llava/modeling_video_llava.py#L134 https://github.com/huggingface/transformers/blob/a564d10afe1a78c31934f0492422700f61a0ffc0/src/transformers/models/idefics2/modeling_idefics2.py#L1349

NielsRogge commented 5 months ago

Ok I was searching on "important: this ported version" which gave me 7 results, feel free to only keep it for llava

BiliBraker commented 5 months ago

Opened the PR! Btw, is there any code related to the pre-training configuration/implementation of Idefics2?

github-actions[bot] commented 4 months ago

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.