Skip to content

Directly supporting Megatron Core checkpoints #671

Open

Description

@terrykong

Please 👍 this issue if this if you'd like to see us support this.

The checkpoint format between megatron and the format we use is very very close so we should be able to support a thin translation for the metadata. The obvious limitation with this is we wouldn't be able to support vllm in general due to there not being an HF and/or vllm implementation of the model; so the user can only use the megatron inference backend.

Related #619

Activity

  1. terrykong commented on Jul 15, 2025

    @terrykong
    CollaboratorAuthor

    Just a note for posterity, I whipped together a script to do this, but haven't validated correctness, but it gets you 95% of the way there:

    https://github.com/NVIDIA-NeMo/RL/blob/06cf4d74ef28118f5657491380475a9c99068127/tools/convert-mcore-to-tron-yaml.py

    The metadata format is in flux, so this might not be the final form, but this is probably in spirit what we need to do + plumbing an mcore checkpoint from our configs (one idea maybe to just have a special scheme for this, e.g., mcore://)

  2. tpoisonooo commented on Jul 16, 2025

    @tpoisonooo
    Contributor

    Please 👍 this issue if this if you'd like to see us support this.

    The checkpoint format between megatron and the format we use is very very close so we should be able to support a thin translation for the metadata. The obvious limitation with this is we wouldn't be able to support vllm in general due to there not being an HF and/or vllm implementation of the model; so the user can only use the megatron inference backend.

    Related #619

    @terrykong I am new for megatron, here is my understanding (maybe not correct):

    Project owner would like to support a new (actually native Megatron) checkpoint format, but this additional format does not affect training.

    My view may not be correct: We chose the framework under NVIDIA for higher performance (for example, transformer-engine-fp8). For format compatibility, being able to run is acceptable and not the primary requirement.

    Time is limited, perhaps we should focus our efforts on performance optimization(for example, GRPO -> C3PO) and support for VLM.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions