| route-pattern | /:user_id/:repository/tree/*name(/*path) |
| route-controller | files |
| route-action | disambiguate |
| fetch-nonce | v2:37cf5ef4-4258-38d9-44ba-06dafc630523 |
| current-catalog-service-hash | f3abb0cc802f3d7b95fc8762b94bdcb13bf39634c40c357301c4aa1d67a256fb |
| request-id | C346:475D7:91D809:C5E539:6A4D6F17 |
| html-safe-nonce | 945d3bb7b90b27faf45e924faaff0176b842e4a74d4e892b145f5e563dec541c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMzQ2OjQ3NUQ3OjkxRDgwOTpDNUU1Mzk6NkE0RDZGMTciLCJ2aXNpdG9yX2lkIjoiNDMyODI0ODcxMTU5NzM1NDc3NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 8ea42df73ea2a8b172f1d6c227ec278fdb6d501d94904d7b7f83f0b50784663c |
| hovercard-subject-tag | repository:510932042 |
| github-keyboard-shortcuts | repository,source-code,file-tree,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | ///files/disambiguate |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/samadejacobs/DeepSpeedExamples/tree/master/HelloDeepSpeed |
| twitter:image | https://opengraph.githubassets.com/27b4710cf7fa95a90856d840988b5c9e22d772cd2fc6b98f2ef3957f64d3dfbc/samadejacobs/DeepSpeedExamples |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/27b4710cf7fa95a90856d840988b5c9e22d772cd2fc6b98f2ef3957f64d3dfbc/samadejacobs/DeepSpeedExamples |
| og:image:alt | Example models using DeepSpeed. Contribute to samadejacobs/DeepSpeedExamples development by creating an account on GitHub. |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | c78260c7b3f4ac4b0356c8208537f05406a3a2d46a9ec3f735b372dcc519c39e |
| turbo-cache-control | no-cache |
| go-import | github.com/samadejacobs/DeepSpeedExamples git https://github.com/samadejacobs/DeepSpeedExamples.git |
| octolytics-dimension-user_id | 16696152 |
| octolytics-dimension-user_login | samadejacobs |
| octolytics-dimension-repository_id | 510932042 |
| octolytics-dimension-repository_nwo | samadejacobs/DeepSpeedExamples |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | true |
| octolytics-dimension-repository_parent_id | 237085793 |
| octolytics-dimension-repository_parent_nwo | deepspeedai/DeepSpeedExamples |
| octolytics-dimension-repository_network_root_id | 237085793 |
| octolytics-dimension-repository_network_root_nwo | deepspeedai/DeepSpeedExamples |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 399fff412f48461d435721c009efc17ea44be72f |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| Skip to content | https://github.com/samadejacobs/DeepSpeedExamples/tree/master/HelloDeepSpeed#start-of-content |
|
| https://github.com/ |
|
Sign in
| https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsamadejacobs%2FDeepSpeedExamples%2Ftree%2Fmaster%2FHelloDeepSpeed |
| GitHub CopilotWrite better code with AI | https://github.com/features/copilot |
| GitHub Copilot appDirect agents from issue to merge | https://github.com/features/ai/github-app |
| MCP RegistryNewIntegrate external tools | https://github.com/mcp |
| ActionsAutomate any workflow | https://github.com/features/actions |
| CodespacesInstant dev environments | https://github.com/features/codespaces |
| IssuesPlan and track work | https://github.com/features/issues |
| Code ReviewManage code changes | https://github.com/features/code-review |
| GitHub Advanced SecurityFind and fix vulnerabilities | https://github.com/security/advanced-security |
| Code securitySecure your code as you build | https://github.com/security/advanced-security/code-security |
| Secret protectionStop leaks before they start | https://github.com/security/advanced-security/secret-protection |
| Why GitHub | https://github.com/why-github |
| Documentation | https://docs.github.com |
| Blog | https://github.blog |
| Changelog | https://github.blog/changelog |
| Marketplace | https://github.com/marketplace |
| View all features | https://github.com/features |
| Enterprises | https://github.com/enterprise |
| Small and medium teams | https://github.com/team |
| Startups | https://github.com/enterprise/startups |
| Nonprofits | https://github.com/solutions/industry/nonprofits |
| App Modernization | https://github.com/solutions/use-case/app-modernization |
| DevSecOps | https://github.com/solutions/use-case/devsecops |
| DevOps | https://github.com/solutions/use-case/devops |
| CI/CD | https://github.com/solutions/use-case/ci-cd |
| View all use cases | https://github.com/solutions/use-case |
| Healthcare | https://github.com/solutions/industry/healthcare |
| Financial services | https://github.com/solutions/industry/financial-services |
| Manufacturing | https://github.com/solutions/industry/manufacturing |
| Government | https://github.com/solutions/industry/government |
| View all industries | https://github.com/solutions/industry |
| View all solutions | https://github.com/solutions |
| AI | https://github.com/resources/articles?topic=ai |
| Software Development | https://github.com/resources/articles?topic=software-development |
| DevOps | https://github.com/resources/articles?topic=devops |
| Security | https://github.com/resources/articles?topic=security |
| View all topics | https://github.com/resources/articles |
| Customer stories | https://github.com/customer-stories |
| Events & webinars | https://github.com/resources/events |
| Ebooks & reports | https://github.com/resources/whitepapers |
| Business insights | https://github.com/solutions/executive-insights |
| GitHub Skills | https://skills.github.com |
| Documentation | https://docs.github.com |
| Customer support | https://support.github.com |
| Community forum | https://github.com/orgs/community/discussions |
| Trust center | https://github.com/trust-center |
| Partners | https://github.com/partners |
| View all resources | https://github.com/resources |
| GitHub SponsorsFund open source developers | https://github.com/sponsors |
| Security Lab | https://securitylab.github.com |
| Maintainer Community | https://maintainers.github.com |
| Accelerator | https://github.com/accelerator |
| GitHub Stars | https://stars.github.com |
| Archive Program | https://archiveprogram.github.com |
| Topics | https://github.com/topics |
| Trending | https://github.com/trending |
| Collections | https://github.com/collections |
| Enterprise platformAI-powered developer platform | https://github.com/enterprise |
| GitHub Advanced SecurityEnterprise-grade security features | https://github.com/security/advanced-security |
| Copilot for BusinessEnterprise-grade AI features | https://github.com/features/copilot/copilot-business |
| Premium SupportEnterprise-grade 24/7 support | https://github.com/premium-support |
| Pricing | https://github.com/pricing |
| Search syntax tips | https://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax |
| documentation | https://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax |
|
Sign in
| https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsamadejacobs%2FDeepSpeedExamples%2Ftree%2Fmaster%2FHelloDeepSpeed |
|
Sign up
| https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Ffiles%2Fdisambiguate&source=header-repo&source_repo=samadejacobs%2FDeepSpeedExamples |
| Reload | https://github.com/samadejacobs/DeepSpeedExamples/tree/master/HelloDeepSpeed |
| Reload | https://github.com/samadejacobs/DeepSpeedExamples/tree/master/HelloDeepSpeed |
| Reload | https://github.com/samadejacobs/DeepSpeedExamples/tree/master/HelloDeepSpeed |
|
samadejacobs
| https://github.com/samadejacobs |
| DeepSpeedExamples | https://github.com/samadejacobs/DeepSpeedExamples |
| deepspeedai/DeepSpeedExamples | https://github.com/deepspeedai/DeepSpeedExamples |
|
Notifications
| https://github.com/login?return_to=%2Fsamadejacobs%2FDeepSpeedExamples |
|
Fork
0
| https://github.com/login?return_to=%2Fsamadejacobs%2FDeepSpeedExamples |
|
Star
0
| https://github.com/login?return_to=%2Fsamadejacobs%2FDeepSpeedExamples |
|
Code
| https://github.com/samadejacobs/DeepSpeedExamples |
|
Pull requests
0
| https://github.com/samadejacobs/DeepSpeedExamples/pulls |
|
Actions
| https://github.com/samadejacobs/DeepSpeedExamples/actions |
|
Projects
| https://github.com/samadejacobs/DeepSpeedExamples/projects |
|
Security and quality
0
| https://github.com/samadejacobs/DeepSpeedExamples/security |
|
Insights
| https://github.com/samadejacobs/DeepSpeedExamples/pulse |
|
Code
| https://github.com/samadejacobs/DeepSpeedExamples |
|
Pull requests
| https://github.com/samadejacobs/DeepSpeedExamples/pulls |
|
Actions
| https://github.com/samadejacobs/DeepSpeedExamples/actions |
|
Projects
| https://github.com/samadejacobs/DeepSpeedExamples/projects |
|
Security and quality
| https://github.com/samadejacobs/DeepSpeedExamples/security |
|
Insights
| https://github.com/samadejacobs/DeepSpeedExamples/pulse |
| https://github.com/samadejacobs/DeepSpeedExamples |
| DeepSpeedExamples | https://github.com/samadejacobs/DeepSpeedExamples/tree/master |
| History | https://github.com/samadejacobs/DeepSpeedExamples/commits/master/HelloDeepSpeed |
| https://github.com/samadejacobs/DeepSpeedExamples/commits/master/HelloDeepSpeed |
| DeepSpeedExamples | https://github.com/samadejacobs/DeepSpeedExamples/tree/master |
| .. | https://github.com/samadejacobs/DeepSpeedExamples/tree/master |
| tests | https://github.com/samadejacobs/DeepSpeedExamples/tree/master/HelloDeepSpeed/tests |
| tests | https://github.com/samadejacobs/DeepSpeedExamples/tree/master/HelloDeepSpeed/tests |
| README.md | https://github.com/samadejacobs/DeepSpeedExamples/blob/master/HelloDeepSpeed/README.md |
| README.md | https://github.com/samadejacobs/DeepSpeedExamples/blob/master/HelloDeepSpeed/README.md |
| requirements.txt | https://github.com/samadejacobs/DeepSpeedExamples/blob/master/HelloDeepSpeed/requirements.txt |
| requirements.txt | https://github.com/samadejacobs/DeepSpeedExamples/blob/master/HelloDeepSpeed/requirements.txt |
| train_bert.py | https://github.com/samadejacobs/DeepSpeedExamples/blob/master/HelloDeepSpeed/train_bert.py |
| train_bert.py | https://github.com/samadejacobs/DeepSpeedExamples/blob/master/HelloDeepSpeed/train_bert.py |
| train_bert_ds.py | https://github.com/samadejacobs/DeepSpeedExamples/blob/master/HelloDeepSpeed/train_bert_ds.py |
| train_bert_ds.py | https://github.com/samadejacobs/DeepSpeedExamples/blob/master/HelloDeepSpeed/train_bert_ds.py |
| README.md | https://github.com/samadejacobs/DeepSpeedExamples/tree/master/HelloDeepSpeed#readme |
| https://github.com/samadejacobs/DeepSpeedExamples/tree/master/HelloDeepSpeed#training-a-masked-language-model-with-pytorch-and-deepspeed |
| https://github.com/samadejacobs/DeepSpeedExamples/tree/master/HelloDeepSpeed#table-of-contents |
| (1) Training a Transformer Encoder (BERT / Roberta) model for MLM | https://github.com/samadejacobs/DeepSpeedExamples/tree/master/HelloDeepSpeed#1-training-a-transformer-encoder-bert--roberta-model-for-mlm |
| 1.0 Some Good Practices | https://github.com/samadejacobs/DeepSpeedExamples/tree/master/HelloDeepSpeed#10-some-good-practices |
| 1.1 The Masked Language Modeling Task | https://github.com/samadejacobs/DeepSpeedExamples/tree/master/HelloDeepSpeed#11-the-masked-language-modeling-task |
| 1.2 Creating a Transformer model | https://github.com/samadejacobs/DeepSpeedExamples/tree/master/HelloDeepSpeed#12-creating-a-transformer-model |
| 1.3 Training the Model | https://github.com/samadejacobs/DeepSpeedExamples/tree/master/HelloDeepSpeed#13-training-the-model |
| (2) Integrating DeepSpeed For More Efficient Training | https://github.com/samadejacobs/DeepSpeedExamples/tree/master/HelloDeepSpeed#2-integrating-deepspeed-for-more-efficient-training |
| 2.0 Core DeepSpeed Code Changes | https://github.com/samadejacobs/DeepSpeedExamples/tree/master/HelloDeepSpeed#20-core-deepspeed-code-changes |
| 2.1 Launching Training | https://github.com/samadejacobs/DeepSpeedExamples/tree/master/HelloDeepSpeed#21-launching-training |
| 2.2 Mixed Precision Training (fp16) | https://github.com/samadejacobs/DeepSpeedExamples/tree/master/HelloDeepSpeed#22-mixed-precision-training-fp16 |
| 2.3 Zero Redundancy Optimizer (ZeRO) | https://github.com/samadejacobs/DeepSpeedExamples/tree/master/HelloDeepSpeed#23-zero-redundancy-optimizer-zero |
| References | https://github.com/samadejacobs/DeepSpeedExamples/tree/master/HelloDeepSpeed#references |
| https://github.com/samadejacobs/DeepSpeedExamples/tree/master/HelloDeepSpeed#1-training-a-transformer-encoder-bert--roberta-model-for-mlm |
| https://github.com/samadejacobs/DeepSpeedExamples/tree/master/HelloDeepSpeed#10-some-good-practices |
| https://github.com/samadejacobs/DeepSpeedExamples/tree/master/HelloDeepSpeed#version-control-and-reproducibility |
| here | https://pytorch.org/docs/stable/notes/randomness.html?highlight=reproducibility |
| https://github.com/samadejacobs/DeepSpeedExamples/tree/master/HelloDeepSpeed#writing-unit-tests |
| here | https://github.com/samadejacobs/DeepSpeedExamples/blob/master/HelloDeepSpeed/tests/test_train_bert.py |
| https://github.com/samadejacobs/DeepSpeedExamples/tree/master/HelloDeepSpeed#11-the-masked-language-modeling-task |
| wikitext-2-v1 | https://huggingface.co/datasets/wikitext |
| HuggingFace datasets | https://github.com/huggingface/datasets |
| train_bert.py | https://github.com/samadejacobs/DeepSpeedExamples/blob/master/HelloDeepSpeed/train_bert.py |
| https://github.com/samadejacobs/DeepSpeedExamples/tree/master/HelloDeepSpeed#12-creating-a-transformer-model |
| train_bert.py | https://github.com/samadejacobs/DeepSpeedExamples/blob/master/HelloDeepSpeed/train_bert.py |
| 3 | https://github.com/samadejacobs/DeepSpeedExamples/tree/master/HelloDeepSpeed#3 |
| 1 | https://github.com/samadejacobs/DeepSpeedExamples/tree/master/HelloDeepSpeed#1 |
| 2 | https://github.com/samadejacobs/DeepSpeedExamples/tree/master/HelloDeepSpeed#2 |
| this | https://nlp.seas.harvard.edu/2018/04/03/attention.html |
| this | https://jalammar.github.io/illustrated-bert/ |
| this | https://jalammar.github.io/illustrated-transformer/ |
| https://github.com/samadejacobs/DeepSpeedExamples/tree/master/HelloDeepSpeed#13-training-the-model |
| https://github.com/samadejacobs/DeepSpeedExamples/tree/master/HelloDeepSpeed#2-integrating-deepspeed-for-more-efficient-training |
| https://github.com/samadejacobs/DeepSpeedExamples/tree/master/HelloDeepSpeed#20-core-deepspeed-code-changes |
| Writing DeepSpeed Models | https://www.deepspeed.ai/getting-started/#writing-deepspeed-models |
| DeepSpeed API documentation | https://deepspeed.readthedocs.io/en/latest/ |
| config JSON documentation | https://www.deepspeed.ai/docs/config-json/ |
| https://github.com/samadejacobs/DeepSpeedExamples/tree/master/HelloDeepSpeed#add-deepspeedinitialize--config |
| deepspeed.initialize API documentation | https://deepspeed.readthedocs.io/en/latest/initialize.html#training-initialization |
| train_bert.py | https://github.com/samadejacobs/DeepSpeedExamples/blob/master/HelloDeepSpeed/train_bert.py |
| https://github.com/samadejacobs/DeepSpeedExamples/tree/master/HelloDeepSpeed#update-the-training-loop |
| https://github.com/samadejacobs/DeepSpeedExamples/tree/master/HelloDeepSpeed#update-checkpoint-save-and-load |
| model checkpoint API documentation | https://deepspeed.readthedocs.io/en/latest/model-checkpointing.html |
| https://github.com/samadejacobs/DeepSpeedExamples/tree/master/HelloDeepSpeed#21-launching-training |
| more details about the DeepSpeed launcher | https://www.deepspeed.ai/getting-started/#launching-deepspeed-training |
| https://github.com/samadejacobs/DeepSpeedExamples/tree/master/HelloDeepSpeed#22-mixed-precision-training-fp16 |
| [3] | https://arxiv.org/pdf/1710.03740v3.pdf |
| fp16 training options | https://www.deepspeed.ai/docs/config-json/#fp16-training-options |
| [3] | https://arxiv.org/pdf/1710.03740v3.pdf |
| Tips for Optimizing GPU Performance Using Tensor Cores | https://developer.nvidia.com/blog/optimizing-gpu-performance-tensor-cores/ |
| [3] | https://arxiv.org/pdf/1710.03740v3.pdf |
| https://github.com/samadejacobs/DeepSpeedExamples/tree/master/HelloDeepSpeed#23-zero-redundancy-optimizer-zero |
| tutorial deep diving ZeRO | https://www.deepspeed.ai/tutorials/zero/ |
| tutorial deep diving ZeRO Offload | https://www.deepspeed.ai/tutorials/zero-offload/ |
| 4 | https://arxiv.org/pdf/1910.02054.pdf |
| 5 | https://www.usenix.org/system/files/atc21-ren-jie.pdf |
| 6 | https://arxiv.org/abs/2104.07857 |
| ZeRO optimizations | https://www.deepspeed.ai/docs/config-json/#zero-optimizations-for-fp16-training |
| https://github.com/samadejacobs/DeepSpeedExamples/tree/master/HelloDeepSpeed#references |
| Vaswani et al. Attention is all you need.
In Proceedings of the 31st International Conference on Neural Information Processing Systems (NIPS'17) | https://arxiv.org/pdf/1706.03762.pdf |
| J. Devlin et al. BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (NAACL-HLT'19) | https://aclanthology.org/N19-1423.pdf |
| P. Micikevicius et al. Mixed Precision Training (ICLR'18) | https://arxiv.org/pdf/1710.03740v3.pdf |
| S. Rajbhandari, J. Rasley, O. Ruwase, Y. He. ZeRO: memory optimizations toward training trillion parameter models. (SC‘20) | https://arxiv.org/pdf/1910.02054.pdf |
| J. Ren, S. Rajbhandari, R. Aminabadi, O. Ruwase, S. Yang, M. Zhang, D. Li, Y. He. ZeRO-Offload: Democratizing Billion-Scale Model Training. (ATC'21) | https://www.usenix.org/system/files/atc21-ren-jie.pdf |
| S. Rajbhandari, O. Ruwase, J. Rasley, S. Smith, Y. He. ZeRO-Infinity: Breaking the GPU Memory Wall for Extreme Scale Deep Learning (SC'21) | https://arxiv.org/abs/2104.07857 |
|
| https://github.com |
| Terms | https://docs.github.com/site-policy/github-terms/github-terms-of-service |
| Privacy | https://docs.github.com/site-policy/privacy-policies/github-privacy-statement |
| Security | https://github.com/security |
| Status | https://www.githubstatus.com/ |
| Community | https://github.community/ |
| Docs | https://docs.github.com/ |
| Contact | https://support.github.com?tags=dotcom-footer |