OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Models

Realtabformer

REaLTabFormer is a Python framework that uses GPT-2 autoregressive models to generate synthetic tables with independent observations and sequence-to-sequence transformer models to generate relational datasets.

Independent OpenViST project profile, based on linked sources.

Realtabformer — OpenViST project profile in AI Models.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it when you have tabular data to model and need synthetic samples, or when your synthetic-data task must represent a parent-child relationship across tables.

Who it is for

  • Data practitioners preparing synthetic tabular data for development or testing.
  • Researchers and developers working with synthetic datasets spanning parent and child tables.

Documented uses

  • Fit a model to tabular observations and generate a chosen number of synthetic rows.
  • Model parent and child tables and generate child records conditioned on sampled parent records.
  • Save trained models and load them from a saved experiment directory.
Before you choose

Requirements & limits

The repository is public, lists an MIT license, and documents installation with pip for Python 3.7 or later.

  • Select the tabular model for independent observations and the sequence-to-sequence relational model for linked parent-child data.
  • For the relational workflow, parent and child tables must share a join-key column name.
  • The README advises removing unique identifiers that should not be modeled.
  • The non-relational model uses an optimal stopping criterion; the README recommends allowing a large epoch setting.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Train and sample a synthetic single-table dataset

Fit a tabular model to a CSV dataset, save it, and generate synthetic rows.

Before you start

  • Python 3.7 or later
  • A CSV dataset readable with pandas
  • Remove unique identifiers you do not want modeled

Steps

  1. Install the package with pip install realtabformer.

  2. Load the CSV into a pandas DataFrame and create REaLTabFormer with model_type="tabular".

  3. Fit the model to the DataFrame and save it with the model's save method.

  4. Call sample with the desired number of rows; the README example uses the input dataset's row count.

Expected outcome

A trained model saved to a directory and a sampled synthetic DataFrame.

Guide limitations

  • The documented optimal stopping criterion applies to non-relational tabular training; the README recommends setting epochs high enough to allow the criterion to be met.
  • The example requires users to decide which unique identifiers should be excluded from modeling.
Source-based practical guide

Generate synthetic records for linked parent-child tables

Fit a parent model and a relational child model, then generate child records conditioned on generated parent records.

Before you start

  • Python 3.7 or later
  • Parent and child tables available as pandas DataFrames
  • A join-key column with the same name in both tables

Steps

  1. Install the package with pip install realtabformer and load the parent and child CSV files.

  2. Fit a tabular parent model using the parent DataFrame without the join-key field, then save the model.

  3. Create a relational model using the saved parent-model path and fit it with the child DataFrame, parent DataFrame, and join-key name.

  4. Sample parent records, assign the join-key from their index, and pass those records and keys to the relational model's sample method.

Expected outcome

Generated parent samples and relational child samples conditioned on those parent records.

Guide limitations

  • The documented example requires the join-key column to exist in both tables and have the same name.
  • The recipe follows the README's parent-child example and does not specify a general workflow for other relational schemas.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
15 October 2026
Original website title
worldbank/REaLTabFormer · Official homepage title · retained in its source language