You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are currently in the process of improving the Transformers model cards by making them more directly useful for everyone. The main goal is to:
Standardize all model cards with a consistent format so users know what to expect when moving between different model cards or trying to learn how to use a new model.
Include a brief description of the model (what makes it unique/different) written in a way that's accessible to everyone.
Provide ready to use code examples featuring the Pipeline, AutoModel, and transformers-cli with available optimizations included. For large models, provide a quantization example so its easier for everyone to run the model.
Include an attention mask visualizer for currently supported models to help users visualize what a model is seeing (refer to Add attention visualization tool #36630) for more details.
Compare the before and after model cards below:
With so many models in Transformers, we could really use some a hand with standardizing the existing model cards. If you're interested in making a contribution, pick a model from the list below and then you can get started!
Steps
Each model card should follow the format below. You can copy the text exactly as it is!
# add appropriate badges
<divstyle="float: right;">
<div class="flex flex-wrap space-x-1"> <img alt="" src="" ></div>
</div>
# Model name[Model name](https://huggingface.co/papers/...) ...
A brief description of the model and what makes it unique/different. Try to write this like you're talking to a friend.
You can find all the original [Model name] checkpoints under the [Model name](link) collection.
> [!TIP]> This model was contributed by [author](link to Hub profile).>> Click on the [Model name] models in the right sidebar for more examples of how to apply [Model name] to different [insert task types here] tasks.
The example below demonstrates how to [insert task here] with [`Pipeline`] or the [`AutoModel`] class.
<hfoptionsid="usage">
<hfoption id="Pipeline>
insert pipeline code here
</hfoption>
<hfoptionid="AutoModel">
add AutoModel code here
</hfoption>
<hfoptionid="transformers-cli">
add transformers-cli usage here if applicable/supported, otherwise close the hfoption block
</hfoption>
</hfoptions>
Quantization reduces the memory burden of large models by representing the weights in a lower precision. Refer to the [Quantization](../quantization/overview) overview for more available quantization backends.
The example below uses [insert quantization method here](link to quantization method) to only quantize the weights to __.
# add if this is supported for your model
Use the [AttentionMaskVisualizer](https://github.com/huggingface/transformers/blob/beb9b5b02246b9b7ee81ddf938f93f44cfeaad19/src/transformers/utils/attention_visualizer.py#L139) to better understand what tokens the model can and cannot attend to.
\```py
from transformers.utils.attention_visualizer import AttentionMaskVisualizer
visualizer = AttentionMaskVisualizer("google/gemma-3-4b-it")
visualizer("<img>What is shown in this image?")
\```
# upload image to https://huggingface.co/datasets/huggingface/documentation-images/tree/main/transformers/model_doc and ping me to merge
<divclass="flex justify-center">
<img src=""/>
</div>
## Notes- Any other model-specific notes should go here.
\```py
<insertrelevantcodesnippethererelatedtothenoteifitsavailable>
\ ```
## Resources
add links to external resources only
Hey friends! 👋
We are currently in the process of improving the Transformers model cards by making them more directly useful for everyone. The main goal is to:
Pipeline,AutoModel, andtransformers-cliwith available optimizations included. For large models, provide a quantization example so its easier for everyone to run the model.Compare the before and after model cards below:
With so many models in Transformers, we could really use some a hand with standardizing the existing model cards. If you're interested in making a contribution, pick a model from the list below and then you can get started!
Steps
Each model card should follow the format below. You can copy the text exactly as it is!
For examples, take a look at #36469 or the BERT, Llama, Llama 2, Gemma 3, PaliGemma, ViT, and Whisper model cards on the
mainversion of the docs.Once you're done or if you have any questions, feel free to ping @stevhliu to review. Don't add
fixto your PR to avoid closing this issue.I'll also be right there working alongside you and opening PRs to convert the model cards so we can complete this faster together! 🤗
Models