Views
No views yet
<tgt>word</tgt> using the exact token position
from the dataset (start1/start2 columns), so marking is always precise regardless
of lemma or morphological variation.| Hyperparameter | Value |
|---|---|
| Learning rate | 8e-6 |
| Effective batch | 32 |
| Epochs | 10 |
| Warmup ratio | 0.15 |
| Dropout | 0.2 |
| Label smoothing | 0.05 |
| LLRD decay | 0.9 |
| Split | Accuracy |
|---|---|
| Validation | 0.7179 |
| Test | 0.7171 |
1from transformers import AutoTokenizer, AutoModelForSequenceClassification
2import torch
3
4tokenizer = AutoTokenizer.from_pretrained("Deehan1866/finetuned-deberta-wic-actual-version2")
5model = AutoModelForSequenceClassification.from_pretrained("Deehan1866/finetuned-deberta-wic-actual-version2")
6
7s1 = "The <tgt>bank</tgt> raised its interest rates."
8s2 = "She visited her local <tgt>bank</tgt> to deposit a cheque."
9
10enc = tokenizer(s1, s2, return_tensors="pt", truncation=True, max_length=256)
11with torch.no_grad():
12 logits = model(**enc).logits
13pred = torch.argmax(logits).item()
14print("Same sense" if pred == 1 else "Different sense")