Skip to content

Conversation

stevhliu
Copy link
Member

🚧 WIP 🚧

Explores a new design for several of the most commonly visited model docs. It is pretty stripped down at the moment, but we can add back the essentials as needed (or not). The main idea is to only show developers what they need to know to use the model.

  • A badge indicating whether a model supports certain features/frameworks (PyTorch, SDPA, FlashAttention, etc.) in the upper right side of the doc.
  • A brief description of the model and what makes it different. Some of these abstracts just don't tell you that much about the model itself or what makes it unique, while others are very technical and the details probably don't matter that much if you aren't a researcher. The description aims for somewhere in between.
  • Code snippets demonstrating inference with all the optimizations included.

@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.

@stevhliu stevhliu force-pushed the model-doc-design branch 3 times, most recently from f353e9e to 8416e96 Compare March 14, 2025 21:37
Copy link
Collaborator

@ArthurZucker ArthurZucker left a comment

Choose a reason for hiding this comment

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

Very nice thanks! Image should be on the hub I think but LGTM

@stevhliu stevhliu marked this pull request as ready for review March 20, 2025 23:15
@stevhliu stevhliu force-pushed the model-doc-design branch 2 times, most recently from 9a3e0ca to 3d2a172 Compare March 21, 2025 18:22
@stevhliu stevhliu merged commit d253de6 into huggingface:main Mar 21, 2025
10 checks passed
@stevhliu stevhliu deleted the model-doc-design branch March 21, 2025 22:35
Vision Transformer (ViT) attains excellent results compared to state-of-the-art convolutional networks while requiring
substantially fewer computational resources to train.*

<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/vit_architecture.jpg"
Copy link
Contributor

Choose a reason for hiding this comment

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

I noticed this PR removed the architecture image, could we please keep images in the docs?

They are stored at https://huggingface.co/datasets/huggingface/documentation-images.

cc @stevhliu

Copy link
Member Author

Choose a reason for hiding this comment

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

Hi! While the image is a nice extra for users I'm not sure if it adds that much more value to the doc?

In general, I think it's better to move away from the older model card format which mirrored the model papers quite a bit (abstract + architecture image) to give it less of an academic/researchy vibe and something more immediately practical for developers. Users can click on the linked paper, which contains all that info, if they really want to learn more.

I think most users are more interested in just knowing how to use a model for inference and don't care too much about the details of the architecture. I also feel like some of the images are also a bit overwhelming for new users because there's a lot going on visually.

I'm not completely against the idea of removing the architecture image though and I'm open to adding it back 🙂

zucchini-nlp pushed a commit to zucchini-nlp/transformers that referenced this pull request May 14, 2025
* initial

* fix

* fix

* update

* fix

* fixes

* quantization

* attention mask visualizer

* multimodal

* small changes

* fix code samples
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.

4 participants