Instructions to use textattack/distilbert-base-uncased-CoLA with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use textattack/distilbert-base-uncased-CoLA with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="textattack/distilbert-base-uncased-CoLA")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("textattack/distilbert-base-uncased-CoLA") model = AutoModelForSequenceClassification.from_pretrained("textattack/distilbert-base-uncased-CoLA", device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
Download train_args.json from textattack/distilbert-base-uncased-CoLA: direct link, hf CLI and curl.
- Browser
- Download file 786 Bytes
-
https://huggingface.co/textattack/distilbert-base-uncased-CoLA/resolve/refs%2Fpr%2F1/train_args.json
- Command line
-
hf download hf://textattack/distilbert-base-uncased-CoLA@refs/pr/1/train_args.json
-
curl -L -o train_args.json https://huggingface.co/textattack/distilbert-base-uncased-CoLA/resolve/refs%2Fpr%2F1/train_args.json
786 Bytes
| { | |
| "model": "distilbert-base-uncased", | |
| "dataset": "glue:cola", | |
| "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": 64, | |
| "max_length": 128, | |
| "learning_rate": 3e-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/distilbert-base-uncased-glue:cola-2020-06-29-12:03/", | |
| "num_labels": 2, | |
| "do_regression": false, | |
| "best_eval_score": 0.8235858101629914, | |
| "best_eval_score_epoch": 2, | |
| "epochs_since_best_eval_score": 2 | |
| } | |