Downloads · 30 days
16
2% of all-time downloads
sadhaklal/bert-base-uncased-finetuned-sst2-v2
bert-base-uncased-finetuned-sst2-v2 is a text classification model from sadhaklal. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as apache-2.0.
BERT ("bert-base-uncased") finetuned on SST-2 (Stanford Sentiment Treebank Binary).
Downloads · 30 days
16
2% of all-time downloads
All-time downloads
692
Public
Parameters
109M
1.3 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors438 MB · 100%
From the Hugging Face model README
BERT ("bert-base-uncased") finetuned on SST-2 (Stanford Sentiment Treebank Binary).
This model pertains to the "Try it out!" exercise in section 4 of chapter 3 of the Hugging Face "NLP Course" (https://huggingface.co/learn/nlp-course/chapter3/4).
It was trained using a custom PyTorch loop without Hugging Face Accelerate.
Code: https://github.com/sambitmukherjee/hf-nlp-course-exercises/blob/main/chapter3/section4.ipynb
Experiment tracking: https://wandb.ai/sadhaklal/bert-base-uncased-finetuned-sst2-v2
from transformers import pipeline
classifier = pipeline("text-classification", model="sadhaklal/bert-base-uncased-finetuned-sst2-v2")
print(classifier("uneasy mishmash of styles and genres ."))
print(classifier("by the end of no such thing the audience , like beatrice , has a watchful affection for the monster ."))
From the dataset page:
The Stanford Sentiment Treebank is a corpus with fully labeled parse trees that allows for a complete analysis of the compositional effects of sentiment in language...
Binary classification experiments on full sentences (negative or somewhat negative vs somewhat positive or positive with neutral sentences discarded) refer to the dataset as SST-2 or SST binary.
Examples: https://huggingface.co/datasets/sst2/viewer
Accuracy on the 'validation' split of SST-2: 0.9278