Instructions to use textattack/roberta-base-STS-B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use textattack/roberta-base-STS-B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="textattack/roberta-base-STS-B")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("textattack/roberta-base-STS-B") model = AutoModelForSequenceClassification.from_pretrained("textattack/roberta-base-STS-B") - Notebooks
- Google Colab
- Kaggle
| { | |
| "model": "roberta-base", | |
| "dataset": "glue:stsb", | |
| "dataset_train_split": "train", | |
| "dataset_dev_split": "validation", | |
| "tb_writer_step": 1000, | |
| "checkpoint_steps": -1, | |
| "checkpoint_every_epoch": false, | |
| "num_train_epochs": 5, | |
| "early_stopping_epochs": -1, | |
| "batch_size": 8, | |
| "max_length": 128, | |
| "learning_rate": 2e-05, | |
| "grad_accum_steps": 1, | |
| "warmup_proportion": 0.1, | |
| "config_name": "config.json", | |
| "weights_name": "pytorch_model.bin", | |
| "enable_wandb": false, | |
| "output_dir": "/p/qdata/jm8wx/research/text_attacks/textattack/outputs/training/roberta-base-glue:stsb-2020-06-29-12:29/", | |
| "num_labels": 1, | |
| "do_regression": true, | |
| "best_eval_score": 0.9108696741479216, | |
| "best_eval_score_epoch": 4, | |
| "epochs_since_best_eval_score": 0 | |
| } | |