Update tokenizer_utils.py
This commit is contained in:
parent
bd2959d300
commit
2837bb1fe3
1 changed files with 2 additions and 2 deletions
|
|
@ -38,7 +38,6 @@ __all__ = [
|
|||
IGNORED_TOKENIZER_CHECKING = frozenset((
|
||||
"CodeLlamaTokenizerFast",
|
||||
"CodeLlamaTokenizer",
|
||||
""
|
||||
))
|
||||
|
||||
|
||||
|
|
@ -499,7 +498,8 @@ def load_correct_tokenizer(
|
|||
cache_dir = cache_dir,
|
||||
)
|
||||
|
||||
if tokenizer_name not in IGNORED_TOKENIZER_NAMES and slow_tokenizer is not None:
|
||||
if tokenizer_name in IGNORED_TOKENIZER_NAMES: pass
|
||||
elif slow_tokenizer is not None:
|
||||
if hasattr(fast_tokenizer, "add_bos_token") and hasattr(slow_tokenizer, "add_bos_token"):
|
||||
fast_tokenizer.add_bos_token = slow_tokenizer.add_bos_token
|
||||
if hasattr(fast_tokenizer, "add_eos_token") and hasattr(slow_tokenizer, "add_eos_token"):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue