lizchu414 commited on
Commit
06684e7
·
verified ·
1 Parent(s): 95df0b9

Add new SentenceTransformer model

Browse files
1_Pooling/config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "word_embedding_dimension": 768,
3
+ "pooling_mode_cls_token": false,
4
+ "pooling_mode_mean_tokens": true,
5
+ "pooling_mode_max_tokens": false,
6
+ "pooling_mode_mean_sqrt_len_tokens": false,
7
+ "pooling_mode_weightedmean_tokens": false,
8
+ "pooling_mode_lasttoken": false,
9
+ "include_prompt": true
10
+ }
README.md ADDED
@@ -0,0 +1,501 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: sentence-transformers/all-mpnet-base-v2
3
+ datasets:
4
+ - sentence-transformers/squad
5
+ language:
6
+ - en
7
+ library_name: sentence-transformers
8
+ pipeline_tag: sentence-similarity
9
+ tags:
10
+ - sentence-transformers
11
+ - sentence-similarity
12
+ - feature-extraction
13
+ - generated_from_trainer
14
+ - dataset_size:87599
15
+ - loss:MultipleNegativesRankingLoss
16
+ widget:
17
+ - source_sentence: What prompted transportation improvements in Portugal in the 1970's?
18
+ sentences:
19
+ - Greenhouses convert solar light to heat, enabling year-round production and the
20
+ growth (in enclosed environments) of specialty crops and other plants not naturally
21
+ suited to the local climate. Primitive greenhouses were first used during Roman
22
+ times to produce cucumbers year-round for the Roman emperor Tiberius. The first
23
+ modern greenhouses were built in Europe in the 16th century to keep exotic plants
24
+ brought back from explorations abroad. Greenhouses remain an important part of
25
+ horticulture today, and plastic transparent materials have also been used to similar
26
+ effect in polytunnels and row covers.
27
+ - By the early 1970s Portugal's fast economic growth with increasing consumption
28
+ and purchase of new automobiles set the priority for improvements in transportation.
29
+ Again in the 1990s, after joining the European Economic Community, the country
30
+ built many new motorways. Today, the country has a 68,732 km (42,708 mi) road
31
+ network, of which almost 3,000 km (1,864 mi) are part of system of 44 motorways.
32
+ Opened in 1944, the first motorway (which linked Lisbon to the National Stadium)
33
+ was an innovative project that made Portugal among one of the first countries
34
+ in the world to establish a motorway (this roadway eventually became the Lisbon-Cascais
35
+ highway, or A5). But, although a few other tracts were created (around 1960 and
36
+ 1970), it was only after the beginning of the 1980s that large-scale motorway
37
+ construction was implemented. In 1972, Brisa, the highway concessionaire, was
38
+ founded to handle the management of many of the regions motorways. On many highways,
39
+ toll needs to be paid, see Via Verde. Vasco da Gama bridge is the longest bridge
40
+ in Europe.
41
+ - Kanye West began his early production career in the mid-1990s, making beats primarily
42
+ for burgeoning local artists, eventually developing a style that involved speeding
43
+ up vocal samples from classic soul records. His first official production credits
44
+ came at the age of nineteen when he produced eight tracks on Down to Earth, the
45
+ 1996 debut album of a Chicago rapper named Grav. For a time, West acted as a ghost
46
+ producer for Deric "D-Dot" Angelettie. Because of his association with D-Dot,
47
+ West wasn't able to release a solo album, so he formed and became a member and
48
+ producer of the Go-Getters, a late-1990s Chicago rap group composed of him, GLC,
49
+ Timmy G, Really Doe, and Arrowstar. His group was managed by John "Monopoly" Johnson,
50
+ Don Crowley, and Happy Lewis under the management firm Hustle Period. After attending
51
+ a series of promotional photo shoots and making some radio appearances, The Go-Getters
52
+ released their first and only studio album World Record Holders in 1999. The album
53
+ featured other Chicago-based rappers such as Rhymefest, Mikkey Halsted, Miss Criss,
54
+ and Shayla G. Meanwhile, the production was handled by West, Arrowstar, Boogz,
55
+ and Brian "All Day" Miller.
56
+ - source_sentence: What did Virchow feel Darwin's conclusions lacked?
57
+ sentences:
58
+ - 'Similar organizations in other countries followed: The American Anthropological
59
+ Association in 1902, the Anthropological Society of Madrid (1865), the Anthropological
60
+ Society of Vienna (1870), the Italian Society of Anthropology and Ethnology (1871),
61
+ and many others subsequently. The majority of these were evolutionist. One notable
62
+ exception was the Berlin Society of Anthropology (1869) founded by Rudolph Virchow,
63
+ known for his vituperative attacks on the evolutionists. Not religious himself,
64
+ he insisted that Darwin''s conclusions lacked empirical foundation.'
65
+ - Russian Imperialism led to the Russian Empire's conquest of Central Asia during
66
+ the late 19th century's Imperial Era. Between 1864 and 1885 Russia gradually took
67
+ control of the entire territory of Russian Turkestan, the Tajikistan portion of
68
+ which had been controlled by the Emirate of Bukhara and Khanate of Kokand. Russia
69
+ was interested in gaining access to a supply of cotton and in the 1870s attempted
70
+ to switch cultivation in the region from grain to cotton (a strategy later copied
71
+ and expanded by the Soviets).[citation needed] By 1885 Tajikistan's territory
72
+ was either ruled by the Russian Empire or its vassal state, the Emirate of Bukhara,
73
+ nevertheless Tajiks felt little Russian influence.[citation needed]
74
+ - A solar balloon is a black balloon that is filled with ordinary air. As sunlight
75
+ shines on the balloon, the air inside is heated and expands causing an upward
76
+ buoyancy force, much like an artificially heated hot air balloon. Some solar balloons
77
+ are large enough for human flight, but usage is generally limited to the toy market
78
+ as the surface-area to payload-weight ratio is relatively high.
79
+ - source_sentence: What is the object of study for linguistic anthropology?
80
+ sentences:
81
+ - Anthropology of development tends to view development from a critical perspective.
82
+ The kind of issues addressed and implications for the approach simply involve
83
+ pondering why, if a key development goal is to alleviate poverty, is poverty increasing?
84
+ Why is there such a gap between plans and outcomes? Why are those working in development
85
+ so willing to disregard history and the lessons it might offer? Why is development
86
+ so externally driven rather than having an internal basis? In short why does so
87
+ much planned development fail?
88
+ - The study of kinship and social organization is a central focus of sociocultural
89
+ anthropology, as kinship is a human universal. Sociocultural anthropology also
90
+ covers economic and political organization, law and conflict resolution, patterns
91
+ of consumption and exchange, material culture, technology, infrastructure, gender
92
+ relations, ethnicity, childrearing and socialization, religion, myth, symbols,
93
+ values, etiquette, worldview, sports, music, nutrition, recreation, games, food,
94
+ festivals, and language (which is also the object of study in linguistic anthropology).
95
+ - On 1 February 1908, the king Dom Carlos I of Portugal and his heir apparent, Prince
96
+ Royal Dom Luís Filipe, Duke of Braganza, were murdered in Lisbon. Under his rule,
97
+ Portugal had twice been declared bankrupt – on 14 June 1892, and again on 10 May
98
+ 1902 – causing social turmoil, economic disturbances, protests, revolts and criticism
99
+ of the monarchy. Manuel II of Portugal became the new king, but was eventually
100
+ overthrown by the 5 October 1910 revolution, which abolished the regime and instated
101
+ republicanism in Portugal. Political instability and economic weaknesses were
102
+ fertile ground for chaos and unrest during the Portuguese First Republic. These
103
+ conditions would lead to the failed Monarchy of the North, 28 May 1926 coup d'état,
104
+ and the creation of the National Dictatorship (Ditadura Nacional).
105
+ - source_sentence: What is the official name of Portugal?
106
+ sentences:
107
+ - 'Portugal (Portuguese: [puɾtuˈɣaɫ]), officially the Portuguese Republic (Portuguese:
108
+ República Portuguesa), is a country on the Iberian Peninsula, in Southwestern
109
+ Europe. It is the westernmost country of mainland Europe, being bordered by the
110
+ Atlantic Ocean to the west and south and by Spain to the north and east. The Portugal–Spain
111
+ border is 1,214 km (754 mi) long and considered the longest uninterrupted border
112
+ within the European Union. The republic also includes the Atlantic archipelagos
113
+ of the Azores and Madeira, both autonomous regions with their own regional governments.'
114
+ - The large magnitude of solar energy available makes it a highly appealing source
115
+ of electricity. The United Nations Development Programme in its 2000 World Energy
116
+ Assessment found that the annual potential of solar energy was 1,575–49,837 exajoules
117
+ (EJ). This is several times larger than the total world energy consumption, which
118
+ was 559.8 EJ in 2012.
119
+ - It was temporarily under the control of the Tibetan empire and Chinese from 650–680
120
+ and then under the control of the Umayyads in 710. The Samanid Empire, 819 to
121
+ 999, restored Persian control of the region and enlarged the cities of Samarkand
122
+ and Bukhara (both cities are today part of Uzbekistan) which became the cultural
123
+ centers of Iran and the region was known as Khorasan. The Kara-Khanid Khanate
124
+ conquered Transoxania (which corresponds approximately with modern-day Uzbekistan,
125
+ Tajikistan, southern Kyrgyzstan and southwest Kazakhstan) and ruled between 999–1211.
126
+ Their arrival in Transoxania signaled a definitive shift from Iranian to Turkic
127
+ predominance in Central Asia, but gradually the Kara-khanids became assimilated
128
+ into the Perso-Arab Muslim culture of the region.
129
+ - source_sentence: During what years did the formation of the First Portuguese Republic
130
+ take place?
131
+ sentences:
132
+ - Anthrozoology (also known as "human–animal studies") is the study of interaction
133
+ between living things. It is a burgeoning interdisciplinary field that overlaps
134
+ with a number of other disciplines, including anthropology, ethology, medicine,
135
+ psychology, veterinary medicine and zoology. A major focus of anthrozoologic research
136
+ is the quantifying of the positive effects of human-animal relationships on either
137
+ party and the study of their interactions. It includes scholars from a diverse
138
+ range of fields, including anthropology, sociology, biology, and philosophy.[n
139
+ 7]
140
+ - Professional anthropological bodies often object to the use of anthropology for
141
+ the benefit of the state. Their codes of ethics or statements may proscribe anthropologists
142
+ from giving secret briefings. The Association of Social Anthropologists of the
143
+ UK and Commonwealth (ASA) has called certain scholarship ethically dangerous.
144
+ The AAA's current 'Statement of Professional Responsibility' clearly states that
145
+ "in relation with their own government and with host governments ... no secret
146
+ research, no secret reports or debriefings of any kind should be agreed to or
147
+ given."
148
+ - Many Portuguese holidays, festivals and traditions have a Christian origin or
149
+ connotation. Although relations between the Portuguese state and the Roman Catholic
150
+ Church were generally amiable and stable since the earliest years of the Portuguese
151
+ nation, their relative power fluctuated. In the 13th and 14th centuries, the church
152
+ enjoyed both riches and power stemming from its role in the reconquest, its close
153
+ identification with early Portuguese nationalism and the foundation of the Portuguese
154
+ educational system, including the first university. The growth of the Portuguese
155
+ overseas empire made its missionaries important agents of colonization, with important
156
+ roles in the education and evangelization of people from all the inhabited continents.
157
+ The growth of liberal and nascent republican movements during the eras leading
158
+ to the formation of the First Portuguese Republic (1910–26) changed the role and
159
+ importance of organized religion.
160
+ ---
161
+
162
+ # SentenceTransformer based on sentence-transformers/all-mpnet-base-v2
163
+
164
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [sentence-transformers/all-mpnet-base-v2](https://huggingface.co/sentence-transformers/all-mpnet-base-v2) on the [squad](https://huggingface.co/datasets/sentence-transformers/squad) dataset. 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.
165
+
166
+ ## Model Details
167
+
168
+ ### Model Description
169
+ - **Model Type:** Sentence Transformer
170
+ - **Base model:** [sentence-transformers/all-mpnet-base-v2](https://huggingface.co/sentence-transformers/all-mpnet-base-v2) <!-- at revision f1b1b820e405bb8644f5e8d9a3b98f9c9e0a3c58 -->
171
+ - **Maximum Sequence Length:** 384 tokens
172
+ - **Output Dimensionality:** 768 tokens
173
+ - **Similarity Function:** Cosine Similarity
174
+ - **Training Dataset:**
175
+ - [squad](https://huggingface.co/datasets/sentence-transformers/squad)
176
+ - **Language:** en
177
+ <!-- - **License:** Unknown -->
178
+
179
+ ### Model Sources
180
+
181
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
182
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
183
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
184
+
185
+ ### Full Model Architecture
186
+
187
+ ```
188
+ SentenceTransformer(
189
+ (0): Transformer({'max_seq_length': 384, 'do_lower_case': False}) with Transformer model: MPNetModel
190
+ (1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
191
+ (2): Normalize()
192
+ )
193
+ ```
194
+
195
+ ## Usage
196
+
197
+ ### Direct Usage (Sentence Transformers)
198
+
199
+ First install the Sentence Transformers library:
200
+
201
+ ```bash
202
+ pip install -U sentence-transformers
203
+ ```
204
+
205
+ Then you can load this model and run inference.
206
+ ```python
207
+ from sentence_transformers import SentenceTransformer
208
+
209
+ # Download from the 🤗 Hub
210
+ model = SentenceTransformer("lizchu414/mpnet-base-all-nli-squad")
211
+ # Run inference
212
+ sentences = [
213
+ 'During what years did the formation of the First Portuguese Republic take place?',
214
+ 'Many Portuguese holidays, festivals and traditions have a Christian origin or connotation. Although relations between the Portuguese state and the Roman Catholic Church were generally amiable and stable since the earliest years of the Portuguese nation, their relative power fluctuated. In the 13th and 14th centuries, the church enjoyed both riches and power stemming from its role in the reconquest, its close identification with early Portuguese nationalism and the foundation of the Portuguese educational system, including the first university. The growth of the Portuguese overseas empire made its missionaries important agents of colonization, with important roles in the education and evangelization of people from all the inhabited continents. The growth of liberal and nascent republican movements during the eras leading to the formation of the First Portuguese Republic (1910–26) changed the role and importance of organized religion.',
215
+ 'Professional anthropological bodies often object to the use of anthropology for the benefit of the state. Their codes of ethics or statements may proscribe anthropologists from giving secret briefings. The Association of Social Anthropologists of the UK and Commonwealth (ASA) has called certain scholarship ethically dangerous. The AAA\'s current \'Statement of Professional Responsibility\' clearly states that "in relation with their own government and with host governments ... no secret research, no secret reports or debriefings of any kind should be agreed to or given."',
216
+ ]
217
+ embeddings = model.encode(sentences)
218
+ print(embeddings.shape)
219
+ # [3, 768]
220
+
221
+ # Get the similarity scores for the embeddings
222
+ similarities = model.similarity(embeddings, embeddings)
223
+ print(similarities.shape)
224
+ # [3, 3]
225
+ ```
226
+
227
+ <!--
228
+ ### Direct Usage (Transformers)
229
+
230
+ <details><summary>Click to see the direct usage in Transformers</summary>
231
+
232
+ </details>
233
+ -->
234
+
235
+ <!--
236
+ ### Downstream Usage (Sentence Transformers)
237
+
238
+ You can finetune this model on your own dataset.
239
+
240
+ <details><summary>Click to expand</summary>
241
+
242
+ </details>
243
+ -->
244
+
245
+ <!--
246
+ ### Out-of-Scope Use
247
+
248
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
249
+ -->
250
+
251
+ <!--
252
+ ## Bias, Risks and Limitations
253
+
254
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
255
+ -->
256
+
257
+ <!--
258
+ ### Recommendations
259
+
260
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
261
+ -->
262
+
263
+ ## Training Details
264
+
265
+ ### Training Dataset
266
+
267
+ #### squad
268
+
269
+ * Dataset: [squad](https://huggingface.co/datasets/sentence-transformers/squad) at [d84c8c2](https://huggingface.co/datasets/sentence-transformers/squad/tree/d84c8c2ef64693264c890bb242d2e73fc0a46c40)
270
+ * Size: 87,599 training samples
271
+ * Columns: <code>question</code> and <code>answer</code>
272
+ * Approximate statistics based on the first 1000 samples:
273
+ | | question | answer |
274
+ |:--------|:----------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|
275
+ | type | string | string |
276
+ | details | <ul><li>min: 6 tokens</li><li>mean: 14.46 tokens</li><li>max: 31 tokens</li></ul> | <ul><li>min: 34 tokens</li><li>mean: 187.2 tokens</li><li>max: 384 tokens</li></ul> |
277
+ * Samples:
278
+ | question | answer |
279
+ |:------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
280
+ | <code>To whom did the Virgin Mary allegedly appear in 1858 in Lourdes France?</code> | <code>Architecturally, the school has a Catholic character. Atop the Main Building's gold dome is a golden statue of the Virgin Mary. Immediately in front of the Main Building and facing it, is a copper statue of Christ with arms upraised with the legend "Venite Ad Me Omnes". Next to the Main Building is the Basilica of the Sacred Heart. Immediately behind the basilica is the Grotto, a Marian place of prayer and reflection. It is a replica of the grotto at Lourdes, France where the Virgin Mary reputedly appeared to Saint Bernadette Soubirous in 1858. At the end of the main drive (and in a direct line that connects through 3 statues and the Gold Dome), is a simple, modern stone statue of Mary.</code> |
281
+ | <code>What is in front of the Notre Dame Main Building?</code> | <code>Architecturally, the school has a Catholic character. Atop the Main Building's gold dome is a golden statue of the Virgin Mary. Immediately in front of the Main Building and facing it, is a copper statue of Christ with arms upraised with the legend "Venite Ad Me Omnes". Next to the Main Building is the Basilica of the Sacred Heart. Immediately behind the basilica is the Grotto, a Marian place of prayer and reflection. It is a replica of the grotto at Lourdes, France where the Virgin Mary reputedly appeared to Saint Bernadette Soubirous in 1858. At the end of the main drive (and in a direct line that connects through 3 statues and the Gold Dome), is a simple, modern stone statue of Mary.</code> |
282
+ | <code>The Basilica of the Sacred heart at Notre Dame is beside to which structure?</code> | <code>Architecturally, the school has a Catholic character. Atop the Main Building's gold dome is a golden statue of the Virgin Mary. Immediately in front of the Main Building and facing it, is a copper statue of Christ with arms upraised with the legend "Venite Ad Me Omnes". Next to the Main Building is the Basilica of the Sacred Heart. Immediately behind the basilica is the Grotto, a Marian place of prayer and reflection. It is a replica of the grotto at Lourdes, France where the Virgin Mary reputedly appeared to Saint Bernadette Soubirous in 1858. At the end of the main drive (and in a direct line that connects through 3 statues and the Gold Dome), is a simple, modern stone statue of Mary.</code> |
283
+ * Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
284
+ ```json
285
+ {
286
+ "scale": 20.0,
287
+ "similarity_fct": "cos_sim"
288
+ }
289
+ ```
290
+
291
+ ### Evaluation Dataset
292
+
293
+ #### squad
294
+
295
+ * Dataset: [squad](https://huggingface.co/datasets/sentence-transformers/squad) at [d84c8c2](https://huggingface.co/datasets/sentence-transformers/squad/tree/d84c8c2ef64693264c890bb242d2e73fc0a46c40)
296
+ * Size: 87,599 evaluation samples
297
+ * Columns: <code>question</code> and <code>answer</code>
298
+ * Approximate statistics based on the first 1000 samples:
299
+ | | question | answer |
300
+ |:--------|:----------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------|
301
+ | type | string | string |
302
+ | details | <ul><li>min: 7 tokens</li><li>mean: 13.84 tokens</li><li>max: 31 tokens</li></ul> | <ul><li>min: 28 tokens</li><li>mean: 151.09 tokens</li><li>max: 368 tokens</li></ul> |
303
+ * Samples:
304
+ | question | answer |
305
+ |:-------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
306
+ | <code>What is one purpose of a greenhouse?</code> | <code>Greenhouses convert solar light to heat, enabling year-round production and the growth (in enclosed environments) of specialty crops and other plants not naturally suited to the local climate. Primitive greenhouses were first used during Roman times to produce cucumbers year-round for the Roman emperor Tiberius. The first modern greenhouses were built in Europe in the 16th century to keep exotic plants brought back from explorations abroad. Greenhouses remain an important part of horticulture today, and plastic transparent materials have also been used to similar effect in polytunnels and row covers.</code> |
307
+ | <code>What was one of the first uses of a greenhouse?</code> | <code>Greenhouses convert solar light to heat, enabling year-round production and the growth (in enclosed environments) of specialty crops and other plants not naturally suited to the local climate. Primitive greenhouses were first used during Roman times to produce cucumbers year-round for the Roman emperor Tiberius. The first modern greenhouses were built in Europe in the 16th century to keep exotic plants brought back from explorations abroad. Greenhouses remain an important part of horticulture today, and plastic transparent materials have also been used to similar effect in polytunnels and row covers.</code> |
308
+ | <code>Where were the first modern greenhouses built?</code> | <code>Greenhouses convert solar light to heat, enabling year-round production and the growth (in enclosed environments) of specialty crops and other plants not naturally suited to the local climate. Primitive greenhouses were first used during Roman times to produce cucumbers year-round for the Roman emperor Tiberius. The first modern greenhouses were built in Europe in the 16th century to keep exotic plants brought back from explorations abroad. Greenhouses remain an important part of horticulture today, and plastic transparent materials have also been used to similar effect in polytunnels and row covers.</code> |
309
+ * Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
310
+ ```json
311
+ {
312
+ "scale": 20.0,
313
+ "similarity_fct": "cos_sim"
314
+ }
315
+ ```
316
+
317
+ ### Training Hyperparameters
318
+ #### Non-Default Hyperparameters
319
+
320
+ - `eval_strategy`: steps
321
+ - `per_device_train_batch_size`: 16
322
+ - `per_device_eval_batch_size`: 16
323
+ - `learning_rate`: 2e-05
324
+ - `num_train_epochs`: 1
325
+ - `warmup_ratio`: 0.1
326
+ - `fp16`: True
327
+ - `batch_sampler`: no_duplicates
328
+
329
+ #### All Hyperparameters
330
+ <details><summary>Click to expand</summary>
331
+
332
+ - `overwrite_output_dir`: False
333
+ - `do_predict`: False
334
+ - `eval_strategy`: steps
335
+ - `prediction_loss_only`: True
336
+ - `per_device_train_batch_size`: 16
337
+ - `per_device_eval_batch_size`: 16
338
+ - `per_gpu_train_batch_size`: None
339
+ - `per_gpu_eval_batch_size`: None
340
+ - `gradient_accumulation_steps`: 1
341
+ - `eval_accumulation_steps`: None
342
+ - `torch_empty_cache_steps`: None
343
+ - `learning_rate`: 2e-05
344
+ - `weight_decay`: 0.0
345
+ - `adam_beta1`: 0.9
346
+ - `adam_beta2`: 0.999
347
+ - `adam_epsilon`: 1e-08
348
+ - `max_grad_norm`: 1.0
349
+ - `num_train_epochs`: 1
350
+ - `max_steps`: -1
351
+ - `lr_scheduler_type`: linear
352
+ - `lr_scheduler_kwargs`: {}
353
+ - `warmup_ratio`: 0.1
354
+ - `warmup_steps`: 0
355
+ - `log_level`: passive
356
+ - `log_level_replica`: warning
357
+ - `log_on_each_node`: True
358
+ - `logging_nan_inf_filter`: True
359
+ - `save_safetensors`: True
360
+ - `save_on_each_node`: False
361
+ - `save_only_model`: False
362
+ - `restore_callback_states_from_checkpoint`: False
363
+ - `no_cuda`: False
364
+ - `use_cpu`: False
365
+ - `use_mps_device`: False
366
+ - `seed`: 42
367
+ - `data_seed`: None
368
+ - `jit_mode_eval`: False
369
+ - `use_ipex`: False
370
+ - `bf16`: False
371
+ - `fp16`: True
372
+ - `fp16_opt_level`: O1
373
+ - `half_precision_backend`: auto
374
+ - `bf16_full_eval`: False
375
+ - `fp16_full_eval`: False
376
+ - `tf32`: None
377
+ - `local_rank`: 0
378
+ - `ddp_backend`: None
379
+ - `tpu_num_cores`: None
380
+ - `tpu_metrics_debug`: False
381
+ - `debug`: []
382
+ - `dataloader_drop_last`: False
383
+ - `dataloader_num_workers`: 0
384
+ - `dataloader_prefetch_factor`: None
385
+ - `past_index`: -1
386
+ - `disable_tqdm`: False
387
+ - `remove_unused_columns`: True
388
+ - `label_names`: None
389
+ - `load_best_model_at_end`: False
390
+ - `ignore_data_skip`: False
391
+ - `fsdp`: []
392
+ - `fsdp_min_num_params`: 0
393
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
394
+ - `fsdp_transformer_layer_cls_to_wrap`: None
395
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
396
+ - `deepspeed`: None
397
+ - `label_smoothing_factor`: 0.0
398
+ - `optim`: adamw_torch
399
+ - `optim_args`: None
400
+ - `adafactor`: False
401
+ - `group_by_length`: False
402
+ - `length_column_name`: length
403
+ - `ddp_find_unused_parameters`: None
404
+ - `ddp_bucket_cap_mb`: None
405
+ - `ddp_broadcast_buffers`: False
406
+ - `dataloader_pin_memory`: True
407
+ - `dataloader_persistent_workers`: False
408
+ - `skip_memory_metrics`: True
409
+ - `use_legacy_prediction_loop`: False
410
+ - `push_to_hub`: False
411
+ - `resume_from_checkpoint`: None
412
+ - `hub_model_id`: None
413
+ - `hub_strategy`: every_save
414
+ - `hub_private_repo`: False
415
+ - `hub_always_push`: False
416
+ - `gradient_checkpointing`: False
417
+ - `gradient_checkpointing_kwargs`: None
418
+ - `include_inputs_for_metrics`: False
419
+ - `eval_do_concat_batches`: True
420
+ - `fp16_backend`: auto
421
+ - `push_to_hub_model_id`: None
422
+ - `push_to_hub_organization`: None
423
+ - `mp_parameters`:
424
+ - `auto_find_batch_size`: False
425
+ - `full_determinism`: False
426
+ - `torchdynamo`: None
427
+ - `ray_scope`: last
428
+ - `ddp_timeout`: 1800
429
+ - `torch_compile`: False
430
+ - `torch_compile_backend`: None
431
+ - `torch_compile_mode`: None
432
+ - `dispatch_batches`: None
433
+ - `split_batches`: None
434
+ - `include_tokens_per_second`: False
435
+ - `include_num_input_tokens_seen`: False
436
+ - `neftune_noise_alpha`: None
437
+ - `optim_target_modules`: None
438
+ - `batch_eval_metrics`: False
439
+ - `eval_on_start`: False
440
+ - `use_liger_kernel`: False
441
+ - `eval_use_gather_object`: False
442
+ - `batch_sampler`: no_duplicates
443
+ - `multi_dataset_batch_sampler`: proportional
444
+
445
+ </details>
446
+
447
+ ### Framework Versions
448
+ - Python: 3.12.7
449
+ - Sentence Transformers: 3.2.0
450
+ - Transformers: 4.45.2
451
+ - PyTorch: 2.2.2+cu121
452
+ - Accelerate: 1.0.1
453
+ - Datasets: 3.0.1
454
+ - Tokenizers: 0.20.1
455
+
456
+ ## Citation
457
+
458
+ ### BibTeX
459
+
460
+ #### Sentence Transformers
461
+ ```bibtex
462
+ @inproceedings{reimers-2019-sentence-bert,
463
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
464
+ author = "Reimers, Nils and Gurevych, Iryna",
465
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
466
+ month = "11",
467
+ year = "2019",
468
+ publisher = "Association for Computational Linguistics",
469
+ url = "https://arxiv.org/abs/1908.10084",
470
+ }
471
+ ```
472
+
473
+ #### MultipleNegativesRankingLoss
474
+ ```bibtex
475
+ @misc{henderson2017efficient,
476
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
477
+ 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},
478
+ year={2017},
479
+ eprint={1705.00652},
480
+ archivePrefix={arXiv},
481
+ primaryClass={cs.CL}
482
+ }
483
+ ```
484
+
485
+ <!--
486
+ ## Glossary
487
+
488
+ *Clearly define terms in order to be accessible across audiences.*
489
+ -->
490
+
491
+ <!--
492
+ ## Model Card Authors
493
+
494
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
495
+ -->
496
+
497
+ <!--
498
+ ## Model Card Contact
499
+
500
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
501
+ -->
config.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "sentence-transformers/all-mpnet-base-v2",
3
+ "architectures": [
4
+ "MPNetModel"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "bos_token_id": 0,
8
+ "eos_token_id": 2,
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-05,
15
+ "max_position_embeddings": 514,
16
+ "model_type": "mpnet",
17
+ "num_attention_heads": 12,
18
+ "num_hidden_layers": 12,
19
+ "pad_token_id": 1,
20
+ "relative_attention_num_buckets": 32,
21
+ "torch_dtype": "float32",
22
+ "transformers_version": "4.45.2",
23
+ "vocab_size": 30527
24
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "3.2.0",
4
+ "transformers": "4.45.2",
5
+ "pytorch": "2.2.2+cu121"
6
+ },
7
+ "prompts": {},
8
+ "default_prompt_name": null,
9
+ "similarity_fn_name": null
10
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6273560d2f240fe54342345f87d3616643ebe00f9d11f68ed9affb0c83dbe883
3
+ size 437967672
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": 384,
3
+ "do_lower_case": false
4
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "cls_token": {
10
+ "content": "<s>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "eos_token": {
17
+ "content": "</s>",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "mask_token": {
24
+ "content": "<mask>",
25
+ "lstrip": true,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ },
30
+ "pad_token": {
31
+ "content": "<pad>",
32
+ "lstrip": false,
33
+ "normalized": false,
34
+ "rstrip": false,
35
+ "single_word": false
36
+ },
37
+ "sep_token": {
38
+ "content": "</s>",
39
+ "lstrip": false,
40
+ "normalized": false,
41
+ "rstrip": false,
42
+ "single_word": false
43
+ },
44
+ "unk_token": {
45
+ "content": "[UNK]",
46
+ "lstrip": false,
47
+ "normalized": false,
48
+ "rstrip": false,
49
+ "single_word": false
50
+ }
51
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "<s>",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "1": {
12
+ "content": "<pad>",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "2": {
20
+ "content": "</s>",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "3": {
28
+ "content": "<unk>",
29
+ "lstrip": false,
30
+ "normalized": true,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "104": {
36
+ "content": "[UNK]",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ },
43
+ "30526": {
44
+ "content": "<mask>",
45
+ "lstrip": true,
46
+ "normalized": false,
47
+ "rstrip": false,
48
+ "single_word": false,
49
+ "special": true
50
+ }
51
+ },
52
+ "bos_token": "<s>",
53
+ "clean_up_tokenization_spaces": false,
54
+ "cls_token": "<s>",
55
+ "do_lower_case": true,
56
+ "eos_token": "</s>",
57
+ "mask_token": "<mask>",
58
+ "max_length": 128,
59
+ "model_max_length": 384,
60
+ "pad_to_multiple_of": null,
61
+ "pad_token": "<pad>",
62
+ "pad_token_type_id": 0,
63
+ "padding_side": "right",
64
+ "sep_token": "</s>",
65
+ "stride": 0,
66
+ "strip_accents": null,
67
+ "tokenize_chinese_chars": true,
68
+ "tokenizer_class": "MPNetTokenizer",
69
+ "truncation_side": "right",
70
+ "truncation_strategy": "longest_first",
71
+ "unk_token": "[UNK]"
72
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff