Skip to content
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

Make request payload size configurable #2444

Merged
merged 6 commits into from
Dec 12, 2024
Merged

Conversation

MrAta
Copy link
Contributor

@MrAta MrAta commented Dec 11, 2024

Motivation

For scenarios where we have long context lengths (e.g. 32k) and have multiple prompts in a single completion request, the size of the http request payload exceeds the default 2MB that rust json has which fails to send the request to the engine.

Modifications

This PR makes the request payload size configurable by adding a new max_request_payload_size field to the Config struct.

Checklist

  • Format your code according to the Contributor Guide.
  • Add unit tests as outlined in the Contributor Guide.
  • Update documentation as needed, including docstrings or example tutorials.

Copy link
Collaborator

@ByronHsu ByronHsu left a comment

Choose a reason for hiding this comment

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

Can you add a test in

def test_2_add_and_remove_worker(self):
with a ultra long request and setting the DP to be 1 to test the payload?

Signed-off-by: Ata Fatahi <immrata@gmail.com>
@MrAta
Copy link
Contributor Author

MrAta commented Dec 11, 2024

Can you add a test in

def test_2_add_and_remove_worker(self):

with a ultra long request and setting the DP to be 1 to test the payload?

Ag, added some tests.

Copy link
Collaborator

@ByronHsu ByronHsu left a comment

Choose a reason for hiding this comment

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

Nice bug catch!

@ByronHsu
Copy link
Collaborator

@MrAta can you release a new version after this is merged?

Signed-off-by: Ata Fatahi <immrata@gmail.com>
Signed-off-by: Ata Fatahi <immrata@gmail.com>
Signed-off-by: Ata Fatahi <immrata@gmail.com>
Signed-off-by: Ata Fatahi <immrata@gmail.com>
Signed-off-by: Ata Fatahi <immrata@gmail.com>
@MrAta MrAta requested a review from ByronHsu December 12, 2024 00:55
@ByronHsu ByronHsu merged commit 2ac36b9 into sgl-project:main Dec 12, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants