Views
No views yet
SentenceTransformer(
(0): Transformer({'max_seq_length': 384, 'do_lower_case': False}) with Transformer model: MPNetModel
(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})
(2): Normalize()
)pip install -U sentence-transformers1from sentence_transformers import SentenceTransformer
2
3# Download from the 🤗 Hub
4model = SentenceTransformer("Alessio-Borgi/all-mpnet-base-v2-margin-based-triplet-loss-finetuned-culture-10-epochs-enhanced")
5# Run inference
6sentences = [
7 "Court of Appeal Icelandic appellate court The Court of Appeal (Icelandic: Landsréttur, lit. National Court) is an appellate court in Iceland with appellate jurisdiction over all district court cases. The court was established by the Courts Act of 2016 and began operating 1 January 2018. The establishment introduced a three-tier judiciary in Iceland where before operated only district courts and the Supreme Court since the 1919 abolition of the National High Court. The court is composed of fifteen justices selected by the Qualifications Committee and nominated by the Minister of Justice for presidential confirmation. In cases where the minister wishes to make changes to the committee's selection, Parliament must approve of said changes with a simple majority vote. {'court_name': 'Court of Appeal', 'native_name': 'Landsréttur', 'established': '7 June 2016', 'jurisdiction': 'Iceland', 'location': 'Reykjavík', 'type': 'Presidential appointment after Minister of Justice nomination following Qualifications Committee selection. Parliamentary confirmation before appointment if minister nomination differs from committee selection.', 'authority': 'Courts Act No. 50/2016', 'appealsto': 'Supreme Court', 'appealsfrom': 'District courts', 'terms': 'Life tenure', 'positions': '15 (by statute)', 'budget': '703.8 million ISK (2019)', 'website': '{{URL|landsrettur.is}} {{In lang|is}}', 'chiefjudgetitle': 'President', 'chiefjudgename': 'Hervör Þorvaldsdóttir', 'chiefjudgetitle2': 'Vice-President', 'chiefjudgename2': 'Eiríkur Jónsson', 'aliases': ['Landsréttur']} {'instance of': 'government', 'subclass of': 'government', 'country': 'France', 'applies to jurisdiction': 'Israel'}",
8 'Allgemeine Zeitung des Judentums magazine Allgemeine Zeitung des Judentums (until May 1903: Allgemeine Zeitung des Judenthums) was a Jewish German magazine devoted to Jewish interests, founded in 1837 by Ludwig Philippson (1811–89), published first in Leipzig and later in Berlin. In 1860 it had a circulation of approximately 1,500. It was read not only in Germany, Austria, and the Netherlands but also in Eastern Europe, and continued to appear until 1922. At the time of its founding, several Jewish journals had recently been launched in Germany – Sulamith (1806-1843), Jedidja (1817-1831), and Abraham Geiger\'s Wissenschaftliche Zeitschrift für Jüdische Theologie (1835-1847), as well as the Unparteiische Universal-Kirchenzeitung (1837), of Julius Vinzenz Höninghaus, which had a Jewish section edited by Michael Hess and Isaac Markus Jost – and Philippson recognized that none had kept pace with the needs of the times. He aimed to produce a journal for the intelligent lay person that would both advance knowledge of Jewish history and plead the cause of the Jews of his day. The first number of the paper appeared May 2, 1837, and was published by Baumgärtner in Leipzig with the subtitle "Unparteiisches Organ für Alles Jüdische Interesse in Betreff von Politik, Religion, Literatur, Geschichte, Sprachkunde, und Belletristik" (Impartial Organ for All Matters of Jewish Interest Pertaining to Politics, Religion, Literature, History, Philology, and Belles-lettres). During the first two years the paper appeared three times per week. For a year and a half a supplement was published three times a month, devoted to literature and homiletics. In the course of 1839 it was first published twice weekly and then eventually became a weekly. Isidore Singer, writing in 1906, highlighted the paper\'s editorial independence, noting that it had not ever received a subsidy from any Jewish body, and that during the revolutions of 1848, "when the publication of nearly all other Jewish journals was interrupted, the Allgemeine Zeitung braved the storm and spoke out plainly in the political turmoil." According to I. M. Jost, who devoted a chapter to the journal in his Neuere Geschichte der Israeliten (1847), the Allgemeine Zeitung "became epoch-making in Jewish history by attempting for the first time to give a general view of the life and conditions of the Jews." Philippson\'s chief aim was the civil emancipation of the Jews, carrying on the fight for that cause in the spirit of Gabriel Riesser\'s earlier periodical Der Jude (1832-1835). The paper was a voice for moderate religious reform, focusing attention on the organization of religious instruction, the form of worship in the synagogue, and the cultivation of all branches of Jewish learning. It also advocated for closer relations with non-Jews. It exercised considerable influence on Judaism in general, and, in particular, on the evolution of Judaism in Germany. It played a role in the establishment of a rabbinical seminary (Lehranstalt für die Wissenschaft des Judenthums) in Berlin, and of a Jewish Publication Society (Institut zur Förderung der Israelitischen Literatur), as well as the calling together of a Jewish synod (Leipzig, 1869). From the outset the Allgemeine Zeitung met with success, drawing the interest of cultured Jewish circles of Germany, Austria, and the Netherlands. Within the first months of its publication a society of students in Leyden (Netherlands) had formed to aid its circulation, and it even obtained several hundred subscribers in Poland. During the first years of its existence the paper had among its collaborators a number of the most distinguished scholars, including Gabriel Riesser, E. Carmoly, J. L. Saalschütz, S. D. Luzzatto, Leopold Zunz, Leopold Dukes, Julius Fürst, Leopold Löw, Franz Delitzsch, Adolph Jellinek, Abraham Geiger, and I. M. Jost. During the first year Phoebus Philippson, brother of Ludwig, contributed a series of 11 articles under the title "Ideas for an Encyclopedia and a Methodology of Jewish Theology." In the mid-1850s a supplement was published regularly, entitled Jüdisches Volksblatt zur Belehrung und Unterhaltung auf Jüdischem Gebiete (A Popular Jewish Journal for Instruction and Entertainment on Jewish Subjects). After Philippson\'s death Gustav Karpeles assumed the editorship, beginning with the issue of February 9, 1890. Under his tenure the paper\'s interests shifted toward the lives and situation of the Jews of Eastern Europe. At that time a change was made in the format so that the literary part, which formed the bulk of the paper, was separated from the part containing the news. The latter was paged separately as a supplement entitled Der Gemeindebote, which continued to appear until 1922. In 1890 the journal was acquired by Rudolf Mosse, and from then on published in Berlin. Later, beginning in the second half of 1920, the journal appeared only once every two weeks. It ceased publication with the issue of April 28, 1922, and was succeeded by the C.V.-Zeitung (C.V.-Newspaper), the organ of the Centralverein deutscher Staatsbürger jüdischen Glaubens (Central Association of German Citizens of Jewish Faith). {\'note\': \'infobox not present in Wikipedia\'} {\'instance of\': \'magazine\', \'language of work or name\': \'German\', \'country of origin\': \'Germany\', \'copyright status\': \'public domain\', \'described by source\': \'Brockhaus and Efron Encyclopedic Dictionary\', \'country\': \'Germany\'}',
9 'inker line artist in a traditional comic book or graphic novel The inker (sometimes credited as the finisher or embellisher) is one of the two line artists in traditional comic book production. After the penciller creates a drawing, the inker interprets this drawing by outlining and embellishing it with a pencil, a pen or a brush. Inking was necessary in the traditional printing process as presses could not reproduce pencilled drawings. Another specialist, the letterer, handles the "inking" of text, while the colorist applies color to the final art submitted by the inker. {\'aliases\': [\'finisher\', \'embellisher\', \'comic inker\', \'Inking (drawing technique)\']} {\'instance of\': \'profession\', \'subclass of\': \'comics artist\'}',
10]
11embeddings = model.encode(sentences)
12print(embeddings.shape)
13# [3, 768]
14
15# Get the similarity scores for the embeddings
16similarities = model.similarity(embeddings, embeddings)
17print(similarities.shape)
18# [3, 3]sentence_0, sentence_1, and sentence_2| sentence_0 | sentence_1 | sentence_2 | |
|---|---|---|---|
| type | string | string | string |
| details |
|
|
|
| sentence_0 | sentence_1 | sentence_2 |
|---|---|---|
Cabinet of the French Consulate Wikimedia list article The Cabinet of the French Consulate was formed following the Coup of 18 Brumaire which replaced the Directory with the Consulate. The new regime was ratified by the adoption of the Constitution of the Year VIII on 24 December 1799 and headed by Napoleon Bonaparte as First Consul, with Jean Jacques Régis de Cambacérès and Charles-François Lebrun serving as Second and Third Consuls respectively. {'cabinet_name': 'Cabinet of the Consulate', 'jurisdiction': 'France', 'flag': '{{flag | France}}', 'flag_border': 'true', 'caption': 'The Three Consuls.', 'date_formed': '11 November 1799', 'date_dissolved': '18 May 1804', 'government_head': 'Napoleon Bonaparte Jean Jacques Régis de Cambacérès Charles-François Lebrun', 'previous': 'Government of the Directory', 'successor': 'First Cabinet of Napoleon I'} {'instance of': 'government', 'subclass of': 'government', 'country': 'France', 'applies to jurisdiction': 'Israel'} | Julia Carabias Mexican professor Julia Carabias Lillo (born August 11, 1954, Mexico City) is a Mexican ecologist and Environmental Conservationist. She is a professor at the National Autonomous University of Mexico and served as the Secretariat of Environment and Natural Resources under President Ernesto Zedillo from 1994 to 2000. {'name': 'Julia Carabias Lillo', 'birth_date': 'August 11, 1954', 'birth_place': 'Mexico City, Mexico', 'fields': 'Ecology and Environmental Conservation', 'workplaces': 'National Autonomous University of Mexico\nSecretariat of Environment and Natural Resources', 'alma_mater': 'National Autonomous University of Mexico, BS (1977) and MS (1981)', 'spouse': 'José Woldenberg (divorced)', 'awards': 'J. Paul Getty Award for Conservation Leadership\nInternational Cosmos Prize\nChampions of the Earth\nBelisario Domínguez Medal of Honor', 'known_for': 'Environmental conservation, former Secretariat of Environment and Natural Resources', 'aliases': ['Julia Carabias Lil... |
Catharism Christian dualist movement that thrived in some areas of Southern Europe Catharism ( KATH-ər-iz-əm; from the Ancient Greek: καθαροί, romanized: katharoí, "the pure ones") was a Christian quasi-dualist and pseudo-Gnostic movement which thrived in Southern Europe, particularly in northern Italy and southern France, between the 12th and 14th centuries. Denounced as a heretical sect by the Catholic Church, its followers were attacked first by the Albigensian Crusade and later by the Medieval Inquisition, which eradicated the sect by 1350. Around 1 million were slaughtered, hanged, or burnt at the stake. Followers were known as Cathars or Albigensians, after the French city Albi where the movement first took hold, but referred to themselves as Good Christians. They famously believed that there were not one, but two Gods—the good God of Heaven and the evil god of this age (2 Corinthians 4:4). According to tradition, Cathars believed that the good God was the God of the New Testamen... | Mosan art regional style of art from the Meuse river valley Mosan art is a regional style of art from the valley of the Meuse in present-day Belgium, the Netherlands, and Germany. Although in a broader sense the term applies to art from this region from all periods, it generally refers to Romanesque art, with Mosan Romanesque architecture, stone carving, metalwork, enamelling and manuscript illumination reaching a high level of development during the 11th, 12th and 13th centuries. The Meuse river valley lay in the heart of the earlier Carolingian Empire and therefore the style draws largely from the heritage of the Carolingian art tradition. Thus, Mosan art contains strong classical elements, which separates it from the international Romanesque style seen elsewhere during the period, for example in France, Germany Spain and Italy. However, it shares with mainstream Romanesque art elements such as the treatment of space. Although the iconography of 11th- and 12th-century Meuse valley ar... | Arrabal an area on the periphery of a city or large town An Arrabal is a Spanish word for an area on the periphery of a city or large town, a suburb. It may also refer to: Bruno Arrabal (born 1992), Brazilian footballer Fernando Arrabal (born 1932), Spanish author and filmmaker Progreso Alfarache Arrabal (1888–1964), Andalusian anarcho-syndicalist Arrabal (Zaragoza), a district in Zaragoza, Spain Arrabal (Leiria), a parish (freguesia) in Leiria, Portugal {'aliases': ['suburb']} {'subclass of': 'neighborhood', 'part of': 'city', 'on focus list of Wikimedia project': 'Wikipedia:Vital articles/Level/4', 'Commons category': 'Downtowns and city centers', 'said to be the same as': 'central business district'} |
Varpa Swedish outdoor sport Varpa is an outdoor game of physical skill that allegedly dates back to the Viking Age and survived in Gotland. It is similar to boules and horseshoes but is played with a flat and heavy object called a "varpa" instead of balls. Varpas used to be well-shaped stones, but nowadays, aluminium is more popular. A varpa can weigh between one-half and five kilograms (one and eleven pounds). The object of the game is to throw the varpa as close to a stick as possible. The stick is fifteen metres (sixteen yards) away for women and twenty metres (twenty-two yards) away for men. The game can be played individually or in teams. No official nationally sponsored varpa teams exist; however, unofficial leagues are growing in popularity among youth in suburban areas of Sweden and Norway. "Varpa" is an old word which simply means "to throw". Varpa is one of the disciplines at the annual Stånga Games (Stångaspelen). {'note': 'infobox not present in Wikipedia'} {'instance of': ... | Pescara city in Abruzzo, Central Italy Pescara (Italian: [pesˈkaːra] ; Abruzzese: Pescàrë; Pescarese: Piscàrë) is the capital city of the province of Pescara, in the Abruzzo region of Italy. It is the most populated city in Abruzzo, with 118,657 (January 1, 2023) residents (and approximately 350,000 including the surrounding metropolitan area). Located on the Adriatic coast at the mouth of the River Aterno-Pescara, the present-day municipality was formed in 1927 joining the municipalities of the old Pescara fortress, the part of the city to the south of the river, and Castellamare Adriatico, the part of the city to the north of the river. The surrounding area was formed into the province of Pescara. The main commercial street of the city is Corso Umberto I, which runs between two squares, starting from Piazza della Repubblica and reaching the seacoast in Piazza Primo Maggio. The rectangle that it forms with Corso Vittorio Emanuele II and Via Nicola Fabrizi is home of the main shopping ... | religious epistemology approach to epistemological questions from a religious perspective Religious epistemology broadly covers religious approaches to epistemological questions, or attempts to understand the epistemological issues that come from religious belief. The questions asked by epistemologists apply to religious beliefs and propositions whether they seem rational, justified, warranted, reasonable, based on evidence and so on. Religious views also influence epistemological theories, such as in the case of Reformed epistemology. Reformed epistemology has mainly developed in contemporary Christian religious epistemology, as in the work of Alvin Plantinga (born 1932), William P. Alston (1921-2009), Nicholas Wolterstorff (born 1932) and Kelly James Clark, as a critique of and alternative to the idea of "evidentialism" of the sort proposed by W. K. Clifford (1845-1879). Alvin Plantinga, for instance, is critical of the evidentialist analysis of knowledge provided by Richard Feldman ... |
TripletLoss with these parameters:
1{
2 "distance_metric": "TripletDistanceMetric.EUCLIDEAN",
3 "triplet_margin": 0.5
4}num_train_epochs: 10fp16: Truemulti_dataset_batch_sampler: round_robinoverwrite_output_dir: Falsedo_predict: Falseeval_strategy: noprediction_loss_only: Trueper_device_train_batch_size: 8per_device_eval_batch_size: 8per_gpu_train_batch_size: Noneper_gpu_eval_batch_size: Nonegradient_accumulation_steps: 1eval_accumulation_steps: Nonetorch_empty_cache_steps: Nonelearning_rate: 5e-05weight_decay: 0.0adam_beta1: 0.9adam_beta2: 0.999adam_epsilon: 1e-08max_grad_norm: 1num_train_epochs: 10max_steps: -1lr_scheduler_type: linearlr_scheduler_kwargs: {}warmup_ratio: 0.0warmup_steps: 0log_level: passivelog_level_replica: warninglog_on_each_node: Truelogging_nan_inf_filter: Truesave_safetensors: Truesave_on_each_node: Falsesave_only_model: Falserestore_callback_states_from_checkpoint: Falseno_cuda: Falseuse_cpu: Falseuse_mps_device: Falseseed: 42data_seed: Nonejit_mode_eval: Falseuse_ipex: Falsebf16: Falsefp16: Truefp16_opt_level: O1half_precision_backend: autobf16_full_eval: Falsefp16_full_eval: Falsetf32: Nonelocal_rank: 0ddp_backend: Nonetpu_num_cores: Nonetpu_metrics_debug: Falsedebug: []dataloader_drop_last: Falsedataloader_num_workers: 0dataloader_prefetch_factor: Nonepast_index: -1disable_tqdm: Falseremove_unused_columns: Truelabel_names: Noneload_best_model_at_end: Falseignore_data_skip: Falsefsdp: []fsdp_min_num_params: 0fsdp_config: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}tp_size: 0fsdp_transformer_layer_cls_to_wrap: Noneaccelerator_config: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}deepspeed: Nonelabel_smoothing_factor: 0.0optim: adamw_torchoptim_args: Noneadafactor: Falsegroup_by_length: Falselength_column_name: lengthddp_find_unused_parameters: Noneddp_bucket_cap_mb: Noneddp_broadcast_buffers: Falsedataloader_pin_memory: Truedataloader_persistent_workers: Falseskip_memory_metrics: Trueuse_legacy_prediction_loop: Falsepush_to_hub: Falseresume_from_checkpoint: Nonehub_model_id: Nonehub_strategy: every_savehub_private_repo: Nonehub_always_push: Falsegradient_checkpointing: Falsegradient_checkpointing_kwargs: Noneinclude_inputs_for_metrics: Falseinclude_for_metrics: []eval_do_concat_batches: Truefp16_backend: autopush_to_hub_model_id: Nonepush_to_hub_organization: Nonemp_parameters:auto_find_batch_size: Falsefull_determinism: Falsetorchdynamo: Noneray_scope: lastddp_timeout: 1800torch_compile: Falsetorch_compile_backend: Nonetorch_compile_mode: Noneinclude_tokens_per_second: Falseinclude_num_input_tokens_seen: Falseneftune_noise_alpha: Noneoptim_target_modules: Nonebatch_eval_metrics: Falseeval_on_start: Falseuse_liger_kernel: Falseeval_use_gather_object: Falseaverage_tokens_across_devices: Falseprompts: Nonebatch_sampler: batch_samplermulti_dataset_batch_sampler: round_robin| Epoch | Step | Training Loss |
|---|---|---|
| 0.6105 | 500 | 0.2552 |
| 1.2210 | 1000 | 0.1448 |
| 1.8315 | 1500 | 0.0974 |
| 2.4420 | 2000 | 0.0565 |
| 3.0525 | 2500 | 0.0499 |
| 3.6630 | 3000 | 0.0298 |
| 4.2735 | 3500 | 0.0212 |
| 4.8840 | 4000 | 0.0163 |
| 5.4945 | 4500 | 0.0121 |
| 6.1050 | 5000 | 0.01 |
| 6.7155 | 5500 | 0.0062 |
| 7.3260 | 6000 | 0.0063 |
| 7.9365 | 6500 | 0.0046 |
| 8.5470 | 7000 | 0.0021 |
| 9.1575 | 7500 | 0.0021 |
| 9.7680 | 8000 | 0.0017 |
1@inproceedings{reimers-2019-sentence-bert,
2 title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
3 author = "Reimers, Nils and Gurevych, Iryna",
4 booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
5 month = "11",
6 year = "2019",
7 publisher = "Association for Computational Linguistics",
8 url = "https://arxiv.org/abs/1908.10084",
9}1@misc{hermans2017defense,
2 title={In Defense of the Triplet Loss for Person Re-Identification},
3 author={Alexander Hermans and Lucas Beyer and Bastian Leibe},
4 year={2017},
5 eprint={1703.07737},
6 archivePrefix={arXiv},
7 primaryClass={cs.CV}
8}