alfraser commited on
Commit
abcd8a9
·
1 Parent(s): 57b94ca

Tweaked the training data format to try and fix the issue of the model repeating the question over and over

Browse files
Files changed (1) hide show
  1. src/training/prep_finetuning.py +1 -1
src/training/prep_finetuning.py CHANGED
@@ -182,7 +182,7 @@ def training_string_from_q_and_a(q: str, a: str, sys_prompt: str = None) -> str:
182
  """
183
  if sys_prompt is None:
184
  sys_prompt = "You are a helpful domestic appliance advisor for the ElectroHome company. Please answer customer questions and do not mention other brands. If you cannot answer please say so."
185
- return f"[INST] << SYS >> {sys_prompt} << SYS >> {q} [ /INST] {a}"
186
 
187
 
188
  def fine_tuning_out_dir(out_model: str) -> str:
 
182
  """
183
  if sys_prompt is None:
184
  sys_prompt = "You are a helpful domestic appliance advisor for the ElectroHome company. Please answer customer questions and do not mention other brands. If you cannot answer please say so."
185
+ return f"<s>[INST] <<SYS>>\n{sys_prompt}\n<</SYS>>\n\n{q} [/INST]{a}"
186
 
187
 
188
  def fine_tuning_out_dir(out_model: str) -> str: