Improve docs and warnings (#1164)

This commit is contained in:
Lianmin Zheng
2024-08-20 08:31:29 -07:00
committed by GitHub
parent d8476818ef
commit a8ae640328
7 changed files with 25 additions and 24 deletions

View File

@@ -147,13 +147,12 @@ def get_tokenizer(
and kwargs.get("use_fast", True)
and tokenizer_name != _FAST_LLAMA_TOKENIZER
):
pass
# warnings.warn(
# "For some LLaMA V1 models, initializing the fast tokenizer may "
# "take a long time. To reduce the initialization time, consider "
# f"using '{_FAST_LLAMA_TOKENIZER}' instead of the original "
# "tokenizer."
# )
warnings.warn(
"For some LLaMA V1 models, initializing the fast tokenizer may "
"take a long time. To reduce the initialization time, consider "
f"using '{_FAST_LLAMA_TOKENIZER}' instead of the original "
"tokenizer."
)
try:
tokenizer = AutoTokenizer.from_pretrained(
tokenizer_name,