selmisskilig
commited on
Update README.md
Browse files
README.md
CHANGED
@@ -28,29 +28,30 @@ mteb[beir]
|
|
28 |
|
29 |
To train the model, a mixed-task approach is used. The loss functions involved are as follows:
|
30 |
|
31 |
-
The generative loss function,
|
32 |
|
33 |
$$
|
34 |
-
\mathcal{L}_{Gen} = -\frac{1}{T} \sum_{t=1}^{T} \
|
35 |
$$
|
36 |
|
37 |
-
This loss measures the quality of text generation by averaging the scores over the sequence length \(T\).
|
38 |
|
39 |
-
|
|
|
|
|
40 |
|
41 |
$$
|
42 |
\mathcal{L}_{Emb}(x, y, y') = (1 - l) \cdot D(f(x), f(y))^2 + l \cdot \max\left(0, \alpha - D(f(x), f(y'))\right)^2
|
43 |
$$
|
44 |
|
45 |
-
This loss ensures that the embeddings are learned effectively by balancing the distance between the correct pairs
|
46 |
|
47 |
-
The combined loss function,
|
48 |
|
49 |
$$
|
50 |
\mathcal{L}_{Mix}=\lambda_{Emb}\mathcal{L}_{Emb}+\lambda_{Gen}\mathcal{L}_{Gen}
|
51 |
$$
|
52 |
|
53 |
-
This mixed loss function integrates both the embedding and generative tasks, where
|
54 |
|
55 |
By using this mixed-task training approach, the model is capable of both text generation and embedding tasks effectively.
|
56 |
|
|
|
28 |
|
29 |
To train the model, a mixed-task approach is used. The loss functions involved are as follows:
|
30 |
|
31 |
+
The generative loss function, $\mathcal{L}_{Gen}\$, is defined as:
|
32 |
|
33 |
$$
|
34 |
+
\mathcal{L}_{Gen} = -\frac{1}{T} \sum_{t=1}^{T} \left( s_{y_t} - \log \sum_{y' \in \mathcal{V}} e^{s_{y'}} \right)
|
35 |
$$
|
36 |
|
|
|
37 |
|
38 |
+
This loss measures the quality of text generation by averaging the scores over the sequence length $T$.
|
39 |
+
|
40 |
+
The embedding loss function, $\mathcal{L}_{Emb}\$, is given by:
|
41 |
|
42 |
$$
|
43 |
\mathcal{L}_{Emb}(x, y, y') = (1 - l) \cdot D(f(x), f(y))^2 + l \cdot \max\left(0, \alpha - D(f(x), f(y'))\right)^2
|
44 |
$$
|
45 |
|
46 |
+
This loss ensures that the embeddings are learned effectively by balancing the distance between the correct pairs $(x, y)\$ and the incorrect pairs $(x, y')\$.
|
47 |
|
48 |
+
The combined loss function, $\mathcal{L}_{Mix}\$, used for training the model is:
|
49 |
|
50 |
$$
|
51 |
\mathcal{L}_{Mix}=\lambda_{Emb}\mathcal{L}_{Emb}+\lambda_{Gen}\mathcal{L}_{Gen}
|
52 |
$$
|
53 |
|
54 |
+
This mixed loss function integrates both the embedding and generative tasks, where $\lambda_{Emb}\$ and $\lambda_{Gen}\$ are the respective weights for each loss component.
|
55 |
|
56 |
By using this mixed-task training approach, the model is capable of both text generation and embedding tasks effectively.
|
57 |
|