Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Dataset Performance] Add num workers on dataset processing - labels,…
… tokenization (#1189) SUMMARY: * Add `preprocessing_num_workers` to run dataset processing in parallel for 2:4 example. Before: Tokenizing: 371.12 examples/s, Adding labels: 1890.18 examples/s, Tokenizing: 333.39 examples/s ```bash Tokenizing: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 12802/12802 [00:34<00:00, 371.12 examples/s] Adding labels: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████| 12802/12802 [00:06<00:00, 1890.18 examples/s] Tokenizing: 9%|█████████▌ | 22077/256032 [00:59<11:41, 333.39 examples/s ``` After (num_proc=8): Tokenizing: 2703.93 examples/s, Adding labels: 5524.98 examples/s, Tokenizing: 2925.98 examples/s ```bash Tokenizing (num_proc=8): 100%|██████████████████████████████████████████████████████████████████████████████████████████████████| 12802/12802 [00:04<00:00, 2703.93 examples/s] Adding labels (num_proc=8): 100%|███████████████████████████████████████████████████████████████████████████████████████████████| 12802/12802 [00:02<00:00, 5524.98 examples/s] Tokenizing (num_proc=8): 100%|████████████████████████████████████████████████████████████████████████████████████████████████| 256032/256032 [01:27<00:00, 2925.98 examples/s] ``` TEST PLAN: * Pass existing tests Co-authored-by: Dipika Sikka <[email protected]>
- Loading branch information