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
Safetensors
Model size
4.39M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for JustMon1kAa/bert-tiny-sst2-homework

Quantized
(10)
this model

Dataset used to train JustMon1kAa/bert-tiny-sst2-homework

Space using JustMon1kAa/bert-tiny-sst2-homework 1