Skip to content

Commit

Permalink
Add parameters for loading normal dataset with updated DataloaderCons…
Browse files Browse the repository at this point in the history
…tructor.

Signed-off-by: Szymon Duchniewicz <[email protected]>
  • Loading branch information
Willmish committed Sep 23, 2024
1 parent 1a2986b commit fa8cf23
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion llm_unlearn_ucl/unlearn_harm.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,14 +215,15 @@ def main(args) -> None:
args.retaining_dataset = "truthfulqa/truthful_qa"
train_normal_dataset, normal_sample_path = make_dataset(
args.retaining_dataset,
args.samples_count if args.sequential != -1 else None,
args.shuffle_seed,
save_dir=args.samples_save_dir,
)

train_normal_loaders = DataloaderConstructor(
train_normal_dataset,
args.retaining_dataset,
num_samples=None if args.sequential == -1 else args.samples_count,
max_sample_length=args.max_sample_length,
batch_size=args.batch_size,
tokenizer=tokenizer,
num_splits=max(args.sequential, 1),
Expand Down

0 comments on commit fa8cf23

Please sign in to comment.