OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Models

Q Transformer

Q Transformer is a Python implementation of Q-Transformer, an offline reinforcement-learning approach that represents action values with autoregressive Q-functions. Its repository includes model, agent, environment-interface, replay-memory and learner examples, along with single-action Q-learning logic for comparison and education.

Independent OpenViST project profile, based on linked sources.

Q Transformer — 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 reference or starting point for an offline Q-learning experiment and can provide an environment and the data needed for your task.

Who it is for

  • Researchers and developers exploring offline reinforcement learning and autoregressive Q-functions.
  • Robotics practitioners adapting Q-learning experiments to their own environments and datasets.
  • Educators building demonstrations that compare single-action and multi-action Q-learning.

Documented uses

  • Inspect an implementation of autoregressive Q-learning for multiple actions.
  • Compare the multi-action approach with retained single-action Q-learning logic.
  • Connect a custom environment to an agent that generates replay memory.
  • Train a Q learner from replay data and request actions from a model using video-like input and instructions.
Before you choose

Requirements & limits

The repository is public and declares an MIT license. Its README provides the installation command pip install q-transformer.

  • The example requires a user-provided environment by overriding BaseEnvironment; the README describes the expected initialization and interaction outputs.
  • The README imports PyTorch and shows a mock environment, but does not establish that a task-specific real environment or robotics dataset is included.
  • The repository retains single-action Q-learning logic specifically for comparison and educational 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

Install the package and inspect the example workflow

Set up the documented Python package and identify the components used in its example.

Before you start

  • Python environment capable of running the documented pip command
  • PyTorch, imported by the README example
  • An environment implementation for the example's agent interaction; the README shows a mock environment and says users must supply their own environment by overriding BaseEnvironment

Steps

  1. Run the README installation command: pip install q-transformer.

  2. Review the example imports for QRoboticTransformer, QLearner, Agent and ReplayMemoryDataset.

  3. Inspect how the example constructs a model and passes an environment to Agent.

Expected outcome

The package is installed and the example's model, environment, agent and learner roles are identifiable.

Guide limitations

  • The setup steps do not train a model or demonstrate successful interaction with a real robotics environment.
  • The README says users must supply their own environment; it specifies the expected initialization and step outputs.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
7 October 2026
Original website title
lucidrains/q-transformer · Official homepage title · retained in its source language