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
cb389c91
Unverified
Commit
cb389c91
authored
Mar 29, 2024
by
Junlong Li
Committed by
GitHub
Mar 28, 2024
Browse files
Fix llava parallelism/fork bug (#315)
parent
eddaa2b5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
python/sglang/backend/runtime_endpoint.py
python/sglang/backend/runtime_endpoint.py
+3
-1
python/sglang/lang/interpreter.py
python/sglang/lang/interpreter.py
+1
-0
No files found.
python/sglang/backend/runtime_endpoint.py
View file @
cb389c91
...
@@ -73,9 +73,11 @@ class RuntimeEndpoint(BaseBackend):
...
@@ -73,9 +73,11 @@ class RuntimeEndpoint(BaseBackend):
assert
res
.
status_code
==
200
assert
res
.
status_code
==
200
def
commit_lazy_operations
(
self
,
s
:
StreamExecutor
):
def
commit_lazy_operations
(
self
,
s
:
StreamExecutor
):
data
=
{
"text"
:
s
.
text_
,
"sampling_params"
:
{
"max_new_tokens"
:
0
}}
self
.
_add_images
(
s
,
data
)
res
=
http_request
(
res
=
http_request
(
self
.
base_url
+
"/generate"
,
self
.
base_url
+
"/generate"
,
json
=
{
"text"
:
s
.
text_
,
"sampling_params"
:
{
"max_new_tokens"
:
0
}}
,
json
=
data
,
auth_token
=
self
.
auth_token
,
auth_token
=
self
.
auth_token
,
api_key
=
self
.
api_key
,
api_key
=
self
.
api_key
,
verify
=
self
.
verify
,
verify
=
self
.
verify
,
...
...
python/sglang/lang/interpreter.py
View file @
cb389c91
...
@@ -276,6 +276,7 @@ class StreamExecutor:
...
@@ -276,6 +276,7 @@ class StreamExecutor:
exes
[
i
].
messages_
=
list
(
self
.
messages_
)
exes
[
i
].
messages_
=
list
(
self
.
messages_
)
exes
[
i
].
cur_role
=
self
.
cur_role
exes
[
i
].
cur_role
=
self
.
cur_role
exes
[
i
].
fork_start_text_pos
=
len
(
self
.
text_
)
exes
[
i
].
fork_start_text_pos
=
len
(
self
.
text_
)
exes
[
i
].
images_
=
list
(
self
.
images_
)
return
exes
return
exes
...
...
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