---
language: en
tags:
- word-sense-disambiguation
- wic
- cross-encoder
datasets:
- Deehan1866/WiC_actual
metrics:
- accuracy
---
# bayartsogt/structbert-large Fine-tuned on WiC (Angle 3 — no_rationale)
Cross-encoder model for the Word-in-Context (WiC) binary sense disambiguation task.
Both sentences — plus an LLM-generated rationale — are fed together so the model
can attend across them simultaneously.
## Base model
`bayartsogt/structbert-large`
## Input format
```
[CLS] sentence1_marked [SEP] sentence2_marked [SEP] rationale [SEP]
```
## Target Word Marking
The target word is wrapped with `word` using the exact token position
from the dataset (start1/start2 columns), so marking is always precise regardless
of lemma or morphological variation.
## Performance
| Split | Accuracy |
|------------|----------|
| Validation | 0.6944 |
| Test | 0.6864 |
## Usage
```python
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
tokenizer = AutoTokenizer.from_pretrained("Deehan1866/wic-angle3-withbannedwords-no_rationale")
model = AutoModelForSequenceClassification.from_pretrained("Deehan1866/wic-angle3-withbannedwords-no_rationale")
s1 = "The bank raised its interest rates."
s2 = "She visited her local bank to deposit a cheque."
rationale = "In the first sentence 'bank' refers to a financial institution; in the second it also refers to a financial institution."
sep = tokenizer.sep_token
enc = tokenizer(s1, s2 + " " + sep + " " + rationale,
return_tensors="pt", truncation=True, max_length=512)
with torch.no_grad():
logits = model(**enc).logits
pred = torch.argmax(logits).item()
print("Same sense" if pred == 1 else "Different sense")
```