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
| { | |
| "add_prefix_space": true, | |
| "bos_token": { | |
| "__type": "AddedToken", | |
| "content": "<s>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false | |
| }, | |
| "clean_up_tokenization_spaces": true, | |
| "cls_token": { | |
| "__type": "AddedToken", | |
| "content": "<s>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false | |
| }, | |
| "do_lower_case": true, | |
| "eos_token": { | |
| "__type": "AddedToken", | |
| "content": "</s>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false | |
| }, | |
| "errors": "replace", | |
| "mask_token": { | |
| "__type": "AddedToken", | |
| "content": "<mask>", | |
| "lstrip": true, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false | |
| }, | |
| "max_len": 512, | |
| "model_max_length": 512, | |
| "pad_token": { | |
| "__type": "AddedToken", | |
| "content": "<pad>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false | |
| }, | |
| "sep_token": { | |
| "__type": "AddedToken", | |
| "content": "</s>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false | |
| }, | |
| "tokenizer_class": "RobertaTokenizer", | |
| "trim_offsets": true, | |
| "unk_token": { | |
| "__type": "AddedToken", | |
| "content": "<unk>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false | |
| } | |
| } | |