Views
No views yet
microsoft/mdeberta-v3-base. Every token is classified as either O (not a link) or LINK (part of a link anchor). The model outputs probabilities rather than hard labels, enabling heatmap-style visualization and tuneable thresholds for production pipelines.
#, ##), bold (**), italics (*), lists (-), and blockquotes (>). This gives the model the same structural context a human editor uses when deciding where a link belongs.| Parameter | Value |
|---|---|
| Base model | microsoft/mdeberta-v3-base |
| Task | Binary token classification (O / LINK) |
| Loss function | Focal loss (γ=2.0) |
| Training tokens | 200M |
| Training sources | 5 Dutch editorial domains (news, tech, science, business, lifestyle) |
| Learning rate | 2e-5 with linear warmup (10%) |
| Batch size | 32 (16 × 2 gradient accumulation) |
| Epochs | 10 (early stopping, patience 3, monitoring F1) |
| Precision | bf16 |
| Max sequence length | 512 |
| Hardware | NVIDIA RTX 4090 |
1from transformers import AutoModelForTokenClassification, AutoTokenizer
2import torch
3
4model_id = "dejanseo/LinkjeBERT"
5tokenizer = AutoTokenizer.from_pretrained(model_id)
6model = AutoModelForTokenClassification.from_pretrained(model_id)
7model.eval()
8
9text = "De minister liet weten dat het plan doorgaat."
10inputs = tokenizer(text, return_tensors="pt", return_offsets_mapping=True)
11offsets = inputs.pop("offset_mapping")[0]
12
13with torch.no_grad():
14 logits = model(**inputs).logits
15 probs = torch.softmax(logits, dim=-1)[0, :, 1]
16
17for i, (start, end) in enumerate(offsets):
18 if start == end:
19 continue
20 word = text[start:end]
21 p = probs[i].item()
22 if p > 0.1:
23 print(f"{word:20s} {p:.1%}")MAX_LENGTH = 512DOC_STRIDE = 128np.maximum<a> tags were removed, so it predicts link placement from context alone. Preserve structural markers (#, **, -, >) as the model relies on them.| ID | Label |
|---|---|
| 0 | O |
| 1 | LINK |

@misc{linkjebert2026,
title={LinkjeBERT: A Dutch Language Model for Link Prediction},
author={DEJAN AI},
year={2026},
url={https://dejan.ai/blog/linkjebert/}
}