KobanBanan
commited on
Add new SentenceTransformer model
Browse files- .gitattributes +1 -0
- 1_Pooling/config.json +10 -0
- README.md +461 -0
- config.json +28 -0
- config_sentence_transformers.json +10 -0
- model.safetensors +3 -0
- modules.json +20 -0
- sentence_bert_config.json +4 -0
- sentencepiece.bpe.model +3 -0
- special_tokens_map.json +51 -0
- tokenizer.json +3 -0
- tokenizer_config.json +55 -0
.gitattributes
CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
+
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
1_Pooling/config.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"word_embedding_dimension": 1024,
|
3 |
+
"pooling_mode_cls_token": false,
|
4 |
+
"pooling_mode_mean_tokens": true,
|
5 |
+
"pooling_mode_max_tokens": false,
|
6 |
+
"pooling_mode_mean_sqrt_len_tokens": false,
|
7 |
+
"pooling_mode_weightedmean_tokens": false,
|
8 |
+
"pooling_mode_lasttoken": false,
|
9 |
+
"include_prompt": true
|
10 |
+
}
|
README.md
ADDED
@@ -0,0 +1,461 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
base_model: intfloat/multilingual-e5-large-instruct
|
3 |
+
library_name: sentence-transformers
|
4 |
+
metrics:
|
5 |
+
- cosine_accuracy
|
6 |
+
- dot_accuracy
|
7 |
+
- manhattan_accuracy
|
8 |
+
- euclidean_accuracy
|
9 |
+
- max_accuracy
|
10 |
+
pipeline_tag: sentence-similarity
|
11 |
+
tags:
|
12 |
+
- sentence-transformers
|
13 |
+
- sentence-similarity
|
14 |
+
- feature-extraction
|
15 |
+
- generated_from_trainer
|
16 |
+
- dataset_size:10190
|
17 |
+
- loss:TripletLoss
|
18 |
+
widget:
|
19 |
+
- source_sentence: безглютеновый хлеб
|
20 |
+
sentences:
|
21 |
+
- 'Instruct: Найти похожие продукты на основе деталей
|
22 |
+
|
23 |
+
Query: Баклажаны по-сычуаньски баклажаны, азиатская кухня, закуска, терияки, сладкий
|
24 |
+
соус, пряный вкус, овощное блюдо, вегетарианское, пикантное, жареное, замаринованное,
|
25 |
+
кунжут, чеснок, имбирь, рыба, рисовый уксус'
|
26 |
+
- 'Instruct: Найти похожие продукты на основе деталей
|
27 |
+
|
28 |
+
Query: Сорбет "Манго- Маракуйя" без доб. сахара сладость, десерт, веганский, без
|
29 |
+
сахара, низкокалорийный, охлаждающий, тропические фрукты, натуральный, диетический,
|
30 |
+
сахарозаменитель, фруктовый, без добавок, здоровье'
|
31 |
+
- 'Instruct: Найти похожие продукты на основе деталей
|
32 |
+
|
33 |
+
Query: Изделие х/б без глютена с семенами безглютеновый, хлеб, рисовая мука, семена,
|
34 |
+
клетчатка, полезный, сытный, ароматный, выпечка, гастрономия'
|
35 |
+
- source_sentence: арома саше
|
36 |
+
sentences:
|
37 |
+
- 'Instruct: Найти похожие продукты на основе деталей
|
38 |
+
|
39 |
+
Query: Мандарины Хатайские сладкие мандарины, Хатай, сладкие, сорта, Надоркотт,
|
40 |
+
цитрусовые, фрукты, свежие'
|
41 |
+
- 'Instruct: Найти похожие продукты на основе деталей
|
42 |
+
|
43 |
+
Query: Арома-саше "№13 Warm Tobacco" Aroma Garmony, 10 гр аромат, саше, натуральный,
|
44 |
+
древесный, табачный, освежитель, упаковка, автомобиль, комод, шкафчик'
|
45 |
+
- 'Instruct: Найти похожие продукты на основе деталей
|
46 |
+
|
47 |
+
Query: Творог зерненый Карат Домашний 4% 200 г творог, домашний, зерненый, натуральный,
|
48 |
+
без консервантов, без добавок, полезный завтрак, продукт из молока, умеренная
|
49 |
+
жирность, Россия'
|
50 |
+
- source_sentence: almette
|
51 |
+
sentences:
|
52 |
+
- 'Instruct: Найти похожие продукты на основе деталей
|
53 |
+
|
54 |
+
Query: Конфеты Scandic Лесные ягоды без сахара 14 г без сахара, низкий гликемический
|
55 |
+
индекс, очищение зубов, свежесть, ягодные конфеты, Россия'
|
56 |
+
- 'Instruct: Найти похожие продукты на основе деталей
|
57 |
+
|
58 |
+
Query: Жареный рис с креветками жареный рис, морепродукты, азиатская кухня, яйцо,
|
59 |
+
овощи, жасминный рис, креветки'
|
60 |
+
- 'Instruct: Найти похожие продукты на основе деталей
|
61 |
+
|
62 |
+
Query: Сыр творожный Almette с зеленью 150 г None, сыр, творожный, закуски, бутерброды,
|
63 |
+
сливочный, зелень'
|
64 |
+
- source_sentence: низкокалорийная закуска без сахара для семьи без орехов с высоким
|
65 |
+
содержанием белка
|
66 |
+
sentences:
|
67 |
+
- 'Instruct: Найти похожие продукты на основе деталей
|
68 |
+
|
69 |
+
Query: Чебурек с телятиной чебурек, телятина, фарш, кинза, хрустящий, мясо, закуска,
|
70 |
+
фритюр'
|
71 |
+
- 'Instruct: Найти похожие продукты на основе деталей
|
72 |
+
|
73 |
+
Query: Печенье протеиновое в шоколаде без доб. сахара протеин, белок, порционная
|
74 |
+
упаковка, тренировка, здоровое питание, сладости без сахара, молочный шоколад,
|
75 |
+
снек'
|
76 |
+
- 'Instruct: Найти похожие продукты на основе деталей
|
77 |
+
|
78 |
+
Query: Суп "Куриный" с домашней лапшой, 1 кг куриный суп, домашняя лапша, свежие
|
79 |
+
овощи, зелень, специи, сытное блюдо, семейны�� обед, пищевая безопасность, аллергены'
|
80 |
+
- source_sentence: паста томатная
|
81 |
+
sentences:
|
82 |
+
- 'Instruct: Найти похожие продукты на основе деталей
|
83 |
+
|
84 |
+
Query: Паста томатная, 250 г томатная паста, кулинария, свежие ингредиенты, насыщенный
|
85 |
+
вкус, универсальное применение, консистенция'
|
86 |
+
- 'Instruct: Найти похожие продукты на основе деталей
|
87 |
+
|
88 |
+
Query: Сыр ''Страчателла'' 150 г None, сыр, сливки, закуски, салаты, пицца, паста,
|
89 |
+
гастрономия, итальянская кухня'
|
90 |
+
- 'Instruct: Найти похожие продукты на основе деталей
|
91 |
+
|
92 |
+
Query: Соус Filippo Berio томатный Арраббьята 340 г соус, итальянская кухня, без
|
93 |
+
консервантов, для пасты, острый, натуральные ингредиенты, высокое качество, томатный
|
94 |
+
соус, органические продукты'
|
95 |
+
model-index:
|
96 |
+
- name: SentenceTransformer based on intfloat/multilingual-e5-large-instruct
|
97 |
+
results:
|
98 |
+
- task:
|
99 |
+
type: triplet
|
100 |
+
name: Triplet
|
101 |
+
dataset:
|
102 |
+
name: dev
|
103 |
+
type: dev
|
104 |
+
metrics:
|
105 |
+
- type: cosine_accuracy
|
106 |
+
value: 0.9285083848190644
|
107 |
+
name: Cosine Accuracy
|
108 |
+
- type: dot_accuracy
|
109 |
+
value: 0.07149161518093557
|
110 |
+
name: Dot Accuracy
|
111 |
+
- type: manhattan_accuracy
|
112 |
+
value: 0.9285083848190644
|
113 |
+
name: Manhattan Accuracy
|
114 |
+
- type: euclidean_accuracy
|
115 |
+
value: 0.9285083848190644
|
116 |
+
name: Euclidean Accuracy
|
117 |
+
- type: max_accuracy
|
118 |
+
value: 0.9285083848190644
|
119 |
+
name: Max Accuracy
|
120 |
+
---
|
121 |
+
|
122 |
+
# SentenceTransformer based on intfloat/multilingual-e5-large-instruct
|
123 |
+
|
124 |
+
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [intfloat/multilingual-e5-large-instruct](https://huggingface.co/intfloat/multilingual-e5-large-instruct). It maps sentences & paragraphs to a 1024-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
|
125 |
+
|
126 |
+
## Model Details
|
127 |
+
|
128 |
+
### Model Description
|
129 |
+
- **Model Type:** Sentence Transformer
|
130 |
+
- **Base model:** [intfloat/multilingual-e5-large-instruct](https://huggingface.co/intfloat/multilingual-e5-large-instruct) <!-- at revision c9e87c786ffac96aeaeb42863276930883923ecb -->
|
131 |
+
- **Maximum Sequence Length:** 512 tokens
|
132 |
+
- **Output Dimensionality:** 1024 tokens
|
133 |
+
- **Similarity Function:** Cosine Similarity
|
134 |
+
<!-- - **Training Dataset:** Unknown -->
|
135 |
+
<!-- - **Language:** Unknown -->
|
136 |
+
<!-- - **License:** Unknown -->
|
137 |
+
|
138 |
+
### Model Sources
|
139 |
+
|
140 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
141 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
142 |
+
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
143 |
+
|
144 |
+
### Full Model Architecture
|
145 |
+
|
146 |
+
```
|
147 |
+
SentenceTransformer(
|
148 |
+
(0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: XLMRobertaModel
|
149 |
+
(1): Pooling({'word_embedding_dimension': 1024, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
|
150 |
+
(2): Normalize()
|
151 |
+
)
|
152 |
+
```
|
153 |
+
|
154 |
+
## Usage
|
155 |
+
|
156 |
+
### Direct Usage (Sentence Transformers)
|
157 |
+
|
158 |
+
First install the Sentence Transformers library:
|
159 |
+
|
160 |
+
```bash
|
161 |
+
pip install -U sentence-transformers
|
162 |
+
```
|
163 |
+
|
164 |
+
Then you can load this model and run inference.
|
165 |
+
```python
|
166 |
+
from sentence_transformers import SentenceTransformer
|
167 |
+
|
168 |
+
# Download from the 🤗 Hub
|
169 |
+
model = SentenceTransformer("Data-Lab/multilingual-e5-large-instruct-embedder-tg")
|
170 |
+
# Run inference
|
171 |
+
sentences = [
|
172 |
+
'паста томатная',
|
173 |
+
'Instruct: Найти похожие продукты на основе деталей\nQuery: Паста томатная, 250 г томатная паста, кулинария, свежие ингредиенты, насыщенный вкус, универсальное применение, консистенция',
|
174 |
+
'Instruct: Найти похожие продукты на основе деталей\nQuery: Соус Filippo Berio томатный Арраббьята 340 г соус, итальянская кухня, без консервантов, для пасты, острый, натуральные ингредиенты, высокое качество, томатный соус, органические продукты',
|
175 |
+
]
|
176 |
+
embeddings = model.encode(sentences)
|
177 |
+
print(embeddings.shape)
|
178 |
+
# [3, 1024]
|
179 |
+
|
180 |
+
# Get the similarity scores for the embeddings
|
181 |
+
similarities = model.similarity(embeddings, embeddings)
|
182 |
+
print(similarities.shape)
|
183 |
+
# [3, 3]
|
184 |
+
```
|
185 |
+
|
186 |
+
<!--
|
187 |
+
### Direct Usage (Transformers)
|
188 |
+
|
189 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
190 |
+
|
191 |
+
</details>
|
192 |
+
-->
|
193 |
+
|
194 |
+
<!--
|
195 |
+
### Downstream Usage (Sentence Transformers)
|
196 |
+
|
197 |
+
You can finetune this model on your own dataset.
|
198 |
+
|
199 |
+
<details><summary>Click to expand</summary>
|
200 |
+
|
201 |
+
</details>
|
202 |
+
-->
|
203 |
+
|
204 |
+
<!--
|
205 |
+
### Out-of-Scope Use
|
206 |
+
|
207 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
208 |
+
-->
|
209 |
+
|
210 |
+
## Evaluation
|
211 |
+
|
212 |
+
### Metrics
|
213 |
+
|
214 |
+
#### Triplet
|
215 |
+
* Dataset: `dev`
|
216 |
+
* Evaluated with [<code>TripletEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.TripletEvaluator)
|
217 |
+
|
218 |
+
| Metric | Value |
|
219 |
+
|:-------------------|:-----------|
|
220 |
+
| cosine_accuracy | 0.9285 |
|
221 |
+
| dot_accuracy | 0.0715 |
|
222 |
+
| manhattan_accuracy | 0.9285 |
|
223 |
+
| euclidean_accuracy | 0.9285 |
|
224 |
+
| **max_accuracy** | **0.9285** |
|
225 |
+
|
226 |
+
<!--
|
227 |
+
## Bias, Risks and Limitations
|
228 |
+
|
229 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
230 |
+
-->
|
231 |
+
|
232 |
+
<!--
|
233 |
+
### Recommendations
|
234 |
+
|
235 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
236 |
+
-->
|
237 |
+
|
238 |
+
## Training Details
|
239 |
+
|
240 |
+
### Training Dataset
|
241 |
+
|
242 |
+
#### Unnamed Dataset
|
243 |
+
|
244 |
+
|
245 |
+
* Size: 10,190 training samples
|
246 |
+
* Columns: <code>sentence_0</code>, <code>sentence_1</code>, and <code>sentence_2</code>
|
247 |
+
* Approximate statistics based on the first 1000 samples:
|
248 |
+
| | sentence_0 | sentence_1 | sentence_2 |
|
249 |
+
|:--------|:---------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|
|
250 |
+
| type | string | string | string |
|
251 |
+
| details | <ul><li>min: 3 tokens</li><li>mean: 7.77 tokens</li><li>max: 30 tokens</li></ul> | <ul><li>min: 34 tokens</li><li>mean: 68.57 tokens</li><li>max: 180 tokens</li></ul> | <ul><li>min: 39 tokens</li><li>mean: 70.46 tokens</li><li>max: 116 tokens</li></ul> |
|
252 |
+
* Samples:
|
253 |
+
| sentence_0 | sentence_1 | sentence_2 |
|
254 |
+
|:-------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
255 |
+
| <code>хурма</code> | <code>Instruct: Найти похожие продукты на основе деталей<br>Query: Чипсы из хурмы, 25 г чипсы, натуральные, фрукты, перекус, сладкий вкус, десерт</code> | <code>Instruct: Найти похожие продукты на основе деталей<br>Query: Салат мимоза, 300 г салат, праздничный стол, обед, горбуша, отварные овощи, куриные желтки, классический рецепт, нежный вкус, закуска</code> |
|
256 |
+
| <code>жареное мясо</code> | <code>Instruct: Найти похожие продукты на основе деталей<br>Query: Жареная говядина с черным перцем жареное мясо, приготовление, специи, соусы, овощи</code> | <code>Instruct: Найти похожие продукты на основе деталей<br>Query: Каша рисовая на безлактозном молоке безлактозное молоко, рисовая каша, завтрак на ходу, низкое содержание жира, альтернативное м��локо, легкая сладость, удобная упаковка, подходящий для аллергиков</code> |
|
257 |
+
| <code>бедро цыпленка бройлера</code> | <code>Instruct: Найти похожие продукты на основе деталей<br>Query: Бедро цыплят-бройлеров Халяль 1 кг None, цыпленок, мясо, бройлер, халяль, бедро, маринование, тушение, запекание, None</code> | <code>Instruct: Найти похожие продукты на основе деталей<br>Query: Мясо бедра (Филе бедра) индейки в маринаде "Чесночный" 1 кг None, мясо, индейка, филе, маринад, чеснок, диетическое, нежирное, острое, травы, 1 кг, None</code> |
|
258 |
+
* Loss: [<code>TripletLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#tripletloss) with these parameters:
|
259 |
+
```json
|
260 |
+
{
|
261 |
+
"distance_metric": "TripletDistanceMetric.COSINE",
|
262 |
+
"triplet_margin": 0.5
|
263 |
+
}
|
264 |
+
```
|
265 |
+
|
266 |
+
### Training Hyperparameters
|
267 |
+
#### Non-Default Hyperparameters
|
268 |
+
|
269 |
+
- `eval_strategy`: steps
|
270 |
+
- `per_device_train_batch_size`: 4
|
271 |
+
- `per_device_eval_batch_size`: 4
|
272 |
+
- `fp16`: True
|
273 |
+
- `multi_dataset_batch_sampler`: round_robin
|
274 |
+
|
275 |
+
#### All Hyperparameters
|
276 |
+
<details><summary>Click to expand</summary>
|
277 |
+
|
278 |
+
- `overwrite_output_dir`: False
|
279 |
+
- `do_predict`: False
|
280 |
+
- `eval_strategy`: steps
|
281 |
+
- `prediction_loss_only`: True
|
282 |
+
- `per_device_train_batch_size`: 4
|
283 |
+
- `per_device_eval_batch_size`: 4
|
284 |
+
- `per_gpu_train_batch_size`: None
|
285 |
+
- `per_gpu_eval_batch_size`: None
|
286 |
+
- `gradient_accumulation_steps`: 1
|
287 |
+
- `eval_accumulation_steps`: None
|
288 |
+
- `torch_empty_cache_steps`: None
|
289 |
+
- `learning_rate`: 5e-05
|
290 |
+
- `weight_decay`: 0.0
|
291 |
+
- `adam_beta1`: 0.9
|
292 |
+
- `adam_beta2`: 0.999
|
293 |
+
- `adam_epsilon`: 1e-08
|
294 |
+
- `max_grad_norm`: 1
|
295 |
+
- `num_train_epochs`: 3
|
296 |
+
- `max_steps`: -1
|
297 |
+
- `lr_scheduler_type`: linear
|
298 |
+
- `lr_scheduler_kwargs`: {}
|
299 |
+
- `warmup_ratio`: 0.0
|
300 |
+
- `warmup_steps`: 0
|
301 |
+
- `log_level`: passive
|
302 |
+
- `log_level_replica`: warning
|
303 |
+
- `log_on_each_node`: True
|
304 |
+
- `logging_nan_inf_filter`: True
|
305 |
+
- `save_safetensors`: True
|
306 |
+
- `save_on_each_node`: False
|
307 |
+
- `save_only_model`: False
|
308 |
+
- `restore_callback_states_from_checkpoint`: False
|
309 |
+
- `no_cuda`: False
|
310 |
+
- `use_cpu`: False
|
311 |
+
- `use_mps_device`: False
|
312 |
+
- `seed`: 42
|
313 |
+
- `data_seed`: None
|
314 |
+
- `jit_mode_eval`: False
|
315 |
+
- `use_ipex`: False
|
316 |
+
- `bf16`: False
|
317 |
+
- `fp16`: True
|
318 |
+
- `fp16_opt_level`: O1
|
319 |
+
- `half_precision_backend`: auto
|
320 |
+
- `bf16_full_eval`: False
|
321 |
+
- `fp16_full_eval`: False
|
322 |
+
- `tf32`: None
|
323 |
+
- `local_rank`: 0
|
324 |
+
- `ddp_backend`: None
|
325 |
+
- `tpu_num_cores`: None
|
326 |
+
- `tpu_metrics_debug`: False
|
327 |
+
- `debug`: []
|
328 |
+
- `dataloader_drop_last`: True
|
329 |
+
- `dataloader_num_workers`: 0
|
330 |
+
- `dataloader_prefetch_factor`: None
|
331 |
+
- `past_index`: -1
|
332 |
+
- `disable_tqdm`: False
|
333 |
+
- `remove_unused_columns`: True
|
334 |
+
- `label_names`: None
|
335 |
+
- `load_best_model_at_end`: False
|
336 |
+
- `ignore_data_skip`: False
|
337 |
+
- `fsdp`: []
|
338 |
+
- `fsdp_min_num_params`: 0
|
339 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
340 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
341 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
342 |
+
- `deepspeed`: None
|
343 |
+
- `label_smoothing_factor`: 0.0
|
344 |
+
- `optim`: adamw_torch
|
345 |
+
- `optim_args`: None
|
346 |
+
- `adafactor`: False
|
347 |
+
- `group_by_length`: False
|
348 |
+
- `length_column_name`: length
|
349 |
+
- `ddp_find_unused_parameters`: None
|
350 |
+
- `ddp_bucket_cap_mb`: None
|
351 |
+
- `ddp_broadcast_buffers`: False
|
352 |
+
- `dataloader_pin_memory`: True
|
353 |
+
- `dataloader_persistent_workers`: False
|
354 |
+
- `skip_memory_metrics`: True
|
355 |
+
- `use_legacy_prediction_loop`: False
|
356 |
+
- `push_to_hub`: False
|
357 |
+
- `resume_from_checkpoint`: None
|
358 |
+
- `hub_model_id`: None
|
359 |
+
- `hub_strategy`: every_save
|
360 |
+
- `hub_private_repo`: False
|
361 |
+
- `hub_always_push`: False
|
362 |
+
- `gradient_checkpointing`: False
|
363 |
+
- `gradient_checkpointing_kwargs`: None
|
364 |
+
- `include_inputs_for_metrics`: False
|
365 |
+
- `eval_do_concat_batches`: True
|
366 |
+
- `fp16_backend`: auto
|
367 |
+
- `push_to_hub_model_id`: None
|
368 |
+
- `push_to_hub_organization`: None
|
369 |
+
- `mp_parameters`:
|
370 |
+
- `auto_find_batch_size`: False
|
371 |
+
- `full_determinism`: False
|
372 |
+
- `torchdynamo`: None
|
373 |
+
- `ray_scope`: last
|
374 |
+
- `ddp_timeout`: 1800
|
375 |
+
- `torch_compile`: False
|
376 |
+
- `torch_compile_backend`: None
|
377 |
+
- `torch_compile_mode`: None
|
378 |
+
- `dispatch_batches`: None
|
379 |
+
- `split_batches`: None
|
380 |
+
- `include_tokens_per_second`: False
|
381 |
+
- `include_num_input_tokens_seen`: False
|
382 |
+
- `neftune_noise_alpha`: None
|
383 |
+
- `optim_target_modules`: None
|
384 |
+
- `batch_eval_metrics`: False
|
385 |
+
- `eval_on_start`: False
|
386 |
+
- `eval_use_gather_object`: False
|
387 |
+
- `batch_sampler`: batch_sampler
|
388 |
+
- `multi_dataset_batch_sampler`: round_robin
|
389 |
+
|
390 |
+
</details>
|
391 |
+
|
392 |
+
### Training Logs
|
393 |
+
| Epoch | Step | Training Loss | dev_max_accuracy |
|
394 |
+
|:------:|:----:|:-------------:|:----------------:|
|
395 |
+
| 0.3928 | 500 | 0.2652 | - |
|
396 |
+
| 0.7855 | 1000 | 0.1742 | 0.9241 |
|
397 |
+
| 1.0 | 1273 | - | 0.9179 |
|
398 |
+
| 1.1783 | 1500 | 0.1526 | - |
|
399 |
+
| 1.5711 | 2000 | 0.1237 | 0.9197 |
|
400 |
+
| 1.9639 | 2500 | 0.0983 | - |
|
401 |
+
| 2.0 | 2546 | - | 0.9197 |
|
402 |
+
| 2.3566 | 3000 | 0.0881 | 0.9294 |
|
403 |
+
| 2.7494 | 3500 | 0.0711 | - |
|
404 |
+
| 3.0 | 3819 | - | 0.9285 |
|
405 |
+
|
406 |
+
|
407 |
+
### Framework Versions
|
408 |
+
- Python: 3.10.12
|
409 |
+
- Sentence Transformers: 3.2.0
|
410 |
+
- Transformers: 4.44.0
|
411 |
+
- PyTorch: 2.3.1+cu121
|
412 |
+
- Accelerate: 0.31.0
|
413 |
+
- Datasets: 2.20.0
|
414 |
+
- Tokenizers: 0.19.1
|
415 |
+
|
416 |
+
## Citation
|
417 |
+
|
418 |
+
### BibTeX
|
419 |
+
|
420 |
+
#### Sentence Transformers
|
421 |
+
```bibtex
|
422 |
+
@inproceedings{reimers-2019-sentence-bert,
|
423 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
424 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
425 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
426 |
+
month = "11",
|
427 |
+
year = "2019",
|
428 |
+
publisher = "Association for Computational Linguistics",
|
429 |
+
url = "https://arxiv.org/abs/1908.10084",
|
430 |
+
}
|
431 |
+
```
|
432 |
+
|
433 |
+
#### TripletLoss
|
434 |
+
```bibtex
|
435 |
+
@misc{hermans2017defense,
|
436 |
+
title={In Defense of the Triplet Loss for Person Re-Identification},
|
437 |
+
author={Alexander Hermans and Lucas Beyer and Bastian Leibe},
|
438 |
+
year={2017},
|
439 |
+
eprint={1703.07737},
|
440 |
+
archivePrefix={arXiv},
|
441 |
+
primaryClass={cs.CV}
|
442 |
+
}
|
443 |
+
```
|
444 |
+
|
445 |
+
<!--
|
446 |
+
## Glossary
|
447 |
+
|
448 |
+
*Clearly define terms in order to be accessible across audiences.*
|
449 |
+
-->
|
450 |
+
|
451 |
+
<!--
|
452 |
+
## Model Card Authors
|
453 |
+
|
454 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
455 |
+
-->
|
456 |
+
|
457 |
+
<!--
|
458 |
+
## Model Card Contact
|
459 |
+
|
460 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
461 |
+
-->
|
config.json
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "intfloat/multilingual-e5-large-instruct",
|
3 |
+
"architectures": [
|
4 |
+
"XLMRobertaModel"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"bos_token_id": 0,
|
8 |
+
"classifier_dropout": null,
|
9 |
+
"eos_token_id": 2,
|
10 |
+
"hidden_act": "gelu",
|
11 |
+
"hidden_dropout_prob": 0.1,
|
12 |
+
"hidden_size": 1024,
|
13 |
+
"initializer_range": 0.02,
|
14 |
+
"intermediate_size": 4096,
|
15 |
+
"layer_norm_eps": 1e-05,
|
16 |
+
"max_position_embeddings": 514,
|
17 |
+
"model_type": "xlm-roberta",
|
18 |
+
"num_attention_heads": 16,
|
19 |
+
"num_hidden_layers": 24,
|
20 |
+
"output_past": true,
|
21 |
+
"pad_token_id": 1,
|
22 |
+
"position_embedding_type": "absolute",
|
23 |
+
"torch_dtype": "float32",
|
24 |
+
"transformers_version": "4.44.0",
|
25 |
+
"type_vocab_size": 1,
|
26 |
+
"use_cache": true,
|
27 |
+
"vocab_size": 250002
|
28 |
+
}
|
config_sentence_transformers.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"__version__": {
|
3 |
+
"sentence_transformers": "3.2.0",
|
4 |
+
"transformers": "4.44.0",
|
5 |
+
"pytorch": "2.3.1+cu121"
|
6 |
+
},
|
7 |
+
"prompts": {},
|
8 |
+
"default_prompt_name": null,
|
9 |
+
"similarity_fn_name": null
|
10 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ad761c65d836c327ba073fc6a10d53c2f87f65373b0a0b08e576c45eadea387d
|
3 |
+
size 2239607176
|
modules.json
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
[
|
2 |
+
{
|
3 |
+
"idx": 0,
|
4 |
+
"name": "0",
|
5 |
+
"path": "",
|
6 |
+
"type": "sentence_transformers.models.Transformer"
|
7 |
+
},
|
8 |
+
{
|
9 |
+
"idx": 1,
|
10 |
+
"name": "1",
|
11 |
+
"path": "1_Pooling",
|
12 |
+
"type": "sentence_transformers.models.Pooling"
|
13 |
+
},
|
14 |
+
{
|
15 |
+
"idx": 2,
|
16 |
+
"name": "2",
|
17 |
+
"path": "2_Normalize",
|
18 |
+
"type": "sentence_transformers.models.Normalize"
|
19 |
+
}
|
20 |
+
]
|
sentence_bert_config.json
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"max_seq_length": 512,
|
3 |
+
"do_lower_case": false
|
4 |
+
}
|
sentencepiece.bpe.model
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:cfc8146abe2a0488e9e2a0c56de7952f7c11ab059eca145a0a727afce0db2865
|
3 |
+
size 5069051
|
special_tokens_map.json
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": {
|
3 |
+
"content": "<s>",
|
4 |
+
"lstrip": false,
|
5 |
+
"normalized": false,
|
6 |
+
"rstrip": false,
|
7 |
+
"single_word": false
|
8 |
+
},
|
9 |
+
"cls_token": {
|
10 |
+
"content": "<s>",
|
11 |
+
"lstrip": false,
|
12 |
+
"normalized": false,
|
13 |
+
"rstrip": false,
|
14 |
+
"single_word": false
|
15 |
+
},
|
16 |
+
"eos_token": {
|
17 |
+
"content": "</s>",
|
18 |
+
"lstrip": false,
|
19 |
+
"normalized": false,
|
20 |
+
"rstrip": false,
|
21 |
+
"single_word": false
|
22 |
+
},
|
23 |
+
"mask_token": {
|
24 |
+
"content": "<mask>",
|
25 |
+
"lstrip": true,
|
26 |
+
"normalized": false,
|
27 |
+
"rstrip": false,
|
28 |
+
"single_word": false
|
29 |
+
},
|
30 |
+
"pad_token": {
|
31 |
+
"content": "<pad>",
|
32 |
+
"lstrip": false,
|
33 |
+
"normalized": false,
|
34 |
+
"rstrip": false,
|
35 |
+
"single_word": false
|
36 |
+
},
|
37 |
+
"sep_token": {
|
38 |
+
"content": "</s>",
|
39 |
+
"lstrip": false,
|
40 |
+
"normalized": false,
|
41 |
+
"rstrip": false,
|
42 |
+
"single_word": false
|
43 |
+
},
|
44 |
+
"unk_token": {
|
45 |
+
"content": "<unk>",
|
46 |
+
"lstrip": false,
|
47 |
+
"normalized": false,
|
48 |
+
"rstrip": false,
|
49 |
+
"single_word": false
|
50 |
+
}
|
51 |
+
}
|
tokenizer.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:883b037111086fd4dfebbbc9b7cee11e1517b5e0c0514879478661440f137085
|
3 |
+
size 17082987
|
tokenizer_config.json
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"added_tokens_decoder": {
|
3 |
+
"0": {
|
4 |
+
"content": "<s>",
|
5 |
+
"lstrip": false,
|
6 |
+
"normalized": false,
|
7 |
+
"rstrip": false,
|
8 |
+
"single_word": false,
|
9 |
+
"special": true
|
10 |
+
},
|
11 |
+
"1": {
|
12 |
+
"content": "<pad>",
|
13 |
+
"lstrip": false,
|
14 |
+
"normalized": false,
|
15 |
+
"rstrip": false,
|
16 |
+
"single_word": false,
|
17 |
+
"special": true
|
18 |
+
},
|
19 |
+
"2": {
|
20 |
+
"content": "</s>",
|
21 |
+
"lstrip": false,
|
22 |
+
"normalized": false,
|
23 |
+
"rstrip": false,
|
24 |
+
"single_word": false,
|
25 |
+
"special": true
|
26 |
+
},
|
27 |
+
"3": {
|
28 |
+
"content": "<unk>",
|
29 |
+
"lstrip": false,
|
30 |
+
"normalized": false,
|
31 |
+
"rstrip": false,
|
32 |
+
"single_word": false,
|
33 |
+
"special": true
|
34 |
+
},
|
35 |
+
"250001": {
|
36 |
+
"content": "<mask>",
|
37 |
+
"lstrip": true,
|
38 |
+
"normalized": false,
|
39 |
+
"rstrip": false,
|
40 |
+
"single_word": false,
|
41 |
+
"special": true
|
42 |
+
}
|
43 |
+
},
|
44 |
+
"additional_special_tokens": [],
|
45 |
+
"bos_token": "<s>",
|
46 |
+
"clean_up_tokenization_spaces": true,
|
47 |
+
"cls_token": "<s>",
|
48 |
+
"eos_token": "</s>",
|
49 |
+
"mask_token": "<mask>",
|
50 |
+
"model_max_length": 512,
|
51 |
+
"pad_token": "<pad>",
|
52 |
+
"sep_token": "</s>",
|
53 |
+
"tokenizer_class": "XLMRobertaTokenizer",
|
54 |
+
"unk_token": "<unk>"
|
55 |
+
}
|