mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-12-19 05:10:35 +08:00
[model] update kt code (#9406)
This commit is contained in:
@@ -616,7 +616,14 @@ def get_template_and_fix_tokenizer(tokenizer: "PreTrainedTokenizer", data_args:
|
||||
logger.info_rank0(f"Using default system message: {data_args.default_system}.")
|
||||
template.default_system = data_args.default_system
|
||||
|
||||
template.enable_thinking = data_args.enable_thinking
|
||||
if isinstance(template, ReasoningTemplate):
|
||||
logger.warning_rank0(
|
||||
"You are using reasoning template, "
|
||||
"please add `_nothink` suffix if the model is not a reasoning model. "
|
||||
"e.g., qwen3_vl_nothink"
|
||||
)
|
||||
template.enable_thinking = data_args.enable_thinking
|
||||
|
||||
template.fix_special_tokens(tokenizer)
|
||||
template.fix_jinja_template(tokenizer)
|
||||
return template
|
||||
|
||||
Reference in New Issue
Block a user