Sentence Similarity
sentence-transformers
Safetensors
bert
feature-extraction
Generated from Trainer
dataset_size:500
loss:MultipleNegativesRankingLoss
text-embeddings-inference
Instructions to use Manborough/isabelle-premise-encoder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use Manborough/isabelle-premise-encoder with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("Manborough/isabelle-premise-encoder") sentences = [ "theorem ptyping_match:\n \"\\<turnstile> p : T \\<Rightarrow> \\<Delta> \\<Longrightarrow> [] \\<turnstile> t : T \\<Longrightarrow> t \\<in> value \\<Longrightarrow>\n \\<exists>ts. \\<turnstile> p \\<rhd> t \\<Rightarrow> ts\"\n \"\\<turnstile> fps [:] fTs \\<Rightarrow> \\<Delta> \\<Longrightarrow> [] \\<turnstile> fs [:] fTs \\<Longrightarrow>\n \\<forall>(l, t) \\<in> set fs. t \\<in> value \\<Longrightarrow> \\<exists>us. \\<turnstile> fps [\\<rhd>] fs \\<Rightarrow> us\"", " cases: fixes a1 :: \"pat\" and a2 :: \"trm\" and a3 :: \"trm list\" assumes \"\\<turnstile> a1 \\<rhd> a2 \\<Rightarrow> a3\" obtains T :: \"POPLmarkRecord.type\" and t :: \"trm\" where \"a1 = PVar T\" and \"a2 = t\" and \"a3 = [t]\" | fps :: \"(char list \\<times> pat) list\" and fs :: \"(char list \\<times> trm) list\" and ts :: \"trm list\" where \"a1 = PRcd fps\" and \"a2 = Rcd fs\" and \"a3 = ts\" and \"\\<turnstile> fps [\\<rhd>] fs \\<Rightarrow> ts\"", " less_le_not_le: fixes less_eq :: \"'a \\<Rightarrow> 'a \\<Rightarrow> bool\" and less :: \"'a \\<Rightarrow> 'a \\<Rightarrow> bool\" and x :: \"'a\" and y :: \"'a\" assumes \"class.preorder less_eq less\" shows \"less x y = (less_eq x y \\<and> \\<not> less_eq y x)\"", " UnE: fixes c :: \"'b\" and A :: \"'b set\" and B :: \"'b set\" assumes \"c \\<in> A \\<union> B\" obtains \"c \\<in> A\" | \"c \\<in> B\"" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
File size: 594 Bytes
18c550b | 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 | {
"backend": "tokenizers",
"cls_token": "[CLS]",
"do_basic_tokenize": true,
"do_lower_case": true,
"is_local": false,
"local_files_only": false,
"mask_token": "[MASK]",
"max_length": 128,
"model_max_length": 256,
"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]"
}
|