Sentence Similarity
sentence-transformers
Safetensors
English
mpnet
ontology
nlp
biology
animals
fish
embedding
trait
feature-extraction
loss:CoSENTLoss
Eval Results (legacy)
text-embeddings-inference
Instructions to use imageomics/trait2vec with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use imageomics/trait2vec with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("imageomics/trait2vec") sentences = [ "Ventral humeral ridge: or not", "If metasternum ossified, shape: long, narrow and tapering markedly anteriorly to posteriorly, length up to 3.5 times maximum width", "Astragalus, dorsolateral margin:: overlaps the anterior and posterior portions of the calcaneum equally", "Ulna size: does not apply" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
File size: 545 Bytes
4fd4743 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | {
"architectures": [
"MPNetModel"
],
"attention_probs_dropout_prob": 0.1,
"bos_token_id": 0,
"dtype": "float32",
"eos_token_id": 2,
"hidden_act": "gelu",
"hidden_dropout_prob": 0.1,
"hidden_size": 768,
"initializer_range": 0.02,
"intermediate_size": 3072,
"layer_norm_eps": 1e-05,
"max_position_embeddings": 514,
"model_type": "mpnet",
"num_attention_heads": 12,
"num_hidden_layers": 12,
"pad_token_id": 1,
"relative_attention_num_buckets": 32,
"transformers_version": "4.57.1",
"vocab_size": 30527
}
|