Spaces:
Runtime error
Runtime error
Tweaked the training data format to try and fix the issue of the model repeating the question over and over
Browse files
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] <<
|
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:
|