Practical overview
When it fits
Use it when a transformer training workflow needs explicit relations in its input, such as table-cell-to-column and same-row relationships for tabular question answering.
Who it is for
- Developers training or fine-tuning transformer models with structured relationships in their inputs.
- Researchers prototyping table question-answering or comparing plain-text and relation-enriched inputs.
Documented uses
- Represent relationships between table cells, columns and rows in model inputs.
- Prepare supported transformer models for training with selected relation kinds.
- Add features associated with individual input words or tokens.
Requirements & limits
- It is a developer library, not a hosted model-training service; the README provides a Python installation and initialization workflow.
- The supported model list is limited to six named architectures.
- The example requires developers to specify relation kinds and a model class; a tokenizer name or path can be supplied separately when it differs from the model.
- The repository identifies the project as open source under the MIT license.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Install RATransformers and prepare a model for training
Install the package and initialize a supported transformer with selected relation kinds, model class and tokenizer.
Before you start
- Python environment with the package and its Hugging Face Transformers dependencies available.
- A supported model and a model class; the README example uses AutoModelForSequenceClassification.
- Relation kinds to encode, and a tokenizer name or path if it differs from the model.
Steps
Install the package with the command below.
pip install ratransformersImport RATransformer and the chosen model class.
Initialize RATransformer with a model name, relation_kinds, model_cls and, if needed, pretrained_tokenizer_name_or_path.
Retrieve the initialized model and tokenizer from ratransformer.model and ratransformer.tokenizer.
Expected outcome
A RATransformer model and tokenizer prepared for a training workflow.
Guide limitations
- The README lists BART, BERT, GPT-2, RoBERTa, T5 and LongT5 as supported; it does not establish support for other architectures.
- The setup example does not document a complete training run or its results.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 17 October 2026
- Original website title
- JoaoLages/RATransformers · Official homepage title · retained in its source language

