ColossalAI icon indicating copy to clipboard operation
ColossalAI copied to clipboard

[BUG]: 在 interleaved pipeline schedule 情况下,模型训练 loss 不下降

Open huangting4201 opened this issue 3 years ago • 4 comments

🐛 Describe the bug

在world_size=8, data_parallel_size=4, pipeline_parallel_size=2, num_chunks=1的设置下,模型训练正常,loss也能正常下降。

但是当设置world_size=8, data_parallel_size=4, pipeline_parallel_size=2, num_chunks=2时,模型训练时,loss一直不下降,如下图所示: 企业微信截图_e7d7f151-6c87-45de-b0bc-7fbc3f6d2b23

不知道是否与 interleaved pipeline schedule 的相关实现逻辑有关,请帮忙解答一下,非常感谢!

Environment

  • Linux OS
  • Python == 3.10
  • GCC == 10.2.0
  • MPFR == 4.1.0
  • CUDA == 11.7
  • Pytorch == 1.13.1
  • Transformers == 4.28.0
  • Flash-Attention == v1.0.5
  • Apex == 23.05

huangting4201 avatar Jul 28 '23 07:07 huangting4201

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Title: [BUG]: In the case of interleaved pipeline schedule, the model training loss does not decrease

🐛 Describe the bug

Under the settings of world_size=8, data_parallel_size=4, pipeline_parallel_size=2, num_chunks=1, the model training is normal, and the loss can also decrease normally.

However, when setting world_size=8, data_parallel_size=4, pipeline_parallel_size=2, num_chunks=2, the loss does not decrease during model training, as shown in the figure below: Enterprise WeChat screenshot_e7d7f151-6c87-45de-b0bc-7fbc3f6d2b23

I don't know whether it is related to the implementation logic of the interleaved pipeline schedule, please help to answer, thank you very much!

Environment

  • Linux OS
  • Python == 3.10
  • GCC==10.2.0 -MPFR==4.1.0 -CUDA==11.7 -Pytorch==1.13.1
  • Transformers == 4.28.0
  • Flash-Attention == v1.0.5
  • Apex == 23.05

Issues-translate-bot avatar Jul 28 '23 07:07 Issues-translate-bot

🐛 Describe the bug

在world_size=8, data_parallel_size=4, pipeline_parallel_size=2, num_chunks=1的设置下,模型训练正常,loss也能正常下降。

但是当设置world_size=8, data_parallel_size=4, pipeline_parallel_size=2, num_chunks=2时,模型训练时,loss一直不下降,如下图所示: 企业微信截图_e7d7f151-6c87-45de-b0bc-7fbc3f6d2b23

不知道是否与 interleaved pipeline schedule 的相关实现逻辑有关,请帮忙解答一下,非常感谢!

Environment

  • Linux OS
  • Python == 3.10
  • GCC == 10.2.0
  • MPFR == 4.1.0
  • CUDA == 11.7
  • Pytorch == 1.13.1
  • Transformers == 4.28.0
  • Flash-Attention == v1.0.5
  • Apex == 23.05 Thank you for the feedback. We will pay attention to this issue. If you have any more questions or need further assistance, feel free to ask.

flybird11111 avatar Aug 09 '23 06:08 flybird11111

Hi, thanks for reporting this, and sorry it went unanswered for so long. We're going through older issues and closing the ones that no longer apply to the current codebase. It was reported against PyTorch 1.13.1, which current ColossalAI no longer supports (PyTorch 2.x is required). We're marking it as stale and will close it in 14 days. If you still see this problem with the latest ColossalAI on PyTorch 2.x, please comment here (or open a new issue) with your environment and a minimal reproduction, and we'll take a look.

JazyJiang avatar Oct 22 '26 06:10 JazyJiang

Closing this issue since there has been no response in the 14 days after it was marked as stale. If you still run into this problem with the latest ColossalAI on PyTorch 2.x, please open a new issue using the bug report template, with your environment and a minimal reproduction.

JazyJiang avatar Nov 05 '26 03:11 JazyJiang