We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b554cf7 commit 6923b10Copy full SHA for 6923b10
2 files changed
pyproject.toml
@@ -36,7 +36,7 @@ local = [
36
train = [
37
"squeez[local]",
38
"datasets>=2.14.0",
39
- "trl>=0.16.0",
+ "trl>=0.24.0",
40
"unsloth",
41
]
42
all = [
squeez/training/train.py
@@ -101,6 +101,10 @@ def train(args: argparse.Namespace):
101
)
102
model.print_trainable_parameters()
103
104
+ # Unsloth patches chat_template with <EOS_TOKEN> placeholder — replace with real token
105
+ if hasattr(tokenizer, "chat_template") and tokenizer.chat_template:
106
+ tokenizer.chat_template = tokenizer.chat_template.replace("<EOS_TOKEN>", "<|im_end|>")
107
+
108
if tokenizer.pad_token is None:
109
tokenizer.pad_token = tokenizer.eos_token
110
tokenizer.pad_token_id = tokenizer.eos_token_id
0 commit comments