Instructions to use textattack/roberta-base-rotten-tomatoes with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use textattack/roberta-base-rotten-tomatoes with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="textattack/roberta-base-rotten-tomatoes")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("textattack/roberta-base-rotten-tomatoes") model = AutoModelForSequenceClassification.from_pretrained("textattack/roberta-base-rotten-tomatoes", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download train_args.json from textattack/roberta-base-rotten-tomatoes: direct link, hf CLI and curl.
- Browser
- Download file 777 Bytes
-
https://huggingface.co/textattack/roberta-base-rotten-tomatoes/resolve/3fd77299e29adc4fe8c5f181810a6a1e7498dbd4/train_args.json
- Command line
-
hf download hf://textattack/roberta-base-rotten-tomatoes@3fd77299e29adc4fe8c5f181810a6a1e7498dbd4/train_args.json
-
curl -L -o train_args.json https://huggingface.co/textattack/roberta-base-rotten-tomatoes/resolve/3fd77299e29adc4fe8c5f181810a6a1e7498dbd4/train_args.json
777 Bytes
| { | |
| "model": "roberta-base", | |
| "dataset": "rotten_tomatoes", | |
| "dataset_train_split": "train", | |
| "dataset_dev_split": "validation", | |
| "tb_writer_step": 1000, | |
| "checkpoint_steps": -1, | |
| "checkpoint_every_epoch": false, | |
| "num_train_epochs": 10, | |
| "early_stopping_epochs": -1, | |
| "batch_size": 64, | |
| "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-rotten_tomatoes-2020-06-25-16:10/", | |
| "num_labels": 2, | |
| "do_regression": false, | |
| "best_eval_score": 0.9033771106941839, | |
| "best_eval_score_epoch": 2, | |
| "epochs_since_best_eval_score": 7 | |
| } | |