OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Models

Tiny Recursive Model

Tiny Recursive Model is a Python implementation of the Tiny Recursive Model (TRM), providing a model, an example MLPMixer1D network, a trainer and iterative prediction with configurable refinement and halting parameters.

Independent OpenViST project profile, based on linked sources.

Tiny Recursive Model — 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 want a code-level starting point for training and running TRM on your own dataset, rather than a hosted inference endpoint or finished end-user application.

Who it is for

  • Developers experimenting with recursive reasoning models in Python.
  • Researchers or practitioners who want to train a model on a PyTorch dataset and inspect iterative predictions.

Documented uses

  • Construct a TRM model with a configurable example network.
  • Train the model using a PyTorch dataset.
  • Run prediction with limits on refinement steps and a halting threshold.
  • Save the model state dictionary for later reuse.
Before you choose

Requirements & limits

The repository is public and lists an MIT license.

  • The repository labels the implementation unofficial and links to a separate official TRM repository.
  • The usage example relies on the developer to provide and configure a dataset; its mock data consists of random token sequences.
  • The README demonstrates state saving but does not show how to load the saved state.

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 run a TRM example

Follow the README's example workflow to construct a model, train it on a PyTorch dataset and request an iterative prediction.

Before you start

  • Python environment with the tiny-recursive-model package installed.
  • PyTorch.
  • A dataset that supplies input and output pairs in the format used by the example.

Steps

  1. Install the package with the command below.

    Documented command
    pip install tiny-recursive-model
  2. Construct TinyRecursiveModel with an MLPMixer1D network, setting dimensions, token count, depth and sequence length.

  3. Pass a PyTorch dataset to Trainer, configure epochs, batch size and CPU use, then call the trainer.

  4. Call trm.predict with an input tensor and set max_deep_refinement_steps and halt_prob_thres.

Expected outcome

The example produces a predicted answer and exit indices after training the model.

Guide limitations

  • The README's sample dataset generates random input and output tokens; it is illustrative rather than a task-specific dataset.
  • The example does not document evaluation metrics or a production deployment workflow.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
8 October 2026
Original website title
lucidrains/tiny-recursive-model · Official homepage title · retained in its source language