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
ad5f04d6
"src/vscode:/vscode.git/clone" did not exist on "6897f55a3a7c0784143f276a2d086696041ed6f0"
Unverified
Commit
ad5f04d6
authored
Jun 16, 2024
by
Liangsheng Yin
Committed by
GitHub
Jun 16, 2024
Browse files
Fix the Jump-Forward with Chinese (#551)
parent
bbec01c9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
python/pyproject.toml
python/pyproject.toml
+1
-1
python/sglang/srt/constrained/jump_forward.py
python/sglang/srt/constrained/jump_forward.py
+4
-2
No files found.
python/pyproject.toml
View file @
ad5f04d6
...
...
@@ -21,7 +21,7 @@ dependencies = [
[project.optional-dependencies]
srt
=
[
"aiohttp"
,
"fastapi"
,
"psutil"
,
"rpyc"
,
"torch"
,
"uvloop"
,
"uvicorn"
,
"zmq"
,
"vllm==0.5.0"
,
"interegular"
,
"pydantic"
,
"pillow"
,
"packaging"
,
"huggingface_hub"
,
"hf_transfer"
,
"outlines>=0.0.4
1
"
]
"zmq"
,
"vllm==0.5.0"
,
"interegular"
,
"pydantic"
,
"pillow"
,
"packaging"
,
"huggingface_hub"
,
"hf_transfer"
,
"outlines>=0.0.4
4
"
]
openai
=
[
"openai>=1.0"
,
"tiktoken"
]
anthropic
=
["anthropic>=0.20.0"]
litellm
=
["litellm>=1.0.0"]
...
...
python/sglang/srt/constrained/jump_forward.py
View file @
ad5f04d6
...
...
@@ -81,8 +81,10 @@ class JumpForwardMap:
if
len
(
c
)
==
1
and
ord
(
c
)
<
0x80
:
# ASCII character
byte_
=
ord
(
c
)
elif
len
(
c
)
==
2
:
byte_
=
int
(
symbols
[
0
],
16
)
elif
len
(
c
)
>
1
:
# FIXME: This logic is due to the leading \x00
# https://github.com/outlines-dev/outlines/pull/930
byte_
=
int
(
symbols
[
0
][
1
:],
16
)
if
byte_
is
not
None
:
outgoings_ct
[
state
]
+=
1
...
...
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