Skip to content

[Feature Request] Port TDMPC2 as a trainer #4448

Open

Description

@bsprenger

Motivation

TD-MPC2 is one of the current state of the art algorithms for continuous control. It would be a great world model algorithm to include in torchRL's trainer framework, because:

  • Unlike DreamerV3, it is decoder free
  • It demonstrates state of the art performance on continuous control, outperforming models like DreamerV3 for single tasks
  • It demonstrates state of the art performance on multi-task learning as well.

The official repository is easy to read and already uses pytorch, including some pieces of torchRL such as replay buffers.

I'm particularly interested to try this out on the Microduck environment for multi-task learning!

Solution

Have a working trainer implementation of TD-MPC2, on a single task and state-based observations to start. Future work can add multi-task learning and pixel observations. The first implementation should just focus on getting the core pieces in place.

Alternatives

Additional context

Checklist

  • I have checked that there is no similar issue in the repo (required)

Activity

  1. bsprenger commented on Sep 21, 2026

    @bsprenger
    CollaboratorAuthor

    I currently have a working branch for this, and will start opening a sequence of PRs to add each piece in isolation, so as to make reviews easier 🙏 stay tuned!

  2. bsprenger commented on Sep 21, 2026

    @bsprenger
    CollaboratorAuthor

    I now have pushed all the PRs. I couldn't figure out how to diff each one against the previous, since these branches live in my own fork and not in the upstream. I'll rebase/retarget as they start getting merged so that it's easier to see what's new in each PR.

    There are 8 PRs in total to fully implement the TD-MPC2 algorithm, trainer, and all config dataclasses:

    #4449
    #4451
    #4452
    #4453
    #4454
    #4455
    #4456
    #4457

    I really hope that this stack makes it easier to review, but apologies in advance if this is actually more challenging, due to Github preventing diffing against a base that isn't in upstream 🙈

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions