nyu-mll/glue
Viewer • Updated • 1.49M • 476k • 498
How to use mi55th/bert-sst2-nesterov with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="mi55th/bert-sst2-nesterov") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("mi55th/bert-sst2-nesterov")
model = AutoModelForSequenceClassification.from_pretrained("mi55th/bert-sst2-nesterov")This repository contains a bert-base-uncased model fine-tuned for binary sentiment classification on the GLUE/SST-2 dataset.
0), positive (1) bert-base-uncased Trainer API) Trainer Fine-tuning used the GLUE benchmark dataset configuration SST-2 (Stanford Sentiment Treebank v2 as used in GLUE).
glue, config sst2 sentence label (0/1)In the provided Colab:
train: selected range(640)validation: selected range(640)test: predictions generated without labels (GLUE test split)AutoTokenizer.from_pretrained("bert-base-uncased")truncation=True)DataCollatorWithPaddingepochs: 3 learning_rate: 2e-5 batch_size: 16 (per device) weight_decay: 0.01 evaluation: each epoch checkpointing: each epoch best model selection: accuracy on validation logging: disabled (report_to="none")(Optional: add confusion matrix, F1, etc. if available)
Base model
google-bert/bert-base-uncased