sentence-transformers
PyTorch
setfit
Spanish
roberta
relation-classification
bert
biomedical
lexical semantics
bionlp
Instructions to use BSC-NLP4BIA/biomedical-semantic-relation-classifier-setfit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use BSC-NLP4BIA/biomedical-semantic-relation-classifier-setfit with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("BSC-NLP4BIA/biomedical-semantic-relation-classifier-setfit") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - setfit
How to use BSC-NLP4BIA/biomedical-semantic-relation-classifier-setfit with setfit:
from setfit import SetFitModel model = SetFitModel.from_pretrained("BSC-NLP4BIA/biomedical-semantic-relation-classifier-setfit") - Notebooks
- Google Colab
- Kaggle
File size: 763 Bytes
fcee4b8 | 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 26 27 28 29 | {
"_name_or_path": "/gpfs/scratch/bsc14/bsc14515/jup_lab/models/base/sapbert_15_parents_1epoch",
"architectures": [
"RobertaModel"
],
"attention_probs_dropout_prob": 0.1,
"bos_token_id": 0,
"classifier_dropout": null,
"eos_token_id": 2,
"gradient_checkpointing": false,
"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": "roberta",
"num_attention_heads": 12,
"num_hidden_layers": 12,
"pad_token_id": 1,
"position_embedding_type": "absolute",
"torch_dtype": "float32",
"transformers_version": "4.33.1",
"type_vocab_size": 1,
"use_cache": true,
"vocab_size": 52000
}
|