Downloads · 30 days
0
mia-project-2025/bert-base-uncased-LoRA-glue-mnli
bert-base-uncased-LoRA-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 with LoRA adapters on the GLUE MNLI dataset. The model is trained for natural language inference (NLI) with three labels: entailment, neutral, and contradiction.
Downloads · 30 days
0
Access
Public
Updated Aug 22, 2025
Repo size
35.2 MB
Likes
0
Public
Click a slice to open those files.
.pt23.5 MB · 56%
From the Hugging Face model README
This repository contains a BERT-base model fine-tuned with LoRA adapters on the GLUE MNLI dataset.
The model is trained for natural language inference (NLI) with three labels: entailment, neutral, and contradiction.
0 = Contradiction1 = Entailment2 = NeutralBase Model: bert-base-uncased
Fine-tuning Method: Parameter-Efficient Fine-Tuning (PEFT) using LoRA adapters
LoRA Configuration:
r = 864query, key, value, dense0.1Hyperparameters:
15645e-5AdamW (fused)20.010.1Hardware: Trained on GPUs with mixed precision (fp16).
| Metric | Matched (in-domain) | Mismatched (out-of-domain) |
|---|---|---|
| Eval Loss | 0.4549 | 0.4476 |
| Accuracy | 83.62% | 83.65% |
| Precision | 0.8378 | 0.8380 |
| Recall | 0.8362 | 0.8365 |
| F1 Score | 0.8367 | 0.8370 |
| Train Loss | 0.8461 | 0.8461 |
| Train Runtime | 21540.38s | 21540.38s |
| Eval Runtime | 9.53s | 9.55s |
You can load this model and tokenizer using Hugging Face Transformers:
from transformers import AutoTokenizer, AutoModelForSequenceClassification
model_name = "mia-project-2025/bert-base-uncased-LoRA-glue-mnli"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)
text = {"premise": "The cat is sleeping on the sofa.", "hypothesis": "The cat is awake."}
inputs = tokenizer(text["premise"], text["hypothesis"], return_tensors="pt")
outputs = model(**inputs)
pred = outputs.logits.argmax(-1).item()
print(pred) # 0=Contradiction, 1=Entailment, 2=Neutral