-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move process_data arg into TrainingArgs
Signed-off-by: Michael Clifford <[email protected]>
- Loading branch information
1 parent
aefde0e
commit 9a7986a
Showing
4 changed files
with
28 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -282,8 +282,9 @@ run_training( | |
) | ||
|
||
``` | ||
Check failure on line 284 in README.md GitHub Actions / markdown-lintFenced code blocks should be surrounded by blank lines
|
||
## Example training with separate data pre-processing | ||
Check failure on line 285 in README.md GitHub Actions / markdown-lintHeadings should be surrounded by blank lines
|
||
|
||
If the machines above have shared storage, users can preprocess the training dataset a single time so that it can then be distributed to each machine with the following update: | ||
If the machines in the example above have shared storage, users can pre-process the training dataset a single time so that it can then be distributed to each machine by making the following updates. | ||
Check failure on line 287 in README.md GitHub Actions / markdown-lintTrailing spaces
|
||
|
||
```python | ||
from instructlab.training import ( | ||
|
@@ -295,6 +296,25 @@ from instructlab.training import ( | |
data_process as dp | ||
) | ||
|
||
training_args = TrainingArgs( | ||
# define data-specific arguments | ||
model_path = "ibm-granite/granite-7b-base", | ||
data_path = "path/to/dataset.jsonl", | ||
ckpt_output_dir = "data/saved_checkpoints", | ||
data_output_dir = "data/outputs", | ||
|
||
# define model-trianing parameters | ||
max_seq_len = 4096, | ||
max_batch_len = 60000, | ||
num_epochs = 10, | ||
effective_batch_size = 3840, | ||
save_samples = 250000, | ||
learning_rate = 2e-6, | ||
warmup_steps = 800, | ||
is_padding_free = True, # set this to true when using Granite-based models | ||
random_seed = 42, | ||
process_data = True, | ||
) | ||
... | ||
|
||
data_process_args = DataProcessArgs( | ||
|
@@ -309,6 +329,5 @@ dp.main(data_process_args) | |
run_training( | ||
torch_args=torchrun_args, | ||
train_args=training_args, | ||
process_data = False | ||
) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters