Skip to content

feat: use async vllm engine (only used in unit tests) #418

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

parthchadha
Copy link
Collaborator

What does this PR do ?

This PR adds the capability to use async vllm engine and verify its correctness in unit tests. This is first of N PR's that will enable async processing of rollout requests.

Issues

List issues that this PR closes (syntax):

Usage

  • You can potentially add a usage example below
# Add a code snippet demonstrating how to use this 

Before your PR is "Ready for review"

Pre checks:

  • Make sure you read and followed Contributor guidelines
  • Did you write any new necessary tests?
  • Did you run the unit tests and functional tests locally? Visit our Testing Guide for how to run tests
  • Did you add or update any necessary documentation? Visit our Document Development Guide for how to write, build and test the docs.

Additional Information

  • ...

@parthchadha parthchadha added the CI:L0 Run doctests and unit tests label May 20, 2025
@parthchadha parthchadha added CI:L0 Run doctests and unit tests and removed CI:L0 Run doctests and unit tests labels May 20, 2025
Signed-off-by: Parth Chadha <[email protected]>
@parthchadha parthchadha force-pushed the pchadha/async-vllm branch from 09c45a8 to fb47ba9 Compare May 20, 2025 15:13
@parthchadha parthchadha added CI:L0 Run doctests and unit tests and removed CI:L0 Run doctests and unit tests labels May 20, 2025
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you mind adding this key to all the grpo recipes under examples/config/recipes/grpo*.yaml?

# Reset the prefix cache to ensure that prefix cache is not reused after weights are updated
self.llm.llm_engine.reset_prefix_cache()
self.llm.sleep(level=1)
async def sleep(self):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't see a synchronous analog to some of these async functions. Is the expectation for users using LLMEngine to still await or should we provide a synchronous variant?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI:L0 Run doctests and unit tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants