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

Code Cleanup #208

Closed
3 tasks done
sdtblck opened this issue Apr 5, 2021 · 1 comment
Closed
3 tasks done

Code Cleanup #208

sdtblck opened this issue Apr 5, 2021 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@sdtblck
Copy link
Contributor

sdtblck commented Apr 5, 2021

Basically want the code to be easier for new devs to get their head around. Some suggested steps we could take toward this:

  • refactor repo organisation (specifically which modules are in megatron/model/language_model.py / megatron/model/gpt2_model.py / megatron/model/transformer.py feels pretty arbitrary, I'd like the organisation here to be clearer so you can find the module you want more easily when making changes.)
  • Get rid of unused codepaths and reduce duplication. (I think there are some modules that are never used still, for example, the Pooler class in megatron/model/language_model.py`
  • Reduce complexity - if there's any way to de-spaghettify this code it should be done. E.G when instantiating a model without model parallel, we first call GPT2Model which then get_language_model which then calls TransformerLanguageModel which then calls ParallelTransformer... Dumb as hell.
@StellaAthena StellaAthena added the documentation Improvements or additions to documentation label Apr 5, 2021
@sdtblck
Copy link
Contributor Author

sdtblck commented Apr 30, 2021

I think with the latest pull from #269 we can call this done.

Lots of terrible megatron code has been removed, and we now have to maintain only a single model. Most unused codepaths are removed.

@sdtblck sdtblck closed this as completed Apr 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants