Skip to content

[Community contributions] Model cards #36979

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

Open
stevhliu opened this issue Mar 25, 2025 · 89 comments · Fixed by #37052, #37076, #37156, #37184 or #37261
Open

[Community contributions] Model cards #36979

stevhliu opened this issue Mar 25, 2025 · 89 comments · Fixed by #37052, #37076, #37156, #37184 or #37261

Comments

@stevhliu
Copy link
Member

stevhliu commented Mar 25, 2025

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:

  1. 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.
  2. Include a brief description of the model (what makes it unique/different) written in a way that's accessible to everyone.
  3. 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.
  4. 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:

Image

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
<div style="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]
> 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 generate text based on an image with [`Pipeline`] or the [`AutoModel`] class.

<hfoptions id="usage">
<hfoption id="Pipeline>

insert pipeline code here

</hfoption>
<hfoption id="AutoModel">

add AutoModel code here

</hfoption>
<hfoption id="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
<div class="flex justify-center">
    <img src=""/>
</div>

## Notes

- Any other model-specific notes should go here.

   \```py
    <insert relevant code snippet here related to the note if its available>
   \ ```

For examples, take a look at #36469 or the BERT, Llama, Llama 2, Gemma 3, PaliGemma, ViT, and Whisper model cards on the main version of the docs.

Once you're done or if you have any questions, feel free to ping @stevhliu to review. Don't add fix to 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

@devesh-2002
Copy link
Contributor

Hi. I would like to work on model card for gemma 2.

@NahieliV
Copy link
Contributor

Hi. I would like to work on model card for mistral.

@NahieliV
Copy link
Contributor

Hi @stevhliu , this is my first contribution so I have a really basic question . Should I clone every repo under mistralai? I just cloned the repo mistralai/Ministral-8B-Instruct-2410, but there are many other repos under mistralai. It's ok if I need to, but I just want to be sure.

@capnmav77
Copy link

Hey , I would like to work on the model card for llama3 .

@stevhliu
Copy link
Member Author

Hey @NahieliV, welcome! You only need to modify the mistral.md file. This is just for the model cards in the Transformers docs rather than the Hub.

@arkhamHack
Copy link
Contributor

Hey @stevhliu I would like to work on the model card for qwen2_5_vl.

@hesamsheikh
Copy link

@stevhliu Is it not possible to automate with an LLM?

@AbhishekRP2002
Copy link
Contributor

hi @stevhliu i would be super grateful if you can let me work on the model card for code_llama

@bimal-gajera
Copy link
Contributor

Hey @stevhliu, I would like to work on the cohere model card.

@ash-01xor
Copy link
Contributor

Hey @stevhliu , i would like to contribute to gpt2 model card

@saumanraaj
Copy link

Hey @stevhliu , I would like to contribute to vitpose model card

@Wu-n0
Copy link
Contributor

Wu-n0 commented Mar 28, 2025

Hey @stevhliu, I would like to work on the electra model card

@shubham0204
Copy link
Contributor

shubham0204 commented Mar 28, 2025

@stevhliu I will update the model card for depth_anything.
PR: #37065

@darmasrmez
Copy link

Hey @stevhliu , I would like to contribute to mixtral model card

@ash-01xor
Copy link
Contributor

ash-01xor commented Mar 29, 2025

To the folks who have been raising PR so far , just have a doubt did you get to install flax , tf-keras , sentencepiece etc.
Before making the changes, I'm trying to set up the environment following the steps here: https://github.com/huggingface/transformers/tree/main/docs.
Currently, I'm trying to build the documentation, but I repeatedly encounter errors such as Unable to register cuDNN factory: and the library installation errors. So would like to know if I am missing any steps or if all these library installations are necessary for making the changes

EDIT : Got it up and running, had to install all the libraries to make it run successfully. Initially felt doubtful about the need to install all the libraries such as flax but yea seems like it has to be installed too.

@arpitsinghgautam
Copy link

Hey @stevhliu, I would like to work on the phi3 model card

@shubham0204
Copy link
Contributor

To the folks who have been raising PR so far , just have a doubt did you get to install flax , tf-keras , sentencepiece etc. Before making the changes, I'm trying to set up the environment following the steps here: https://github.com/huggingface/transformers/tree/main/docs. Currently, I'm trying to build the documentation, but I repeatedly encounter errors such as Unable to register cuDNN factory: and the library installation errors. So would like to know if I am missing any steps or if all these library installations are necessary for making the changes

As you just going to edit the docs, you need not have a complete development setup. Fork the transformers repo, checkout a new branch, and start updating the Markdown document of your choice in the docs/source/en/model_doc directory.

@Shoumik-Gandre
Copy link

Hey @stevhliu I have made the suggested changes to deberta - #37409

Apologies for the wait. Busy month.

@BryanBradfo
Copy link
Contributor

Hi @stevhliu,

Continuing with the model card updates, I would like to work on the following models next:

  • pixtral
  • shieldgemma2

Please let me know if these are still available and okay for me to take on. Thanks!

@KsuParkhamchuk
Copy link

Hello @stevhliu, worked on RoFormer card update in #37946
Please let me know if any adjustments needed from my side, thanks

yuanjua added a commit to yuanjua/transformers that referenced this issue May 4, 2025
yuanjua added a commit to yuanjua/transformers that referenced this issue May 4, 2025
yuanjua added a commit to yuanjua/transformers that referenced this issue May 4, 2025
RogerSinghChugh added a commit to RogerSinghChugh/transformers that referenced this issue May 5, 2025
@RogerSinghChugh
Copy link

Hi @stevhliu, have created a PR(#37959) for BigBird.
Please let me know if I need to make any changes. Thanks a lot.

@RogerSinghChugh
Copy link

Hi @stevhliu, continuing on my work I would love to update the BERTweet model card too, will raise a PR asap.
Thanks.

@RogerSinghChugh
Copy link

Hi @stevhliu, continuing on my work I would love to update the BERTweet model card too, will raise a PR asap. Thanks.

@stevhliu I have created a PR for BERTweet in #37981. Please let me know if I need to make any changes. Thanks a lot.

@GSNCodes
Copy link

GSNCodes commented May 7, 2025

Hey @stevhliu ,
I'd like to take up Segformer :)

@1himan
Copy link

1himan commented May 12, 2025

Hello @stevhliu, I've created a PR for ALIGN(the top 2nd model on the list). This is the one.

@alvarotorro
Copy link

alvarotorro commented May 13, 2025

Hi @stevhliu, I initially started with bartpho but it already has a model card. I would now like to contribute the model card for gemma, which I confirmed is implemented and currently undocumented.

@1himan
Copy link

1himan commented May 14, 2025

What is happening? Nobody's reviewing our PRs and merging them in the main codebase, it has been days since @stevhliu was actively reviewing our PRs? Is there anyone else in the community who can do the reviewing instead of him?

zucchini-nlp pushed a commit to zucchini-nlp/transformers that referenced this issue May 14, 2025
* Update code_llama.md

aims to handle huggingface#36979 (comment)

sub part of huggingface#36979

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

Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>

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

Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>

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

Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>

* make changes as per code review

* chore: make the function smaller for attention mask visualizer

* chore[docs]: update code_llama.md with some more suggested changes

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

Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>

* chore[docs] : Update code_llama.md with indentation changes

---------

Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
@mreraser
Copy link
Contributor

Hi everyone! I'd love to contribute as well. Is anyone currently working on vit_mae? If not, I'd be happy to take it on.

@udapy
Copy link

udapy commented May 17, 2025

Hi @stevhliu,
I would like to work on smolvlm model card.
Thanks.

@Aguedoom
Copy link

Hi everyone and @stevhliu, I'm actually working on BioGPT, I would like to claim it, thanks.

@stevhliu
Copy link
Member Author

Hey friends, sorry for the delay, I was on vacation but I'm back now and will be working on reviewing all your PRs over the next few days. Thanks for your patience! 🤗

@alvarotorro, bartpho doesn't look like it has been standardized yet whereas gemma has. Would you still like to work on bartpho?

@sezan92
Copy link

sezan92 commented May 22, 2025

Hello i want to take the cvt model card if it is okay

@EmileAydar
Copy link

Hi @stevhliu , I'd like to work on the altclip model card.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment