nyu-mll/glue
Viewer • Updated • 1.49M • 480k • 498
How to use UnMelow/422_zhuravlev with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="UnMelow/422_zhuravlev") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("UnMelow/422_zhuravlev")
model = AutoModelForSequenceClassification.from_pretrained("UnMelow/422_zhuravlev")This repository contains a BERT-base-uncased model fine-tuned for binary sentiment classification on the GLUE/SST-2 dataset.
negative (0), positive (1)bert-base-uncasedTrainer API)Note: In the training notebook, the model was fine-tuned on a small subset (640 train / 640 validation) for demonstration purposes. For production use, fine-tune on the full dataset and validate thoroughly.
TrainerFine-tuning used the GLUE benchmark dataset configuration SST-2 (Stanford Sentiment Treebank v2 as used in GLUE).
glue, config sst2sentencelabel (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)DataCollatorWithPaddingaccuracy on validationreport_to="none")0.86250.33919745683670044Optional (if you computed them):
from transformers import pipeline
model_id = "UnMelow/422_zhuravlev"
clf = pipeline(
"text-classification",
model=model_id,
tokenizer=model_id,
return_all_scores=False
)
print(clf("This movie was surprisingly good!"))
print(clf("The plot was boring and predictable."))
Base model
google-bert/bert-base-uncased