DeBERTa-v3-base fine-tuned for 22-class RST discourse relation classification on fused GUM + SciDTB EDU pairs (seed 42, stratified 80/10/10 split, 2,045 test pairs).
training/fine_tune_deberta_rst_v2.py in
https://github.com/Lamia-dev-doc/discourse-graph-rstlabel_encoder.pkl (scikit-learn LabelEncoder)import pickle
from huggingface_hub import hf_hub_download
from transformers import AutoTokenizer, AutoModelForSequenceClassification
repo = "lamialamia/rst-DeBERTA"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForSequenceClassification.from_pretrained(repo)
le = pickle.load(open(hf_hub_download(repo, "label_encoder.pkl"), "rb"))
enc = tok("The reaction releases energy.", "This is why it is exothermic.",
return_tensors="pt")
pred = model(**enc).logits.argmax(-1).item()
print(le.inverse_transform([pred])[0])
```---