Downloads · 30 days
0
mia-project-2025/bert-base-uncased-adapter-quora-question-pairs
bert-base-uncased-adapter-quora-question-pairs 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 Prefix-Tuned BERT model fine-tuned on the Quora Duplicate Questions Dataset. The task is binary classification: given two questions, predict whether they are duplicates.
Downloads · 30 days
0
Access
Public
Updated Aug 22, 2025
Repo size
240 MB
Likes
0
Public
Click a slice to open those files.
.pt236 MB · 98%
From the Hugging Face model README
This repository contains a Prefix-Tuned BERT model fine-tuned on the Quora Duplicate Questions Dataset.
The task is binary classification: given two questions, predict whether they are duplicates.
| Model | Dataset | Epochs | Eval Loss | Accuracy | Precision | Recall | F1 | Train Loss | Train Runtime | Eval Runtime |
|---|---|---|---|---|---|---|---|---|---|---|
| Prefix-Tuned BERT (tomaarsen/bert-base-nq-prompts) | Quora | 15 | 0.2891 | 0.8763 | 0.8070 | 0.8720 | 0.8382 | 0.3222 | 1664.56s | 19.59s |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
model_name = "mia-project-2025/bert-base-uncased-adapter-quora-question-pairs"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)
# Example input
questions = ["How do I learn Python?", "What is the best way to learn Python?"]
inputs = tokenizer(questions[0], questions[1], return_tensors="pt", padding=True, truncation=True)
# Prediction
outputs = model(**inputs)
pred = outputs.logits.argmax(-1).item()
print("Duplicate" if pred == 1 else "Not Duplicate")