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
78b8015a
Unverified
Commit
78b8015a
authored
Oct 03, 2025
by
Bowen Bao
Committed by
GitHub
Oct 03, 2025
Browse files
[Bugfix] Relax tokenizer regex for mixtral to include 'tokenizer.model' (#25964)
Signed-off-by:
Bowen Bao
<
bowenbao@amd.com
>
parent
831b1241
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
vllm/transformers_utils/tokenizers/mistral.py
vllm/transformers_utils/tokenizers/mistral.py
+11
-5
No files found.
vllm/transformers_utils/tokenizers/mistral.py
View file @
78b8015a
...
...
@@ -122,15 +122,21 @@ def list_local_repo_files(repo_id: str, revision: Optional[str]) -> list[str]:
def
find_tokenizer_file
(
files
:
list
[
str
]):
# Accept both versioned (tokenizer.model.v3) and unversioned
# (tokenizer.model) forms, plus tekken.json and tokenizer.mm.model
# variants. Previous pattern only matched the versioned variants.
file_pattern
=
re
.
compile
(
r
"^tokenizer\.model\.v.*$|^tekken\.json$|^tokenizer\.mm\.model\.v.*$"
)
r
"^tokenizer\.model(\.v.*)?|tekken\.json|tokenizer\.mm\.model(\.v.*)?$"
)
matched_files
=
[
file
for
file
in
files
if
file_pattern
.
match
(
file
)]
if
len
(
matched_files
)
>
1
:
raise
OSError
(
f
"Found
{
len
(
matched_files
)
}
files matching the "
f
"pattern: `
{
file_pattern
.
pattern
}
`. Make sure only one Mistral "
f
"tokenizer is present in
{
files
}
."
)
logger
.
warning
(
"Multiple files matched pattern `%s`: %s. Using %s."
,
file_pattern
.
pattern
,
matched_files
,
matched_files
[
0
],
)
elif
len
(
matched_files
)
==
0
:
raise
OSError
(
f
"Found
{
len
(
matched_files
)
}
files matching the "
...
...
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