Downloads · 30 days
11
19% of all-time downloads
mokarami/claimlens-m-verifier
claimlens-m-verifier is a text classification model from mokarami. Use it when you need a label for a piece of text. The card lists the license as mit.
ClaimLens-M Verifier is a fine-tuned XLM-RoBERTa sequence-classification model for evidence-grounded claim verification.
Downloads · 30 days
11
19% of all-time downloads
All-time downloads
58
Public
Parameters
278M
1.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors1.1 GB · 98%
From the Hugging Face model README
ClaimLens-M Verifier is a fine-tuned XLM-RoBERTa sequence-classification model for evidence-grounded claim verification.
The model classifies an evidence-claim pair into:
entailmentcontradictionneutralIn the full ClaimLens-M pipeline, these NLI labels are mapped to:
SUPPORTEDREFUTEDNOT_ENOUGH_INFOThe verifier was fine-tuned on a FEVER-NLI subset:
| Split | Count |
|---|---|
| Train | 20,000 |
| Validation | 2,000 |
| Test | 2,000 |
The project also includes curated Italian demo pairs for multilingual product testing.
| Metric | Value |
|---|---|
| Test loss | 0.5157 |
| Test accuracy | 0.8105 |
| Test macro F1 | 0.8057 |
| Test weighted F1 | 0.8094 |
from transformers import AutoModelForSequenceClassification, AutoTokenizer
import torch
repo_id = "mokarami/claimlens-m-verifier"
tokenizer = AutoTokenizer.from_pretrained(repo_id)
model = AutoModelForSequenceClassification.from_pretrained(repo_id)
premise = "QLoRA enables fine-tuning large language models with 4-bit quantization, reducing GPU memory requirements."
hypothesis = "QLoRA reduces GPU memory requirements during fine-tuning."
inputs = tokenizer(premise, hypothesis, truncation=True, max_length=384, return_tensors="pt")
with torch.no_grad():
probs = torch.softmax(model(**inputs).logits[0], dim=-1)
label_id = int(torch.argmax(probs))
print(model.config.id2label[label_id], float(probs[label_id]))
The full ClaimLens-M application combines:
The Hugging Face Gradio Space package is prepared separately, but creating Gradio Spaces on this account currently requires a Hugging Face PRO subscription.