Skip to content

Commit b788768

Browse files
authored
fix nits (#462)
1 parent 40ff9c0 commit b788768

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

how-to-train-sentence-transformers.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ Check out this tutorial with the Notebook Companion:
2929
<img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
3030
</a>
3131

32+
---
33+
---
3234

3335
Training or fine-tuning a Sentence Transformers model highly depends on the available data and the target task. The key is twofold:
3436
1. Understand how to input data into the model and prepare your dataset accordingly.
@@ -50,7 +52,7 @@ In a Sentence Transformer model, you map a variable-length text (or image pixels
5052
This is how the Sentence Transformers models work:
5153

5254
1. **Layer 1** – The input text is passed through a pre-trained Transformer model that can be obtained directly from the [Hugging Face Hub](https://huggingface.co/models?pipeline_tag=fill-mask&sort=downloads). This tutorial will use the "[distilroberta-base](https://huggingface.co/distilroberta-base)" model. The Transformer outputs are contextualized word embeddings for all input tokens; imagine an embedding for each token of the text.
53-
2. **Layer 2**: The embeddings go through a pooling layer to get a single fixed-length embedding for all the text. For example, mean pooling averages the embeddings generated by the model.
55+
2. **Layer 2** - The embeddings go through a pooling layer to get a single fixed-length embedding for all the text. For example, mean pooling averages the embeddings generated by the model.
5456

5557
This figure summarizes the process:
5658

0 commit comments

Comments
 (0)