-
Notifications
You must be signed in to change notification settings - Fork 213
feat: Add SGLang rollout backend and tests #1674
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Ryan <yzr1914001753@gmail.com> Signed-off-by: Zhuoran Yin <yzr1914001753@gmail.com>
…a server Signed-off-by: Ryan <yzr1914001753@gmail.com> Signed-off-by: Zhuoran Yin <yzr1914001753@gmail.com>
…p servers Signed-off-by: Ryan <yzr1914001753@gmail.com> Signed-off-by: Zhuoran Yin <yzr1914001753@gmail.com>
Signed-off-by: Ryan <yzr1914001753@gmail.com> Signed-off-by: Zhuoran Yin <yzr1914001753@gmail.com>
Signed-off-by: Ryan <yzr1914001753@gmail.com> Signed-off-by: Zhuoran Yin <yzr1914001753@gmail.com>
Signed-off-by: Ryan <yzr1914001753@gmail.com> Signed-off-by: Zhuoran Yin <yzr1914001753@gmail.com>
Signed-off-by: Ryan <yzr1914001753@gmail.com> Signed-off-by: Zhuoran Yin <yzr1914001753@gmail.com>
Signed-off-by: Ryan <yzr1914001753@gmail.com> Signed-off-by: Zhuoran Yin <yzr1914001753@gmail.com>
Signed-off-by: Ryan <yzr1914001753@gmail.com> Signed-off-by: Zhuoran Yin <yzr1914001753@gmail.com>
Signed-off-by: Ryan <yzr1914001753@gmail.com> Signed-off-by: Zhuoran Yin <yzr1914001753@gmail.com>
Signed-off-by: Ryan <yzr1914001753@gmail.com> Signed-off-by: Zhuoran Yin <yzr1914001753@gmail.com>
Signed-off-by: Ryan <yzr1914001753@gmail.com> Signed-off-by: Zhuoran Yin <yzr1914001753@gmail.com>
Signed-off-by: Ryan <yzr1914001753@gmail.com> Signed-off-by: Zhuoran Yin <yzr1914001753@gmail.com>
Signed-off-by: Ryan <yzr1914001753@gmail.com> Signed-off-by: Zhuoran Yin <yzr1914001753@gmail.com>
sglang: add 1B example Signed-off-by: Ryan <yzr1914001753@gmail.com> Signed-off-by: Zhuoran Yin <yzr1914001753@gmail.com>
Signed-off-by: Ryan <yzr1914001753@gmail.com> Signed-off-by: Zhuoran Yin <yzr1914001753@gmail.com>
Signed-off-by: Ryan <yzr1914001753@gmail.com> Signed-off-by: Zhuoran Yin <yzr1914001753@gmail.com>
Signed-off-by: Ryan <yzr1914001753@gmail.com> Signed-off-by: Zhuoran Yin <yzr1914001753@gmail.com>
Signed-off-by: Ryan <yzr1914001753@gmail.com> Signed-off-by: Zhuoran Yin <yzr1914001753@gmail.com>
Signed-off-by: Zhuoran Yin <yzr1914001753@gmail.com>
Signed-off-by: Zhuoran Yin <yzr1914001753@gmail.com>
Signed-off-by: Zhuoran Yin <yzr1914001753@gmail.com>
- Convert SGLangConfig from regular class to TypedDict inheriting GenerationConfig - Align structure with VllmConfig pattern for consistency - Mark all fields as NotRequired for backward compatibility - Add sglang_kwargs field for additional ServerArgs parameters - Add type casting in grpo.py for type safety This maintains backward compatibility while aligning with the existing generation config structure pattern. Signed-off-by: Zhuoran Yin <yzr1914001753@gmail.com>
Signed-off-by: Zhuoran Yin <yzr1914001753@gmail.com>
Signed-off-by: Zhuoran Yin <yzr1914001753@gmail.com>
Signed-off-by: Zhuoran Yin <yzr1914001753@gmail.com>
Signed-off-by: Zhuoran Yin <yzr1914001753@gmail.com>
Co-authored-by: Terry Kong <terrycurtiskong@gmail.com> Signed-off-by: Night <32424487+PrinsYin@users.noreply.github.com>
Signed-off-by: RolaoDenthu <xinyis10@illinois.edu>
|
@guyueh1 Hi I’ve fixed the environment and it should now be able to run with the current uv lock. Could you please restart the test? |
|
|
hey @RolaoDenthu . i'm trying to get the examples in this PR to run and running into some issues. I'll submit a PR against your branch tomorrow with some fixes |
Signed-off-by: RolaoDenthu <xinyis10@illinois.edu>
Signed-off-by: RolaoDenthu <xinyis10@illinois.edu>
Signed-off-by: RolaoDenthu <xinyis10@illinois.edu>
|
@RolaoDenthu PR for your review: RolaoDenthu#1 Also when i run: I get is sgl_kernel supposed to be a dependency? |
|
@RolaoDenthu From poking around in sglang's source I think this is due to the sgl-kernel bdist wheel being built against torch 2.8. We currently need to be on torch 2.9. I'm looking at sglang 0.5.5, and the bdist wheel seems to be built against torch 2.9 despite the sglang sdist wheel specifying torch 2.8; not sure if I'm reading that correctly |
|
@RolaoDenthu also another challenge we need to overcome is the fact that the extras |
Thank you! I have checked before and sgl-kernel support torch 2.8.0 and after is 2.9.1. So I can't find an appropriate version as nemo ask for torch 2.9.0. |
|
@RolaoDenthu we took a look and it seems possible to decouple sglang from dtensor v2 (from consulting with @yuki-97 ). that would help a good deal with the complexity. I'll give that a try (will need to copy some sglang source needed to do so). I think the bigger issue is the |
I checked with others in the sglang community, and the feedback was that there are known issues with torch 2.9.0 + cudnn. If we really need to stay on 2.9.0 then we can only build sgl-kernel from source. I will try on this. |
|
Thanks for checking. I'll give it a try as well. Do you have a link to the issues for my understanding? We can bump to 2.9.1 as well, but usually we encounter many issues when upgrading torch, so maybe we can first see if there's a way to not upgrade torch first before resorting to the upgrade |
|
pytorch/pytorch#166643 I think this is the issue. |
|
Regarding sgl_kernel problem, I think @RolaoDenthu should try see if compile-from-source works for sgl_kernel + torch 2.9.0; we can't globally bump torch to 2.9.1, until vllm releases v0.14.0 which is the first that's compatible with torch 2.9.1. @terrykong Regarding vllm and sglang dependency co-existing in the |
What does this PR do ?
Add comprehensive test coverage for SGLang generation backend, including functional tests, unit tests, and nightly tests.
Usage
Before your PR is "Ready for review"
Pre checks:
Summary by CodeRabbit
Release Notes
New Features
Configuration
Tests
✏️ Tip: You can customize this high-level summary in your review settings.