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 train pipeline #89

Merged
merged 6 commits into from
Jan 25, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix breaks in train_pipeline.py
  • Loading branch information
sdtblck committed Jan 23, 2021
commit b38bd8c0df16f2342a881a91acb37c9bfe5c8f3d
2 changes: 1 addition & 1 deletion scripts/train_gpt3small_pipeline.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
NCCL_SHM_DISABLE=1 NCCL_DEBUG=info MASTER_ADDR=127.0.0.1 MASTER_PORT=2000 deepspeed train_pipeline.py --deepspeed --deepspeed_config configs/deepspeed_zero2.json
MASTER_ADDR=127.0.0.1 MASTER_PORT=2000 deepspeed train_pipeline.py --deepspeed --deepspeed_config configs/deepspeed_zero2.json
6 changes: 3 additions & 3 deletions train_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
cycle, prepare_optimizer_parameters, decode_tokens, prepare_data,
GPTNeoX_Pipe)
from gpt_neox.datasets import GPT2Dataset
from gpt_neox.utils import is_main
from gpt_neox.data_utils import get_tokenizer
from gpt_neox.utils import is_main, get_args, get_params
import gpt_neox

WORLD_SIZE = os.getenv('WORLD_SIZE')
Expand Down Expand Up @@ -43,7 +44,7 @@ def loss_function(x, y):
depth=params["n_layers"],
heads=params["n_heads"],
dim_head=params["dim_head"],
loss_fn = loss_function,#torch.nn.CrossEntropyLoss(),
loss_fn = loss_function,
num_stages = params.get("pipeline_num_stages", 2)
)
model = AutoregressiveWrapper(model)
Expand All @@ -67,7 +68,6 @@ def loss_function(x, y):
seq_len=params["seq_len"],
train=True,
**dset_params)
train_loader = model_engine.deepspeed_io(train_dataset, pin_memory=params.get("pin_memory", False))

eval_dataset = GPT2Dataset(glob_pattern=dset_params["eval_path"],
seq_len=params["seq_len"],
Expand Down