Sentence Similarity
sentence-transformers
Safetensors
bert
feature-extraction
Generated from Trainer
dataset_size:100000
loss:TripletLoss
text-embeddings-inference
Instructions to use Lysandrec/MNLP_M2_document_encoder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use Lysandrec/MNLP_M2_document_encoder with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("Lysandrec/MNLP_M2_document_encoder") sentences = [ "Consider the set of points $S = \\{(x,y) : x \\text{ and } y \\text{ are non-negative integers } \\leq n\\}$. Find the number of squares that can be formed with vertices belonging to $S$ and sides parallel to the axes.", "<page_title> Waller Plan </page_title> <path> Waller_Plan > City plan </path> <section_title> City plan </section_title> <content> The plan also designated spaces for a hospital, an academy and university, churches, a courthouse and jail, an armory, and a penitentiary.With the surveying and grid plan completed, Waller and his associates drew up a plat dividing the city blocks into land lots. The first auction of lots was held on August 1, 1839, under a group of live oak trees in what was to be the city's southwestern public square; these trees have since been known as the \"Auction Oaks\". The auction raised $182,585 (equivalent to $5,018,000 in 2022), funds used to pay for the construction of government buildings for the new capital city. </content>", "<page_title> Heilbronn triangle problem </page_title> <path> Heilbronn_triangle_problem > Specific shapes and numbers </path> <section_title> Specific shapes and numbers </section_title> <content> Goldberg (1972) has investigated the optimal arrangements of n {\\displaystyle n} points in a square, for n {\\displaystyle n} up to 16. Goldberg's constructions for up to six points lie on the boundary of the square, and are placed to form an affine transformation of the vertices of a regular polygon. For larger values of n {\\displaystyle n} , Comellas & Yebra (2002) improved Goldberg's bounds, and for these values the solutions include points interior to the square. These constructions have been proven optimal for up to seven points. </content>", "<page_title> 14:9 aspect ratio </page_title> <path> 14:9_aspect_ratio > Mathematics </path> <section_title> Mathematics </section_title> <content> The aspect ratio of 14:9 (1.555...) is the arithmetic mean (average) of 16:9 and 4:3 (12:9), ( ( 16 / 9 ) + ( 12 / 9 ) ) ÷ 2 = 14 / 9 {\\displaystyle ((16/9)+(12/9))\\div 2=14/9} . More practically, it is approximately the geometric mean (the precise geometric mean is ( 16 / 9 ) × ( 4 / 3 ) ≈ 1.5396 ≈ 13.8: 9 {\\displaystyle {\\sqrt {(16/9)\\times (4/3)}}\\approx 1.5396\\approx 13.8:9} ), and in this sense is mathematically a compromise between these two aspect ratios: two equal area pictures (at 16:9 and 4:3) will intersect in a box with aspect ratio the geometric mean, as demonstrated in the image at top (14:9 is just slightly wider than the intersection). In this way 14:9 balances the needs of both 16:9 and 4:3, cropping or distorting both about equally. Similar considerations were used in the choice of 16:9 by the SMPTE, which balanced 2.35:1 and 4:3. </content>" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
File size: 1,464 Bytes
a571099 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | {
"added_tokens_decoder": {
"0": {
"content": "[PAD]",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"100": {
"content": "[UNK]",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"101": {
"content": "[CLS]",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"102": {
"content": "[SEP]",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"103": {
"content": "[MASK]",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
}
},
"clean_up_tokenization_spaces": false,
"cls_token": "[CLS]",
"do_basic_tokenize": true,
"do_lower_case": true,
"extra_special_tokens": {},
"mask_token": "[MASK]",
"max_length": 128,
"model_max_length": 384,
"never_split": null,
"pad_to_multiple_of": null,
"pad_token": "[PAD]",
"pad_token_type_id": 0,
"padding_side": "right",
"sep_token": "[SEP]",
"stride": 0,
"strip_accents": null,
"tokenize_chinese_chars": true,
"tokenizer_class": "BertTokenizer",
"truncation_side": "right",
"truncation_strategy": "longest_first",
"unk_token": "[UNK]"
}
|