Sentence Similarity
sentence-transformers
Safetensors
mpnet
feature-extraction
dense
Generated from Trainer
dataset_size:130308
loss:MultipleNegativesRankingLoss
text-embeddings-inference
Instructions to use haongn/mpnet-mnr-squad2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use haongn/mpnet-mnr-squad2 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("haongn/mpnet-mnr-squad2") sentences = [ "What is an ogonek? ", "“The roots of all our modern academic fields can be found within the pages of literature.” Literature in all its forms can be seen as written records, whether the literature itself be factual or fictional, it is still quite possible to decipher facts through things like characters’ actions and words or the authors’ style of writing and the intent behind the words. The plot is for more than just entertainment purposes; within it lies information about economics, psychology, science, religions, politics, cultures, and social depth. Studying and analyzing literature becomes very important in terms of learning about our history. Through the study of past literature we are able to learn about how society has evolved and about the societal norms during each of the different periods all throughout history. This can even help us to understand references made in more modern literature because authors often make references to Greek mythology and other old religious texts or historical moments. Not only is there literature written on each of the aforementioned topics themselves, and how they have evolved throughout history (like a book about the history of economics or a book about evolution and science, for example) but we can also learn about these things in fictional works. Authors often include historical moments in their works, like when Lord Byron talks about the Spanish and the French in ‘‘Childe Harold’s Pilgrimage: Canto I’’ and expresses his opinions through his character Childe Harold. Through literature we are able to continuously uncover new information about history. It is easy to see how all academic fields have roots in literature. Information became easier to pass down from generation to generation once we began to write it down. Eventually everything was written down, from things like home remedies and cures for illness, or how to build shelter to traditions and religious practices. From there people were able to study literature, improve on ideas, further our knowledge, and academic fields such as the medical field or trades could be started. In much the same way as the literature that we study today continue to be updated as we continue to evolve and learn more and more.", "Darwin's aims were twofold: to show that species had not been separately created, and to show that natural selection had been the chief agent of change. He knew that his readers were already familiar with the concept of transmutation of species from Vestiges, and his introduction ridicules that work as failing to provide a viable mechanism. Therefore, the first four chapters lay out his case that selection in nature, caused by the struggle for existence, is analogous to the selection of variations under domestication, and that the accumulation of adaptive variations provides a scientifically testable mechanism for evolutionary speciation.", "The set of graphic and format characters defined by Unicode does not correspond directly to the repertoire of abstract characters that is representable under Unicode. Unicode encodes characters by associating an abstract character with a particular code point. However, not all abstract characters are encoded as a single Unicode character, and some abstract characters may be represented in Unicode by a sequence of two or more characters. For example, a Latin small letter \"i\" with an ogonek, a dot above, and an acute accent, which is required in Lithuanian, is represented by the character sequence U+012F, U+0307, U+0301. Unicode maintains a list of uniquely named character sequences for abstract characters that are not directly encoded in Unicode." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
Welcome to the community
The community tab is the place to discuss and collaborate with the HF community!