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
| { | |
| "bos_token": { | |
| "content": "<s>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false | |
| }, | |
| "cls_token": { | |
| "content": "<s>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false | |
| }, | |
| "eos_token": { | |
| "content": "</s>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false | |
| }, | |
| "mask_token": { | |
| "content": "<mask>", | |
| "lstrip": true, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false | |
| }, | |
| "pad_token": { | |
| "content": "<pad>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false | |
| }, | |
| "sep_token": { | |
| "content": "</s>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false | |
| }, | |
| "unk_token": { | |
| "content": "[UNK]", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false | |
| } | |
| } | |