--- license: cc-by-nc-4.0 language: - en base_model: google-bert/bert-base-uncased datasets: - facebook/anli pipeline_tag: text-classification tags: - bert - anli - natural-language-inference - sequence-classification - transformers metrics: - accuracy model-index: - name: BERT Base ANLI results: - task: type: text-classification name: Natural Language Inference dataset: type: facebook/anli name: ANLI combined rounds split: dev metrics: - type: accuracy value: 0.49125 name: Validation accuracy - task: type: text-classification name: Natural Language Inference dataset: type: facebook/anli name: ANLI combined rounds split: test metrics: - type: accuracy value: 0.4865625 name: Test accuracy --- # BERT Base fine tuned on ANLI ## Model This checkpoint is based on `google-bert/bert-base-uncased`. It was fine tuned only on the combined ANLI training rounds. The training set contained 162,865 premise and hypothesis pairs. 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 combined ANLI held out rounds. | Split | Accuracy | Examples | |---|---:|---:| | Development | 49.13% | 3,200 | | Test | 48.66% | 3,200 | These values are plain classification accuracy. The checkpoint was trained on ANLI alone. Comparisons should use the same combined ANLI 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 | 4 | | Batch size | 32 | | Gradient accumulation steps | 2 | | Learning rate | 0.00005631600339029408 | | Weight decay | 0.01 | | Warmup ratio | 0.09151572612509906 | | Label smoothing | 0.0 | | 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 ANLI data. ANLI is adversarial and difficult. Performance on other NLI datasets may differ. The training accuracy was 99.30%, 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 ANLI training data is licensed under CC BY-NC 4.0. This checkpoint is released under CC BY-NC 4.0 as a conservative noncommercial choice. Users must follow the terms of the base model and the ANLI dataset. Use of this checkpoint is limited to noncommercial purposes. ## 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: ```bibtex @misc{mashiach2026bertanli, author = {Lidor Mashiach}, title = {BERT Base fine tuned on ANLI}, year = {2026}, publisher = {Hugging Face}, url = {https://huggingface.co/Lidor-Mashiach/bert-base-anli} } ``` Please also cite the BERT and ANLI papers. ## Contact Questions, corrections, and reproducibility reports can be posted in the Community tab of this repository.