File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -45,8 +45,14 @@ pip install llms_from_scratch tokenizers
45
45
Specify which model to use:
46
46
47
47
``` python
48
- USE_REASONING_MODEL = False # The base model
49
- USE_REASONING_MODEL = True # The "thinking" model
48
+ USE_REASONING_MODEL = True
49
+ # Uses the base model if USE_REASONING_MODEL = False
50
+
51
+ USE_INSTRUCT_MODEL = False
52
+ # Uses the instruct mode (without reasoning) if
53
+ # USE_REASONING_MODEL = True
54
+ # USE_INSTRUCT_MODEL = False
55
+ # This setting does have no effect if USE_REASONING_MODEL = False
50
56
51
57
52
58
# Use
@@ -187,10 +193,11 @@ else:
187
193
tok_filename = " tokenizer-base.json"
188
194
189
195
tokenizer = Qwen3Tokenizer(
190
- tokenizer_file_path = tok_filename ,
196
+ tokenizer_file_path = tokenizer_file_path ,
191
197
repo_id = repo_id,
198
+ apply_chat_template = USE_REASONING_MODEL ,
192
199
add_generation_prompt = USE_REASONING_MODEL ,
193
- add_thinking = USE_REASONING_MODEL
200
+ add_thinking = not USE_INSTRUCT_MODEL
194
201
)
195
202
```
196
203
You can’t perform that action at this time.
0 commit comments