Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
9216b106
"vscode:/vscode.git/clone" did not exist on "2104d20eba2b3badcc51c3d8fbcec48f45e045e5"
Unverified
Commit
9216b106
authored
Apr 25, 2024
by
Liangsheng Yin
Committed by
GitHub
Apr 25, 2024
Browse files
Improve performance when running with full parallel (#394)
parent
da19434c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
python/sglang/srt/managers/router/model_rpc.py
python/sglang/srt/managers/router/model_rpc.py
+3
-1
No files found.
python/sglang/srt/managers/router/model_rpc.py
View file @
9216b106
...
...
@@ -348,6 +348,7 @@ class ModelRpcServer:
# Undo the insertion
delta
=
self
.
tree_cache
.
dec_ref_counter
(
req
.
last_node
)
available_size
+=
delta
break
else
:
# Add this request to the running batch
self
.
token_to_kv_pool
.
add_refs
(
req
.
prefix_indices
)
...
...
@@ -356,7 +357,8 @@ class ModelRpcServer:
req
.
extend_input_len
+
req
.
max_new_tokens
()
)
new_batch_input_tokens
+=
req
.
extend_input_len
else
:
break
if
len
(
can_run_list
)
==
0
:
return
None
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment