[Bugfix] Suggest upgrading Transformers for tokenizer class errors (#38099)

Signed-off-by: Lidang-Jiang <lidangjiang@gmail.com>
This commit is contained in:
Lidang Jiang
2026-05-05 14:10:45 +00:00
committed by GitHub
parent 20dcd984f9
commit b786ec8e74
+4 -1
View File
@@ -190,7 +190,10 @@ class CachedHfTokenizer(TokenizerLike):
"is a custom tokenizer not yet available in the "
"HuggingFace transformers library, consider "
"setting `trust_remote_code=True` in LLM or using "
"the `--trust-remote-code` flag in the CLI."
"the `--trust-remote-code` flag in the CLI. If the "
"model was created with a newer version of "
"transformers, consider upgrading: "
"`uv pip install --upgrade transformers`"
)
raise RuntimeError(err_msg) from e
else: