sentence_transformers/cross_encoder/model_card_template.md
This is a Cross Encoder model{% if base_model %} finetuned from [{{ base_model }}](https://huggingface.co/{{ base_model }}){% else %} trained{% endif %}{% if train_datasets | selectattr("name") | list %} on {% if train_datasets | selectattr("name") | map(attribute="name") | join(", ") | length > 200 %}{{ train_datasets | length }}{% else %}the {% for dataset in (train_datasets | selectattr("name")) %}{% if dataset.id %}[{{ dataset.name if dataset.name else dataset.id }}](https://huggingface.co/datasets/{{ dataset.id }}){% else %}{{ dataset.name }}{% endif %}{% if not loop.last %}{% if loop.index == (train_datasets | selectattr("name") | list | length - 1) %} and {% else %}, {% endif %}{% endif %}{% endfor %}{% endif %} dataset{{"s" if train_datasets | selectattr("name") | list | length > 1 else ""}}{% endif %} using the sentence-transformers library. It computes scores for pairs of texts, which can be used for {{ task_name }}.
{%- endif %}
{%- endif %} {% if language -%} - Language{{"s" if language is not string and language | length > 1 else ""}}: {%- if language is string %} {{ language }} {%- else %} {% for lang in language -%} {{ lang }}{{ ", " if not loop.last else "" }} {%- endfor %} {%- endif %} {%- else -%} <!-- - **Language:** Unknown --> {%- endif %} {% if license -%} - License: {{ license }} {%- else -%} <!-- - **License:** Unknown --> {%- endif %}
{{ model_string }}
First install the Sentence Transformers library:
pip install -U sentence-transformers
Then you can load this model and run inference. {{ usage_snippet }}
<!-- ### Direct Usage (Transformers) <details><summary>Click to see the direct usage in Transformers</summary> </details> --> <!-- ### Downstream Usage (Sentence Transformers) You can finetune this model on your own dataset. <details><summary>Click to expand</summary> </details> --> <!-- ### Out-of-Scope Use *List how the model may foreseeably be misused and address what users ought not to do with the model.* -->{% if eval_metrics %}
{% for metrics in eval_metrics %}
{% if metrics.dataset_name %}
{{ metrics.dataset_name }}
{%- else -%}
{%- for name in metrics.dataset_name -%}
{{ name }}
{%- if not loop.last -%}
{%- if loop.index == metrics.dataset_name | length - 1 %} and {% else -%}, {% endif -%}
{%- endif -%}
{%- endfor -%}
{%- endif -%}
{%- endif %}{{ metrics.table }} {%- endfor %}{% endif %}
<!-- ## Bias, Risks and Limitations *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.* --> <!-- ### Recommendations *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.* -->{% for dataset_type, dataset_list in [("training", train_datasets), ("evaluation", eval_datasets)] %}{% if dataset_list %}
{% for dataset in dataset_list %}{% if dataset_list | length > 3 %}<details><summary>{{ dataset['name'] or 'Unnamed Dataset' }}</summary> {% endif %}
{% if dataset['name'] %}
{% if all_hyperparameters %}
{% if non_default_hyperparameters -%}
{% for name, value in non_default_hyperparameters.items() %}- {{ name }}: {{ value }}
{% endfor %}{%- endif %}
{% for name, value in all_hyperparameters.items() %}- {{ name }}: {{ value }}
{% endfor %}
{%- if eval_lines %}
{% if hide_eval_lines %}<details><summary>Click to expand</summary>
{% endif -%} {{ eval_lines }}{% if explain_bold_in_eval %}
{%- if co2_eq_emissions %}
Carbon emissions were measured using CodeCarbon.
{% for loss_name, citation in citations.items() %}
{{ citation | trim }}
{% endfor %}
<!-- ## Glossary *Clearly define terms in order to be accessible across audiences.* --> <!-- ## Model Card Authors *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.* --> <!-- ## Model Card Contact *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.* -->