Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion data/preprocess_sft.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"\n",
"\n",
"def get_prompt(data_i):\n",
" return Template(system_prompts).render(problem = data_i[\"prompt\"])\n",
" return Template(system_prompts, keep_trailing_newline=True).render(problem = data_i[\"prompt\"])\n",
"processed_data = []\n",
"for i in range(len(data)):\n",
" processed_data.append(\n",
Expand Down
2 changes: 1 addition & 1 deletion sample/dream_rl_rollout.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ def random_select(data_list, random_k):

# obtain prompt
def get_prompt(data_i):
return Template(system_prompts).render(problem = data_i["question"])
return Template(system_prompts, keep_trailing_newline=True).render(problem = data_i["question"])



Expand Down
2 changes: 1 addition & 1 deletion sample/dream_sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ def random_select(data_list, random_k):

# obtain prompt
def get_prompt(data_i):
return Template(system_prompts).render(problem = data_i["question"])
return Template(system_prompts, keep_trailing_newline=True).render(problem = data_i["question"])



Expand Down
2 changes: 1 addition & 1 deletion sample/llada_rl_rollout.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def random_select(data_list, random_k):

# obtain prompt
def get_prompt(data_i):
return Template(system_prompts).render(problem = data_i["question"])
return Template(system_prompts, keep_trailing_newline=True).render(problem = data_i["question"])


def extract_final_boxed_answer(s: str):
Expand Down
2 changes: 1 addition & 1 deletion sample/llada_sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def random_select(data_list, random_k):

# obtain prompt
def get_prompt(data_i):
return Template(system_prompts).render(problem = data_i["question"])
return Template(system_prompts, keep_trailing_newline=True).render(problem = data_i["question"])


def extract_final_boxed_answer(s: str):
Expand Down
2 changes: 1 addition & 1 deletion sample/sdar_rl_rollout.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def get_config():

# obtain prompt
def get_prompt(data_i):
return Template(system_prompts).render(problem = data_i["question"])
return Template(system_prompts, keep_trailing_newline=True).render(problem = data_i["question"])

def extract_final_boxed_answer(s: str):
tag = r'\boxed{'
Expand Down
2 changes: 1 addition & 1 deletion sample/sdar_sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def get_config():

# obtain prompt
def get_prompt(data_i):
return Template(system_prompts).render(problem = data_i["question"])
return Template(system_prompts, keep_trailing_newline=True).render(problem = data_i["question"])

def extract_final_boxed_answer(s: str):
tag = r'\boxed{'
Expand Down
2 changes: 1 addition & 1 deletion sample/trado_rl_rollout.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def get_config():

# obtain prompt
def get_prompt(data_i):
return Template(system_prompts).render(problem = data_i["question"])
return Template(system_prompts, keep_trailing_newline=True).render(problem = data_i["question"])

def extract_final_boxed_answer(s: str):
tag = r'\boxed{'
Expand Down
2 changes: 1 addition & 1 deletion sample/trado_sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def get_config():

# obtain prompt
def get_prompt(data_i):
return Template(system_prompts).render(problem = data_i["question"])
return Template(system_prompts, keep_trailing_newline=True).render(problem = data_i["question"])

def extract_final_boxed_answer(s: str):
tag = r'\boxed{'
Expand Down