Views
No views yet
microsoft/deberta-v3-large[CLS] sentence1_marked [SEP] sentence2_marked [SEP] rationale [SEP]<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.| Split | Accuracy |
|---|---|
| Validation | 0.7665 |
| Test | 0.7686 |
1from transformers import AutoTokenizer, AutoModelForSequenceClassification
2import torch
3
4tokenizer = AutoTokenizer.from_pretrained("Deehan/wic-gemini25flash-rule6prompt-deberta-v3-large")
5model = AutoModelForSequenceClassification.from_pretrained("Deehan/wic-gemini25flash-rule6prompt-deberta-v3-large")
6
7s1 = "The <TGT>bank</TGT> raised its interest rates."
8s2 = "She visited her local <TGT>bank</TGT> to deposit a cheque."
9rationale = "In the first sentence 'bank' refers to a financial institution; in the second it also refers to a financial institution."
10
11sep = tokenizer.sep_token
12enc = tokenizer(s1, s2 + " " + sep + " " + rationale,
13 return_tensors="pt", truncation=True, max_length=512)
14with torch.no_grad():
15 logits = model(**enc).logits
16pred = torch.argmax(logits).item()
17print("Same sense" if pred == 1 else "Different sense")