From 862df48e38efce7f791d7161df955f8ebfbe833e Mon Sep 17 00:00:00 2001 From: rasbt Date: Tue, 16 Sep 2025 08:12:01 -0500 Subject: [PATCH] use apply_chat_template --- ch05/11_qwen3/standalone-qwen3-moe-plus-kvcache.ipynb | 1 + ch05/11_qwen3/standalone-qwen3-moe.ipynb | 1 + ch05/11_qwen3/standalone-qwen3-plus-kvcache.ipynb | 1 + ch05/11_qwen3/standalone-qwen3.ipynb | 1 + 4 files changed, 4 insertions(+) diff --git a/ch05/11_qwen3/standalone-qwen3-moe-plus-kvcache.ipynb b/ch05/11_qwen3/standalone-qwen3-moe-plus-kvcache.ipynb index 36f8f9d..42c5f63 100644 --- a/ch05/11_qwen3/standalone-qwen3-moe-plus-kvcache.ipynb +++ b/ch05/11_qwen3/standalone-qwen3-moe-plus-kvcache.ipynb @@ -1064,6 +1064,7 @@ "tokenizer = Qwen3Tokenizer(\n", " tokenizer_file_path=tokenizer_file_path,\n", " repo_id=repo_id,\n", + " apply_chat_template=True,\n", " add_generation_prompt=True,\n", " add_thinking=True\n", ")" diff --git a/ch05/11_qwen3/standalone-qwen3-moe.ipynb b/ch05/11_qwen3/standalone-qwen3-moe.ipynb index 5c1a402..6e845fb 100644 --- a/ch05/11_qwen3/standalone-qwen3-moe.ipynb +++ b/ch05/11_qwen3/standalone-qwen3-moe.ipynb @@ -1006,6 +1006,7 @@ "tokenizer = Qwen3Tokenizer(\n", " tokenizer_file_path=tokenizer_file_path,\n", " repo_id=repo_id,\n", + " apply_chat_template=True,\n", " add_generation_prompt=True,\n", " add_thinking=True\n", ")" diff --git a/ch05/11_qwen3/standalone-qwen3-plus-kvcache.ipynb b/ch05/11_qwen3/standalone-qwen3-plus-kvcache.ipynb index ca9e15e..02d0e19 100644 --- a/ch05/11_qwen3/standalone-qwen3-plus-kvcache.ipynb +++ b/ch05/11_qwen3/standalone-qwen3-plus-kvcache.ipynb @@ -1060,6 +1060,7 @@ "tokenizer = Qwen3Tokenizer(\n", " tokenizer_file_path=tokenizer_file_path,\n", " repo_id=repo_id,\n", + " apply_chat_template=USE_REASONING_MODEL,\n", " add_generation_prompt=USE_REASONING_MODEL,\n", " add_thinking=USE_REASONING_MODEL\n", ")" diff --git a/ch05/11_qwen3/standalone-qwen3.ipynb b/ch05/11_qwen3/standalone-qwen3.ipynb index 0302990..3483617 100644 --- a/ch05/11_qwen3/standalone-qwen3.ipynb +++ b/ch05/11_qwen3/standalone-qwen3.ipynb @@ -1002,6 +1002,7 @@ "tokenizer = Qwen3Tokenizer(\n", " tokenizer_file_path=tokenizer_file_path,\n", " repo_id=repo_id,\n", + " apply_chat_template=USE_REASONING_MODEL,\n", " add_generation_prompt=USE_REASONING_MODEL,\n", " add_thinking=USE_REASONING_MODEL\n", ")"