Skip to content

Commit 23ed501

Browse files
authored
Add info on base_model metadata to model cards page
1 parent a209f04 commit 23ed501

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

docs/hub/model-cards.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ See the detailed model card metadata specification [here](https://github.com/hug
5454

5555
### Specifying a library
5656

57-
You can also specify the supported libraries in the model card metadata section. Find more about our supported libraries [here](./models-libraries). The library can be specified with the following order of priority
57+
You can also specify the supported libraries in the model card metadata section. Find more about our supported libraries [here](./models-libraries). The library can be specified in the following order of priority
5858

5959
1. Specifying `library_name` in the model card (recommended if your model is not a `transformers` model)
6060

@@ -74,6 +74,23 @@ If it's not specified, the Hub will try to automatically detect the library type
7474
1. By looking into the presence of files such as `*.nemo` or `*saved_model.pb*`, the Hub can determine if a model is from NeMo or Keras.
7575
2. If nothing is detected and there is a `config.json` file, it's assumed the library is `transformers`.
7676

77+
### Specifying a base model
78+
79+
If your model is a fine-tune or adapter of a base model, you can specify the base model in the model card metadata section:
80+
81+
```yaml
82+
base_model: HuggingFaceH4/zephyr-7b-beta
83+
```
84+
85+
This metadata will be used to display the base model on the model page. Users can also use this information to filter models by base model or find models that are fine-tuned from a specific base model.
86+
87+
<div class="flex justify-center">
88+
<img class="block dark:hidden" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/base-model-ui.png"/>
89+
<img class="hidden dark:block" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/base-model-ui-dark.png"/>
90+
</div>
91+
92+
93+
7794

7895
### Evaluation Results
7996

@@ -100,7 +117,7 @@ If a model includes valid eval results, they will be displayed like this:
100117

101118
<div class="flex justify-center">
102119
<img class="block dark:hidden" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/eval-results.png"/>
103-
<img class="hidden dark:block" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/eval-results-dark.png"/>
120+
<img class="hidden dark:block" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/base-model-ui-dark.png"/>
104121
</div>
105122

106123
### CO<sub>2</sub> Emissions

0 commit comments

Comments
 (0)