Downloads · 30 days
7
19% of all-time downloads
Lidor-Mashiach/bert-base-snli
bert-base-snli is a text classification model from Lidor-Mashiach. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as cc-by-sa-4.0.
This checkpoint is based on google-bert/bert-base-uncased.
Downloads · 30 days
7
19% of all-time downloads
All-time downloads
36
Public
Parameters
109M
438 MB on disk
Likes
2
Public
Click a slice to open those files.
.safetensors438 MB · 100%
From the Hugging Face model README
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.
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.
| 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.
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.
| 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 |
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.
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.
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.
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.
Questions, corrections, and reproducibility reports can be posted in the Community tab of this repository.