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
9d02bb3e
Unverified
Commit
9d02bb3e
authored
Mar 17, 2025
by
Mick
Committed by
GitHub
Mar 16, 2025
Browse files
Urgent model support: support gemma-3-it (#4424)
parent
402db5c5
Changes
21
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
1 deletion
+24
-1
test/srt/test_vision_openai_server.py
test/srt/test_vision_openai_server.py
+24
-1
No files found.
test/srt/test_vision_openai_server.py
View file @
9d02bb3e
...
@@ -75,7 +75,8 @@ class TestOpenAIVisionServer(unittest.TestCase):
...
@@ -75,7 +75,8 @@ class TestOpenAIVisionServer(unittest.TestCase):
assert
response
.
choices
[
0
].
message
.
role
==
"assistant"
assert
response
.
choices
[
0
].
message
.
role
==
"assistant"
text
=
response
.
choices
[
0
].
message
.
content
text
=
response
.
choices
[
0
].
message
.
content
assert
isinstance
(
text
,
str
)
assert
isinstance
(
text
,
str
)
assert
"man"
in
text
or
"person"
in
text
,
text
# `driver` is for gemma-3-it
assert
"man"
in
text
or
"person"
or
"driver"
in
text
,
text
assert
"cab"
in
text
or
"taxi"
in
text
or
"SUV"
in
text
,
text
assert
"cab"
in
text
or
"taxi"
in
text
or
"SUV"
in
text
,
text
assert
"iron"
in
text
,
text
assert
"iron"
in
text
,
text
assert
response
.
id
assert
response
.
id
...
@@ -540,5 +541,27 @@ class TestJanusProServer(TestOpenAIVisionServer):
...
@@ -540,5 +541,27 @@ class TestJanusProServer(TestOpenAIVisionServer):
pass
pass
class
TestGemma3itServer
(
TestOpenAIVisionServer
):
@
classmethod
def
setUpClass
(
cls
):
cls
.
model
=
"google/gemma-3-4b-it"
cls
.
base_url
=
DEFAULT_URL_FOR_TEST
cls
.
api_key
=
"sk-123456"
cls
.
process
=
popen_launch_server
(
cls
.
model
,
cls
.
base_url
,
timeout
=
DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH
,
other_args
=
[
"--trust-remote-code"
,
"--chat-template"
,
"gemma-it"
,
],
)
cls
.
base_url
+=
"/v1"
def
test_video_chat_completion
(
self
):
pass
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
unittest
.
main
()
unittest
.
main
()
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