mirror of
https://github.com/wassname/alignment-handbook.git
synced 2026-06-27 18:22:17 +08:00
Add auto_insert_empty_system_msg config flag (#123)
* Make system messages optional Also use the `maybe_insert_system_message` in dpo setting * add `auto_insert_empty_system_msg` flag * add `auto_insert_empty_system_msg` * add auto_insert_empty_system_msg * Update src/alignment/configs.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * make style --------- Co-authored-by: lewtun <lewis.c.tunstall@gmail.com>
This commit is contained in:
+5
-1
@@ -93,7 +93,11 @@ def main():
|
||||
#####################
|
||||
raw_datasets = raw_datasets.map(
|
||||
apply_chat_template,
|
||||
fn_kwargs={"tokenizer": tokenizer, "task": "dpo"},
|
||||
fn_kwargs={
|
||||
"tokenizer": tokenizer,
|
||||
"task": "dpo",
|
||||
"auto_insert_empty_system_msg": data_args.auto_insert_empty_system_msg,
|
||||
},
|
||||
num_proc=data_args.preprocessing_num_workers,
|
||||
remove_columns=column_names,
|
||||
desc="Formatting comparisons with prompt template",
|
||||
|
||||
+5
-1
@@ -100,7 +100,11 @@ def main():
|
||||
#####################
|
||||
raw_datasets = raw_datasets.map(
|
||||
apply_chat_template,
|
||||
fn_kwargs={"tokenizer": tokenizer, "task": "sft"},
|
||||
fn_kwargs={
|
||||
"tokenizer": tokenizer,
|
||||
"task": "sft",
|
||||
"auto_insert_empty_system_msg": data_args.auto_insert_empty_system_msg,
|
||||
},
|
||||
num_proc=data_args.preprocessing_num_workers,
|
||||
remove_columns=column_names,
|
||||
desc="Applying chat template",
|
||||
|
||||
Reference in New Issue
Block a user