Jeswina-123's picture
Upload 8 files
2af80d9 verified
|
Raw History Blame Contribute Delete
29.6 kB
---
tags:
- sentence-transformers
- sentence-similarity
- feature-extraction
- dense
- generated_from_trainer
- dataset_size:10000
- loss:MultipleNegativesRankingLoss
base_model: sentence-transformers/all-MiniLM-L6-v2
widget:
- source_sentence: What are the AA systems called in Russian?
sentences:
- 'Non-English terms for air defence include the German Flak (Fliegerabwehrkanone,
"aircraft defence cannon", also cited as Flugabwehrkanone), whence English flak,
and the Russian term Protivovozdushnaya oborona (Cyrillic: Противовозду́шная оборо́на),
a literal translation of "anti-air defence", abbreviated as PVO. In Russian the
AA systems are called zenitnye (i.e. "pointing to zenith") systems (guns, missiles
etc.). In French, air defence is called DCA (Défense contre les aéronefs, "aéronef"
being the generic term for all kind of airborne device (airplane, airship, balloon,
missile, rocket, etc.)).'
- After setting up his workshop, Bell continued experiments based on Helmholtz's
work with electricity and sound. He also modified a melodeon (a type of pump organ)
so that it could transmit its music electrically over a distance. Once the family
was settled in, both Bell and his father made plans to establish a teaching practice
and in 1871, he accompanied his father to Montreal, where Melville was offered
a position to teach his System of Visible Speech.
- Beginning in February 1988, the Democratic Movement of Moldova (formerly Moldavia)
organized public meetings, demonstrations, and song festivals, which gradually
grew in size and intensity. In the streets, the center of public manifestations
was the Stephen the Great Monument in Chişinău, and the adjacent park harboring
Aleea Clasicilor (The "Alee of the Classics [of the Literature]"). On January
15, 1988, in a tribute to Mihai Eminescu at his bust on the Aleea Clasicilor,
Anatol Şalaru submitted a proposal to continue the meetings. In the public discourse,
the movement called for national awakening, freedom of speech, revival of Moldavian
traditions, and for attainment of official status for the Romanian language and
return to the Latin alphabet. The transition from "movement" (an informal association)
to "front" (a formal association) was seen as a natural "upgrade" once a movement
gained momentum with the public, and the Soviet authorities no longer dared to
crack down on it.
- source_sentence: Which month and year did GQ feature Beyonce on its cover?
sentences:
- In September 2010, Beyoncé made her runway modelling debut at Tom Ford's Spring/Summer
2011 fashion show. She was named "World's Most Beautiful Woman" by People and
the "Hottest Female Singer of All Time" by Complex in 2012. In January 2013, GQ
placed her on its cover, featuring her atop its "100 Sexiest Women of the 21st
Century" list. VH1 listed her at number 1 on its 100 Sexiest Artists list. Several
wax figures of Beyoncé are found at Madame Tussauds Wax Museums in major cities
around the world, including New York, Washington, D.C., Amsterdam, Bangkok, Hollywood
and Sydney.
- 'The Canadian Armed Forces (CAF; French: Forces armées canadiennes, FAC), or Canadian
Forces (CF) (French: les Forces canadiennes, FC), is the unified armed force of
Canada, as constituted by the National Defence Act, which states: "The Canadian
Forces are the armed forces of Her Majesty raised by Canada and consist of one
Service called the Canadian Armed Forces."'
- The salivary glands (element 30 in numbered diagram) in an insect's mouth produce
saliva. The salivary ducts lead from the glands to the reservoirs and then forward
through the head to an opening called the salivarium, located behind the hypopharynx.
By moving its mouthparts (element 32 in numbered diagram) the insect can mix its
food with saliva. The mixture of saliva and food then travels through the salivary
tubes into the mouth, where it begins to break down. Some insects, like flies,
have extra-oral digestion. Insects using extra-oral digestion expel digestive
enzymes onto their food to break it down. This strategy allows insects to extract
a significant proportion of the available nutrients from the food source.:31 The
gut is where almost all of insects' digestion takes place. It can be divided into
the foregut, midgut and hindgut.
- source_sentence: Hellenism contrasts with what other similar concept of era?
sentences:
- Small-scale "expedition tourism" has existed since 1957 and is currently subject
to Antarctic Treaty and Environmental Protocol provisions, but in effect self-regulated
by the International Association of Antarctica Tour Operators (IAATO). Not all
vessels associated with Antarctic tourism are members of IAATO, but IAATO members
account for 95% of the tourist activity. Travel is largely by small or medium
ship, focusing on specific scenic locations with accessible concentrations of
iconic wildlife. A total of 37,506 tourists visited during the 2006–07 Austral
summer with nearly all of them coming from commercial ships. The number was predicted
to increase to over 80,000 by 2010.
- On April 23, 2008, Dell announced the closure of one of its biggest Canadian call-centers
in Kanata, Ontario, terminating approximately 1100 employees, with 500 of those
redundancies effective on the spot, and with the official closure of the center
scheduled for the summer. The call-center had opened in 2006 after the city of
Ottawa won a bid to host it. Less than a year later, Dell planned to double its
workforce to nearly 3,000 workers add a new building. These plans were reversed,
due to a high Canadian dollar that made the Ottawa staff relatively expensive,
and also as part of Dell's turnaround, which involved moving these call-center
jobs offshore to cut costs. The company had also announced the shutdown of its
Edmonton, Alberta office, losing 900 jobs. In total, Dell announced the ending
of about 8,800 jobs in 2007–2008 — 10% of its workforce.
- '"Hellenistic" is a modern word and a 19th-century concept; the idea of a Hellenistic
period did not exist in Ancient Greece. Although words related in form or meaning,
e.g. Hellenist (Ancient Greek: Ἑλληνιστής, Hellēnistēs), have been attested since
ancient times, it was J. G. Droysen in the mid-19th century, who in his classic
work Geschichte des Hellenismus, i.e. History of Hellenism, coined the term Hellenistic
to refer to and define the period when Greek culture spread in the non-Greek world
after Alexander’s conquest. Following Droysen, Hellenistic and related terms,
e.g. Hellenism, have been widely used in various contexts; a notable such use
is in Culture and Anarchy by Matthew Arnold, where Hellenism is used in contrast
with Hebraism.'
- source_sentence: What organization is the FBI a subset of?
sentences:
- The Federal Bureau of Investigation (FBI) is the domestic intelligence and security
service of the United States, which simultaneously serves as the nation's prime
federal law enforcement organization. Operating under the jurisdiction of the
U.S. Department of Justice, FBI is concurrently a member of the U.S. Intelligence
Community and reports to both the Attorney General and the Director of National
Intelligence. A leading U.S. counterterrorism, counterintelligence, and criminal
investigative organization, FBI has jurisdiction over violations of more than
200 categories of federal crimes.
- The last use of the firing squad between 1608 and the moratorium on judicial executions
between 1967 and 1977 was when Utah shot James W. Rodgers on March 30, 1960. The
last use of the gallows between 1608 and the moratorium was when Kansas hanged
George York on June 22, 1965. The last use of the electric chair between the first
electrocution on August 6, 1890 and the moratorium was when Oklahoma electrocuted
James French on August 10, 1966. The last use of the gas chamber between the first
gassing on February 8, 1924 and the moratorium was when Colorado gassed Luis Monge
on June 2, 1967.
- In mid May 1967, the Soviet Union issued warnings to Nasser of an impending Israeli
attack on Syria, although Chief of Staff Mohamed Fawzi considered the warnings
to be "baseless". According to Kandil, without Nasser's authorization, Amer used
the Soviet warnings as a pretext to dispatch troops to Sinai on 14 May, and Nasser
subsequently demanded UNEF's withdrawal. Earlier that day, Nasser received a warning
from King Hussein of Israeli-American collusion to drag Egypt into war. The message
had been originally received by Amer on 2 May, but was withheld from Nasser until
the Sinai deployment on 14 May. Although in the preceding months, Hussein and
Nasser had been accusing each other of avoiding a fight with Israel, Hussein was
nonetheless wary that an Egyptian-Israeli war would risk the West Bank's occupation
by Israel. Nasser still felt that the US would restrain Israel from attacking
due to assurances that he received from the US and Soviet Union. In turn, he also
reassured both powers that Egypt would only act defensively.
- source_sentence: What is the modern name for the West Saxon dialect of Alfred's
time?
sentences:
- Each of these four dialects was associated with an independent kingdom on the
island. Of these, Northumbria south of the Tyne, and most of Mercia, were overrun
by the Vikings during the 9th century. The portion of Mercia that was successfully
defended, and all of Kent, were then integrated into Wessex under Alfred the Great.
From that time on, the West Saxon dialect (then in the form now known as Early
West Saxon) became standardised as the language of government, and as the basis
for the many works of literature and religious materials produced or translated
from Latin in that period.
- Education in Switzerland is very diverse because the constitution of Switzerland
delegates the authority for the school system to the cantons. There are both public
and private schools, including many private international schools. The minimum
age for primary school is about six years in all cantons, but most cantons provide
a free "children's school" starting at four or five years old. Primary school
continues until grade four, five or six, depending on the school. Traditionally,
the first foreign language in school was always one of the other national languages,
although recently (2000) English was introduced first in a few cantons.
- At the dawn of the Grand Lodge era, during the 1720s, James Anderson composed
the first printed constitutions for Freemasons, the basis for most subsequent
constitutions, which specifically excluded women from Freemasonry. As Freemasonry
spread, continental masons began to include their ladies in Lodges of Adoption,
which worked three degrees with the same names as the men's but different content.
The French officially abandoned the experiment in the early 19th century. Later
organisations with a similar aim emerged in the United States, but distinguished
the names of the degrees from those of male masonry.
pipeline_tag: sentence-similarity
library_name: sentence-transformers
---
# SentenceTransformer based on sentence-transformers/all-MiniLM-L6-v2
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [sentence-transformers/all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2). It maps sentences & paragraphs to a 384-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, classification, clustering, and more.
## Model Details
### Model Description
- **Model Type:** Sentence Transformer
- **Base model:** [sentence-transformers/all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2) <!-- at revision 1110a243fdf4706b3f48f1d95db1a4f5529b4d41 -->
- **Maximum Sequence Length:** 256 tokens
- **Output Dimensionality:** 384 dimensions
- **Similarity Function:** Cosine Similarity
- **Supported Modality:** Text
<!-- - **Training Dataset:** Unknown -->
<!-- - **Language:** Unknown -->
<!-- - **License:** Unknown -->
### Model Sources
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
- **Repository:** [Sentence Transformers on GitHub](https://github.com/huggingface/sentence-transformers)
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
### Full Model Architecture
```
SentenceTransformer(
(0): Transformer({'transformer_task': 'feature-extraction', 'modality_config': {'text': {'method': 'forward', 'method_output_name': 'last_hidden_state'}}, 'module_output_name': 'token_embeddings', 'architecture': 'BertModel'})
(1): Pooling({'embedding_dimension': 384, 'pooling_mode': 'mean', 'include_prompt': True})
(2): Normalize({})
)
```
## Usage
### Direct Usage (Sentence Transformers)
First install the Sentence Transformers library:
```bash
pip install -U sentence-transformers
```
Then you can load this model and run inference.
```python
from sentence_transformers import SentenceTransformer
# Download from the 🤗 Hub
model = SentenceTransformer("sentence_transformers_model_id")
# Run inference
sentences = [
"What is the modern name for the West Saxon dialect of Alfred's time?",
'Each of these four dialects was associated with an independent kingdom on the island. Of these, Northumbria south of the Tyne, and most of Mercia, were overrun by the Vikings during the 9th century. The portion of Mercia that was successfully defended, and all of Kent, were then integrated into Wessex under Alfred the Great. From that time on, the West Saxon dialect (then in the form now known as Early West Saxon) became standardised as the language of government, and as the basis for the many works of literature and religious materials produced or translated from Latin in that period.',
"At the dawn of the Grand Lodge era, during the 1720s, James Anderson composed the first printed constitutions for Freemasons, the basis for most subsequent constitutions, which specifically excluded women from Freemasonry. As Freemasonry spread, continental masons began to include their ladies in Lodges of Adoption, which worked three degrees with the same names as the men's but different content. The French officially abandoned the experiment in the early 19th century. Later organisations with a similar aim emerged in the United States, but distinguished the names of the degrees from those of male masonry.",
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 384]
# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities)
# tensor([[ 1.0000, 0.5936, 0.0054],
# [ 0.5936, 1.0000, -0.0376],
# [ 0.0054, -0.0376, 1.0000]])
```
<!--
### Direct Usage (Transformers)
<details><summary>Click to see the direct usage in Transformers</summary>
</details>
-->
<!--
### Downstream Usage (Sentence Transformers)
You can finetune this model on your own dataset.
<details><summary>Click to expand</summary>
</details>
-->
<!--
### Out-of-Scope Use
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
-->
<!--
## Bias, Risks and Limitations
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
-->
<!--
### Recommendations
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
-->
## Training Details
### Training Dataset
#### Unnamed Dataset
* Size: 10,000 training samples
* Columns: <code>sentence_0</code> and <code>sentence_1</code>
* Approximate statistics based on the first 100 samples:
| | sentence_0 | sentence_1 |
|:---------|:----------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------|
| type | string | string |
| modality | text | text |
| details | <ul><li>min: 8 tokens</li><li>mean: 14.67 tokens</li><li>max: 30 tokens</li></ul> | <ul><li>min: 33 tokens</li><li>mean: 152.05 tokens</li><li>max: 256 tokens</li></ul> |
* Samples:
| sentence_0 | sentence_1 |
|:------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| <code>Plato and Aristotle are known for systematically discussing what?</code> | <code>Subsequently, Plato and Aristotle produced the first systematic discussions of natural philosophy, which did much to shape later investigations of nature. Their development of deductive reasoning was of particular importance and usefulness to later scientific inquiry. Plato founded the Platonic Academy in 387 BC, whose motto was "Let none unversed in geometry enter here", and turned out many notable philosophers. Plato's student Aristotle introduced empiricism and the notion that universal truths can be arrived at via observation and induction, thereby laying the foundations of the scientific method. Aristotle also produced many biological writings that were empirical in nature, focusing on biological causation and the diversity of life. He made countless observations of nature, especially the habits and attributes of plants and animals in the world around him, classified more than 540 animal species, and dissected at least 50. Aristotle's writings profoundly influenced subsequent Isla...</code> |
| <code>Destiny's Child released a compilation album about which topic?</code> | <code>In January 2013, Destiny's Child released Love Songs, a compilation album of the romance-themed songs from their previous albums and a newly recorded track, "Nuclear". Beyoncé performed the American national anthem singing along with a pre-recorded track at President Obama's second inauguration in Washington, D.C. The following month, Beyoncé performed at the Super Bowl XLVII halftime show, held at the Mercedes-Benz Superdome in New Orleans. The performance stands as the second most tweeted about moment in history at 268,000 tweets per minute. At the 55th Annual Grammy Awards, Beyoncé won for Best Traditional R&B Performance for "Love on Top". Her feature-length documentary film, Life Is But a Dream, first aired on HBO on February 16, 2013. The film, which she directed and produced herself, featured footage from her childhood, her as a mother and businesswoman, recording, rehearsing for live performances, and her return to the spotlight following Blue Ivy's birth. Its DVD release in No...</code> |
| <code>Which church is located on East 90th Street between Second and Third Avenue?</code> | <code>90th Street is split into two segments. The first segment, West 90th Street begins at Riverside Drive and ends at Central Park West or West Drive, when it is open, in Central Park on the Upper West Side. The second segment of East 90th Street begins at East Drive, at Engineers Gate of Central Park. When East Drive is closed, East 90th Street begins at Fifth Avenue on the Upper East Side and curves to the right at the FDR Drive becoming East End Avenue. Our Lady of Good Counsel Church, is located on East 90th Street between Third Avenue and Second Avenue, across the street from Ruppert Towers (1601 and 1619 Third Avenue) and Ruppert Park. Asphalt Green, which is located on East 90th Street between York Avenue and East End Avenue.</code> |
* Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
```json
{
"scale": 20.0,
"similarity_fct": "cos_sim",
"gather_across_devices": false,
"directions": [
"query_to_doc"
],
"partition_mode": "joint",
"hardness_mode": null,
"hardness_strength": 0.0
}
```
### Training Hyperparameters
#### Non-Default Hyperparameters
- `per_device_train_batch_size`: 32
- `per_device_eval_batch_size`: 32
- `multi_dataset_batch_sampler`: round_robin
#### All Hyperparameters
<details><summary>Click to expand</summary>
- `per_device_train_batch_size`: 32
- `num_train_epochs`: 3
- `max_steps`: -1
- `learning_rate`: 5e-05
- `lr_scheduler_type`: linear
- `lr_scheduler_kwargs`: None
- `warmup_steps`: 0
- `optim`: adamw_torch_fused
- `optim_args`: None
- `weight_decay`: 0.0
- `adam_beta1`: 0.9
- `adam_beta2`: 0.999
- `adam_epsilon`: 1e-08
- `optim_target_modules`: None
- `gradient_accumulation_steps`: 1
- `average_tokens_across_devices`: True
- `max_grad_norm`: 1
- `label_smoothing_factor`: 0.0
- `bf16`: False
- `fp16`: False
- `bf16_full_eval`: False
- `fp16_full_eval`: False
- `tf32`: None
- `gradient_checkpointing`: False
- `gradient_checkpointing_kwargs`: None
- `torch_compile`: False
- `torch_compile_backend`: None
- `torch_compile_mode`: None
- `use_liger_kernel`: False
- `liger_kernel_config`: None
- `use_cache`: False
- `neftune_noise_alpha`: None
- `torch_empty_cache_steps`: None
- `auto_find_batch_size`: False
- `log_on_each_node`: True
- `logging_nan_inf_filter`: True
- `include_num_input_tokens_seen`: no
- `log_level`: passive
- `log_level_replica`: warning
- `disable_tqdm`: False
- `project`: huggingface
- `trackio_space_id`: None
- `trackio_bucket_id`: None
- `trackio_static_space_id`: None
- `per_device_eval_batch_size`: 32
- `prediction_loss_only`: True
- `eval_on_start`: False
- `eval_do_concat_batches`: True
- `eval_use_gather_object`: False
- `eval_accumulation_steps`: None
- `include_for_metrics`: []
- `batch_eval_metrics`: False
- `save_only_model`: False
- `save_on_each_node`: False
- `enable_jit_checkpoint`: False
- `push_to_hub`: False
- `hub_private_repo`: None
- `hub_model_id`: None
- `hub_strategy`: every_save
- `hub_always_push`: False
- `hub_revision`: None
- `load_best_model_at_end`: False
- `ignore_data_skip`: False
- `restore_callback_states_from_checkpoint`: False
- `full_determinism`: False
- `seed`: 42
- `data_seed`: None
- `use_cpu`: False
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
- `parallelism_config`: None
- `dataloader_drop_last`: False
- `dataloader_num_workers`: 0
- `dataloader_pin_memory`: True
- `dataloader_persistent_workers`: False
- `dataloader_prefetch_factor`: None
- `dataloader_multiprocessing_context`: None
- `dataloader_in_order`: True
- `remove_unused_columns`: True
- `label_names`: None
- `train_sampling_strategy`: random
- `length_column_name`: length
- `ddp_find_unused_parameters`: None
- `ddp_bucket_cap_mb`: None
- `ddp_broadcast_buffers`: False
- `ddp_static_graph`: None
- `ddp_backend`: None
- `ddp_timeout`: 1800
- `fsdp`: None
- `fsdp_config`: None
- `deepspeed`: None
- `debug`: []
- `skip_memory_metrics`: True
- `do_predict`: False
- `resume_from_checkpoint`: None
- `local_rank`: -1
- `prompts`: None
- `batch_sampler`: batch_sampler
- `multi_dataset_batch_sampler`: round_robin
- `router_mapping`: {}
- `learning_rate_mapping`: {}
- `warmup_ratio`: None
</details>
### Training Logs
| Epoch | Step | Training Loss |
|:------:|:----:|:-------------:|
| 1.5974 | 500 | 0.0709 |
### Training Time
- **Training**: 12.2 hours
### Framework Versions
- Python: 3.11.0
- Sentence Transformers: 5.7.0
- Transformers: 5.17.0
- PyTorch: 2.14.0+cpu
- Accelerate: 1.15.0
- Datasets: 4.8.5
- Tokenizers: 0.23.2
## Additional Resources
- [Training and Finetuning Embedding Models with Sentence Transformers](https://huggingface.co/blog/train-sentence-transformers): the end-to-end guide for training or finetuning Sentence Transformer models.
- [Introduction to Matryoshka Embedding Models](https://huggingface.co/blog/matryoshka): variable-size embeddings that can be truncated with minimal quality loss.
- [Binary and Scalar Embedding Quantization for Significantly Faster & Cheaper Retrieval](https://huggingface.co/blog/embedding-quantization): post-training compression of embedding vectors.
- [Multimodal Embedding & Reranker Models with Sentence Transformers](https://huggingface.co/blog/multimodal-sentence-transformers): use text, image, audio, and video models through the same API.
- [Training and Finetuning Multimodal Embedding & Reranker Models with Sentence Transformers](https://huggingface.co/blog/train-multimodal-sentence-transformers): train multimodal embedding models, with a Visual Document Retrieval walkthrough.
## Citation
### BibTeX
#### Sentence Transformers
```bibtex
@inproceedings{reimers-2019-sentence-bert,
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
author = "Reimers, Nils and Gurevych, Iryna",
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
month = "11",
year = "2019",
publisher = "Association for Computational Linguistics",
url = "https://arxiv.org/abs/1908.10084",
}
```
#### MultipleNegativesRankingLoss
```bibtex
@misc{oord2019representationlearningcontrastivepredictive,
title={Representation Learning with Contrastive Predictive Coding},
author={Aaron van den Oord and Yazhe Li and Oriol Vinyals},
year={2019},
eprint={1807.03748},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/1807.03748},
}
```
<!--
## Glossary
*Clearly define terms in order to be accessible across audiences.*
-->
<!--
## Model Card Authors
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
-->
<!--
## Model Card Contact
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
-->