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

Distill BLOOM - tentative 2 #354

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

younesbelkada
Copy link

Tentative of applying teacher student using Megatron-DeepSpeed

WIP draft PR - not supposed to merge

cc @thomasw21

self.alibi = self.alibi.to(torch.bfloat16)
else:
self.alibi = None
@torch.no_grad()
Copy link
Author

Choose a reason for hiding this comment

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

nuke this

@@ -30,6 +41,9 @@ def _get_params_for_weight_decay_optimization(modules):

weight_decay_params = {'params': []}
no_weight_decay_params = {'params': [], 'weight_decay': 0.0}

modules = _filter_for_teacher_student(modules)

for module in modules:
Copy link
Author

Choose a reason for hiding this comment

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

Can we do the filtering on the for loop

  • check before the fist if - if it is a Student module
  • check also with isinstance instead of class name


for module in modules:
for module_ in module.modules():
if "Student" in module_.__class__.__name__:
Copy link
Author

Choose a reason for hiding this comment

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

Use isinstance instead

# transformer layer
if args.pp_partition_method is not None:
partition_method = args.pp_partition_method
else:
partition_method = 'type:transformer'


from deepspeed.runtime.pipe.topology import PipeModelDataParallelTopology
Copy link
Author

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant