Skip to content

Commit 32fe4ce

Browse files
krampstudiogary149Vaibhavs10pcuenca
authored
Model release checklist (#1647)
* structure * section name and order * update content * Update model-release-checklist.md * Update model-release-checklist.md * Update model-release-checklist.md * Update model-release-checklist.md * fix link * Update docs/hub/model-release-checklist.md Co-authored-by: vb <[email protected]> * Update docs/hub/model-release-checklist.md Co-authored-by: vb <[email protected]> * Update docs/hub/model-release-checklist.md Co-authored-by: vb <[email protected]> * Update docs/hub/model-release-checklist.md Co-authored-by: Pedro Cuenca <[email protected]> * Update docs/hub/model-release-checklist.md Co-authored-by: Pedro Cuenca <[email protected]> * Update docs/hub/model-release-checklist.md Co-authored-by: Pedro Cuenca <[email protected]> * Update docs/hub/model-release-checklist.md Co-authored-by: Pedro Cuenca <[email protected]> * Update docs/hub/model-release-checklist.md Co-authored-by: Pedro Cuenca <[email protected]> * Apply suggestions from code review Co-authored-by: Pedro Cuenca <[email protected]> --------- Co-authored-by: Victor Muštar <[email protected]> Co-authored-by: vb <[email protected]> Co-authored-by: Pedro Cuenca <[email protected]>
1 parent 7345705 commit 32fe4ce

File tree

2 files changed

+173
-0
lines changed

2 files changed

+173
-0
lines changed

docs/hub/_toctree.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@
132132
title: Models Download Stats
133133
- local: models-faq
134134
title: Frequently Asked Questions
135+
- local: model-release-checklist
136+
title: Model Release Checklist
135137
- local: models-advanced
136138
title: Advanced Topics
137139
sections:
Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
# Model(s) Release Checklist
2+
3+
The Hugging Face Hub is the go-to platform for sharing machine learning models. A well-executed release can boost your model's visibility and impact. This section covers essential steps for a concise, informative, and user-friendly model release.
4+
5+
## ⏳ Preparing Your Model for Release
6+
7+
### Writing a Comprehensive Model Card
8+
9+
A well-crafted model card (the `README.md` file in your repository) is essential for discoverability, reproducibility, and effective sharing. Your model card should include:
10+
11+
1. **Metadata Configuration**: The [metadata section](https://huggingface.co/docs/hub/model-cards#model-card-metadata) at the top of your model card (in YAML format) is crucial for discoverability and proper categorization. Be sure to include:
12+
```yaml
13+
---
14+
pipeline_tag: text-generation # Specify the task
15+
library_name: transformers # Specify the library
16+
language:
17+
- en # List language for your model
18+
license: apache-2.0 # Specify a license
19+
datasets:
20+
- username/dataset # List datasets used for training
21+
base_model: username/base-model # If applicable
22+
---
23+
```
24+
25+
2. **Detailed Model Description**: Provide a clear explanation of what your model does, its architecture, and its intended use cases. This helps users quickly understand if your model fits their needs.
26+
27+
3. **Usage Examples**: Provide clear, actionable code snippets that demonstrate how to use your model for inference, fine-tuning, or other common tasks. These examples should be ready to copy and run with minimal modifications.
28+
29+
4. **Technical Specifications**: Include information about training parameters, hardware requirements, and any other technical details that would help users understand how to effectively use your model.
30+
31+
5. **Performance Metrics**: Share comprehensive benchmarks and evaluation results. Include both quantitative metrics and qualitative examples to give users a complete picture of your model's capabilities and limitations.
32+
33+
6. **Limitations and Biases**: Transparently document any known limitations, biases, or ethical considerations associated with your model. This helps users make informed decisions about whether and how to use your model.
34+
35+
36+
### Enhancing Model Discoverability and Usability
37+
38+
To maximize your model's reach and usability:
39+
40+
1. **Library Integration**: If possible, add support for one of the many [libraries integrated with the Hugging Face Hub](https://huggingface.co/docs/hub/models-libraries) (such as Transformers or Diffusers). This integration significantly increases your model's accessibility and provides users with code snippets for working with your model.
41+
42+
For example, to specify that your model works with the Transformers library:
43+
```yaml
44+
---
45+
library_name: transformers
46+
---
47+
```
48+
49+
Bonus: a recognised library also allows you to track downloads of your model over time.
50+
51+
2. **Pipeline Tag Selection**: Choose the correct [pipeline tag](https://huggingface.co/docs/hub/model-cards#specifying-a-task--pipelinetag-) that accurately reflects your model's primary task. This tag determines how your model appears in search results and which widgets are displayed on your model page.
52+
53+
Examples of common pipeline tags:
54+
- `text-generation` - For language models that generate text
55+
- `text-to-image` - For text-to-image generation models
56+
- `image-text-to-text` - For vision-language models (VLMs) that generate text
57+
- `text-to-speech` - For models that generate audio from text
58+
59+
3. **Research Papers**: If your model has associated research papers, you can cite them in your model card and they will be [linked automatically](https://huggingface.co/docs/hub/model-cards#linking-a-paper). This provides academic context, allows users to dive deeper into the theoretical foundations of your work, and increases citations.
60+
61+
```markdown
62+
## References
63+
64+
* [Model Paper](https://arxiv.org/abs/xxxx.xxxxx)
65+
```
66+
67+
4. **Collections**: If you're releasing multiple related models or variants, organize them into a [collection](https://huggingface.co/docs/hub/collections). Collections help users discover related models and understand the relationships between different versions or variants.
68+
69+
5. **Demos**: Create a [Hugging Face Space](https://huggingface.co/docs/hub/spaces) with an interactive demo of your model. This allows users to try your model directly without writing any code, significantly lowering the barrier to adoption. You can also [link the model](https://huggingface.co/docs/hub/spaces-config-reference) from the Space to make it appear on the model page dedicated UI.
70+
71+
```markdown
72+
## Demo
73+
74+
Try this model directly in your browser: [Space Demo](https://huggingface.co/spaces/username/model-demo)
75+
```
76+
77+
6. **Quantized Versions**: Consider uploading quantized versions of your model (e.g., in GGUF or DDUF formats) to improve accessibility for users with limited computational resources. Link these versions using the [`base_model` metadata field](https://huggingface.co/docs/hub/model-cards#specifying-a-base-model) on the quantized model cards. You can also clearly document performance differences between the original and quantized versions.
78+
79+
```yaml
80+
---
81+
base_model: username/original-model
82+
base_model_relation: quantized
83+
---
84+
```
85+
86+
7. **Linking Datasets on the Model Page**: Link datasets in your `README.md` metadata to display those used directly from your model page.
87+
88+
```yaml
89+
---
90+
datasets:
91+
- username/dataset
92+
- username/dataset-2
93+
---
94+
```
95+
96+
8. **New Model Version**: If your model is an update of an existing one, you can specify it on the older version model model card. This will [display a banner](https://huggingface.co/docs/hub/en/model-cards#specifying-a-new-version) on the older model's page linking directly to this updated version.
97+
98+
```yaml
99+
---
100+
new_version: username/updated-model
101+
---
102+
```
103+
104+
9. **Visual Examples**: For image or video generation models, include examples directly on your model page using the [`<Gallery>` card component](https://huggingface.co/docs/hub/en/model-cards-components#the-gallery-component). Visual examples provide immediate insight into your model's capabilities.
105+
106+
```markdown
107+
<Gallery>
108+
![Example 1](./images/example1.png)
109+
![Example 2](./images/example2.png)
110+
</Gallery>
111+
```
112+
113+
10. **Carbon Emissions**: If possible, specify the [carbon emissions](https://huggingface.co/docs/hub/model-cards-co2) associated with training your model. This information helps environmentally conscious users and organizations make informed decisions.
114+
115+
```yaml
116+
---
117+
co2_eq_emissions:
118+
emissions: 123.45
119+
source: "CodeCarbon"
120+
training_type: "pre-training"
121+
geographical_location: "US-East"
122+
hardware_used: "8xA100 GPUs"
123+
---
124+
```
125+
126+
### Access Control and Visibility
127+
128+
1. **Visibility Settings**: Once everything is finalized and you're ready to share your model with the world, switch your model to public visibility in your [model settings](https://huggingface.co/docs/hub/repositories-settings). Before doing so, double-check all documentation and code examples to ensure they're accurate and complete
129+
130+
2. **Gated Access**: If your model requires controlled access, use the [gated access feature](https://huggingface.co/docs/hub/models-gated) and clearly specify the conditions users must meet to gain access. This is particularly important for models with potential dual-use concerns or commercial restrictions.
131+
132+
## 🏁 After Releasing Your Model
133+
134+
A successful model release extends beyond the initial publication. To maximize impact and maintain quality:
135+
136+
### Maintenance and Community Engagement
137+
138+
1. **Verify Functionality**: After release, verify that all provided code snippets work correctly by testing them in a clean environment. This ensures users can successfully implement your model without frustration.
139+
140+
For example, if your model is a transformers compatible LLM, you can try the following code snippet:
141+
```python
142+
from transformers import pipeline
143+
144+
# This should work without errors
145+
pipe = pipeline("text-generation", model="your-username/your-model")
146+
result = pipe("Your test prompt")
147+
```
148+
149+
2. **Promote Your Work**: Share your model through relevant channels such as social media, research communities, etc. Remember that every model represents valuable work that deserves visibility.
150+
151+
3. **Community Interaction**: Engage with users in the Community Tab by answering questions, addressing feedback, and resolving issues quickly. Clarify confusion, adopt useful suggestions, and close off-topic discussions or pull requests to keep the space focused.
152+
153+
### Tracking Usage and Impact
154+
155+
1. **Usage Metrics**: Monitor downloads and likes to track your model's popularity and adoption. You can access total download metrics in your model settings.
156+
157+
2. **Monitor Contributions**: Regularly check your model tree to discover contributions made by the community. These contributions can provide valuable insights and potential collaboration opportunities.
158+
159+
## Enterprise Features
160+
161+
[Hugging Face Enterprise](https://huggingface.co/enterprise) subscription offers additional capabilities:
162+
163+
1. **Access Control**: Set [resource groups](https://huggingface.co/docs/hub/security-resource-groups) to control access for specific teams or users, ensuring appropriate permissions across your organization.
164+
165+
2. **Storage Region**: Select the data storage region (US/EU) for your model files to comply with regional data regulations and requirements.
166+
167+
3. **Advanced Analytics**: Use [Enterprise Analytics features](https://huggingface.co/docs/hub/enterprise-hub-analytics) to gain deeper insights into usage patterns and adoption metrics.
168+
169+
4. **Extended Storage**: Access additional private storage capacity to host more models and larger artifacts as your model portfolio grows.
170+
171+
By following these comprehensive guidelines and examples, you'll ensure your model release on Hugging Face is clear, impactful, and valuable. This will maximize the value of your work for the AI community and increase its visibility. Looking forward to your contributions!

0 commit comments

Comments
 (0)