File tree Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Original file line number Diff line number Diff line change @@ -232,16 +232,7 @@ def main():
232232 tokenizer = None
233233 try :
234234 # Load tokenizer
235- tokenizer = AutoTokenizer .from_pretrained (
236- tokenizer_id , ** from_pretrained_kwargs )
237-
238- # To avoid inserting all chat templates into tokenizers.js, we save the chat template
239- # to the tokenizer_config.json file, and load it when the tokenizer is loaded.
240- if getattr (tokenizer , 'chat_template' , None ) is None and \
241- getattr (tokenizer , 'use_default_system_prompt' , False ):
242- # No chat template specified, and we use the default
243- setattr (tokenizer , 'chat_template' ,
244- tokenizer .default_chat_template )
235+ tokenizer = AutoTokenizer .from_pretrained (tokenizer_id , ** from_pretrained_kwargs )
245236
246237 except KeyError :
247238 pass # No Tokenizer
You can’t perform that action at this time.
0 commit comments