Instructions to use relbert/relbert-roberta-large with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use relbert/relbert-roberta-large with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="relbert/relbert-roberta-large")# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("relbert/relbert-roberta-large") model = AutoModel.from_pretrained("relbert/relbert-roberta-large") - Notebooks
- Google Colab
- Kaggle
| { | |
| "template": "I wasn\u2019t aware of this relationship, but I just read in the encyclopedia that <subj> is the <mask> of <obj>", | |
| "model": "roberta-large", | |
| "max_length": 64, | |
| "epoch": 10, | |
| "batch": 32, | |
| "random_seed": 0, | |
| "lr": 5e-06, | |
| "lr_warmup": 10, | |
| "aggregation_mode": "average_no_mask", | |
| "data": "relbert/semeval2012_relational_similarity", | |
| "data_name": null, | |
| "exclude_relation": null, | |
| "split": "train", | |
| "split_valid": "validation", | |
| "loss_function": "nce", | |
| "classification_loss": false, | |
| "loss_function_config": { | |
| "temperature": 0.05, | |
| "gradient_accumulation": 1, | |
| "num_negative": 400, | |
| "num_positive": 10 | |
| }, | |
| "augment_negative_by_positive": true | |
| } |