-
Notifications
You must be signed in to change notification settings - Fork 576
add finutuning with streaming dataset example #945
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 19 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
eb36d09
add convert
9b08490
fix
2a29831
fix convert
7ee3a60
add jsonl
7c4beed
revert setup
5316ca3
test precommit
447422f
pre-commit
bfe98bf
test pre-commit
20e0741
v0
ea2318d
Merge branch 'main' into add_finetuning_streaming_dataset_conversion
dakinggg 94ca4b9
Merge branch 'add_finetuning_streaming_dataset_conversion' into add_f…
bigning 2abac71
review comments
009f304
Merge branch 'main' into add_finetuning_streaming_dataset_conversion
bigning 428af78
merge
23fd10a
temporarily trigger test
13c4446
test
3f64a7f
fix yaml
af1e6c9
comments
9f63c87
Merge branch 'main' into add_finetuning_example_2
bigning 66b2746
comments
c07ed2d
Merge branch 'main' into add_finetuning_example_2
dakinggg 71c6925
comments
1320c16
Merge branch 'add_finetuning_example_2' of github.com:mosaicml/llm-fo…
f38ae6b
add unit test
c5bb036
Merge branch 'main' into add_finetuning_example_2
dakinggg f0cbcad
comments
c6eb5cc
Merge branch 'main' into add_finetuning_example_2
bigning File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
77 changes: 77 additions & 0 deletions
77
scripts/train/yamls/finetune/gpt2-arc-easy--cpu-streaming-dataset.yaml
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,77 @@ | ||
max_seq_len: 512 | ||
bigning marked this conversation as resolved.
Show resolved
Hide resolved
|
||
global_seed: 17 | ||
|
||
# Run Name | ||
run_name: # If left blank, will be read from env var $RUN_NAME | ||
|
||
# Model | ||
model: | ||
name: hf_causal_lm | ||
pretrained_model_name_or_path: gpt2 | ||
pretrained: true # false: only use the architecture; true: initialize with pretrained weights | ||
|
||
# Tokenizer | ||
tokenizer: | ||
name: gpt2 | ||
kwargs: | ||
model_max_length: ${max_seq_len} | ||
|
||
# Dataloaders | ||
train_loader: | ||
name: finetuning | ||
dataset: | ||
############ | ||
remote: /Users/ning.wang/projects/llm-foundry/scripts/data_prep/example_data/ | ||
bigning marked this conversation as resolved.
Show resolved
Hide resolved
|
||
local: /tmp/ | ||
split: train | ||
############ | ||
shuffle: true | ||
max_seq_len: ${max_seq_len} | ||
decoder_only_format: true | ||
drop_last: true | ||
num_workers: 8 | ||
|
||
# Optimization | ||
scheduler: | ||
name: cosine_with_warmup | ||
t_warmup: 100ba | ||
alpha_f: 0.1 | ||
|
||
optimizer: | ||
name: decoupled_adamw | ||
lr: 6.0e-4 | ||
betas: | ||
- 0.9 | ||
- 0.95 | ||
eps: 1.0e-08 | ||
weight_decay: 0.0 | ||
|
||
algorithms: | ||
gradient_clipping: | ||
clipping_type: norm | ||
clipping_threshold: 1.0 | ||
|
||
max_duration: 1ep | ||
eval_interval: 1 | ||
eval_first: false | ||
eval_subset_num_batches: -1 | ||
global_train_batch_size: 8 | ||
|
||
# System | ||
seed: ${global_seed} | ||
device_eval_batch_size: 8 | ||
device_train_microbatch_size: 8 | ||
# device_train_microbatch_size: auto | ||
precision: fp32 | ||
|
||
# Logging | ||
progress_bar: false | ||
log_to_console: true | ||
console_log_interval: 1ba | ||
|
||
callbacks: | ||
speed_monitor: | ||
window_size: 10 | ||
lr_monitor: {} | ||
memory_monitor: {} | ||
runtime_estimator: {} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.