-
Notifications
You must be signed in to change notification settings - Fork 700
Torchtitan changes to integrate into Verl #2333
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
base: main
Are you sure you want to change the base?
Changes from all commits
d1f6761
3e72875
82821c7
0d3f3c6
c08d6cd
8c8db22
047712b
e28ce31
e3a9eb5
2da51a3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -128,11 +128,15 @@ def __init__(self, job_config: JobConfig): | |
| else None | ||
| ) | ||
|
|
||
| self.dataloader = self.train_spec.build_dataloader_fn( | ||
| dp_world_size=batch_degree, | ||
| dp_rank=batch_rank, | ||
| tokenizer=self.tokenizer, | ||
| job_config=job_config, | ||
| self.dataloader = ( | ||
| self.train_spec.build_dataloader_fn( | ||
| dp_world_size=batch_degree, | ||
| dp_rank=batch_rank, | ||
| tokenizer=self.tokenizer, | ||
| job_config=job_config, | ||
| ) | ||
| if self.train_spec.build_dataloader_fn is not None | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. according to https://github.com/pytorch/torchtitan/blob/main/torchtitan/protocols/train_spec.py#L51, it can't be None I'm OK with type change, but you'll need to assert not None in torchtitan before it's used?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since we are using verl's dataloader, i don't want to initialize titan's dataloader(otherwise I will encounter loading c4 dataset error). I did a hack here https://github.com/verl-project/verl/pull/5051/changes#diff-f658afe18d14b480f4067f7544fbdb0ef6962a20ef3b5f5d0c709ae31e91809dR101 |
||
| else None | ||
| ) | ||
|
|
||
| # build model (using meta init) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If going this path, it means a lot of the setting in this function / config won't take effect. Shall we add a warning to users?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense, will add a warning. But I think this also means user initialize distributed env somewhere else with their own settings.