Downloads · 30 days
0
mia-project-2025/bert-base-uncased-finetuned-glue-mnli
bert-base-uncased-finetuned-glue-mnli is a machine learning model from mia-project-2025. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
This repository contains a BERT-base model fine-tuned on the GLUE MultiNLI dataset. The task is natural language inference (NLI): given a premise and a hypothesis, predict the relationship between them as one of: - en…
Downloads · 30 days
0
Access
Public
Updated Aug 22, 2025
Repo size
2.6 GB
Likes
0
Public
Click a slice to open those files.
.pt1.8 GB · 57%
From the Hugging Face model README
This repository contains a BERT-base model fine-tuned on the GLUE MultiNLI dataset.
The task is natural language inference (NLI): given a premise and a hypothesis, predict the relationship between them as one of:
| Metric | Matched (in-domain) | Mismatched (out-of-domain) |
|---|---|---|
| Eval Loss | 0.5139 | 0.4987 |
| Accuracy | 84.46% | 84.46% |
| Precision | 0.8473 | 0.8467 |
| Recall | 0.8446 | 0.8446 |
| F1 Score | 0.8453 | 0.8453 |
| Train Loss | 0.7036 | 0.7036 |
| Train Runtime | 2936.98s | 2936.98s |
| Eval Runtime | 4.7s | 4.8s |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
model_name = "mia-project-2025/bert-base-uncased-finetuned-glue-mnli"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)
# Example input
premise = "A soccer game with multiple males playing."
hypothesis = "Some men are playing a sport."
inputs = tokenizer(premise, hypothesis, return_tensors="pt", padding=True, truncation=True)
# Prediction
outputs = model(**inputs)
pred = outputs.logits.argmax(-1).item()
labels = ["entailment", "neutral", "contradiction"]
print("Prediction:", labels[pred])