Skip to content
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

fix data splitting #59

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/zeroband/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ def train(config: Config):

train_dataloader = get_dataloader(
tokenizer=tokenizer,
world_size=world_info.world_size,
rank=world_info.rank,
world_size=world_info.world_size * world_info.global_world_size,
rank=world_info.rank + world_info.global_rank * world_info.global_world_size,
Comment on lines +118 to +119
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really a bug. You now need to set data.data_rank and data.data_world_size in order for the splitting between diloco workers. My bad for not putting it in the README :(

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gotcha forget about it

batch_size=config.train.micro_bs,
pad_token_id=0 if config.type_model == "llama3" else tokenizer.pad_token_id,
data_config=config.data,
Expand Down