philocifer commited on
Commit
c4fb691
·
verified ·
1 Parent(s): 71bfe1c

Add new SentenceTransformer model

Browse files
1_Pooling/config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "word_embedding_dimension": 1024,
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
+ }
README.md ADDED
@@ -0,0 +1,658 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - sentence-transformers
4
+ - sentence-similarity
5
+ - feature-extraction
6
+ - generated_from_trainer
7
+ - dataset_size:156
8
+ - loss:MatryoshkaLoss
9
+ - loss:MultipleNegativesRankingLoss
10
+ base_model: Snowflake/snowflake-arctic-embed-l
11
+ widget:
12
+ - source_sentence: What is the author's perspective on the environmental impact of
13
+ plagiarism machines in the field discussed?
14
+ sentences:
15
+ - 'Prince Canuma’s excellent, fast moving mlx-vlm project brings vision LLMs to
16
+ Apple Silicon as well. I used that recently to run Qwen’s QvQ.
17
+
18
+ While MLX is a game changer, Apple’s own “Apple Intelligence” features have mostly
19
+ been a disappointment. I wrote about their initial announcement in June, and I
20
+ was optimistic that Apple had focused hard on the subset of LLM applications that
21
+ preserve user privacy and minimize the chance of users getting mislead by confusing
22
+ features.'
23
+ - 'I think telling people that this whole field is environmentally catastrophic
24
+ plagiarism machines that constantly make things up is doing those people a disservice,
25
+ no matter how much truth that represents. There is genuine value to be had here,
26
+ but getting to that value is unintuitive and needs guidance.
27
+
28
+ Those of us who understand this stuff have a duty to help everyone else figure
29
+ it out.
30
+
31
+ Everything tagged “llms” on my blog in 2024
32
+
33
+ Because I undoubtedly missed a whole bunch of things, here’s every long-form post
34
+ I wrote in 2024 that I tagged with llms:'
35
+ - Meanwhile, it’s increasingly common for end users to develop wildly inaccurate
36
+ mental models of how these things work and what they are capable of. I’ve seen
37
+ so many examples of people trying to win an argument with a screenshot from ChatGPT—an
38
+ inherently ludicrous proposition, given the inherent unreliability of these models
39
+ crossed with the fact that you can get them to say anything if you prompt them
40
+ right.
41
+ - source_sentence: What is the license under which Alibaba's QwQ model was released?
42
+ sentences:
43
+ - 'Those US export regulations on GPUs to China seem to have inspired some very
44
+ effective training optimizations!
45
+
46
+ The environmental impact got better
47
+
48
+ A welcome result of the increased efficiency of the models—both the hosted ones
49
+ and the ones I can run locally—is that the energy usage and environmental impact
50
+ of running a prompt has dropped enormously over the past couple of years.
51
+
52
+ OpenAI themselves are charging 100x less for a prompt compared to the GPT-3 days.
53
+ I have it on good authority that neither Google Gemini nor Amazon Nova (two of
54
+ the least expensive model providers) are running prompts at a loss.'
55
+ - 'OpenAI are not the only game in town here. Google released their first entrant
56
+ in the category, gemini-2.0-flash-thinking-exp, on December 19th.
57
+
58
+ Alibaba’s Qwen team released their QwQ model on November 28th—under an Apache
59
+ 2.0 license, and that one I could run on my own machine. They followed that up
60
+ with a vision reasoning model called QvQ on December 24th, which I also ran locally.
61
+
62
+ DeepSeek made their DeepSeek-R1-Lite-Preview model available to try out through
63
+ their chat interface on November 20th.
64
+
65
+ To understand more about inference scaling I recommend Is AI progress slowing
66
+ down? by Arvind Narayanan and Sayash Kapoor.'
67
+ - 'The boring yet crucial secret behind good system prompts is test-driven development.
68
+ You don’t write down a system prompt and find ways to test it. You write down
69
+ tests and find a system prompt that passes them.
70
+
71
+
72
+ It’s become abundantly clear over the course of 2024 that writing good automated
73
+ evals for LLM-powered systems is the skill that’s most needed to build useful
74
+ applications on top of these models. If you have a strong eval suite you can adopt
75
+ new models faster, iterate better and build more reliable and useful product features
76
+ than your competition.
77
+
78
+ Vercel’s Malte Ubl:'
79
+ - source_sentence: How do longer inputs enhance the problem-solving capabilities of
80
+ an LLM compared to shorter prompts?
81
+ sentences:
82
+ - '19th: Weeknotes: GPT-4o mini, LLM 0.15, sqlite-utils 3.37 and building a staging
83
+ environment
84
+
85
+
86
+
87
+
88
+ August
89
+
90
+
91
+ 6th: Weeknotes: a staging environment, a Datasette alpha and a bunch of new LLMs
92
+
93
+
94
+ 8th: django-http-debug, a new Django app mostly written by Claude
95
+
96
+
97
+ 23rd: Claude’s API now supports CORS requests, enabling client-side applications
98
+
99
+
100
+ 26th: Building a tool showing how Gemini Pro can return bounding boxes for objects
101
+ in images
102
+
103
+
104
+
105
+
106
+ September
107
+
108
+
109
+ 6th: Calling LLMs from client-side JavaScript, converting PDFs to HTML + weeknotes
110
+
111
+
112
+ 10th: Notes from my appearance on the Software Misadventures Podcast
113
+
114
+
115
+ 12th: Notes on OpenAI’s new o1 chain-of-thought models
116
+
117
+
118
+ 20th: Notes on using LLMs for code'
119
+ - 'Longer inputs dramatically increase the scope of problems that can be solved
120
+ with an LLM: you can now throw in an entire book and ask questions about its contents,
121
+ but more importantly you can feed in a lot of example code to help the model correctly
122
+ solve a coding problem. LLM use-cases that involve long inputs are far more interesting
123
+ to me than short prompts that rely purely on the information already baked into
124
+ the model weights. Many of my tools were built using this pattern.'
125
+ - The most recent twist, again from December (December was a lot) is live video.
126
+ ChatGPT voice mode now provides the option to share your camera feed with the
127
+ model and talk about what you can see in real time. Google Gemini have a preview
128
+ of the same feature, which they managed to ship the day before ChatGPT did.
129
+ - source_sentence: What capabilities does Google’s Gemini have regarding audio input
130
+ and output?
131
+ sentences:
132
+ - 'Terminology aside, I remain skeptical as to their utility based, once again,
133
+ on the challenge of gullibility. LLMs believe anything you tell them. Any systems
134
+ that attempts to make meaningful decisions on your behalf will run into the same
135
+ roadblock: how good is a travel agent, or a digital assistant, or even a research
136
+ tool if it can’t distinguish truth from fiction?
137
+
138
+ Just the other day Google Search was caught serving up an entirely fake description
139
+ of the non-existant movie “Encanto 2”. It turned out to be summarizing an imagined
140
+ movie listing from a fan fiction wiki.'
141
+ - 'Watching in real time as “slop” becomes a term of art. the way that “spam” became
142
+ the term for unwanted emails, “slop” is going in the dictionary as the term for
143
+ unwanted AI generated content
144
+
145
+
146
+ I expanded that definition a tiny bit to this:
147
+
148
+
149
+ Slop describes AI-generated content that is both unrequested and unreviewed.
150
+
151
+
152
+ I ended up getting quoted talking about slop in both the Guardian and the NY Times.
153
+ Here’s what I said in the NY TImes:
154
+
155
+
156
+ Society needs concise ways to talk about modern A.I. — both the positives and
157
+ the negatives. ‘Ignore that email, it’s spam,’ and ‘Ignore that article, it’s
158
+ slop,’ are both useful lessons.'
159
+ - 'Your browser does not support the audio element.
160
+
161
+
162
+ OpenAI aren’t the only group with a multi-modal audio model. Google’s Gemini also
163
+ accepts audio input, and the Google Gemini apps can speak in a similar way to
164
+ ChatGPT now. Amazon also pre-announced voice mode for Amazon Nova, but that’s
165
+ meant to roll out in Q1 of 2025.
166
+
167
+ Google’s NotebookLM, released in September, took audio output to a new level by
168
+ producing spookily realistic conversations between two “podcast hosts” about anything
169
+ you fed into their tool. They later added custom instructions, so naturally I
170
+ turned them into pelicans:
171
+
172
+
173
+
174
+ Your browser does not support the audio element.'
175
+ - source_sentence: How does the context compare a prompt without evals, models, and
176
+ UX to an ASML machine?
177
+ sentences:
178
+ - 'When @v0 first came out we were paranoid about protecting the prompt with all
179
+ kinds of pre and post processing complexity.
180
+
181
+ We completely pivoted to let it rip. A prompt without the evals, models, and especially
182
+ UX is like getting a broken ASML machine without a manual'
183
+ - 'I’m still trying to figure out the best patterns for doing this for my own work.
184
+ Everyone knows that evals are important, but there remains a lack of great guidance
185
+ for how to best implement them—I’m tracking this under my evals tag. My SVG pelican
186
+ riding a bicycle benchmark is a pale imitation of what a real eval suite should
187
+ look like.
188
+
189
+ Apple Intelligence is bad, Apple’s MLX library is excellent
190
+
191
+ As a Mac user I’ve been feeling a lot better about my choice of platform this
192
+ year.
193
+
194
+ Last year it felt like my lack of a Linux/Windows machine with an NVIDIA GPU
195
+ was a huge disadvantage in terms of trying out new models.'
196
+ - 'That’s a total cost of $1.68 to process 68,000 images. That’s so absurdly cheap
197
+ I had to run the numbers three times to confirm I got it right.
198
+
199
+ How good are those descriptions? Here’s what I got from this command:
200
+
201
+ llm -m gemini-1.5-flash-8b-latest describe -a IMG_1825.jpeg'
202
+ pipeline_tag: sentence-similarity
203
+ library_name: sentence-transformers
204
+ metrics:
205
+ - cosine_accuracy@1
206
+ - cosine_accuracy@3
207
+ - cosine_accuracy@5
208
+ - cosine_accuracy@10
209
+ - cosine_precision@1
210
+ - cosine_precision@3
211
+ - cosine_precision@5
212
+ - cosine_precision@10
213
+ - cosine_recall@1
214
+ - cosine_recall@3
215
+ - cosine_recall@5
216
+ - cosine_recall@10
217
+ - cosine_ndcg@10
218
+ - cosine_mrr@10
219
+ - cosine_map@100
220
+ model-index:
221
+ - name: SentenceTransformer based on Snowflake/snowflake-arctic-embed-l
222
+ results:
223
+ - task:
224
+ type: information-retrieval
225
+ name: Information Retrieval
226
+ dataset:
227
+ name: Unknown
228
+ type: unknown
229
+ metrics:
230
+ - type: cosine_accuracy@1
231
+ value: 0.875
232
+ name: Cosine Accuracy@1
233
+ - type: cosine_accuracy@3
234
+ value: 1.0
235
+ name: Cosine Accuracy@3
236
+ - type: cosine_accuracy@5
237
+ value: 1.0
238
+ name: Cosine Accuracy@5
239
+ - type: cosine_accuracy@10
240
+ value: 1.0
241
+ name: Cosine Accuracy@10
242
+ - type: cosine_precision@1
243
+ value: 0.875
244
+ name: Cosine Precision@1
245
+ - type: cosine_precision@3
246
+ value: 0.3333333333333333
247
+ name: Cosine Precision@3
248
+ - type: cosine_precision@5
249
+ value: 0.20000000000000004
250
+ name: Cosine Precision@5
251
+ - type: cosine_precision@10
252
+ value: 0.10000000000000002
253
+ name: Cosine Precision@10
254
+ - type: cosine_recall@1
255
+ value: 0.875
256
+ name: Cosine Recall@1
257
+ - type: cosine_recall@3
258
+ value: 1.0
259
+ name: Cosine Recall@3
260
+ - type: cosine_recall@5
261
+ value: 1.0
262
+ name: Cosine Recall@5
263
+ - type: cosine_recall@10
264
+ value: 1.0
265
+ name: Cosine Recall@10
266
+ - type: cosine_ndcg@10
267
+ value: 0.9429554063988107
268
+ name: Cosine Ndcg@10
269
+ - type: cosine_mrr@10
270
+ value: 0.923611111111111
271
+ name: Cosine Mrr@10
272
+ - type: cosine_map@100
273
+ value: 0.923611111111111
274
+ name: Cosine Map@100
275
+ ---
276
+
277
+ # SentenceTransformer based on Snowflake/snowflake-arctic-embed-l
278
+
279
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [Snowflake/snowflake-arctic-embed-l](https://huggingface.co/Snowflake/snowflake-arctic-embed-l). 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.
280
+
281
+ ## Model Details
282
+
283
+ ### Model Description
284
+ - **Model Type:** Sentence Transformer
285
+ - **Base model:** [Snowflake/snowflake-arctic-embed-l](https://huggingface.co/Snowflake/snowflake-arctic-embed-l) <!-- at revision d8fb21ca8d905d2832ee8b96c894d3298964346b -->
286
+ - **Maximum Sequence Length:** 512 tokens
287
+ - **Output Dimensionality:** 1024 dimensions
288
+ - **Similarity Function:** Cosine Similarity
289
+ <!-- - **Training Dataset:** Unknown -->
290
+ <!-- - **Language:** Unknown -->
291
+ <!-- - **License:** Unknown -->
292
+
293
+ ### Model Sources
294
+
295
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
296
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
297
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
298
+
299
+ ### Full Model Architecture
300
+
301
+ ```
302
+ SentenceTransformer(
303
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: BertModel
304
+ (1): Pooling({'word_embedding_dimension': 1024, '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})
305
+ (2): Normalize()
306
+ )
307
+ ```
308
+
309
+ ## Usage
310
+
311
+ ### Direct Usage (Sentence Transformers)
312
+
313
+ First install the Sentence Transformers library:
314
+
315
+ ```bash
316
+ pip install -U sentence-transformers
317
+ ```
318
+
319
+ Then you can load this model and run inference.
320
+ ```python
321
+ from sentence_transformers import SentenceTransformer
322
+
323
+ # Download from the 🤗 Hub
324
+ model = SentenceTransformer("philocifer/legal-ft-2")
325
+ # Run inference
326
+ sentences = [
327
+ 'How does the context compare a prompt without evals, models, and UX to an ASML machine?',
328
+ 'When @v0 first came out we were paranoid about protecting the prompt with all kinds of pre and post processing complexity.\nWe completely pivoted to let it rip. A prompt without the evals, models, and especially UX is like getting a broken ASML machine without a manual',
329
+ 'That’s a total cost of $1.68 to process 68,000 images. That’s so absurdly cheap I had to run the numbers three times to confirm I got it right.\nHow good are those descriptions? Here’s what I got from this command:\nllm -m gemini-1.5-flash-8b-latest describe -a IMG_1825.jpeg',
330
+ ]
331
+ embeddings = model.encode(sentences)
332
+ print(embeddings.shape)
333
+ # [3, 1024]
334
+
335
+ # Get the similarity scores for the embeddings
336
+ similarities = model.similarity(embeddings, embeddings)
337
+ print(similarities.shape)
338
+ # [3, 3]
339
+ ```
340
+
341
+ <!--
342
+ ### Direct Usage (Transformers)
343
+
344
+ <details><summary>Click to see the direct usage in Transformers</summary>
345
+
346
+ </details>
347
+ -->
348
+
349
+ <!--
350
+ ### Downstream Usage (Sentence Transformers)
351
+
352
+ You can finetune this model on your own dataset.
353
+
354
+ <details><summary>Click to expand</summary>
355
+
356
+ </details>
357
+ -->
358
+
359
+ <!--
360
+ ### Out-of-Scope Use
361
+
362
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
363
+ -->
364
+
365
+ ## Evaluation
366
+
367
+ ### Metrics
368
+
369
+ #### Information Retrieval
370
+
371
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
372
+
373
+ | Metric | Value |
374
+ |:--------------------|:----------|
375
+ | cosine_accuracy@1 | 0.875 |
376
+ | cosine_accuracy@3 | 1.0 |
377
+ | cosine_accuracy@5 | 1.0 |
378
+ | cosine_accuracy@10 | 1.0 |
379
+ | cosine_precision@1 | 0.875 |
380
+ | cosine_precision@3 | 0.3333 |
381
+ | cosine_precision@5 | 0.2 |
382
+ | cosine_precision@10 | 0.1 |
383
+ | cosine_recall@1 | 0.875 |
384
+ | cosine_recall@3 | 1.0 |
385
+ | cosine_recall@5 | 1.0 |
386
+ | cosine_recall@10 | 1.0 |
387
+ | **cosine_ndcg@10** | **0.943** |
388
+ | cosine_mrr@10 | 0.9236 |
389
+ | cosine_map@100 | 0.9236 |
390
+
391
+ <!--
392
+ ## Bias, Risks and Limitations
393
+
394
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
395
+ -->
396
+
397
+ <!--
398
+ ### Recommendations
399
+
400
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
401
+ -->
402
+
403
+ ## Training Details
404
+
405
+ ### Training Dataset
406
+
407
+ #### Unnamed Dataset
408
+
409
+ * Size: 156 training samples
410
+ * Columns: <code>sentence_0</code> and <code>sentence_1</code>
411
+ * Approximate statistics based on the first 156 samples:
412
+ | | sentence_0 | sentence_1 |
413
+ |:--------|:-----------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------|
414
+ | type | string | string |
415
+ | details | <ul><li>min: 13 tokens</li><li>mean: 20.07 tokens</li><li>max: 33 tokens</li></ul> | <ul><li>min: 43 tokens</li><li>mean: 130.53 tokens</li><li>max: 204 tokens</li></ul> |
416
+ * Samples:
417
+ | sentence_0 | sentence_1 |
418
+ |:---------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
419
+ | <code>What are some ways the author has used LLMs to improve productivity and entertainment?</code> | <code>So far, I think they’re a net positive. I’ve used them on a personal level to improve my productivity (and entertain myself) in all sorts of different ways. I think people who learn how to use them effectively can gain a significant boost to their quality of life.<br>A lot of people are yet to be sold on their value! Some think their negatives outweigh their positives, some think they are all hot air, and some even think they represent an existential threat to humanity.<br>They’re actually quite easy to build<br>The most surprising thing we’ve learned about LLMs this year is that they’re actually quite easy to build.</code> |
420
+ | <code>What concerns do some people have regarding the value and impact of LLMs?</code> | <code>So far, I think they’re a net positive. I’ve used them on a personal level to improve my productivity (and entertain myself) in all sorts of different ways. I think people who learn how to use them effectively can gain a significant boost to their quality of life.<br>A lot of people are yet to be sold on their value! Some think their negatives outweigh their positives, some think they are all hot air, and some even think they represent an existential threat to humanity.<br>They’re actually quite easy to build<br>The most surprising thing we’ve learned about LLMs this year is that they’re actually quite easy to build.</code> |
421
+ | <code>What improvements were noted in the intonation of ChatGPT Advanced Voice mode during its rollout?</code> | <code>When ChatGPT Advanced Voice mode finally did roll out (a slow roll from August through September) it was spectacular. I’ve been using it extensively on walks with my dog and it’s amazing how much the improvement in intonation elevates the material. I’ve also had a lot of fun experimenting with the OpenAI audio APIs.<br>Even more fun: Advanced Voice mode can do accents! Here’s what happened when I told it I need you to pretend to be a California brown pelican with a very thick Russian accent, but you talk to me exclusively in Spanish.</code> |
422
+ * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
423
+ ```json
424
+ {
425
+ "loss": "MultipleNegativesRankingLoss",
426
+ "matryoshka_dims": [
427
+ 768,
428
+ 512,
429
+ 256,
430
+ 128,
431
+ 64
432
+ ],
433
+ "matryoshka_weights": [
434
+ 1,
435
+ 1,
436
+ 1,
437
+ 1,
438
+ 1
439
+ ],
440
+ "n_dims_per_step": -1
441
+ }
442
+ ```
443
+
444
+ ### Training Hyperparameters
445
+ #### Non-Default Hyperparameters
446
+
447
+ - `eval_strategy`: steps
448
+ - `per_device_train_batch_size`: 10
449
+ - `per_device_eval_batch_size`: 10
450
+ - `num_train_epochs`: 10
451
+ - `multi_dataset_batch_sampler`: round_robin
452
+
453
+ #### All Hyperparameters
454
+ <details><summary>Click to expand</summary>
455
+
456
+ - `overwrite_output_dir`: False
457
+ - `do_predict`: False
458
+ - `eval_strategy`: steps
459
+ - `prediction_loss_only`: True
460
+ - `per_device_train_batch_size`: 10
461
+ - `per_device_eval_batch_size`: 10
462
+ - `per_gpu_train_batch_size`: None
463
+ - `per_gpu_eval_batch_size`: None
464
+ - `gradient_accumulation_steps`: 1
465
+ - `eval_accumulation_steps`: None
466
+ - `torch_empty_cache_steps`: None
467
+ - `learning_rate`: 5e-05
468
+ - `weight_decay`: 0.0
469
+ - `adam_beta1`: 0.9
470
+ - `adam_beta2`: 0.999
471
+ - `adam_epsilon`: 1e-08
472
+ - `max_grad_norm`: 1
473
+ - `num_train_epochs`: 10
474
+ - `max_steps`: -1
475
+ - `lr_scheduler_type`: linear
476
+ - `lr_scheduler_kwargs`: {}
477
+ - `warmup_ratio`: 0.0
478
+ - `warmup_steps`: 0
479
+ - `log_level`: passive
480
+ - `log_level_replica`: warning
481
+ - `log_on_each_node`: True
482
+ - `logging_nan_inf_filter`: True
483
+ - `save_safetensors`: True
484
+ - `save_on_each_node`: False
485
+ - `save_only_model`: False
486
+ - `restore_callback_states_from_checkpoint`: False
487
+ - `no_cuda`: False
488
+ - `use_cpu`: False
489
+ - `use_mps_device`: False
490
+ - `seed`: 42
491
+ - `data_seed`: None
492
+ - `jit_mode_eval`: False
493
+ - `use_ipex`: False
494
+ - `bf16`: False
495
+ - `fp16`: False
496
+ - `fp16_opt_level`: O1
497
+ - `half_precision_backend`: auto
498
+ - `bf16_full_eval`: False
499
+ - `fp16_full_eval`: False
500
+ - `tf32`: None
501
+ - `local_rank`: 0
502
+ - `ddp_backend`: None
503
+ - `tpu_num_cores`: None
504
+ - `tpu_metrics_debug`: False
505
+ - `debug`: []
506
+ - `dataloader_drop_last`: False
507
+ - `dataloader_num_workers`: 0
508
+ - `dataloader_prefetch_factor`: None
509
+ - `past_index`: -1
510
+ - `disable_tqdm`: False
511
+ - `remove_unused_columns`: True
512
+ - `label_names`: None
513
+ - `load_best_model_at_end`: False
514
+ - `ignore_data_skip`: False
515
+ - `fsdp`: []
516
+ - `fsdp_min_num_params`: 0
517
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
518
+ - `fsdp_transformer_layer_cls_to_wrap`: None
519
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
520
+ - `deepspeed`: None
521
+ - `label_smoothing_factor`: 0.0
522
+ - `optim`: adamw_torch
523
+ - `optim_args`: None
524
+ - `adafactor`: False
525
+ - `group_by_length`: False
526
+ - `length_column_name`: length
527
+ - `ddp_find_unused_parameters`: None
528
+ - `ddp_bucket_cap_mb`: None
529
+ - `ddp_broadcast_buffers`: False
530
+ - `dataloader_pin_memory`: True
531
+ - `dataloader_persistent_workers`: False
532
+ - `skip_memory_metrics`: True
533
+ - `use_legacy_prediction_loop`: False
534
+ - `push_to_hub`: False
535
+ - `resume_from_checkpoint`: None
536
+ - `hub_model_id`: None
537
+ - `hub_strategy`: every_save
538
+ - `hub_private_repo`: None
539
+ - `hub_always_push`: False
540
+ - `gradient_checkpointing`: False
541
+ - `gradient_checkpointing_kwargs`: None
542
+ - `include_inputs_for_metrics`: False
543
+ - `include_for_metrics`: []
544
+ - `eval_do_concat_batches`: True
545
+ - `fp16_backend`: auto
546
+ - `push_to_hub_model_id`: None
547
+ - `push_to_hub_organization`: None
548
+ - `mp_parameters`:
549
+ - `auto_find_batch_size`: False
550
+ - `full_determinism`: False
551
+ - `torchdynamo`: None
552
+ - `ray_scope`: last
553
+ - `ddp_timeout`: 1800
554
+ - `torch_compile`: False
555
+ - `torch_compile_backend`: None
556
+ - `torch_compile_mode`: None
557
+ - `dispatch_batches`: None
558
+ - `split_batches`: None
559
+ - `include_tokens_per_second`: False
560
+ - `include_num_input_tokens_seen`: False
561
+ - `neftune_noise_alpha`: None
562
+ - `optim_target_modules`: None
563
+ - `batch_eval_metrics`: False
564
+ - `eval_on_start`: False
565
+ - `use_liger_kernel`: False
566
+ - `eval_use_gather_object`: False
567
+ - `average_tokens_across_devices`: False
568
+ - `prompts`: None
569
+ - `batch_sampler`: batch_sampler
570
+ - `multi_dataset_batch_sampler`: round_robin
571
+
572
+ </details>
573
+
574
+ ### Training Logs
575
+ | Epoch | Step | cosine_ndcg@10 |
576
+ |:-----:|:----:|:--------------:|
577
+ | 1.0 | 16 | 0.9276 |
578
+ | 2.0 | 32 | 0.9330 |
579
+ | 3.0 | 48 | 0.9301 |
580
+ | 3.125 | 50 | 0.9301 |
581
+ | 4.0 | 64 | 0.9372 |
582
+ | 5.0 | 80 | 0.9401 |
583
+ | 6.0 | 96 | 0.9401 |
584
+ | 6.25 | 100 | 0.9401 |
585
+ | 7.0 | 112 | 0.9430 |
586
+ | 8.0 | 128 | 0.9484 |
587
+ | 9.0 | 144 | 0.9430 |
588
+ | 9.375 | 150 | 0.9430 |
589
+ | 10.0 | 160 | 0.9430 |
590
+
591
+
592
+ ### Framework Versions
593
+ - Python: 3.11.11
594
+ - Sentence Transformers: 3.4.1
595
+ - Transformers: 4.48.3
596
+ - PyTorch: 2.5.1+cu124
597
+ - Accelerate: 1.3.0
598
+ - Datasets: 3.3.0
599
+ - Tokenizers: 0.21.0
600
+
601
+ ## Citation
602
+
603
+ ### BibTeX
604
+
605
+ #### Sentence Transformers
606
+ ```bibtex
607
+ @inproceedings{reimers-2019-sentence-bert,
608
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
609
+ author = "Reimers, Nils and Gurevych, Iryna",
610
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
611
+ month = "11",
612
+ year = "2019",
613
+ publisher = "Association for Computational Linguistics",
614
+ url = "https://arxiv.org/abs/1908.10084",
615
+ }
616
+ ```
617
+
618
+ #### MatryoshkaLoss
619
+ ```bibtex
620
+ @misc{kusupati2024matryoshka,
621
+ title={Matryoshka Representation Learning},
622
+ 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},
623
+ year={2024},
624
+ eprint={2205.13147},
625
+ archivePrefix={arXiv},
626
+ primaryClass={cs.LG}
627
+ }
628
+ ```
629
+
630
+ #### MultipleNegativesRankingLoss
631
+ ```bibtex
632
+ @misc{henderson2017efficient,
633
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
634
+ 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},
635
+ year={2017},
636
+ eprint={1705.00652},
637
+ archivePrefix={arXiv},
638
+ primaryClass={cs.CL}
639
+ }
640
+ ```
641
+
642
+ <!--
643
+ ## Glossary
644
+
645
+ *Clearly define terms in order to be accessible across audiences.*
646
+ -->
647
+
648
+ <!--
649
+ ## Model Card Authors
650
+
651
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
652
+ -->
653
+
654
+ <!--
655
+ ## Model Card Contact
656
+
657
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
658
+ -->
config.json ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "Snowflake/snowflake-arctic-embed-l",
3
+ "architectures": [
4
+ "BertModel"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "classifier_dropout": null,
8
+ "hidden_act": "gelu",
9
+ "hidden_dropout_prob": 0.1,
10
+ "hidden_size": 1024,
11
+ "initializer_range": 0.02,
12
+ "intermediate_size": 4096,
13
+ "layer_norm_eps": 1e-12,
14
+ "max_position_embeddings": 512,
15
+ "model_type": "bert",
16
+ "num_attention_heads": 16,
17
+ "num_hidden_layers": 24,
18
+ "pad_token_id": 0,
19
+ "position_embedding_type": "absolute",
20
+ "torch_dtype": "float32",
21
+ "transformers_version": "4.48.3",
22
+ "type_vocab_size": 2,
23
+ "use_cache": true,
24
+ "vocab_size": 30522
25
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "3.4.1",
4
+ "transformers": "4.48.3",
5
+ "pytorch": "2.5.1+cu124"
6
+ },
7
+ "prompts": {
8
+ "query": "Represent this sentence for searching relevant passages: "
9
+ },
10
+ "default_prompt_name": null,
11
+ "similarity_fn_name": "cosine"
12
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:22f1e939c47c4cb47bc45fec8f19472ddb818a99301dda035fd135605deee09a
3
+ size 1336413848
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
+ }
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
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "extra_special_tokens": {},
48
+ "mask_token": "[MASK]",
49
+ "max_length": 512,
50
+ "model_max_length": 512,
51
+ "pad_to_multiple_of": null,
52
+ "pad_token": "[PAD]",
53
+ "pad_token_type_id": 0,
54
+ "padding_side": "right",
55
+ "sep_token": "[SEP]",
56
+ "stride": 0,
57
+ "strip_accents": null,
58
+ "tokenize_chinese_chars": true,
59
+ "tokenizer_class": "BertTokenizer",
60
+ "truncation_side": "right",
61
+ "truncation_strategy": "longest_first",
62
+ "unk_token": "[UNK]"
63
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff