Skip to content

Commit

Permalink
add Dynamic batching
Browse files Browse the repository at this point in the history
Signed-off-by: pandyamarut <[email protected]>
  • Loading branch information
pandyamarut committed Jan 6, 2025
1 parent e7569c9 commit 22919bd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
engine.wait_for_server()


def get_max_concurrency(default=50):
def get_max_concurrency(default=300):
"""
Returns the maximum concurrency value.
By default, it uses 50 unless the 'MAX_CONCURRENCY' environment variable is set.
Expand Down
10 changes: 10 additions & 0 deletions worker-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"PORT",
"ADDITIONAL_PORTS",
"API_KEY",
"MAX_CONCURRENCY",
"LOG_LEVEL",
"LOG_LEVEL_HTTP",
"FILE_STORAGE_PTH"
Expand Down Expand Up @@ -90,6 +91,7 @@
"PORT",
"ADDITIONAL_PORTS",
"API_KEY",
"MAX_CONCURRENCY",
"LOG_LEVEL",
"LOG_LEVEL_HTTP",
"FILE_STORAGE_PTH"
Expand Down Expand Up @@ -371,6 +373,14 @@
"required": false,
"type": "text"
},
"MAX_CONCURRENCY": {
"env_var_name": "MAX_CONCURRENCY",
"value": "300",
"title": "Max Concurrency",
"description": "Max concurrent requests per worker. SGLang has an internal queue, so you don't have to worry about limiting by VRAM, this is for improving scaling/load balancing efficiency",
"required": false,
"type": "number"
},
"FILE_STORAGE_PTH": {
"env_var_name": "FILE_STORAGE_PTH",
"value": "",
Expand Down

0 comments on commit 22919bd

Please sign in to comment.