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
c51020cf
"...pipelines/animatediff/pipeline_animatediff_controlnet.py" did not exist on "e550163b9f503bfd3c941cbd0d9f31dcdc313429"
Unverified
Commit
c51020cf
authored
Feb 11, 2024
by
Lianmin Zheng
Committed by
GitHub
Feb 11, 2024
Browse files
Fix the chat template for llava-v1.6-34b & format code (#177)
parent
50afed4e
Changes
23
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
7 deletions
+9
-7
test/srt/model/bench_llama_low_api.py
test/srt/model/bench_llama_low_api.py
+6
-6
test/srt/test_jump_forward.py
test/srt/test_jump_forward.py
+1
-0
test/srt/test_openai_server.py
test/srt/test_openai_server.py
+2
-1
No files found.
test/srt/model/bench_llama_low_api.py
View file @
c51020cf
...
...
@@ -66,9 +66,9 @@ class BenchBatch:
p_idx
=
prefix_req_idx
[
i
//
fork_num
].
item
()
n_idx
=
self
.
req_pool_indices
[
i
].
item
()
req_to_token
[
n_idx
,
:
prefix_len
]
=
req_to_token
[
p_idx
,
:
prefix_len
]
req_to_token
[
n_idx
,
prefix_len
:
prefix_len
+
extend_len
]
=
self
.
out_cache_loc
[
i
*
extend_len
:
(
i
+
1
)
*
extend_len
]
req_to_token
[
n_idx
,
prefix_len
:
prefix_len
+
extend_len
]
=
(
self
.
out_cache_loc
[
i
*
extend_len
:
(
i
+
1
)
*
extend_len
]
)
def
update_decode
(
self
,
predict_ids
,
batch_size
):
assert
predict_ids
.
shape
[
0
]
==
batch_size
...
...
@@ -81,9 +81,9 @@ class BenchBatch:
self
.
out_cache_cont_start
,
self
.
out_cache_cont_end
,
)
=
self
.
token_to_kv_pool
.
alloc_contiguous
(
batch_size
)
self
.
req_to_token_pool
.
req_to_token
[
self
.
req_pool_indices
,
self
.
seq_lens
]
=
self
.
out_cache_loc
self
.
req_to_token_pool
.
req_to_token
[
self
.
req_pool_indices
,
self
.
seq_lens
]
=
(
self
.
out_cache_loc
)
self
.
seq_lens
.
add_
(
1
)
...
...
test/srt/test_jump_forward.py
View file @
c51020cf
...
...
@@ -7,6 +7,7 @@ from sglang.test.test_utils import (
add_common_sglang_args_and_parse
,
select_sglang_backend
,
)
import
sglang
as
sgl
IP_REGEX
=
r
"((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)"
...
...
test/srt/test_openai_server.py
View file @
c51020cf
...
...
@@ -155,7 +155,8 @@ def test_chat_completion_stream(args):
def
test_regex
(
args
):
client
=
openai
.
Client
(
api_key
=
"EMPTY"
,
base_url
=
args
.
base_url
)
regex
=
(
r
"""\{\n"""
regex
=
(
r
"""\{\n"""
+
r
""" "name": "[\w]+",\n"""
+
r
""" "population": "[\w\d\s]+"\n"""
+
r
"""\}"""
...
...
Prev
1
2
Next
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