--- license: apache-2.0 base_model: bert-base-uncased tags: - generated_from_keras_callback - really-cool model-index: - name: bert-base-uncased-finetuned-glue-sst2 results: [] datasets: - glue language: - en metrics: - accuracy pipeline_tag: text-classification --- # bert-base-uncased-finetuned-glue-sst2 Use for **sentiment analysis**. Labels: `positive`, `negative` This model is a fine-tuned version of the [bert-base-uncased](https://huggingface.co/bert-base-uncased) model, fine-tuned on a subset of the [glue sst2 dataset](https://huggingface.co/datasets/glue/viewer/sst2). It achieves the following results on the evaluation set: ``` Evaluation Accuracy: 91.74% ``` ## Model description The `bert-base-uncased` model is a pretrained English language model which has learned a bidirectional representation through Masked Language Modeling (MLM). The `bert-base-uncased-finetuned-glue-sst2` adds a 2-class classification head to `bert-base-uncased`. It is then fine-tuned for **sentiment analysis** on the [glue sst2 dataset](https://huggingface.co/datasets/glue/viewer/sst2). ## Training and evaluation data This model was only trained on 10000 samples, while the entire glue sst2 training set includes 67349 examples. This was done mainly to decrease training time. ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - optimizer: {'name': 'Adam', 'weight_decay': None, 'clipnorm': None, 'global_clipnorm': None, 'clipvalue': None, 'use_ema': False, 'ema_momentum': 0.99, 'ema_overwrite_frequency': None, 'jit_compile': True, 'is_legacy_optimizer': False, 'learning_rate': {'module': 'keras.optimizers.schedules', 'class_name': 'PolynomialDecay', 'config': {'initial_learning_rate': 5e-05, 'decay_steps': 3750, 'end_learning_rate': 0.0, 'power': 1.0, 'cycle': False, 'name': None}, 'registered_name': None}, 'beta_1': 0.9, 'beta_2': 0.999, 'epsilon': 1e-07, 'amsgrad': False} - training_precision: float32 ### Training results - Accuracy (training): `94.08%` - Accuracy (validation): `91.74%` ### Framework versions - Transformers 4.35.2 - TensorFlow 2.15.0 - Datasets 2.16.1 - Tokenizers 0.15.0