Galatea007
commited on
Commit
•
da2d29a
1
Parent(s):
41868d3
aa
Browse files- 1_Pooling/config.json +10 -0
- 1_Pooling/config.json:Zone.Identifier +0 -0
- README.md +582 -0
- README.md:Zone.Identifier +0 -0
- config.json +26 -0
- config.json:Zone.Identifier +0 -0
- config_sentence_transformers.json +12 -0
- config_sentence_transformers.json:Zone.Identifier +0 -0
- model.safetensors +3 -0
- model.safetensors:Zone.Identifier +0 -0
- modules.json +20 -0
- modules.json:Zone.Identifier +0 -0
- sentence_bert_config.json +4 -0
- sentence_bert_config.json:Zone.Identifier +0 -0
- special_tokens_map.json +37 -0
- special_tokens_map.json:Zone.Identifier +0 -0
- tokenizer.json +0 -0
- tokenizer.json:Zone.Identifier +0 -0
- tokenizer_config.json +62 -0
- tokenizer_config.json:Zone.Identifier +0 -0
- vocab.txt +0 -0
- vocab.txt:Zone.Identifier +0 -0
1_Pooling/config.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"word_embedding_dimension": 768,
|
3 |
+
"pooling_mode_cls_token": true,
|
4 |
+
"pooling_mode_mean_tokens": false,
|
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 |
+
}
|
1_Pooling/config.json:Zone.Identifier
ADDED
File without changes
|
README.md
ADDED
@@ -0,0 +1,582 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
base_model: Snowflake/snowflake-arctic-embed-m
|
3 |
+
library_name: sentence-transformers
|
4 |
+
metrics:
|
5 |
+
- cosine_accuracy@1
|
6 |
+
- cosine_accuracy@3
|
7 |
+
- cosine_accuracy@5
|
8 |
+
- cosine_accuracy@10
|
9 |
+
- cosine_precision@1
|
10 |
+
- cosine_precision@3
|
11 |
+
- cosine_precision@5
|
12 |
+
- cosine_precision@10
|
13 |
+
- cosine_recall@1
|
14 |
+
- cosine_recall@3
|
15 |
+
- cosine_recall@5
|
16 |
+
- cosine_recall@10
|
17 |
+
- cosine_ndcg@10
|
18 |
+
- cosine_mrr@10
|
19 |
+
- cosine_map@100
|
20 |
+
- dot_accuracy@1
|
21 |
+
- dot_accuracy@3
|
22 |
+
- dot_accuracy@5
|
23 |
+
- dot_accuracy@10
|
24 |
+
- dot_precision@1
|
25 |
+
- dot_precision@3
|
26 |
+
- dot_precision@5
|
27 |
+
- dot_precision@10
|
28 |
+
- dot_recall@1
|
29 |
+
- dot_recall@3
|
30 |
+
- dot_recall@5
|
31 |
+
- dot_recall@10
|
32 |
+
- dot_ndcg@10
|
33 |
+
- dot_mrr@10
|
34 |
+
- dot_map@100
|
35 |
+
pipeline_tag: sentence-similarity
|
36 |
+
tags:
|
37 |
+
- sentence-transformers
|
38 |
+
- sentence-similarity
|
39 |
+
- feature-extraction
|
40 |
+
- generated_from_trainer
|
41 |
+
- dataset_size:600
|
42 |
+
- loss:MatryoshkaLoss
|
43 |
+
- loss:MultipleNegativesRankingLoss
|
44 |
+
widget:
|
45 |
+
- source_sentence: What types of additional risks might future updates incorporate?
|
46 |
+
sentences:
|
47 |
+
- Inaccuracies in these labels can impact the “stability” or robustness of these
|
48 |
+
benchmarks, which many GAI practitioners consider during the model selection process.
|
49 |
+
- For example, when prompted to generate images of CEOs, doctors, lawyers, and judges,
|
50 |
+
current text-to-image models underrepresent women and/or racial minorities , and
|
51 |
+
people with disabilities .
|
52 |
+
- Future updates may incorporate additional risks or provide further details on
|
53 |
+
the risks identified below.
|
54 |
+
- source_sentence: What are some potential consequences of the abuse and misuse of
|
55 |
+
AI systems by humans?
|
56 |
+
sentences:
|
57 |
+
- Even when trained on “clean” data, increasingly capable GAI models can synthesize
|
58 |
+
or produce synthetic NCII and CSAM.
|
59 |
+
- 3 the abuse, misuse, and unsafe repurposing by humans (adversarial or not ), and
|
60 |
+
others result from interactions between a human and an AI system.
|
61 |
+
- Energy and carbon emissions vary based on what is being done with the GAI model
|
62 |
+
(i.e., pre -training, fine -tuning, inference), the modality of the content , hardware
|
63 |
+
used, and type of task or application .
|
64 |
+
- source_sentence: What types of digital content can be included in GAI?
|
65 |
+
sentences:
|
66 |
+
- Errors in t hird-party GAI components can also have downstream impacts on accuracy
|
67 |
+
and robustness .
|
68 |
+
- In direct prompt injections, attackers might craft malicious prompts and input
|
69 |
+
them directly to a GAI system , with a variety of downstream negative consequences
|
70 |
+
to interconnected systems.
|
71 |
+
- This can include images, videos, audio, text, and other digital content.” While
|
72 |
+
not all GAI is derived from foundation models, for purposes of this document,
|
73 |
+
GAI generally refers to generative foundation models .
|
74 |
+
- source_sentence: What are the implications of harmful bias and homogenization in
|
75 |
+
relation to stereotypical content?
|
76 |
+
sentences:
|
77 |
+
- These risks provide a lens through which organizations can frame and execute risk
|
78 |
+
management efforts.
|
79 |
+
- 13 • Not every suggested action appl ies to every AI Actor14 or is relevant to
|
80 |
+
every AI Actor Task .
|
81 |
+
- The spread of denigrating or stereotypical content can also further exacerbate
|
82 |
+
representational harms (see Harmful Bias and Homogenization below).
|
83 |
+
- source_sentence: What are the inventory exemptions defined in organizational policies
|
84 |
+
for GAI systems embedded into application software?
|
85 |
+
sentences:
|
86 |
+
- Methods for creating smaller versions of train ed models, such as model distillation
|
87 |
+
or compression, could reduce environmental impacts at inference time, but training
|
88 |
+
and tuning such models may still contribute to their environmental impacts .
|
89 |
+
- For example, predictive inferences made by GAI models based on PII or protected
|
90 |
+
attributes c an contribute to adverse decisions , leading to representational
|
91 |
+
or allocative harms to individuals or groups (see Harmful Bias and Homogenization
|
92 |
+
below).
|
93 |
+
- Information Security GV-1.6-002 Define any inventory exemptions in organizational
|
94 |
+
policies for GAI systems embedded into application software .
|
95 |
+
model-index:
|
96 |
+
- name: SentenceTransformer based on Snowflake/snowflake-arctic-embed-m
|
97 |
+
results:
|
98 |
+
- task:
|
99 |
+
type: information-retrieval
|
100 |
+
name: Information Retrieval
|
101 |
+
dataset:
|
102 |
+
name: Unknown
|
103 |
+
type: unknown
|
104 |
+
metrics:
|
105 |
+
- type: cosine_accuracy@1
|
106 |
+
value: 0.9
|
107 |
+
name: Cosine Accuracy@1
|
108 |
+
- type: cosine_accuracy@3
|
109 |
+
value: 0.98
|
110 |
+
name: Cosine Accuracy@3
|
111 |
+
- type: cosine_accuracy@5
|
112 |
+
value: 0.99
|
113 |
+
name: Cosine Accuracy@5
|
114 |
+
- type: cosine_accuracy@10
|
115 |
+
value: 1.0
|
116 |
+
name: Cosine Accuracy@10
|
117 |
+
- type: cosine_precision@1
|
118 |
+
value: 0.9
|
119 |
+
name: Cosine Precision@1
|
120 |
+
- type: cosine_precision@3
|
121 |
+
value: 0.3266666666666667
|
122 |
+
name: Cosine Precision@3
|
123 |
+
- type: cosine_precision@5
|
124 |
+
value: 0.19799999999999998
|
125 |
+
name: Cosine Precision@5
|
126 |
+
- type: cosine_precision@10
|
127 |
+
value: 0.09999999999999998
|
128 |
+
name: Cosine Precision@10
|
129 |
+
- type: cosine_recall@1
|
130 |
+
value: 0.9
|
131 |
+
name: Cosine Recall@1
|
132 |
+
- type: cosine_recall@3
|
133 |
+
value: 0.98
|
134 |
+
name: Cosine Recall@3
|
135 |
+
- type: cosine_recall@5
|
136 |
+
value: 0.99
|
137 |
+
name: Cosine Recall@5
|
138 |
+
- type: cosine_recall@10
|
139 |
+
value: 1.0
|
140 |
+
name: Cosine Recall@10
|
141 |
+
- type: cosine_ndcg@10
|
142 |
+
value: 0.9563669441556807
|
143 |
+
name: Cosine Ndcg@10
|
144 |
+
- type: cosine_mrr@10
|
145 |
+
value: 0.9417619047619047
|
146 |
+
name: Cosine Mrr@10
|
147 |
+
- type: cosine_map@100
|
148 |
+
value: 0.9417619047619047
|
149 |
+
name: Cosine Map@100
|
150 |
+
- type: dot_accuracy@1
|
151 |
+
value: 0.9
|
152 |
+
name: Dot Accuracy@1
|
153 |
+
- type: dot_accuracy@3
|
154 |
+
value: 0.98
|
155 |
+
name: Dot Accuracy@3
|
156 |
+
- type: dot_accuracy@5
|
157 |
+
value: 0.99
|
158 |
+
name: Dot Accuracy@5
|
159 |
+
- type: dot_accuracy@10
|
160 |
+
value: 1.0
|
161 |
+
name: Dot Accuracy@10
|
162 |
+
- type: dot_precision@1
|
163 |
+
value: 0.9
|
164 |
+
name: Dot Precision@1
|
165 |
+
- type: dot_precision@3
|
166 |
+
value: 0.3266666666666667
|
167 |
+
name: Dot Precision@3
|
168 |
+
- type: dot_precision@5
|
169 |
+
value: 0.19799999999999998
|
170 |
+
name: Dot Precision@5
|
171 |
+
- type: dot_precision@10
|
172 |
+
value: 0.09999999999999998
|
173 |
+
name: Dot Precision@10
|
174 |
+
- type: dot_recall@1
|
175 |
+
value: 0.9
|
176 |
+
name: Dot Recall@1
|
177 |
+
- type: dot_recall@3
|
178 |
+
value: 0.98
|
179 |
+
name: Dot Recall@3
|
180 |
+
- type: dot_recall@5
|
181 |
+
value: 0.99
|
182 |
+
name: Dot Recall@5
|
183 |
+
- type: dot_recall@10
|
184 |
+
value: 1.0
|
185 |
+
name: Dot Recall@10
|
186 |
+
- type: dot_ndcg@10
|
187 |
+
value: 0.9563669441556807
|
188 |
+
name: Dot Ndcg@10
|
189 |
+
- type: dot_mrr@10
|
190 |
+
value: 0.9417619047619047
|
191 |
+
name: Dot Mrr@10
|
192 |
+
- type: dot_map@100
|
193 |
+
value: 0.9417619047619047
|
194 |
+
name: Dot Map@100
|
195 |
+
---
|
196 |
+
|
197 |
+
# SentenceTransformer based on Snowflake/snowflake-arctic-embed-m
|
198 |
+
|
199 |
+
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [Snowflake/snowflake-arctic-embed-m](https://huggingface.co/Snowflake/snowflake-arctic-embed-m). It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
|
200 |
+
|
201 |
+
## Model Details
|
202 |
+
|
203 |
+
### Model Description
|
204 |
+
- **Model Type:** Sentence Transformer
|
205 |
+
- **Base model:** [Snowflake/snowflake-arctic-embed-m](https://huggingface.co/Snowflake/snowflake-arctic-embed-m) <!-- at revision e2b128b9fa60c82b4585512b33e1544224ffff42 -->
|
206 |
+
- **Maximum Sequence Length:** 512 tokens
|
207 |
+
- **Output Dimensionality:** 768 tokens
|
208 |
+
- **Similarity Function:** Cosine Similarity
|
209 |
+
<!-- - **Training Dataset:** Unknown -->
|
210 |
+
<!-- - **Language:** Unknown -->
|
211 |
+
<!-- - **License:** Unknown -->
|
212 |
+
|
213 |
+
### Model Sources
|
214 |
+
|
215 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
216 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
217 |
+
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
218 |
+
|
219 |
+
### Full Model Architecture
|
220 |
+
|
221 |
+
```
|
222 |
+
SentenceTransformer(
|
223 |
+
(0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: BertModel
|
224 |
+
(1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': True, 'pooling_mode_mean_tokens': False, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
|
225 |
+
(2): Normalize()
|
226 |
+
)
|
227 |
+
```
|
228 |
+
|
229 |
+
## Usage
|
230 |
+
|
231 |
+
### Direct Usage (Sentence Transformers)
|
232 |
+
|
233 |
+
First install the Sentence Transformers library:
|
234 |
+
|
235 |
+
```bash
|
236 |
+
pip install -U sentence-transformers
|
237 |
+
```
|
238 |
+
|
239 |
+
Then you can load this model and run inference.
|
240 |
+
```python
|
241 |
+
from sentence_transformers import SentenceTransformer
|
242 |
+
|
243 |
+
# Download from the 🤗 Hub
|
244 |
+
model = SentenceTransformer("sentence_transformers_model_id")
|
245 |
+
# Run inference
|
246 |
+
sentences = [
|
247 |
+
'What are the inventory exemptions defined in organizational policies for GAI systems embedded into application software?',
|
248 |
+
'Information Security GV-1.6-002 Define any inventory exemptions in organizational policies for GAI systems embedded into application software .',
|
249 |
+
'For example, predictive inferences made by GAI models based on PII or protected attributes c an contribute to adverse decisions , leading to representational or allocative harms to individuals or groups (see Harmful Bias and Homogenization below).',
|
250 |
+
]
|
251 |
+
embeddings = model.encode(sentences)
|
252 |
+
print(embeddings.shape)
|
253 |
+
# [3, 768]
|
254 |
+
|
255 |
+
# Get the similarity scores for the embeddings
|
256 |
+
similarities = model.similarity(embeddings, embeddings)
|
257 |
+
print(similarities.shape)
|
258 |
+
# [3, 3]
|
259 |
+
```
|
260 |
+
|
261 |
+
<!--
|
262 |
+
### Direct Usage (Transformers)
|
263 |
+
|
264 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
265 |
+
|
266 |
+
</details>
|
267 |
+
-->
|
268 |
+
|
269 |
+
<!--
|
270 |
+
### Downstream Usage (Sentence Transformers)
|
271 |
+
|
272 |
+
You can finetune this model on your own dataset.
|
273 |
+
|
274 |
+
<details><summary>Click to expand</summary>
|
275 |
+
|
276 |
+
</details>
|
277 |
+
-->
|
278 |
+
|
279 |
+
<!--
|
280 |
+
### Out-of-Scope Use
|
281 |
+
|
282 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
283 |
+
-->
|
284 |
+
|
285 |
+
## Evaluation
|
286 |
+
|
287 |
+
### Metrics
|
288 |
+
|
289 |
+
#### Information Retrieval
|
290 |
+
|
291 |
+
* Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
|
292 |
+
|
293 |
+
| Metric | Value |
|
294 |
+
|:--------------------|:-----------|
|
295 |
+
| cosine_accuracy@1 | 0.9 |
|
296 |
+
| cosine_accuracy@3 | 0.98 |
|
297 |
+
| cosine_accuracy@5 | 0.99 |
|
298 |
+
| cosine_accuracy@10 | 1.0 |
|
299 |
+
| cosine_precision@1 | 0.9 |
|
300 |
+
| cosine_precision@3 | 0.3267 |
|
301 |
+
| cosine_precision@5 | 0.198 |
|
302 |
+
| cosine_precision@10 | 0.1 |
|
303 |
+
| cosine_recall@1 | 0.9 |
|
304 |
+
| cosine_recall@3 | 0.98 |
|
305 |
+
| cosine_recall@5 | 0.99 |
|
306 |
+
| cosine_recall@10 | 1.0 |
|
307 |
+
| cosine_ndcg@10 | 0.9564 |
|
308 |
+
| cosine_mrr@10 | 0.9418 |
|
309 |
+
| **cosine_map@100** | **0.9418** |
|
310 |
+
| dot_accuracy@1 | 0.9 |
|
311 |
+
| dot_accuracy@3 | 0.98 |
|
312 |
+
| dot_accuracy@5 | 0.99 |
|
313 |
+
| dot_accuracy@10 | 1.0 |
|
314 |
+
| dot_precision@1 | 0.9 |
|
315 |
+
| dot_precision@3 | 0.3267 |
|
316 |
+
| dot_precision@5 | 0.198 |
|
317 |
+
| dot_precision@10 | 0.1 |
|
318 |
+
| dot_recall@1 | 0.9 |
|
319 |
+
| dot_recall@3 | 0.98 |
|
320 |
+
| dot_recall@5 | 0.99 |
|
321 |
+
| dot_recall@10 | 1.0 |
|
322 |
+
| dot_ndcg@10 | 0.9564 |
|
323 |
+
| dot_mrr@10 | 0.9418 |
|
324 |
+
| dot_map@100 | 0.9418 |
|
325 |
+
|
326 |
+
<!--
|
327 |
+
## Bias, Risks and Limitations
|
328 |
+
|
329 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
330 |
+
-->
|
331 |
+
|
332 |
+
<!--
|
333 |
+
### Recommendations
|
334 |
+
|
335 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
336 |
+
-->
|
337 |
+
|
338 |
+
## Training Details
|
339 |
+
|
340 |
+
### Training Dataset
|
341 |
+
|
342 |
+
#### Unnamed Dataset
|
343 |
+
|
344 |
+
|
345 |
+
* Size: 600 training samples
|
346 |
+
* Columns: <code>sentence_0</code> and <code>sentence_1</code>
|
347 |
+
* Approximate statistics based on the first 600 samples:
|
348 |
+
| | sentence_0 | sentence_1 |
|
349 |
+
|:--------|:----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|
|
350 |
+
| type | string | string |
|
351 |
+
| details | <ul><li>min: 7 tokens</li><li>mean: 18.93 tokens</li><li>max: 33 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 43.35 tokens</li><li>max: 165 tokens</li></ul> |
|
352 |
+
* Samples:
|
353 |
+
| sentence_0 | sentence_1 |
|
354 |
+
|:-----------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
355 |
+
| <code>What are indirect prompt injections and how can they exploit vulnerabilities?</code> | <code>Security researchers have already demonstrated how indirect prompt injections can exploit vulnerabilities by steal ing proprietary data or running malicious code remotely on a machine.</code> |
|
356 |
+
| <code>What potential consequences can arise from exploiting vulnerabilities through indirect prompt injections?</code> | <code>Security researchers have already demonstrated how indirect prompt injections can exploit vulnerabilities by steal ing proprietary data or running malicious code remotely on a machine.</code> |
|
357 |
+
| <code>What factors might organizations consider when tailoring their measurement of GAI risks?</code> | <code>Organizations may choose to tailor how they measure GAI risks based on these characteristics .</code> |
|
358 |
+
* Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
|
359 |
+
```json
|
360 |
+
{
|
361 |
+
"loss": "MultipleNegativesRankingLoss",
|
362 |
+
"matryoshka_dims": [
|
363 |
+
768,
|
364 |
+
512,
|
365 |
+
256,
|
366 |
+
128,
|
367 |
+
64
|
368 |
+
],
|
369 |
+
"matryoshka_weights": [
|
370 |
+
1,
|
371 |
+
1,
|
372 |
+
1,
|
373 |
+
1,
|
374 |
+
1
|
375 |
+
],
|
376 |
+
"n_dims_per_step": -1
|
377 |
+
}
|
378 |
+
```
|
379 |
+
|
380 |
+
### Training Hyperparameters
|
381 |
+
#### Non-Default Hyperparameters
|
382 |
+
|
383 |
+
- `eval_strategy`: steps
|
384 |
+
- `per_device_train_batch_size`: 20
|
385 |
+
- `per_device_eval_batch_size`: 20
|
386 |
+
- `num_train_epochs`: 5
|
387 |
+
- `multi_dataset_batch_sampler`: round_robin
|
388 |
+
|
389 |
+
#### All Hyperparameters
|
390 |
+
<details><summary>Click to expand</summary>
|
391 |
+
|
392 |
+
- `overwrite_output_dir`: False
|
393 |
+
- `do_predict`: False
|
394 |
+
- `eval_strategy`: steps
|
395 |
+
- `prediction_loss_only`: True
|
396 |
+
- `per_device_train_batch_size`: 20
|
397 |
+
- `per_device_eval_batch_size`: 20
|
398 |
+
- `per_gpu_train_batch_size`: None
|
399 |
+
- `per_gpu_eval_batch_size`: None
|
400 |
+
- `gradient_accumulation_steps`: 1
|
401 |
+
- `eval_accumulation_steps`: None
|
402 |
+
- `torch_empty_cache_steps`: None
|
403 |
+
- `learning_rate`: 5e-05
|
404 |
+
- `weight_decay`: 0.0
|
405 |
+
- `adam_beta1`: 0.9
|
406 |
+
- `adam_beta2`: 0.999
|
407 |
+
- `adam_epsilon`: 1e-08
|
408 |
+
- `max_grad_norm`: 1
|
409 |
+
- `num_train_epochs`: 5
|
410 |
+
- `max_steps`: -1
|
411 |
+
- `lr_scheduler_type`: linear
|
412 |
+
- `lr_scheduler_kwargs`: {}
|
413 |
+
- `warmup_ratio`: 0.0
|
414 |
+
- `warmup_steps`: 0
|
415 |
+
- `log_level`: passive
|
416 |
+
- `log_level_replica`: warning
|
417 |
+
- `log_on_each_node`: True
|
418 |
+
- `logging_nan_inf_filter`: True
|
419 |
+
- `save_safetensors`: True
|
420 |
+
- `save_on_each_node`: False
|
421 |
+
- `save_only_model`: False
|
422 |
+
- `restore_callback_states_from_checkpoint`: False
|
423 |
+
- `no_cuda`: False
|
424 |
+
- `use_cpu`: False
|
425 |
+
- `use_mps_device`: False
|
426 |
+
- `seed`: 42
|
427 |
+
- `data_seed`: None
|
428 |
+
- `jit_mode_eval`: False
|
429 |
+
- `use_ipex`: False
|
430 |
+
- `bf16`: False
|
431 |
+
- `fp16`: False
|
432 |
+
- `fp16_opt_level`: O1
|
433 |
+
- `half_precision_backend`: auto
|
434 |
+
- `bf16_full_eval`: False
|
435 |
+
- `fp16_full_eval`: False
|
436 |
+
- `tf32`: None
|
437 |
+
- `local_rank`: 0
|
438 |
+
- `ddp_backend`: None
|
439 |
+
- `tpu_num_cores`: None
|
440 |
+
- `tpu_metrics_debug`: False
|
441 |
+
- `debug`: []
|
442 |
+
- `dataloader_drop_last`: False
|
443 |
+
- `dataloader_num_workers`: 0
|
444 |
+
- `dataloader_prefetch_factor`: None
|
445 |
+
- `past_index`: -1
|
446 |
+
- `disable_tqdm`: False
|
447 |
+
- `remove_unused_columns`: True
|
448 |
+
- `label_names`: None
|
449 |
+
- `load_best_model_at_end`: False
|
450 |
+
- `ignore_data_skip`: False
|
451 |
+
- `fsdp`: []
|
452 |
+
- `fsdp_min_num_params`: 0
|
453 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
454 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
455 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
456 |
+
- `deepspeed`: None
|
457 |
+
- `label_smoothing_factor`: 0.0
|
458 |
+
- `optim`: adamw_torch
|
459 |
+
- `optim_args`: None
|
460 |
+
- `adafactor`: False
|
461 |
+
- `group_by_length`: False
|
462 |
+
- `length_column_name`: length
|
463 |
+
- `ddp_find_unused_parameters`: None
|
464 |
+
- `ddp_bucket_cap_mb`: None
|
465 |
+
- `ddp_broadcast_buffers`: False
|
466 |
+
- `dataloader_pin_memory`: True
|
467 |
+
- `dataloader_persistent_workers`: False
|
468 |
+
- `skip_memory_metrics`: True
|
469 |
+
- `use_legacy_prediction_loop`: False
|
470 |
+
- `push_to_hub`: False
|
471 |
+
- `resume_from_checkpoint`: None
|
472 |
+
- `hub_model_id`: None
|
473 |
+
- `hub_strategy`: every_save
|
474 |
+
- `hub_private_repo`: False
|
475 |
+
- `hub_always_push`: False
|
476 |
+
- `gradient_checkpointing`: False
|
477 |
+
- `gradient_checkpointing_kwargs`: None
|
478 |
+
- `include_inputs_for_metrics`: False
|
479 |
+
- `eval_do_concat_batches`: True
|
480 |
+
- `fp16_backend`: auto
|
481 |
+
- `push_to_hub_model_id`: None
|
482 |
+
- `push_to_hub_organization`: None
|
483 |
+
- `mp_parameters`:
|
484 |
+
- `auto_find_batch_size`: False
|
485 |
+
- `full_determinism`: False
|
486 |
+
- `torchdynamo`: None
|
487 |
+
- `ray_scope`: last
|
488 |
+
- `ddp_timeout`: 1800
|
489 |
+
- `torch_compile`: False
|
490 |
+
- `torch_compile_backend`: None
|
491 |
+
- `torch_compile_mode`: None
|
492 |
+
- `dispatch_batches`: None
|
493 |
+
- `split_batches`: None
|
494 |
+
- `include_tokens_per_second`: False
|
495 |
+
- `include_num_input_tokens_seen`: False
|
496 |
+
- `neftune_noise_alpha`: None
|
497 |
+
- `optim_target_modules`: None
|
498 |
+
- `batch_eval_metrics`: False
|
499 |
+
- `eval_on_start`: False
|
500 |
+
- `use_liger_kernel`: False
|
501 |
+
- `eval_use_gather_object`: False
|
502 |
+
- `batch_sampler`: batch_sampler
|
503 |
+
- `multi_dataset_batch_sampler`: round_robin
|
504 |
+
|
505 |
+
</details>
|
506 |
+
|
507 |
+
### Training Logs
|
508 |
+
| Epoch | Step | cosine_map@100 |
|
509 |
+
|:------:|:----:|:--------------:|
|
510 |
+
| 1.0 | 30 | 0.9216 |
|
511 |
+
| 1.6667 | 50 | 0.9292 |
|
512 |
+
| 2.0 | 60 | 0.9361 |
|
513 |
+
| 3.0 | 90 | 0.9418 |
|
514 |
+
|
515 |
+
|
516 |
+
### Framework Versions
|
517 |
+
- Python: 3.11.9
|
518 |
+
- Sentence Transformers: 3.1.1
|
519 |
+
- Transformers: 4.45.0
|
520 |
+
- PyTorch: 2.4.1+cu121
|
521 |
+
- Accelerate: 0.34.2
|
522 |
+
- Datasets: 3.0.1
|
523 |
+
- Tokenizers: 0.20.0
|
524 |
+
|
525 |
+
## Citation
|
526 |
+
|
527 |
+
### BibTeX
|
528 |
+
|
529 |
+
#### Sentence Transformers
|
530 |
+
```bibtex
|
531 |
+
@inproceedings{reimers-2019-sentence-bert,
|
532 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
533 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
534 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
535 |
+
month = "11",
|
536 |
+
year = "2019",
|
537 |
+
publisher = "Association for Computational Linguistics",
|
538 |
+
url = "https://arxiv.org/abs/1908.10084",
|
539 |
+
}
|
540 |
+
```
|
541 |
+
|
542 |
+
#### MatryoshkaLoss
|
543 |
+
```bibtex
|
544 |
+
@misc{kusupati2024matryoshka,
|
545 |
+
title={Matryoshka Representation Learning},
|
546 |
+
author={Aditya Kusupati and Gantavya Bhatt and Aniket Rege and Matthew Wallingford and Aditya Sinha and Vivek Ramanujan and William Howard-Snyder and Kaifeng Chen and Sham Kakade and Prateek Jain and Ali Farhadi},
|
547 |
+
year={2024},
|
548 |
+
eprint={2205.13147},
|
549 |
+
archivePrefix={arXiv},
|
550 |
+
primaryClass={cs.LG}
|
551 |
+
}
|
552 |
+
```
|
553 |
+
|
554 |
+
#### MultipleNegativesRankingLoss
|
555 |
+
```bibtex
|
556 |
+
@misc{henderson2017efficient,
|
557 |
+
title={Efficient Natural Language Response Suggestion for Smart Reply},
|
558 |
+
author={Matthew Henderson and Rami Al-Rfou and Brian Strope and Yun-hsuan Sung and Laszlo Lukacs and Ruiqi Guo and Sanjiv Kumar and Balint Miklos and Ray Kurzweil},
|
559 |
+
year={2017},
|
560 |
+
eprint={1705.00652},
|
561 |
+
archivePrefix={arXiv},
|
562 |
+
primaryClass={cs.CL}
|
563 |
+
}
|
564 |
+
```
|
565 |
+
|
566 |
+
<!--
|
567 |
+
## Glossary
|
568 |
+
|
569 |
+
*Clearly define terms in order to be accessible across audiences.*
|
570 |
+
-->
|
571 |
+
|
572 |
+
<!--
|
573 |
+
## Model Card Authors
|
574 |
+
|
575 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
576 |
+
-->
|
577 |
+
|
578 |
+
<!--
|
579 |
+
## Model Card Contact
|
580 |
+
|
581 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
582 |
+
-->
|
README.md:Zone.Identifier
ADDED
File without changes
|
config.json
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "Snowflake/snowflake-arctic-embed-m",
|
3 |
+
"architectures": [
|
4 |
+
"BertModel"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"classifier_dropout": null,
|
8 |
+
"gradient_checkpointing": false,
|
9 |
+
"hidden_act": "gelu",
|
10 |
+
"hidden_dropout_prob": 0.1,
|
11 |
+
"hidden_size": 768,
|
12 |
+
"initializer_range": 0.02,
|
13 |
+
"intermediate_size": 3072,
|
14 |
+
"layer_norm_eps": 1e-12,
|
15 |
+
"max_position_embeddings": 512,
|
16 |
+
"model_type": "bert",
|
17 |
+
"num_attention_heads": 12,
|
18 |
+
"num_hidden_layers": 12,
|
19 |
+
"pad_token_id": 0,
|
20 |
+
"position_embedding_type": "absolute",
|
21 |
+
"torch_dtype": "float32",
|
22 |
+
"transformers_version": "4.45.0",
|
23 |
+
"type_vocab_size": 2,
|
24 |
+
"use_cache": true,
|
25 |
+
"vocab_size": 30522
|
26 |
+
}
|
config.json:Zone.Identifier
ADDED
File without changes
|
config_sentence_transformers.json
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"__version__": {
|
3 |
+
"sentence_transformers": "3.1.1",
|
4 |
+
"transformers": "4.45.0",
|
5 |
+
"pytorch": "2.4.1+cu121"
|
6 |
+
},
|
7 |
+
"prompts": {
|
8 |
+
"query": "Represent this sentence for searching relevant passages: "
|
9 |
+
},
|
10 |
+
"default_prompt_name": null,
|
11 |
+
"similarity_fn_name": null
|
12 |
+
}
|
config_sentence_transformers.json:Zone.Identifier
ADDED
File without changes
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:05e2899560dd847e094c457cfe02489b704ddf821b6254fb0cd0845fa3924863
|
3 |
+
size 435588776
|
model.safetensors:Zone.Identifier
ADDED
File without changes
|
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 |
+
]
|
modules.json:Zone.Identifier
ADDED
File without changes
|
sentence_bert_config.json
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"max_seq_length": 512,
|
3 |
+
"do_lower_case": false
|
4 |
+
}
|
sentence_bert_config.json:Zone.Identifier
ADDED
File without changes
|
special_tokens_map.json
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"cls_token": {
|
3 |
+
"content": "[CLS]",
|
4 |
+
"lstrip": false,
|
5 |
+
"normalized": false,
|
6 |
+
"rstrip": false,
|
7 |
+
"single_word": false
|
8 |
+
},
|
9 |
+
"mask_token": {
|
10 |
+
"content": "[MASK]",
|
11 |
+
"lstrip": false,
|
12 |
+
"normalized": false,
|
13 |
+
"rstrip": false,
|
14 |
+
"single_word": false
|
15 |
+
},
|
16 |
+
"pad_token": {
|
17 |
+
"content": "[PAD]",
|
18 |
+
"lstrip": false,
|
19 |
+
"normalized": false,
|
20 |
+
"rstrip": false,
|
21 |
+
"single_word": false
|
22 |
+
},
|
23 |
+
"sep_token": {
|
24 |
+
"content": "[SEP]",
|
25 |
+
"lstrip": false,
|
26 |
+
"normalized": false,
|
27 |
+
"rstrip": false,
|
28 |
+
"single_word": false
|
29 |
+
},
|
30 |
+
"unk_token": {
|
31 |
+
"content": "[UNK]",
|
32 |
+
"lstrip": false,
|
33 |
+
"normalized": false,
|
34 |
+
"rstrip": false,
|
35 |
+
"single_word": false
|
36 |
+
}
|
37 |
+
}
|
special_tokens_map.json:Zone.Identifier
ADDED
File without changes
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer.json:Zone.Identifier
ADDED
File without changes
|
tokenizer_config.json
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"added_tokens_decoder": {
|
3 |
+
"0": {
|
4 |
+
"content": "[PAD]",
|
5 |
+
"lstrip": false,
|
6 |
+
"normalized": false,
|
7 |
+
"rstrip": false,
|
8 |
+
"single_word": false,
|
9 |
+
"special": true
|
10 |
+
},
|
11 |
+
"100": {
|
12 |
+
"content": "[UNK]",
|
13 |
+
"lstrip": false,
|
14 |
+
"normalized": false,
|
15 |
+
"rstrip": false,
|
16 |
+
"single_word": false,
|
17 |
+
"special": true
|
18 |
+
},
|
19 |
+
"101": {
|
20 |
+
"content": "[CLS]",
|
21 |
+
"lstrip": false,
|
22 |
+
"normalized": false,
|
23 |
+
"rstrip": false,
|
24 |
+
"single_word": false,
|
25 |
+
"special": true
|
26 |
+
},
|
27 |
+
"102": {
|
28 |
+
"content": "[SEP]",
|
29 |
+
"lstrip": false,
|
30 |
+
"normalized": false,
|
31 |
+
"rstrip": false,
|
32 |
+
"single_word": false,
|
33 |
+
"special": true
|
34 |
+
},
|
35 |
+
"103": {
|
36 |
+
"content": "[MASK]",
|
37 |
+
"lstrip": false,
|
38 |
+
"normalized": false,
|
39 |
+
"rstrip": false,
|
40 |
+
"single_word": false,
|
41 |
+
"special": true
|
42 |
+
}
|
43 |
+
},
|
44 |
+
"clean_up_tokenization_spaces": true,
|
45 |
+
"cls_token": "[CLS]",
|
46 |
+
"do_lower_case": true,
|
47 |
+
"mask_token": "[MASK]",
|
48 |
+
"max_length": 512,
|
49 |
+
"model_max_length": 512,
|
50 |
+
"pad_to_multiple_of": null,
|
51 |
+
"pad_token": "[PAD]",
|
52 |
+
"pad_token_type_id": 0,
|
53 |
+
"padding_side": "right",
|
54 |
+
"sep_token": "[SEP]",
|
55 |
+
"stride": 0,
|
56 |
+
"strip_accents": null,
|
57 |
+
"tokenize_chinese_chars": true,
|
58 |
+
"tokenizer_class": "BertTokenizer",
|
59 |
+
"truncation_side": "right",
|
60 |
+
"truncation_strategy": "longest_first",
|
61 |
+
"unk_token": "[UNK]"
|
62 |
+
}
|
tokenizer_config.json:Zone.Identifier
ADDED
File without changes
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
vocab.txt:Zone.Identifier
ADDED
File without changes
|