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
ModelZoo
Qwen_lmdeploy
Commits
8ba2d7c5
Unverified
Commit
8ba2d7c5
authored
Jul 20, 2023
by
WRH
Committed by
GitHub
Jul 20, 2023
Browse files
return carriage cause overwriting at the same line (#143)
parent
cde17e73
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
lmdeploy/pytorch/utils.py
lmdeploy/pytorch/utils.py
+1
-1
No files found.
lmdeploy/pytorch/utils.py
View file @
8ba2d7c5
...
@@ -92,7 +92,7 @@ class InternLMStreamer(DecodeOutputStreamer):
...
@@ -92,7 +92,7 @@ class InternLMStreamer(DecodeOutputStreamer):
tok
=
self
.
tokenizer
.
decode
(
value
)
tok
=
self
.
tokenizer
.
decode
(
value
)
if
res
:
=
self
.
hex_regex
.
match
(
tok
):
if
res
:
=
self
.
hex_regex
.
match
(
tok
):
tok
=
chr
(
int
(
res
.
group
(
1
),
16
))
tok
=
chr
(
int
(
res
.
group
(
1
),
16
))
if
tok
==
'</s>'
or
tok
==
'<eoa>'
:
if
tok
==
'</s>'
or
tok
==
'<eoa>'
or
tok
==
'
\r
'
:
tok
=
'
\n
'
tok
=
'
\n
'
return
tok
return
tok
...
...
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