Skip to content

Commit

Permalink
fix test not to try importing Sigliptokenizerfast
Browse files Browse the repository at this point in the history
  • Loading branch information
Ita Zaporozhets authored and Ita Zaporozhets committed Oct 2, 2024
1 parent 80d2f46 commit 2133809
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@

TOKENIZER_CLASSES = {
# Phi3 uses Llama tokenizer
name: getattr(transformers, "LlamaTokenizerFast" if name == "Phi3Tokenizer" else name + "Fast")
name: getattr(
transformers,
"LlamaTokenizerFast"
if name == "Phi3Tokenizer"
else ("PreTrainedTokenizerFast" if name == "SiglipTokenizerFast" else name + "Fast"),
)
for name in SLOW_TO_FAST_CONVERTERS
}

Expand Down

0 comments on commit 2133809

Please sign in to comment.