Views
No views yet
DT4H_CardioBERTa_grandparents_nl_translations_only is a Dutch biomedical terminology encoder for clinical concept normalization and entity linking. It is initialized from [UMCU/CardioBERTa.nl] and specialized using CUI-supervised terminology pairs and metric learning.| Language | Dutch (nl) |
| Triplet collection | translations_only |
| Strategy | grandparents |
| Objective | Multi-Similarity Loss |
| Mining | All triplets, margin 0.2 |
| Pooling | CLS |
| Epochs | 1 |
| Batch size | 256 |
| Learning rate | 2e-5 |
| Max. length | 25 |
| Strategy | Triplets | CUIs | Unique terms | Unique positives | Terms/CUI | Δ terms |
|---|---|---|---|---|---|---|
| synonyms | 73,383 | 73,383 | 144,382 | 72,882 | 2.00 | 0 |
| parents | 1,619,124 | 476,352 | 534,325 | 416,533 | 3.95 | +389,943 |
| grandparents | 4,753,324 | 476,971 | 534,613 | 471,453 | 9.84 | +390,231 |
1import torch
2import torch.nn.functional as F
3from transformers import AutoModel, AutoTokenizer
4
5model_id = "DT4H/DT4H_CardioBERTa_grandparents_nl_translations_only"
6
7tokenizer = AutoTokenizer.from_pretrained(model_id)
8model = AutoModel.from_pretrained(model_id)
9
10inputs = tokenizer(
11 "clinical concept",
12 return_tensors="pt",
13 truncation=True,
14 max_length=25,
15)
16
17with torch.no_grad():
18 output = model(**inputs)
19
20embedding = F.normalize(
21 output.last_hidden_state[:, 0, :],
22 p=2,
23 dim=1,
24)