Skip to content

Refactor: separate sync/async vllm #599

Open

Description

@yuki-97

For now, vllm.py is a bit complex with both sync/async code in it.

It's better to separate them to improve the experience of user and developer.

step1:
after doing this, we can aware the code changes of vllm at main branch and not miss them when doing step2.

  1. put vllm stuffs from nemo_rl/models/generation to nemo_rl/models/generation/vllm, so that it's easy for us to support other inference FW in the future.
  2. split sync and async vllm worker to different files to make it clear.

step2:

  1. tidy and remove duplicated / useless code.

Activity

  1. added
    UX
    on Jul 3, 2025
  2. self-assigned this
    on Jul 3, 2025
  3. github-actions commented on Aug 3, 2025

    @github-actions

    This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

  4. terrykong commented on Sep 16, 2025

    @terrykong
    Collaborator

    @yuki-97 is this issue resolved?

  5. yuki-97 commented on Sep 17, 2025

    @yuki-97
    ContributorAuthor

    Not completely, only step1 is finished through #900.

    For step2, I plan to do these things after the async-rl PR merged and after v0.4.

    1. Change xxx_async function name to xxx in VllmAsyncGenerationWorker, so the function name will be the same as VllmGenerationWorker, so that we can remove lots of "Choose the appropriate method based on async_engine setting" in VllmGeneration.
    2. Remove measuring batch logic in VllmAsyncGenerationWorker:generate since async engine only receive single request each time. But need to see how async-rl PR use it and make sure the refactor won't break it.
    3. Move patches and some codes that not so related to vLLM to a proper place to make the code clear.
  6. euronymous-aithal commented on Oct 31, 2025

    @euronymous-aithal
    Contributor

    @yuki-97 what is the latest status on this ?

  7. yuki-97 commented on Oct 31, 2025

    @yuki-97
    ContributorAuthor

    @yuki-97 what is the latest status on this ?

    @euronymous-aithal I'd like to discuss with folks during next week meeting, and will do it after v0.4.

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

Metadata

Metadata

Assignees

Labels

UXvllm

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions