Sentence Similarity
sentence-transformers
Safetensors
English
mpnet
ontology
nlp
biology
animals
fish
embedding
trait
feature-extraction
loss:CoSENTLoss
Eval Results (legacy)
text-embeddings-inference
Run this model with HF Jobs
Run imageomics/trait2vec on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/imageomics/trait2vec. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/imageomics/trait2vec on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
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
Add published reference citation (instead of preprint)
#2
by egrace479 - opened
98 unmodified lines991001011021031041052 unmodified lines1081091101111121131141 unmodified line1161171181191201211226 unmodified lines12913013113213313413533 unmodified lines16917017117217317417531 unmodified lines20720820921021121221390 unmodified lines30430530630730830931013 unmodified lines32432532632732832933033119 unmodified lines35135235335498 unmodified lines# Model Card for Trait2VecTrait2Vec is a language model to embed organismal trait descriptions in a way that preserves the structure induced by a semantic similarity metric (e.g. SimGIC). The model was trained on the [char-sim-data](https://huggingface.co/datasets/imageomics/char-sim-data) dataset. It is fine-tuned from [sentence-transformers/all-mpnet-base-v2](https://huggingface.co/sentence-transformers/all-mpnet-base-v2).Through qualitative data exploration we observe the cosine similarity between embeddings of raw trait description is proportional to the semantic similarity of their corresponding ontological representations.## Model Details2 unmodified lines<!-- Provide a longer summary of what this model is. -->- **Developed by:** Jim Balhoff, Soumyashree Kar, Hilmar Lapp, Juan Garcia- **Model type:** Sentence Transformer- **Language(s) (NLP):** English- **License:** MIT1 unmodified line### Model Sources- **Repository:** [Trait2Vec](https://github.com/Imageomics/char-sim/)## Uses6 unmodified lines## Bias, Risks, and LimitationsThis model is finetuned from [sentence-transformers/all-mpnet-base-v2](https://huggingface.co/sentence-transformers/all-mpnet-base-v2), therefore it inherits its corresponding biases and risks. The training dataset([char-sim-data](https://huggingface.co/datasets/imageomics/char-sim-data)) introduces the biases of the single similarity metric and ontology. This means the embedding inherits that metric’s inductive biases, coverage gaps, and evolving definitions. Biological conclusions may differ under alternative metrics (e.g., Resnik, Jaccard) or other phenotype ontologies.### Recommendations33 unmodified lines### Training DataThis model was trained on the [char-sim-data](https://huggingface.co/datasets/imageomics/char-sim-data) dataset.* Size: 438,516 training samples* Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>score</code>31 unmodified lines## EvaluationWe tested Trait2Vec on a hold-out split of 20\% of the [char-sim-data](https://huggingface.co/datasets/imageomics/char-sim-data/) dataset. No descriptor overlap was ensured.### Testing Data, Factors & Metrics90 unmodified lines```bibtex@software{trait2vec2025,author = {Jim Balhoff and Soumyashree Kar and Hilmar Lapp and Juan Garcia},doi = {<doi once generated>},title = {Trait2Vec},version = {1.0.0},13 unmodified linesbooktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",month = "11",year = "2019",publisher = "Association for Computational Linguistics",url = "https://arxiv.org/abs/1908.10084",}```19 unmodified lines## Model Card Contact[jjgarcia@cs.unc.edu](mailto:jjgarcia@cs.unc.edu)98 unmodified lines991001011021031041052 unmodified lines1081091101111121131141 unmodified line1161171181191201211226 unmodified lines12913013113213313413533 unmodified lines16917017117217317417531 unmodified lines20720820921021121221390 unmodified lines30430530630730830931013 unmodified lines32432532632732832933033133233319 unmodified lines35335435535698 unmodified lines# Model Card for Trait2VecTrait2Vec is a language model to embed organismal trait descriptions in a way that preserves the structure induced by a semantic similarity metric (e.g. SimGIC). The model was trained on the [Character Similarity Dataset](https://huggingface.co/datasets/imageomics/char-sim-data). It is fine-tuned from [sentence-transformers/all-mpnet-base-v2](https://huggingface.co/sentence-transformers/all-mpnet-base-v2).Through qualitative data exploration we observe the cosine similarity between embeddings of raw trait description is proportional to the semantic similarity of their corresponding ontological representations.## Model Details2 unmodified lines<!-- Provide a longer summary of what this model is. -->- **Developed by:** Juan Garcia, Soumyashree Kar, Jim Balhoff, Hilmar Lapp- **Model type:** Sentence Transformer- **Language(s) (NLP):** English- **License:** MIT1 unmodified line### Model Sources- **Repository:** [Imageomics/char-sim](https://github.com/Imageomics/char-sim/)## Uses6 unmodified lines## Bias, Risks, and LimitationsThis model is finetuned from [sentence-transformers/all-mpnet-base-v2](https://huggingface.co/sentence-transformers/all-mpnet-base-v2), therefore it inherits its corresponding biases and risks. The training dataset([Character Similarity Dataset](https://huggingface.co/datasets/imageomics/char-sim-data)) introduces the biases of the single similarity metric and ontology. This means the embedding inherits that metric’s inductive biases, coverage gaps, and evolving definitions. Biological conclusions may differ under alternative metrics (e.g., Resnik, Jaccard) or other phenotype ontologies.### Recommendations33 unmodified lines### Training DataThis model was trained on the [Character Similarity Dataset](https://huggingface.co/datasets/imageomics/char-sim-data).* Size: 438,516 training samples* Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>score</code>31 unmodified lines## EvaluationWe tested Trait2Vec on a hold-out split of 20\% of the [Character Similarity Dataset](https://huggingface.co/datasets/imageomics/char-sim-data/). No descriptor overlap was ensured.### Testing Data, Factors & Metrics90 unmodified lines```bibtex@software{trait2vec2025,author = {Juan Garcia and Soumyashree Kar and Jim Balhoff and Hilmar Lapp},doi = {<doi once generated>},title = {Trait2Vec},version = {1.0.0},13 unmodified linesbooktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",month = "11",year = "2019",pages = "3982-3992",publisher = "Association for Computational Linguistics",url = "https://aclanthology.org/D19-1410/",doi = "10.18653/v1/D19-1410"}```19 unmodified lines## Model Card ContactPlease open a [Discussion on the Community Tab](https://huggingface.co/imageomics/trait2vec/discussions) with any questions on the model.
README.md+11-9