nguyenbh damajercakms commited on
Commit
5fa3419
1 Parent(s): 19f7775

Update sample_finetune.py (#65)

Browse files

- Update sample_finetune.py (ed48a568bcff8414a98597fd4e417049f7168205)


Co-authored-by: David Majercak <[email protected]>

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