Downloads · 30 days
5
8% of all-time downloads
JAYADIR/mdts-agxqa-last4-layers
mdts-agxqa-last4-layers is a machine learning model from JAYADIR. 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.
Last-4 layers fine-tuned cross-encoder on AgXQA agricultural dataset. Full attention + MLP unfrozen for layers 8-11 (7.10M params). Initialized from SciFact-fine-tuned JAYADIR/mdts-last4-layers.
Downloads · 30 days
5
8% of all-time downloads
All-time downloads
63
Public
Parameters
33.4M
133 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors133 MB · 99%
From the Hugging Face model README
Last-4 layers fine-tuned cross-encoder on AgXQA agricultural dataset. Full attention + MLP unfrozen for layers 8-11 (7.10M params). Initialized from SciFact-fine-tuned JAYADIR/mdts-last4-layers.
| Stage | Dataset | Description |
|---|---|---|
| Stage 1 | SciFact (BEIR) | Circuit fine-tuning with BM25 hard negatives |
| Stage 2 | AgXQA | Domain adaptation to agricultural extension QA |
| Strategy | Params | Zero-Shot | AgXQA FT | Delta | MRR@10 |
|---|---|---|---|---|---|
| BM25 baseline | — | 0.8533 | — | — | 0.8208 |
| Vanilla (no FT) | — | 0.9124 | — | — | 0.8907 |
| A: Circuit MLP-only | 2.36M | 0.9123 | 0.9151 | +0.0028 | 0.8945 |
| B: Last-4 Layers | 7.10M | 0.9070 | 0.9135 | +0.0065 | 0.8937 |
| C: Full Fine-Tuning | 33.36M | 0.9020 | 0.9231 | +0.0211 | 0.9051 |
| D: Circuit-Full (BM25) | 4.73M | 0.9094 | 0.9174 | +0.0080 | 0.8976 |
This model: B: Last-4 Layers | Params: 7.10M | NDCG@10: 0.9135 | MRR@10: 0.8937
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
tokenizer = AutoTokenizer.from_pretrained("JAYADIR/mdts-agxqa-last4-layers")
model = AutoModelForSequenceClassification.from_pretrained("JAYADIR/mdts-agxqa-last4-layers")
query = "What is the best irrigation method for wheat in semi-arid regions?"
passage = "Drip irrigation is highly efficient for wheat cultivation in semi-arid areas."
inputs = tokenizer(query, passage, return_tensors="pt", truncation=True, max_length=512)
with torch.no_grad():
score = model(**inputs).logits.squeeze().item()
print(f"Relevance score: {score:.4f}")