Skip to content

Commit df64341

Browse files
authored
Fix: Remove call to deleted method [_apply_chat_template_safe] and replace it with the standard method [self.tokenizer.apply_chat_template] (#591)
1 parent 974e17b commit df64341

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mlx_lm/tuner/datasets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def process(self, d):
105105
{"role": "user", "content": d[self.prompt_key]},
106106
{"role": "assistant", "content": d[self.completion_key]},
107107
]
108-
tokens = _apply_chat_template_safe(self.tokenizer, messages, tools=tools)
108+
tokens = self.tokenizer.apply_chat_template(messages, tools=tools)
109109
if self.mask_prompt:
110110
offset = len(
111111
self.tokenizer.apply_chat_template(

0 commit comments

Comments
 (0)