Skip to content

Integration between NeMo and NeMo-RL for audio LLMs #619

Open

Description

@jkaniewski-tii

Hi, we are training our audio LLMs using the code provided in https://github.com/tiiuae/aiccu-audio-nemo/tree/main/nemo/collections/speechlm . Under the hood these are just MegatronLM models.

Now we'd like to apply RL training to these models and we'd like to use NeMo-RL for that. What's the easiest way to load our models into NeMo-RL? Is this something that's relatively simple to add or do you think it's a really big task?

Activity

  1. terrykong commented on Jul 9, 2025

    @terrykong
    Collaborator

    Hi @jkaniewski-tii . Thanks for your interest in NeMo RL. I'm not able to view the link, but just to confirm, is that just a fork of https://github.com/nvidia/nemo/tree/main/nemo/collections/speechlm ?

    Regarding the size of the task, it depends on the support of other upstream repos:

    For text, since we already have a reference math task, as long as there's a:

    1. hf model implementation
    2. mcore reference implementation (configured with nemo -- for now; subject to change)
    3. vllm implementation

    the work is just to write a converter for HF -> mcore state dict & mcore -> HF state dict. We have plans to cover more common cases in the future differently than how we currently do it, so stay tuned for that 😄. The vllm implementation and mcore -> hf state dict converter isn't necessary if you use the megatron backend (provided that the megatron inference path works for that model class)

    I'd say ^ is a small task if you're familiar with nemo-rl, and maybe a medium one if you are getting familiarized.


    Several other things would potentially increase the effort involved, which could include (1) no vllm implementation or (2) you don't have a task (dataset + environment + loss).

    That being said, we'd be happy to discuss supporting this use case!

    While we don't have a guide for this since we don't have a standard prescription for it, you can get a feel for the work involved with these PRs:

    mcore model support
    * https://github.com/NVIDIA-NeMo/RL/pull/590/files
    * #591

    new modality
    * #521


    I think having an audio LLM example would be pretty neat! My preference would be to have some replication of some open source recipe so that we have a reference for correctness. I'm not as familiar with the latest in the audio space; is there a popular exemplar RL recipe in the audio space?

  2. jkaniewski-tii commented on Jul 9, 2025

    @jkaniewski-tii
    Author

    Hi, thanks for your reply.

    Sorry for sending a link to our private fork :/ Yes, it's exactly the file you mention.

    We are currently exploring the possibility of doing the entire training (first SFT, then RL) with NeMo libraries. We have managed to do SFT with NVIDIA/NeMo and now we want to try doing RL with NeMo-RL. We hoped that since the output of SFT is a NeMo/Megatron native model, it will be easy to just plug in into NeMo-RL, but after a quick look it does not seem that straightforward.

    The point of exploring NVIDIA libraries is so that we can stay within a single ecosystem during the entire training (so that if we experiment with a new architecture, we just need to define in one framework). If we have to convert to HF after SFT, then this advantage is lost.

    So I guess my question is: if we have a SpeechLM NeMo/Megatron model produced by NVIDIA/NeMo can it be easily imported to NeMo-RL or is it necessary to make substantial changes (e.g. because NeMo-RL requires models to provide additional method/attributes)?

    Thanks for the refs, I'll take a look.

    Regarding a popular recipe for audio LLM: I don't think there is one. Some research papers have published their code, but I wouldn't call them popular. Here is one example:
    https://github.com/xiaomi-research/r1-aqa

    In terms of models Qwen2-Audio is a popular audio LLM available from HF:
    https://huggingface.co/Qwen/Qwen2-Audio-7B

  3. jkaniewski-tii commented on Jul 9, 2025

    @jkaniewski-tii
    Author

    Oh, and maybe one more question: if we want to run NeMo-RL inside a container, is there a specific Docker image you'd recommend?

  4. terrykong commented on Jul 9, 2025

    @terrykong
    Collaborator

    We have managed to do SFT with NVIDIA/NeMo and now we want to try doing RL with NeMo-RL. We hoped that since the output of SFT is a NeMo/Megatron native model, it will be easy to just plug in into NeMo-RL, but after a quick look it does not seem that straightforward.

    Ah I see, so your starting place is a SFT Nemo model (mcore backend && nemo2 checkpoint)? Could you share a pointer to the model config in nemo as an example? It should be possible to convert nemo2 checkpoints to a mcore checkpoint that we can consume in NeMo RL, but it would help to see the model config to make sure there's nothing surprising. FYI @yaoyu-33 @hemildesai

    The point of exploring NVIDIA libraries is so that we can stay within a single ecosystem during the entire training (so that if we experiment with a new architecture, we just need to define in one framework). If we have to convert to HF after SFT, then this advantage is lost.

    That is very reasonable. To understand your use case: regarding converting to HF, do you purely work with megatron (nemo) checkpoints and don't deal with open-source models on HF and have your own base megatron models that you continually train?

    if we have a SpeechLM NeMo/Megatron model produced by NVIDIA/NeMo can it be easily imported to NeMo-RL or is it necessary to make substantial changes (e.g. because NeMo-RL requires models to provide additional method/attributes)?

    The checkpoint format (pytorch DCP) is the same, but to continually SFT in NeMo RL, we need a converter of the NeMo checkpoint model metadata to the "preferred" NeMo RL format.

  5. terrykong commented on Jul 9, 2025

    @terrykong
    Collaborator

    re: docker image

    we plan on publishing one to save time, but we've had to punt on that due to limited BW. The container we'd publish can be built here

    https://docs.nvidia.com/nemo/rl/latest/docker.html (recommend either the hermetic or release one. the base one has issues and we will likely remove it)

    We'll look at publishing one next release (post v0.3 which is imminent)

  6. jkaniewski-tii commented on Jul 15, 2025

    @jkaniewski-tii
    Author

    Hi, sorry for a slow reply.

    Yes, we have the pretraining done in Megatron and we wanted to do SFT and then possibly RL within NVIDIA ecosystem. Our model config is something similar to this:
    https://github.com/NVIDIA/NeMo/blob/main/examples/speechlm/conf/salm/salm_llama3.2-3b_fc_fc_peft.yaml

    Of course, at the very end there is a requirement to export to HF, but for the actual training we could rely fully on Megatron format.

    Either way, it seems like the disconnect between NeMo and NeMo-RL pushes us towards the HF ecosystem, which is a bit more friendly for teams with limited engineering support.

    But thanks a lot for assistance and discussion

  7. snowmanwwg commented on Jul 30, 2025

    @snowmanwwg
    Contributor
  8. snowmanwwg commented on Dec 6, 2025

    @snowmanwwg
    Contributor

    @jkaniewski-tii To update you (1) NeMo-RL now uses NeMo Megatron-bridge which accepts megatron model checkpoint, or HF checkpoint as we have an online-conversion built in. (2) We also have a container published in case you need that. More updates in our release notes https://github.com/NVIDIA-NeMo/RL/releases/tag/v0.4.0

  9. 21 remaining items

  10. added
    waiting-on-customer
    on Jun 6, 2026
  11. added
    waiting-on-maintainers
    waiting-on-customer
    and removed
    waiting-on-customer
    waiting-on-maintainers
    on Jun 14, 2026
  12. added
    waiting-on-maintainers
    and removed
    waiting-on-customer
    on Jul 3, 2026
  13. added
    waiting-on-customer
    and removed
    waiting-on-maintainers
    on Jul 10, 2026
  14. added
    waiting-on-maintainers
    waiting-on-customer
    and removed
    waiting-on-customer
    waiting-on-maintainers
    on Aug 5, 2026
  15. added
    waiting-on-maintainers
    and removed
    waiting-on-customer
    on Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions