How to use from the
Use from the
Transformers library
# pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM

tokenizer = AutoTokenizer.from_pretrained("Loria-MosAIk/bt5-webnlg-en-ru")
model = AutoModelForSeq2SeqLM.from_pretrained("Loria-MosAIk/bt5-webnlg-en-ru", device_map="auto")
Quick Links

BT5 English–Russian Semantic Parsing

This model converts English or Russian text into subject–relation–object triples. It follows the BT5 method of Agarwal et al. (2020) and was initialized from cointegrated/rut5-base-multitask and trained with six equally sampled parsing and translation tasks.

The first author of the XQDT paper reproduced BT5 for use as a base text-to-data model in that study. The reproduction repository contains the code, saved predictions, and evaluation scripts.

The checkpoint is step 54,000. Its saved WebNLG 2020 test predictions give Exact F1 of 67.62 for English and 93.46 for Russian, using five-beam decoding.

Usage

from transformers import AutoModelForSeq2SeqLM, AutoTokenizer

model_path = "Loria-MosAIk/bt5-webnlg-en-ru"
tokenizer = AutoTokenizer.from_pretrained(model_path, use_fast=False)
model = AutoModelForSeq2SeqLM.from_pretrained(model_path).eval()
inputs = tokenizer("Parse English Lina Dorado was born in Bogotá in 1975.", return_tensors="pt")
outputs = model.generate(**inputs, num_beams=5, max_new_tokens=256)
print(tokenizer.decode(outputs[0], skip_special_tokens=True, clean_up_tokenization_spaces=False))

English output (<S> = subject, <P> = relation, <O> = object):

<S> Lina Dorado <P> birth year <O> 1975 <S> Lina Dorado <P> birth place <O> Bogotá

Russian example:

Input:  Parse Russian Валюта Индии - Индийская рупия.
Output: <S> India <P> currency <O> Indian rupee

The scorer counts identical predicted triples only once per input.

The base model is distributed under MIT. The WebNLG data used for fine-tuning are distributed under CC BY-NC-SA 4.0.

Citation

Original BT5 model: Agarwal et al. (2020).

@inproceedings{agarwal-etal-2020-machine,
    title = "Machine Translation Aided Bilingual Data-to-Text Generation and Semantic Parsing",
    author = "Agarwal, Oshin  and
      Kale, Mihir  and
      Ge, Heming  and
      Shakeri, Siamak  and
      Al-Rfou, Rami",
    editor = "Castro Ferreira, Thiago  and
      Gardent, Claire  and
      Ilinykh, Nikolai  and
      van der Lee, Chris  and
      Mille, Simon  and
      Moussallem, Diego  and
      Shimorina, Anastasia",
    booktitle = "Proceedings of the 3rd International Workshop on Natural Language Generation from the Semantic Web ({W}eb{NLG}+)",
    month = "12",
    year = "2020",
    address = "Dublin, Ireland (Virtual)",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2020.webnlg-1.13/",
    pages = "125--130"
}

This checkpoint and reproduction code: Efimov-Zhang et al. (2026).

@inproceedings{efimov-zhang-etal-2026-xqdt,
    title = "{XQDT}: e{X}plainable and Quantitative Data-Text Alignment Metric with Feedback Signals",
    author = "Efimov-Zhang, Kun  and
      Song, Yifei  and
      Gardent, Claire",
    editor = "Lee, Hung-Yi  and
      Dev, Sunipa  and
      Li, Jessy  and
      Elliott, Desmond",
    booktitle = "Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing",
    month = oct,
    year = "2026",
    address = "Budapest, Hungary",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2026.emnlp-main.397/",
    doi = "10.18653/2026.emnlp-main.397",
    pages = "9121--9157",
    ISBN = "979-8-89176-459-0"
}
Downloads last month
29
Safetensors
Model size
0.2B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Loria-MosAIk/bt5-webnlg-en-ru

Finetuned
(3)
this model

Collection including Loria-MosAIk/bt5-webnlg-en-ru

Paper for Loria-MosAIk/bt5-webnlg-en-ru