dataera2013 commited on
Commit
0b52910
·
verified ·
1 Parent(s): 86adca9

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,689 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - sentence-transformers
4
+ - sentence-similarity
5
+ - feature-extraction
6
+ - generated_from_trainer
7
+ - dataset_size:200
8
+ - loss:MatryoshkaLoss
9
+ - loss:MultipleNegativesRankingLoss
10
+ base_model: Snowflake/snowflake-arctic-embed-l
11
+ widget:
12
+ - source_sentence: How do longer inputs enhance the problem-solving capabilities of
13
+ an LLM?
14
+ sentences:
15
+ - 'Longer inputs dramatically increase the scope of problems that can be solved
16
+ with an LLM: you can now throw in an entire book and ask questions about its contents,
17
+ but more importantly you can feed in a lot of example code to help the model correctly
18
+ solve a coding problem. LLM use-cases that involve long inputs are far more interesting
19
+ to me than short prompts that rely purely on the information already baked into
20
+ the model weights. Many of my tools were built using this pattern.'
21
+ - 'If you think about what they do, this isn’t such a big surprise. The grammar
22
+ rules of programming languages like Python and JavaScript are massively less complicated
23
+ than the grammar of Chinese, Spanish or English.
24
+
25
+ It’s still astonishing to me how effective they are though.
26
+
27
+ One of the great weaknesses of LLMs is their tendency to hallucinate—to imagine
28
+ things that don’t correspond to reality. You would expect this to be a particularly
29
+ bad problem for code—if an LLM hallucinates a method that doesn’t exist, the code
30
+ should be useless.'
31
+ - "blogging\n 68\n\n\n ai\n 1098\n\n\n \
32
+ \ generative-ai\n 942\n\n\n llms\n 930\n\n\
33
+ Next: Tom Scott, and the formidable power of escalating streaks\nPrevious: Last\
34
+ \ weeknotes of 2023\n\n\n \n \n\n\nColophon\n©\n2002\n2003\n2004\n2005\n2006\n\
35
+ 2007\n2008\n2009\n2010\n2011\n2012\n2013\n2014\n2015\n2016\n2017\n2018\n2019\n\
36
+ 2020\n2021\n2022\n2023\n2024\n2025"
37
+ - source_sentence: How did other teams respond to the author's use of Claude Artifacts?
38
+ sentences:
39
+ - 'This prompt-driven custom interface feature is so powerful and easy to build
40
+ (once you’ve figured out the gnarly details of browser sandboxing) that I expect
41
+ it to show up as a feature in a wide range of products in 2025.
42
+
43
+ Universal access to the best models lasted for just a few short months
44
+
45
+ For a few short months this year all three of the best available models—GPT-4o,
46
+ Claude 3.5 Sonnet and Gemini 1.5 Pro—were freely available to most of the world.'
47
+ - 'I’ve found myself using this a lot. I noticed how much I was relying on it in
48
+ October and wrote Everything I built with Claude Artifacts this week, describing
49
+ 14 little tools I had put together in a seven day period.
50
+
51
+ Since then, a whole bunch of other teams have built similar systems. GitHub announced
52
+ their version of this—GitHub Spark—in October. Mistral Chat added it as a feature
53
+ called Canvas in November.
54
+
55
+ Steve Krouse from Val Town built a version of it against Cerebras, showcasing
56
+ how a 2,000 token/second LLM can iterate on an application with changes visible
57
+ in less than a second.'
58
+ - Structured and Gradual Learning. In organic datasets, the relationship between
59
+ tokens is often complex and indirect. Many reasoning steps may be required to
60
+ connect the current token to the next, making it challenging for the model to
61
+ learn effectively from next-token prediction. By contrast, each token generated
62
+ by a language model is by definition predicted by the preceding tokens, making
63
+ it easier for a model to follow the resulting reasoning patterns.
64
+ - source_sentence: How does the new llamafile improve the process of running an LLM
65
+ on a personal computer?
66
+ sentences:
67
+ - 'A year ago, the only organization that had released a generally useful LLM was
68
+ OpenAI. We’ve now seen better-than-GPT-3 class models produced by Anthropic, Mistral,
69
+ Google, Meta, EleutherAI, Stability AI, TII in Abu Dhabi (Falcon), Microsoft Research,
70
+ xAI, Replit, Baidu and a bunch of other organizations.
71
+
72
+ The training cost (hardware and electricity) is still significant—initially millions
73
+ of dollars, but that seems to have dropped to the tens of thousands already. Microsoft’s
74
+ Phi-2 claims to have used “14 days on 96 A100 GPUs”, which works out at around
75
+ $35,000 using current Lambda pricing.'
76
+ - 'Embeddings: What they are and why they matter
77
+
78
+ 61.7k
79
+
80
+ 79.3k
81
+
82
+
83
+
84
+ Catching up on the weird world of LLMs
85
+
86
+ 61.6k
87
+
88
+ 85.9k
89
+
90
+
91
+
92
+ llamafile is the new best way to run an LLM on your own computer
93
+
94
+ 52k
95
+
96
+ 66k
97
+
98
+
99
+
100
+ Prompt injection explained, with video, slides, and a transcript
101
+
102
+ 51k
103
+
104
+ 61.9k
105
+
106
+
107
+
108
+ AI-enhanced development makes me more ambitious with my projects
109
+
110
+ 49.6k
111
+
112
+ 60.1k
113
+
114
+
115
+
116
+ Understanding GPT tokenizers
117
+
118
+ 49.5k
119
+
120
+ 61.1k
121
+
122
+
123
+
124
+ Exploring GPTs: ChatGPT in a trench coat?
125
+
126
+ 46.4k
127
+
128
+ 58.5k
129
+
130
+
131
+
132
+ Could you train a ChatGPT-beating model for $85,000 and run it in a browser?
133
+
134
+ 40.5k
135
+
136
+ 49.2k
137
+
138
+
139
+
140
+ How to implement Q&A against your documentation with GPT3, embeddings and Datasette
141
+
142
+ 37.3k
143
+
144
+ 44.9k
145
+
146
+
147
+
148
+ Lawyer cites fake cases invented by ChatGPT, judge is not amused
149
+
150
+ 37.1k
151
+
152
+ 47.4k'
153
+ - 'Qwen2.5-Coder-32B is an LLM that can code well that runs on my Mac talks about
154
+ Qwen2.5-Coder-32B in November—an Apache 2.0 licensed model!
155
+
156
+
157
+ I can now run a GPT-4 class model on my laptop talks about running Meta’s Llama
158
+ 3.3 70B (released in December)'
159
+ - source_sentence: What technique is being used by an increasing number of labs to
160
+ create training data for smaller models?
161
+ sentences:
162
+ - 'Another common technique is to use larger models to help create training data
163
+ for their smaller, cheaper alternatives—a trick used by an increasing number of
164
+ labs. DeepSeek v3 used “reasoning” data created by DeepSeek-R1. Meta’s Llama 3.3
165
+ 70B fine-tuning used over 25M synthetically generated examples.
166
+
167
+ Careful design of the training data that goes into an LLM appears to be the entire
168
+ game for creating these models. The days of just grabbing a full scrape of the
169
+ web and indiscriminately dumping it into a training run are long gone.
170
+
171
+ LLMs somehow got even harder to use'
172
+ - 'An interesting point of comparison here could be the way railways rolled out
173
+ around the world in the 1800s. Constructing these required enormous investments
174
+ and had a massive environmental impact, and many of the lines that were built
175
+ turned out to be unnecessary—sometimes multiple lines from different companies
176
+ serving the exact same routes!
177
+
178
+ The resulting bubbles contributed to several financial crashes, see Wikipedia
179
+ for Panic of 1873, Panic of 1893, Panic of 1901 and the UK’s Railway Mania. They
180
+ left us with a lot of useful infrastructure and a great deal of bankruptcies and
181
+ environmental damage.
182
+
183
+ The year of slop'
184
+ - 'Here’s the sequel to this post: Things we learned about LLMs in 2024.
185
+
186
+ Large Language Models
187
+
188
+ In the past 24-36 months, our species has discovered that you can take a GIANT
189
+ corpus of text, run it through a pile of GPUs, and use it to create a fascinating
190
+ new kind of software.
191
+
192
+ LLMs can do a lot of things. They can answer questions, summarize documents, translate
193
+ from one language to another, extract information and even write surprisingly
194
+ competent code.
195
+
196
+ They can also help you cheat at your homework, generate unlimited streams of fake
197
+ content and be used for all manner of nefarious purposes.'
198
+ - source_sentence: What are some reasons why better informed people have chosen to
199
+ avoid using LLMs?
200
+ sentences:
201
+ - 'There’s a flipside to this too: a lot of better informed people have sworn off
202
+ LLMs entirely because they can’t see how anyone could benefit from a tool with
203
+ so many flaws. The key skill in getting the most out of LLMs is learning to work
204
+ with tech that is both inherently unreliable and incredibly powerful at the same
205
+ time. This is a decidedly non-obvious skill to acquire!
206
+
207
+ There is so much space for helpful education content here, but we need to do do
208
+ a lot better than outsourcing it all to AI grifters with bombastic Twitter threads.
209
+
210
+ Knowledge is incredibly unevenly distributed
211
+
212
+ Most people have heard of ChatGPT by now. How many have heard of Claude?'
213
+ - 'I find I have to work with an LLM for a few weeks in order to get a good intuition
214
+ for it’s strengths and weaknesses. This greatly limits how many I can evaluate
215
+ myself!
216
+
217
+ The most frustrating thing for me is at the level of individual prompting.
218
+
219
+ Sometimes I’ll tweak a prompt and capitalize some of the words in it, to emphasize
220
+ that I really want it to OUTPUT VALID MARKDOWN or similar. Did capitalizing those
221
+ words make a difference? I still don’t have a good methodology for figuring that
222
+ out.
223
+
224
+ We’re left with what’s effectively Vibes Based Development. It’s vibes all the
225
+ way down.
226
+
227
+ I’d love to see us move beyond vibes in 2024!
228
+
229
+ LLMs are really smart, and also really, really dumb'
230
+ - 'The year of slop
231
+
232
+ 2024 was the year that the word "slop" became a term of art. I wrote about this
233
+ in May, expanding on this tweet by @deepfates:'
234
+ pipeline_tag: sentence-similarity
235
+ library_name: sentence-transformers
236
+ metrics:
237
+ - cosine_accuracy@1
238
+ - cosine_accuracy@3
239
+ - cosine_accuracy@5
240
+ - cosine_accuracy@10
241
+ - cosine_precision@1
242
+ - cosine_precision@3
243
+ - cosine_precision@5
244
+ - cosine_precision@10
245
+ - cosine_recall@1
246
+ - cosine_recall@3
247
+ - cosine_recall@5
248
+ - cosine_recall@10
249
+ - cosine_ndcg@10
250
+ - cosine_mrr@10
251
+ - cosine_map@100
252
+ model-index:
253
+ - name: SentenceTransformer based on Snowflake/snowflake-arctic-embed-l
254
+ results:
255
+ - task:
256
+ type: information-retrieval
257
+ name: Information Retrieval
258
+ dataset:
259
+ name: Unknown
260
+ type: unknown
261
+ metrics:
262
+ - type: cosine_accuracy@1
263
+ value: 0.7580645161290323
264
+ name: Cosine Accuracy@1
265
+ - type: cosine_accuracy@3
266
+ value: 0.967741935483871
267
+ name: Cosine Accuracy@3
268
+ - type: cosine_accuracy@5
269
+ value: 1.0
270
+ name: Cosine Accuracy@5
271
+ - type: cosine_accuracy@10
272
+ value: 1.0
273
+ name: Cosine Accuracy@10
274
+ - type: cosine_precision@1
275
+ value: 0.7580645161290323
276
+ name: Cosine Precision@1
277
+ - type: cosine_precision@3
278
+ value: 0.3225806451612902
279
+ name: Cosine Precision@3
280
+ - type: cosine_precision@5
281
+ value: 0.19999999999999993
282
+ name: Cosine Precision@5
283
+ - type: cosine_precision@10
284
+ value: 0.09999999999999996
285
+ name: Cosine Precision@10
286
+ - type: cosine_recall@1
287
+ value: 0.7580645161290323
288
+ name: Cosine Recall@1
289
+ - type: cosine_recall@3
290
+ value: 0.967741935483871
291
+ name: Cosine Recall@3
292
+ - type: cosine_recall@5
293
+ value: 1.0
294
+ name: Cosine Recall@5
295
+ - type: cosine_recall@10
296
+ value: 1.0
297
+ name: Cosine Recall@10
298
+ - type: cosine_ndcg@10
299
+ value: 0.8958019499724179
300
+ name: Cosine Ndcg@10
301
+ - type: cosine_mrr@10
302
+ value: 0.860215053763441
303
+ name: Cosine Mrr@10
304
+ - type: cosine_map@100
305
+ value: 0.8602150537634409
306
+ name: Cosine Map@100
307
+ ---
308
+
309
+ # SentenceTransformer based on Snowflake/snowflake-arctic-embed-l
310
+
311
+ 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.
312
+
313
+ ## Model Details
314
+
315
+ ### Model Description
316
+ - **Model Type:** Sentence Transformer
317
+ - **Base model:** [Snowflake/snowflake-arctic-embed-l](https://huggingface.co/Snowflake/snowflake-arctic-embed-l) <!-- at revision d8fb21ca8d905d2832ee8b96c894d3298964346b -->
318
+ - **Maximum Sequence Length:** 512 tokens
319
+ - **Output Dimensionality:** 1024 dimensions
320
+ - **Similarity Function:** Cosine Similarity
321
+ <!-- - **Training Dataset:** Unknown -->
322
+ <!-- - **Language:** Unknown -->
323
+ <!-- - **License:** Unknown -->
324
+
325
+ ### Model Sources
326
+
327
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
328
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
329
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
330
+
331
+ ### Full Model Architecture
332
+
333
+ ```
334
+ SentenceTransformer(
335
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: BertModel
336
+ (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})
337
+ (2): Normalize()
338
+ )
339
+ ```
340
+
341
+ ## Usage
342
+
343
+ ### Direct Usage (Sentence Transformers)
344
+
345
+ First install the Sentence Transformers library:
346
+
347
+ ```bash
348
+ pip install -U sentence-transformers
349
+ ```
350
+
351
+ Then you can load this model and run inference.
352
+ ```python
353
+ from sentence_transformers import SentenceTransformer
354
+
355
+ # Download from the 🤗 Hub
356
+ model = SentenceTransformer("dataera2013/mt-1")
357
+ # Run inference
358
+ sentences = [
359
+ 'What are some reasons why better informed people have chosen to avoid using LLMs?',
360
+ 'There’s a flipside to this too: a lot of better informed people have sworn off LLMs entirely because they can’t see how anyone could benefit from a tool with so many flaws. The key skill in getting the most out of LLMs is learning to work with tech that is both inherently unreliable and incredibly powerful at the same time. This is a decidedly non-obvious skill to acquire!\nThere is so much space for helpful education content here, but we need to do do a lot better than outsourcing it all to AI grifters with bombastic Twitter threads.\nKnowledge is incredibly unevenly distributed\nMost people have heard of ChatGPT by now. How many have heard of Claude?',
361
+ 'The year of slop\n2024 was the year that the word "slop" became a term of art. I wrote about this in May, expanding on this tweet by @deepfates:',
362
+ ]
363
+ embeddings = model.encode(sentences)
364
+ print(embeddings.shape)
365
+ # [3, 1024]
366
+
367
+ # Get the similarity scores for the embeddings
368
+ similarities = model.similarity(embeddings, embeddings)
369
+ print(similarities.shape)
370
+ # [3, 3]
371
+ ```
372
+
373
+ <!--
374
+ ### Direct Usage (Transformers)
375
+
376
+ <details><summary>Click to see the direct usage in Transformers</summary>
377
+
378
+ </details>
379
+ -->
380
+
381
+ <!--
382
+ ### Downstream Usage (Sentence Transformers)
383
+
384
+ You can finetune this model on your own dataset.
385
+
386
+ <details><summary>Click to expand</summary>
387
+
388
+ </details>
389
+ -->
390
+
391
+ <!--
392
+ ### Out-of-Scope Use
393
+
394
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
395
+ -->
396
+
397
+ ## Evaluation
398
+
399
+ ### Metrics
400
+
401
+ #### Information Retrieval
402
+
403
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
404
+
405
+ | Metric | Value |
406
+ |:--------------------|:-----------|
407
+ | cosine_accuracy@1 | 0.7581 |
408
+ | cosine_accuracy@3 | 0.9677 |
409
+ | cosine_accuracy@5 | 1.0 |
410
+ | cosine_accuracy@10 | 1.0 |
411
+ | cosine_precision@1 | 0.7581 |
412
+ | cosine_precision@3 | 0.3226 |
413
+ | cosine_precision@5 | 0.2 |
414
+ | cosine_precision@10 | 0.1 |
415
+ | cosine_recall@1 | 0.7581 |
416
+ | cosine_recall@3 | 0.9677 |
417
+ | cosine_recall@5 | 1.0 |
418
+ | cosine_recall@10 | 1.0 |
419
+ | **cosine_ndcg@10** | **0.8958** |
420
+ | cosine_mrr@10 | 0.8602 |
421
+ | cosine_map@100 | 0.8602 |
422
+
423
+ <!--
424
+ ## Bias, Risks and Limitations
425
+
426
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
427
+ -->
428
+
429
+ <!--
430
+ ### Recommendations
431
+
432
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
433
+ -->
434
+
435
+ ## Training Details
436
+
437
+ ### Training Dataset
438
+
439
+ #### Unnamed Dataset
440
+
441
+ * Size: 200 training samples
442
+ * Columns: <code>sentence_0</code> and <code>sentence_1</code>
443
+ * Approximate statistics based on the first 200 samples:
444
+ | | sentence_0 | sentence_1 |
445
+ |:--------|:-----------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------|
446
+ | type | string | string |
447
+ | details | <ul><li>min: 12 tokens</li><li>mean: 20.32 tokens</li><li>max: 36 tokens</li></ul> | <ul><li>min: 43 tokens</li><li>mean: 134.92 tokens</li><li>max: 214 tokens</li></ul> |
448
+ * Samples:
449
+ | sentence_0 | sentence_1 |
450
+ |:--------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
451
+ | <code>What is the new name for unwanted AI-generated content mentioned in May?</code> | <code>17th: AI for Data Journalism: demonstrating what we can do with this stuff right now<br><br>22nd: Options for accessing Llama 3 from the terminal using LLM<br><br><br><br>May<br><br>8th: Slop is the new name for unwanted AI-generated content<br><br>15th: ChatGPT in “4o” mode is not running the new features yet<br><br>29th: Training is not the same as chatting: ChatGPT and other LLMs don’t remember everything you say<br><br><br><br>June<br><br>6th: Accidental prompt injection against RAG applications<br><br>10th: Thoughts on the WWDC 2024 keynote on Apple Intelligence<br><br>17th: Language models on the command-line<br><br>21st: Building search-based RAG using Claude, Datasette and Val Town<br><br>27th: Open challenges for AI engineering<br><br><br><br>July<br><br>14th: Imitation Intelligence, my keynote for PyCon US 2024</code> |
452
+ | <code>What are the options for accessing Llama 3 from the terminal?</code> | <code>17th: AI for Data Journalism: demonstrating what we can do with this stuff right now<br><br>22nd: Options for accessing Llama 3 from the terminal using LLM<br><br><br><br>May<br><br>8th: Slop is the new name for unwanted AI-generated content<br><br>15th: ChatGPT in “4o” mode is not running the new features yet<br><br>29th: Training is not the same as chatting: ChatGPT and other LLMs don’t remember everything you say<br><br><br><br>June<br><br>6th: Accidental prompt injection against RAG applications<br><br>10th: Thoughts on the WWDC 2024 keynote on Apple Intelligence<br><br>17th: Language models on the command-line<br><br>21st: Building search-based RAG using Claude, Datasette and Val Town<br><br>27th: Open challenges for AI engineering<br><br><br><br>July<br><br>14th: Imitation Intelligence, my keynote for PyCon US 2024</code> |
453
+ | <code>What is the name of the model that the author runs on their iPhone?</code> | <code>I run a bunch of them on my laptop. I run Mistral 7B (a surprisingly great model) on my iPhone. You can install several different apps to get your own, local, completely private LLM. My own LLM project provides a CLI tool for running an array of different models via plugins.<br>You can even run them entirely in your browser using WebAssembly and the latest Chrome!<br>Hobbyists can build their own fine-tuned models<br>I said earlier that building an LLM was still out of reach of hobbyists. That may be true for training from scratch, but fine-tuning one of those models is another matter entirely.</code> |
454
+ * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
455
+ ```json
456
+ {
457
+ "loss": "MultipleNegativesRankingLoss",
458
+ "matryoshka_dims": [
459
+ 768,
460
+ 512,
461
+ 256,
462
+ 128,
463
+ 64
464
+ ],
465
+ "matryoshka_weights": [
466
+ 1,
467
+ 1,
468
+ 1,
469
+ 1,
470
+ 1
471
+ ],
472
+ "n_dims_per_step": -1
473
+ }
474
+ ```
475
+
476
+ ### Training Hyperparameters
477
+ #### Non-Default Hyperparameters
478
+
479
+ - `eval_strategy`: steps
480
+ - `per_device_train_batch_size`: 10
481
+ - `per_device_eval_batch_size`: 10
482
+ - `num_train_epochs`: 10
483
+ - `multi_dataset_batch_sampler`: round_robin
484
+
485
+ #### All Hyperparameters
486
+ <details><summary>Click to expand</summary>
487
+
488
+ - `overwrite_output_dir`: False
489
+ - `do_predict`: False
490
+ - `eval_strategy`: steps
491
+ - `prediction_loss_only`: True
492
+ - `per_device_train_batch_size`: 10
493
+ - `per_device_eval_batch_size`: 10
494
+ - `per_gpu_train_batch_size`: None
495
+ - `per_gpu_eval_batch_size`: None
496
+ - `gradient_accumulation_steps`: 1
497
+ - `eval_accumulation_steps`: None
498
+ - `torch_empty_cache_steps`: None
499
+ - `learning_rate`: 5e-05
500
+ - `weight_decay`: 0.0
501
+ - `adam_beta1`: 0.9
502
+ - `adam_beta2`: 0.999
503
+ - `adam_epsilon`: 1e-08
504
+ - `max_grad_norm`: 1
505
+ - `num_train_epochs`: 10
506
+ - `max_steps`: -1
507
+ - `lr_scheduler_type`: linear
508
+ - `lr_scheduler_kwargs`: {}
509
+ - `warmup_ratio`: 0.0
510
+ - `warmup_steps`: 0
511
+ - `log_level`: passive
512
+ - `log_level_replica`: warning
513
+ - `log_on_each_node`: True
514
+ - `logging_nan_inf_filter`: True
515
+ - `save_safetensors`: True
516
+ - `save_on_each_node`: False
517
+ - `save_only_model`: False
518
+ - `restore_callback_states_from_checkpoint`: False
519
+ - `no_cuda`: False
520
+ - `use_cpu`: False
521
+ - `use_mps_device`: False
522
+ - `seed`: 42
523
+ - `data_seed`: None
524
+ - `jit_mode_eval`: False
525
+ - `use_ipex`: False
526
+ - `bf16`: False
527
+ - `fp16`: False
528
+ - `fp16_opt_level`: O1
529
+ - `half_precision_backend`: auto
530
+ - `bf16_full_eval`: False
531
+ - `fp16_full_eval`: False
532
+ - `tf32`: None
533
+ - `local_rank`: 0
534
+ - `ddp_backend`: None
535
+ - `tpu_num_cores`: None
536
+ - `tpu_metrics_debug`: False
537
+ - `debug`: []
538
+ - `dataloader_drop_last`: False
539
+ - `dataloader_num_workers`: 0
540
+ - `dataloader_prefetch_factor`: None
541
+ - `past_index`: -1
542
+ - `disable_tqdm`: False
543
+ - `remove_unused_columns`: True
544
+ - `label_names`: None
545
+ - `load_best_model_at_end`: False
546
+ - `ignore_data_skip`: False
547
+ - `fsdp`: []
548
+ - `fsdp_min_num_params`: 0
549
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
550
+ - `fsdp_transformer_layer_cls_to_wrap`: None
551
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
552
+ - `deepspeed`: None
553
+ - `label_smoothing_factor`: 0.0
554
+ - `optim`: adamw_torch
555
+ - `optim_args`: None
556
+ - `adafactor`: False
557
+ - `group_by_length`: False
558
+ - `length_column_name`: length
559
+ - `ddp_find_unused_parameters`: None
560
+ - `ddp_bucket_cap_mb`: None
561
+ - `ddp_broadcast_buffers`: False
562
+ - `dataloader_pin_memory`: True
563
+ - `dataloader_persistent_workers`: False
564
+ - `skip_memory_metrics`: True
565
+ - `use_legacy_prediction_loop`: False
566
+ - `push_to_hub`: False
567
+ - `resume_from_checkpoint`: None
568
+ - `hub_model_id`: None
569
+ - `hub_strategy`: every_save
570
+ - `hub_private_repo`: None
571
+ - `hub_always_push`: False
572
+ - `gradient_checkpointing`: False
573
+ - `gradient_checkpointing_kwargs`: None
574
+ - `include_inputs_for_metrics`: False
575
+ - `include_for_metrics`: []
576
+ - `eval_do_concat_batches`: True
577
+ - `fp16_backend`: auto
578
+ - `push_to_hub_model_id`: None
579
+ - `push_to_hub_organization`: None
580
+ - `mp_parameters`:
581
+ - `auto_find_batch_size`: False
582
+ - `full_determinism`: False
583
+ - `torchdynamo`: None
584
+ - `ray_scope`: last
585
+ - `ddp_timeout`: 1800
586
+ - `torch_compile`: False
587
+ - `torch_compile_backend`: None
588
+ - `torch_compile_mode`: None
589
+ - `dispatch_batches`: None
590
+ - `split_batches`: None
591
+ - `include_tokens_per_second`: False
592
+ - `include_num_input_tokens_seen`: False
593
+ - `neftune_noise_alpha`: None
594
+ - `optim_target_modules`: None
595
+ - `batch_eval_metrics`: False
596
+ - `eval_on_start`: False
597
+ - `use_liger_kernel`: False
598
+ - `eval_use_gather_object`: False
599
+ - `average_tokens_across_devices`: False
600
+ - `prompts`: None
601
+ - `batch_sampler`: batch_sampler
602
+ - `multi_dataset_batch_sampler`: round_robin
603
+
604
+ </details>
605
+
606
+ ### Training Logs
607
+ | Epoch | Step | cosine_ndcg@10 |
608
+ |:-----:|:----:|:--------------:|
609
+ | 1.0 | 20 | 0.9008 |
610
+ | 2.0 | 40 | 0.9190 |
611
+ | 2.5 | 50 | 0.9050 |
612
+ | 3.0 | 60 | 0.9050 |
613
+ | 4.0 | 80 | 0.8990 |
614
+ | 5.0 | 100 | 0.9109 |
615
+ | 6.0 | 120 | 0.9029 |
616
+ | 7.0 | 140 | 0.9018 |
617
+ | 7.5 | 150 | 0.9029 |
618
+ | 8.0 | 160 | 0.9029 |
619
+ | 9.0 | 180 | 0.8958 |
620
+ | 10.0 | 200 | 0.8958 |
621
+
622
+
623
+ ### Framework Versions
624
+ - Python: 3.13.1
625
+ - Sentence Transformers: 3.4.1
626
+ - Transformers: 4.48.3
627
+ - PyTorch: 2.6.0+cu124
628
+ - Accelerate: 1.3.0
629
+ - Datasets: 3.2.0
630
+ - Tokenizers: 0.21.0
631
+
632
+ ## Citation
633
+
634
+ ### BibTeX
635
+
636
+ #### Sentence Transformers
637
+ ```bibtex
638
+ @inproceedings{reimers-2019-sentence-bert,
639
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
640
+ author = "Reimers, Nils and Gurevych, Iryna",
641
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
642
+ month = "11",
643
+ year = "2019",
644
+ publisher = "Association for Computational Linguistics",
645
+ url = "https://arxiv.org/abs/1908.10084",
646
+ }
647
+ ```
648
+
649
+ #### MatryoshkaLoss
650
+ ```bibtex
651
+ @misc{kusupati2024matryoshka,
652
+ title={Matryoshka Representation Learning},
653
+ 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},
654
+ year={2024},
655
+ eprint={2205.13147},
656
+ archivePrefix={arXiv},
657
+ primaryClass={cs.LG}
658
+ }
659
+ ```
660
+
661
+ #### MultipleNegativesRankingLoss
662
+ ```bibtex
663
+ @misc{henderson2017efficient,
664
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
665
+ 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},
666
+ year={2017},
667
+ eprint={1705.00652},
668
+ archivePrefix={arXiv},
669
+ primaryClass={cs.CL}
670
+ }
671
+ ```
672
+
673
+ <!--
674
+ ## Glossary
675
+
676
+ *Clearly define terms in order to be accessible across audiences.*
677
+ -->
678
+
679
+ <!--
680
+ ## Model Card Authors
681
+
682
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
683
+ -->
684
+
685
+ <!--
686
+ ## Model Card Contact
687
+
688
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
689
+ -->
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.6.0+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:a00f7db8bf965efc7dbb3bbad52e60dfd3e875de150dfbdb127a33595159384b
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