Skip to content

Commit

Permalink
Merge pull request FlagAI-Open#27 from baai-open-internal/develop
Browse files Browse the repository at this point in the history
merge flagi  into internal develop
  • Loading branch information
marscrazy authored Jul 20, 2022
2 parents cd45e5c + 06f0b69 commit deaa120
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
1 change: 0 additions & 1 deletion flagai/auto_model/auto_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ def __getattr__(self, name):
"opt-13b-en": ["flagai.data.tokenizer.opt.opt_en_tokenizer","OPTTokenizer"],
"opt-30b-en": ["flagai.data.tokenizer.opt.opt_en_tokenizer","OPTTokenizer"],
"opt-66b-en": ["flagai.data.tokenizer.opt.opt_en_tokenizer","OPTTokenizer"],

}

class AutoLoader:
Expand Down
10 changes: 3 additions & 7 deletions flagai/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,10 +319,6 @@ def get_dataloader(self, dataset, collate_fn, shuffle=False):
shuffle=shuffle)
else:
if self.env_type == 'deepspeed+mpu':
# num_replicas = self.world_size // mpu.get_model_parallel_world_size(
# )
# rank = self.rank // mpu.get_model_parallel_world_size()
# rank = mpu.get_model_parallel_rank()
rank = mpu.get_model_parallel_src_rank()
print("*"*80)
print("local rank",self.rank, "model rank", rank)
Expand Down Expand Up @@ -941,9 +937,9 @@ def evaluate(self,
labels = data_iterator['labels']
else:
labels = data_iterator['target_ids']

all_logits.append(logits)
all_labels.append(labels)
if len(self.metric_methods) != 0:
all_logits.append(logits)
all_labels.append(labels)
all_losses.append(lm_loss.view(1))

if len(self.metric_methods) != 0:
Expand Down

0 comments on commit deaa120

Please sign in to comment.