OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Models

DREAMER4

DREAMER4 is a Python implementation of work in the Dreamer research line, with code for training video tokenizers and dynamics world models from video, action and reward data. Its examples also demonstrate generating imagined experience, learning from that experience, and interacting with mock or example environments.

Independent OpenViST project profile, based on linked sources.

DREAMER4 — 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 DREAMER4 when you want code-level access to a Dreamer research implementation and are prepared to work with Python, training data and model checkpoints.

Who it is for

  • Researchers exploring world models and model-based reinforcement learning.
  • Python developers who want to inspect or adapt a Dreamer-style implementation.
  • Experimenters working with video observations, action data and reward signals.

Documented uses

  • Train a video tokenizer from video data and save a checkpoint.
  • Train a dynamics model, optionally conditioned on action data.
  • Generate imagined experience and use it in actor-critic learning examples.
  • Explore the included HalfCheetah, Toy Snake and Moving MNIST workflows.
Before you choose

Requirements & limits

The repository is public, lists an MIT license, and provides `pip install dreamer4` as its installation command.

  • The README describes training stages and runnable examples, rather than a hosted model interface.
  • The primary workflow depends on video data and saved checkpoints; action-conditioned training additionally uses .action.npy files alongside videos.
  • The repository is written primarily in Python and lists an MIT license.

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 a tokenizer and dynamics model from video data

Use the documented CLI stages to train a video tokenizer, then train a dynamics world model from video data.

Before you start

  • Python environment with DREAMER4 installed; the README gives pip install dreamer4.
  • A video dataset available at a filesystem path.
  • A saved tokenizer checkpoint for the dynamics-training stage.

Steps

  1. Run dreamer4 train-video-tokenizer on the video path, giving the experiment a name and selecting documented training options such as image size and batch size.

  2. Use the resulting tokenizer checkpoint with dreamer4 train-dynamics on the video path.

  3. Load the trained dynamics model in Python with DynamicsWorldModel.init_and_load and its checkpoint path.

Expected outcome

A trained video tokenizer and a dynamics model checkpoint that can be loaded from Python.

Guide limitations

  • The README's CLI examples do not specify a complete dependency list or hardware requirements.
  • Action-conditioned training requires continuous or discrete actions saved as .action.npy files alongside the videos.
Source-based practical guide

Train and serve the Toy Snake world-model example

Follow the README's sequence to create a Snake replay buffer, train an action-conditioned dynamics model, and serve it for browser interaction.

Before you start

  • DREAMER4 installed and the documented uv command available for the PPO training step.
  • A grid-size setting for the Snake PPO example; the README shows 4.
  • The video tokenizer and dynamics checkpoints produced by the preceding stages.

Steps

  1. Generate an initial replay buffer by running the command below.

    Documented command
    uv run train_snake_ppo.py --grid_size 4
  2. Train a tokenizer on the generated buffer with dreamer4 train-video-tokenizer, using the documented Snake example options.

  3. Train action-conditioned dynamics on the buffer with dreamer4 train-dynamics, pointing to the tokenizer checkpoint and setting four discrete actions.

  4. Run dreamer4 serve-world-model with the dynamics checkpoint folder to serve the model in the browser.

Expected outcome

The documented workflow serves the trained Toy Snake world model for browser interaction.

Guide limitations

  • The serving example automatically looks for the latest EMA checkpoint in the supplied folder.
  • The README does not specify the full environment setup or resource requirements for this workflow.
Evidence and transparency

Sources & review

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