Skip to content

chore: update model card for SigLIP #37585

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

Merged
merged 9 commits into from
Apr 18, 2025

Conversation

saswatmeher
Copy link
Contributor

What does this PR do?

Update the model card for SigLIP to handle #36979

Fixes #36979

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you write any new necessary tests?

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.
@stevhliu

@github-actions github-actions bot marked this pull request as draft April 17, 2025 15:39
Copy link
Contributor

Hi 👋, thank you for opening this pull request! The pull request is converted to draft by default. The CI will be paused while the PR is in draft mode. When it is ready for review, please click the Ready for review button (at the bottom of the PR page). This will assign reviewers and trigger CI.

@saswatmeher saswatmeher marked this pull request as ready for review April 17, 2025 15:39
@github-actions github-actions bot requested a review from stevhliu April 17, 2025 15:40
Copy link
Member

@stevhliu stevhliu left a comment

Choose a reason for hiding this comment

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

Great job, thanks so much!

... torch_dtype=torch.float16,
... device_map=device,
... )
from transformers import SiglipModel
Copy link
Member

Choose a reason for hiding this comment

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

Indent code here and lets show flash_attention_2 since we're already using "sdpa" above.

# pip install -U flash-attn --no-build-isolation

<code here>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@HuggingFaceDocBuilderDev

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

@stevhliu stevhliu left a comment

Choose a reason for hiding this comment

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

Nice, thanks again! 🤗

@stevhliu stevhliu merged commit 27a25be into huggingface:main Apr 18, 2025
10 checks passed
@saswatmeher saswatmeher deleted the update_modelcard_siglip branch April 19, 2025 03:00
Comment on lines -111 to -112
- [Zero-shot image classification task guide](../tasks/zero_shot_image_classification)
- Demo notebooks for SigLIP can be found [here](https://github.com/NielsRogge/Transformers-Tutorials/tree/master/SigLIP). 🌎
Copy link
Member

Choose a reason for hiding this comment

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

@stevhliu, I'm curious, should we remove links to additional resources?

Copy link
Member

Choose a reason for hiding this comment

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

Hey, great question! I think we should remove these additional resources because imo the docs should only contain official and maintained content. Everything you need to know should ideally be in the docs, and additional resources linking to extra/nice-to-know/supplemental content should be kept somewhere else. When a notebook or blog from the community gets outdated or stops working as expected, its a bit harder to maintain and can also add noise and clutter.

These additional resources are still useful and there is definitely a place for them though! I'm experimenting a bit with creating a "Transformers model resources" Space that will hold all these additional resources. Community members can open PRs to add a notebook or open fixes for it there.

Let me know if that helps answer your question! :)

Copy link
Member

Choose a reason for hiding this comment

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

@stevhliu thanks for answering, having a space indeed a cool idea! However, in my opinion, from a user perspective, it would be super nice to have some "further steps" when you land on the documentation page - so you don't need to search for additional resources and can continue exploring the model. In transformers, we are trying to keep the external API stable, so most of the resources are still relevant even though they are not maintained. Considering the case above

[Zero-shot image classification task guide](../tasks/zero_shot_image_classification)

This one is actually pointing to our internal guide

Demo notebooks for SigLIP can be found [here](https://github.com/NielsRogge/Transformers-Tutorials/tree/master/SigLIP). 🌎

This one is also still working

So, I would be more careful about removing useful materials and doing it only in case some users complain.

cc @NielsRogge as well, because you were the one who added a lot of resources

zucchini-nlp pushed a commit to zucchini-nlp/transformers that referenced this pull request May 14, 2025
* edit siglip model card

* fix syntax

* Update docs/source/en/model_doc/siglip.md

Co-authored-by: Steven Liu <[email protected]>

* Update docs/source/en/model_doc/siglip.md

Co-authored-by: Steven Liu <[email protected]>

* Update docs/source/en/model_doc/siglip.md

Co-authored-by: Steven Liu <[email protected]>

* Update docs/source/en/model_doc/siglip.md

Co-authored-by: Steven Liu <[email protected]>

* Update docs/source/en/model_doc/siglip.md

Co-authored-by: Steven Liu <[email protected]>

* Update docs/source/en/model_doc/siglip.md

Co-authored-by: Steven Liu <[email protected]>

* address comments

---------

Co-authored-by: Steven Liu <[email protected]>
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.

[Community contributions] Model cards
4 participants