mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-10-15 08:08:09 +08:00
mask_history args verify valid
Former-commit-id: 2f8388b4f4195d934400ad9267d72e10ca4105a3
This commit is contained in:
parent
d71446e387
commit
6ec64a7e56
@ -206,6 +206,8 @@ 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:
|
||||
|
@ -141,3 +141,6 @@ class DataArguments:
|
||||
|
||||
if self.streaming and self.max_samples is not None:
|
||||
raise ValueError("`max_samples` is incompatible with `streaming`.")
|
||||
|
||||
if self.mask_history and self.train_on_prompt:
|
||||
raise ValueError("`Train on the last turn only` does not support `train_on_prompt`.")
|
||||
|
Loading…
x
Reference in New Issue
Block a user