Former-commit-id: 7d917e03e2df570139bae18227d9c7303a12de2a
This commit is contained in:
hiyouga
2024-08-09 18:03:00 +08:00
parent 4e8861e653
commit 5af32ce705
6 changed files with 35 additions and 34 deletions

View File

@@ -206,8 +206,6 @@ def get_dataset(
template = get_template_and_fix_tokenizer(tokenizer, data_args.template, data_args.tool_format)
if data_args.train_on_prompt and template.efficient_eos:
raise ValueError("Current template does not support `train_on_prompt`.")
if stage!="sft" and data_args.mask_history:
raise ValueError("`Train on the last turn only` is only valid for sft training.")
# Load tokenized dataset
if data_args.tokenized_path is not None: