Instructions to use textattack/distilbert-base-uncased-rotten-tomatoes with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use textattack/distilbert-base-uncased-rotten-tomatoes with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="textattack/distilbert-base-uncased-rotten-tomatoes")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("textattack/distilbert-base-uncased-rotten-tomatoes") model = AutoModelForSequenceClassification.from_pretrained("textattack/distilbert-base-uncased-rotten-tomatoes", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download log.txt from textattack/distilbert-base-uncased-rotten-tomatoes: direct link, hf CLI and curl.
- Browser
- Download file 1.97 kB
-
https://huggingface.co/textattack/distilbert-base-uncased-rotten-tomatoes/resolve/main/log.txt
- Command line
-
hf download hf://textattack/distilbert-base-uncased-rotten-tomatoes/log.txt
-
curl -L -o log.txt https://huggingface.co/textattack/distilbert-base-uncased-rotten-tomatoes/resolve/main/log.txt
1.97 kB
| Writing logs to /p/qdata/jm8wx/research/text_attacks/textattack/outputs/training/distilbert-base-uncased-rotten_tomatoes-2020-06-24-12:26/log.txt. | |
| Loading [94mnlp[0m dataset [94mrotten_tomatoes[0m, split [94mtrain[0m. | |
| Loading [94mnlp[0m dataset [94mrotten_tomatoes[0m, split [94mvalidation[0m. | |
| Filtering samples with labels outside of [0, 1, 2]. | |
| Filtered 8530 train samples to 8530 points. | |
| Filtered 1066 dev samples to 1066 points. | |
| Loaded dataset. Found: 2 labels: ([0, 1]) | |
| Loading transformers AutoModelForSequenceClassification: distilbert-base-uncased | |
| Tokenizing training data. (len: 8530) | |
| Tokenizing eval data (len: 1066) | |
| Loaded data and tokenized in 6.951146125793457s | |
| Training model across 4 GPUs | |
| ***** Running training ***** | |
| Num examples = 8530 | |
| Batch size = 128 | |
| Max sequence length = 128 | |
| Num steps = 198 | |
| Num epochs = 3 | |
| Learning rate = 1e-05 | |
| Eval accuracy: 81.61350844277673% | |
| Best acc found. Saved model to /p/qdata/jm8wx/research/text_attacks/textattack/outputs/training/distilbert-base-uncased-rotten_tomatoes-2020-06-24-12:26/. | |
| Eval accuracy: 82.6454033771107% | |
| Best acc found. Saved model to /p/qdata/jm8wx/research/text_attacks/textattack/outputs/training/distilbert-base-uncased-rotten_tomatoes-2020-06-24-12:26/. | |
| Eval accuracy: 83.95872420262664% | |
| Best acc found. Saved model to /p/qdata/jm8wx/research/text_attacks/textattack/outputs/training/distilbert-base-uncased-rotten_tomatoes-2020-06-24-12:26/. | |
| Saved tokenizer <textattack.models.tokenizers.auto_tokenizer.AutoTokenizer object at 0x7f798097fac0> to /p/qdata/jm8wx/research/text_attacks/textattack/outputs/training/distilbert-base-uncased-rotten_tomatoes-2020-06-24-12:26/. | |
| Wrote README to /p/qdata/jm8wx/research/text_attacks/textattack/outputs/training/distilbert-base-uncased-rotten_tomatoes-2020-06-24-12:26/README.md. | |
| Wrote training args to /p/qdata/jm8wx/research/text_attacks/textattack/outputs/training/distilbert-base-uncased-rotten_tomatoes-2020-06-24-12:26/train_args.json. | |