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
| { | |
| "add_cross_attention": false, | |
| "architectures": [ | |
| "BertModel" | |
| ], | |
| "attention_probs_dropout_prob": 0.1, | |
| "bos_token_id": null, | |
| "classifier_dropout": null, | |
| "dtype": "float32", | |
| "eos_token_id": null, | |
| "gradient_checkpointing": false, | |
| "hidden_act": "gelu", | |
| "hidden_dropout_prob": 0.1, | |
| "hidden_size": 384, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 1536, | |
| "is_decoder": false, | |
| "layer_norm_eps": 1e-12, | |
| "max_position_embeddings": 512, | |
| "model_type": "bert", | |
| "num_attention_heads": 12, | |
| "num_hidden_layers": 6, | |
| "pad_token_id": 0, | |
| "position_embedding_type": "absolute", | |
| "tie_word_embeddings": true, | |
| "transformers_version": "5.9.0", | |
| "type_vocab_size": 2, | |
| "use_cache": false, | |
| "vocab_size": 30522 | |
| } | |