OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Models

Transformer Generalization

Transformer Generalization is an MIT-licensed Python research codebase for training transformer models on systematic-generalization datasets and working with experiments associated with an EMNLP 2021 paper.

Independent OpenViST project profile, based on linked sources.

Transformer Generalization — 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 need research code and experiment workflows for investigating transformer systematic generalization, rather than a hosted model or inference API.

Who it is for

  • Researchers reproducing the paper’s transformer training experiments
  • Practitioners comparing model or training configurations on systematic-generalization datasets
  • Developers adapting the training code to evaluate proposed research changes

Documented uses

  • Run configured experiments across dataset settings and seeds using W&B sweeps.
  • Run a single experiment locally with TensorBoard for debugging.
  • Generate paper plots and tables from W&B experiment results.
  • Adjust batch-length handling when a task exceeds available GPU memory.
Before you choose

Requirements & limits

The repository is public and carries an MIT license. The README requires a W&B account for its tracked-experiment workflow; its local single-experiment path uses TensorBoard.

  • The stated stack is Python 3 and PyTorch 1.8; Python 3.8 and 3.9 are the versions the README says were tested.
  • Most datasets download automatically, while Mathematics Dataset and CFQ require Google Cloud access and manual placement in cache directories.
  • Paper plotting requires LaTeX and W&B experiment results; the README says plotting scripts do not work with TensorBoard alone.
  • The documented memory adjustment trades speed for lower GPU memory use.

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

Set up the research environment

Install the documented Python dependencies and configure Weights & Biases for tracked experiments.

Before you start

  • Python 3; the README reports testing with Python 3.8 and 3.9
  • PyTorch 1.8
  • A Weights & Biases account for the tracking workflow

Steps

  1. Install project dependencies with the command below.

    Documented command
    pip3 install -r requirements.txt
  2. Create a Weights & Biases account and run wandb login.

Expected outcome

The documented dependencies are installed and W&B credentials are configured for experiment tracking.

Guide limitations

  • The README does not specify operating-system compatibility guarantees.
  • LaTeX is additionally required for plotting, not for the basic dependency setup.
Source-based practical guide

Recreate paper plots from W&B results

Generate the paper’s plots and tables from a configured W&B project.

Before you start

  • A configured Weights & Biases project containing experiment results
  • LaTeX for plotting

Steps

  1. Edit paper/config.json and set wandb_project to the project name, such as username/project.

  2. Run cd paper followed by ./run_all.sh.

Expected outcome

Generated files are placed in `paper/out/`, and tables are printed to standard output in LaTeX format.

Guide limitations

  • The README says the plotting scripts work only with Weights & Biases.
  • LaTeX installation is operating-system specific.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
17 October 2026
Original website title
RobertCsordas/transformer_generalization · Official homepage title · retained in its source language