Update tokenizer_utils.py
This commit is contained in:
parent
444bc97f13
commit
1623c3242b
1 changed files with 1 additions and 0 deletions
|
|
@ -914,6 +914,7 @@ def patch_sft_trainer_tokenizer():
|
|||
|
||||
check_text = \
|
||||
"\n"\
|
||||
"if 'tokenizer' not in locals(): tokenizer = processing_class\n"\
|
||||
"test_text = dataset[0][dataset_text_field] if (formatting_func is not None and dataset_text_field is None) else formatting_func(dataset[0])[0]\n"\
|
||||
"chat_template = getattr(tokenizer, 'chat_template', None)\n"\
|
||||
"chat_template = '' if chat_template is None else chat_template\n"\
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue