Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
1bbbcc0b
"tests/vscode:/vscode.git/clone" did not exist on "185d8ed44f382fc2b066e4d2eabd3c1b5fcbd8db"
Unverified
Commit
1bbbcc0b
authored
Oct 19, 2024
by
Cyrus Leung
Committed by
GitHub
Oct 19, 2024
Browse files
[CI/Build] Fix lint errors in mistral tokenizer (#9504)
parent
25aeb7d4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
vllm/transformers_utils/tokenizers/mistral.py
vllm/transformers_utils/tokenizers/mistral.py
+3
-3
No files found.
vllm/transformers_utils/tokenizers/mistral.py
View file @
1bbbcc0b
...
...
@@ -2,11 +2,11 @@ import os
import
re
from
dataclasses
import
dataclass
from
pathlib
import
Path
from
typing
import
TYPE_CHECKING
,
Any
,
Dict
,
List
,
Optional
,
Union
from
typing
import
TYPE_CHECKING
,
Any
,
Dict
,
List
,
Optional
,
Union
,
cast
from
huggingface_hub
import
HfApi
,
hf_hub_download
from
mistral_common.protocol.instruct.request
import
ChatCompletionRequest
# yapf: disable
from
mistral_common.tokens.tokenizers.mistral
import
ChatCompletionRequest
from
mistral_common.tokens.tokenizers.mistral
import
(
MistralTokenizer
as
PublicMistralTokenizer
)
# yapf: enable
...
...
@@ -166,7 +166,7 @@ class MistralTokenizer:
tools
:
Optional
[
Dict
[
str
,
Any
]]
=
None
,
**
kwargs
)
->
List
[
int
]:
last_message
=
messages
[
-
1
]
last_message
=
cast
(
Dict
[
str
,
Any
],
messages
[
-
1
]
)
if
last_message
[
"role"
]
==
"assistant"
:
last_message
[
"prefix"
]
=
True
...
...
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