damajercakms commited on
Commit
ed48a56
1 Parent(s): 19f7775

Update sample_finetune.py

Browse files
Files changed (1) hide show
  1. sample_finetune.py +0 -3
sample_finetune.py CHANGED
@@ -151,9 +151,6 @@ def apply_chat_template(
151
  tokenizer,
152
  ):
153
  messages = example["messages"]
154
- # Add an empty system message if there is none
155
- if messages[0]["role"] != "system":
156
- messages.insert(0, {"role": "system", "content": ""})
157
  example["text"] = tokenizer.apply_chat_template(
158
  messages, tokenize=False, add_generation_prompt=False)
159
  return example
 
151
  tokenizer,
152
  ):
153
  messages = example["messages"]
 
 
 
154
  example["text"] = tokenizer.apply_chat_template(
155
  messages, tokenize=False, add_generation_prompt=False)
156
  return example