Views
No views yet
entailmentcontradictionneutralSUPPORTEDREFUTEDNOT_ENOUGH_INFO| Split | Count |
|---|---|
| Train | 20,000 |
| Validation | 2,000 |
| Test | 2,000 |
| Metric | Value |
|---|---|
| Test loss | 0.5157 |
| Test accuracy | 0.8105 |
| Test macro F1 | 0.8057 |
| Test weighted F1 | 0.8094 |
1from transformers import AutoModelForSequenceClassification, AutoTokenizer
2import torch
3
4repo_id = "mokarami/claimlens-m-verifier"
5tokenizer = AutoTokenizer.from_pretrained(repo_id)
6model = AutoModelForSequenceClassification.from_pretrained(repo_id)
7
8premise = "QLoRA enables fine-tuning large language models with 4-bit quantization, reducing GPU memory requirements."
9hypothesis = "QLoRA reduces GPU memory requirements during fine-tuning."
10
11inputs = tokenizer(premise, hypothesis, truncation=True, max_length=384, return_tensors="pt")
12with torch.no_grad():
13 probs = torch.softmax(model(**inputs).logits[0], dim=-1)
14
15label_id = int(torch.argmax(probs))
16print(model.config.id2label[label_id], float(probs[label_id]))