ModernBiaffineParser — microsoft/deberta-v3-xsmall
Biaffine dependency parser + joint UPOS + morphological features (FEATS) tagger trained on
Universal Dependencies English Web Treebank (EWT) and Universal Dependencies English GUM.
Normalization: Lexical MWEs (fixed / compound:prt) and abbreviation features (Abbr=Yes) applied on-the-fly to match expected extraction targets.
Encoder: microsoft/deberta-v3-xsmall (frozen weights not included — loaded from HuggingFace at runtime)
Custom head: biaffine_head.safetensors — word projection, arc/rel/POS/FEATS MLPs and biaffine layers
Labels: 53 DEPREL labels · 19 UPOS tags · 21 FEATS categories
Score convention: s_arc[dep, head], s_rel[dep, head, rel]
Metrics (EWT + GUM, decode: Eisner (projective MST))
| Split | LAS | UPOS | UFEATS | UCM | LCM |
|---|---|---|---|---|---|
| dev | 93.30% | 98.20% | 95.63% | 71.09% | 61.49% |
| test | 93.42% | 98.18% | 95.85% | 71.70% | 62.33% |
ONNX / TorchScript / production use
model.onnx — fp32 ONNX model (Recommended for CPU inference).
model.fp16.onnx — fp16 ONNX model (For GPU or environments with native fp16 support, ~139 MB).
traced_model.pt — TorchScript model (For tch-rs or PyTorch C++ API).
Inputs: subwords [B, W, 20] int64. Outputs: s_arc [B,W,W], s_rel [B,W,W,R], s_pos [B,W,P], s_feats [B,W,C,Vmax].
# download only inference artifacts
hf download ghotriw/deberta-v3-xsmall-biaffine-dep-pos-feats-en-ewt-gum-norm \
model.fp16.onnx model.onnx traced_model.pt vocabs.json tokenizer.json \
--local-dir ./model
vocabs.json — DEPREL and UPOS vocabularies (str→int dicts).
feats_vocab — morphological categories {category: {value: idx}} (idx 0 = _/absent). s_feats[..., c, :] is an independent softmax per category; non-existent value slots carry -inf, so argmax over the last dim is always valid.
Input format
The model expects a word-level subword grid [B, W, fix_len=20] (int64),
where each word is independently tokenised with the encoder's sentencepiece tokeniser
and padded/truncated to 20 subword slots. Position 0 is a synthetic ROOT word
whose only subword is [CLS] (id 1).
Vocabularies
config.json contains rel_vocab (str→int) and pos_vocab (str→int).
Index 0 is the <pad> / ROOT slot and should be ignored in evaluation.
For FEATS models, config.json also contains feats_vocab {category: {value: idx}} and feats_sizes (per-category value counts, incl. the _/absent slot at index 0). The 4th output s_feats [B,W,C,Vmax] is decoded per category via argmax over its last dimension.