BERT Base fine tuned on SNLI

Model

This checkpoint is based on google-bert/bert-base-uncased.

It was fine tuned on the SNLI training split.

The model predicts one of three labels:

Label Meaning
0 entailment
1 neutral
2 contradiction

The input order is premise first and hypothesis second.

Evaluation

Accuracy was measured on the official SNLI validation and test splits.

Split Accuracy Examples
Validation 91.05% 9,842
Test 90.88% 9,824

These values are plain classification accuracy.

Comparisons should use the same SNLI splits and the same label mapping.

The machine readable results are stored in baseline_eval.json.

Training

Setting Value
Base model google-bert/bert-base-uncased
Epochs 2
Batch size 32
Gradient accumulation steps 1
Learning rate 0.000049777038124886604
Weight decay 0.01
Warmup ratio 0.07796913153849455
Label smoothing 0.05
Adam beta 2 0.999
Maximum sequence length 128
Seed 1299843651
Numerical precision BF16

The hyperparameters were selected for this model and dataset combination.

The full training record is stored in model_card.json.

Use

Load the repository with AutoTokenizer and AutoModelForSequenceClassification from the Transformers library.

Pass the premise and hypothesis as a text pair.

Use a maximum sequence length of 128 to match training.

Files

File Purpose
model.safetensors Model weights
config.json Architecture and label mapping
tokenizer.json Tokenizer data
tokenizer_config.json Tokenizer settings
baseline_eval.json Evaluation results
model_card.json Training record and provenance
README.md Model card

Limitations

The model was trained and evaluated on English SNLI data.

Performance on other NLI datasets may differ.

The training accuracy was 94.68%, while held out accuracy was lower. This gap should be considered when using the checkpoint.

The model can inherit errors and biases from the base model and the training data.

The checkpoint has not been evaluated for high risk or safety critical use.

License

The base model google-bert/bert-base-uncased is licensed under Apache 2.0.

The SNLI training data is licensed under CC BY-SA 4.0.

This checkpoint is released under CC BY-SA 4.0.

Users must follow the terms of the base model and the SNLI dataset.

Adapted material must be shared under CC BY-SA 4.0 or a compatible license.

Associated research

This model was trained as part of the following research manuscript:

“Opening the Black Box: Localizing semantic inconsistency in NLI models with Deep k -Nearest Neighbors”

The manuscript is in preparation. It has not been submitted or published.

This section will be updated when a public preprint or an accepted version becomes available.

Citation

Until the paper is public, please cite this model repository:

@misc{mashiach2026bertsnli,
  author = {Lidor Mashiach},
  title = {BERT Base fine tuned on SNLI},
  year = {2026},
  publisher = {Hugging Face},
  url = {https://huggingface.co/Lidor-Mashiach/bert-base-snli}
}

Please also cite the BERT and SNLI papers.

Contact

Questions, corrections, and reproducibility reports can be posted in the Community tab of this repository.

Downloads last month
-
Safetensors
Model size
0.1B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Lidor-Mashiach/bert-base-snli

Finetuned
(6857)
this model

Dataset used to train Lidor-Mashiach/bert-base-snli

Evaluation results