Skip to content

torch.compile for training #4

Open

Description

@parthchadha

Is your feature request related to a problem? Please describe.

We should leverage torch.compile for training and fprop.

Describe the solution you'd like

Ideally we should be able to torch compile all calls to hf model (train, get_logprobs). The compile cost should be paid once at the init.
FYI there is a known issue with torch.compile + FSDP + BF16 and torch.compile was failing (with torch 2.5.1).

Describe alternatives you've considered

thunder compiler: https://github.com/Lightning-AI/lightning-thunder/ (we should investigate perf benefits of thunder over native compile)

Activity

  1. added this to the v0.2 release milestone on Mar 20, 2025
  2. self-assigned this
    on Mar 20, 2025
  3. linked a pull request that will close this issueDraft: Feat: Enable torch compile #496on Aug 7, 2025
  4. 4 remaining items

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions