Instructions to use JustMon1kAa/bert-tiny-sst2-homework with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use JustMon1kAa/bert-tiny-sst2-homework with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="JustMon1kAa/bert-tiny-sst2-homework")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("JustMon1kAa/bert-tiny-sst2-homework") model = AutoModelForSequenceClassification.from_pretrained("JustMon1kAa/bert-tiny-sst2-homework", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Fine-tuned Tiny BERT sentiment classifier
Fine-tuned on 4096 SST-2 training examples; 512 additional training-split examples select the epoch. The official validation split of 872 examples is held out for final evaluation. Accuracy: 0.763761. Macro F1: 0.763717. 4 epochs, AdamW, learning rate 5e-5, batch size 64, max length 96, seed 42. Labels: 0 = NEGATIVE; 1 = POSITIVE. Intended for short English movie reviews.
The ONNX export was repaired without retraining, and validated against eval-mode PyTorch on six inputs in three differently shaped batches. Maximum absolute logit error: 2.9802322e-07. See metrics.json for actual training and recovery records. Transformers.js: use dtype fp32 and onnx/model.onnx.
This is a small educational experiment; it is not a general-purpose or Chinese sentiment model. The original SST-2 hidden-label test split is not evaluated. The base-model license is MIT; dataset rights are separate: https://huggingface.co/datasets/stanfordnlp/sst2
- Downloads last month
- 18
Model tree for JustMon1kAa/bert-tiny-sst2-homework
Base model
prajjwal1/bert-tiny