About context parallel in Qwen-3.5 training
请问Qwen3.5的训练什么时候可以支持上下文并行呢
Megatron dev branch has supported BSHD/THD+CP, upgrade following deps:
pip install transformers==5.5.0 flash-linear-attention
pip install --no-deps git+https://github.com/NVIDIA/Megatron-LM.git@dev
pip install --force-reinstall git+https://github.com/ISEEKYAN/mbridge.git
源码更新megatron-LM版本到0.18.0rc0,mbridge版本为0.15.1,还是报不支持,请问是为啥呢
File "/usr/local/lib/python3.12/dist-packages/mbridge/core/auto_bridge.py", line 48, in from_config
return _MODEL_REGISTRY[model_type](hf_config, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/mbridge/core/bridge.py", line 54, in init
self.config = self._build_config()
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/mbridge/models/qwen3_5/qwen3_5_vl_bridge.py", line 194, in _build_config
return self._build_base_config(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/mbridge/core/llm_bridge.py", line 109, in _build_base_config
return self.TransformerConfigClass(**base_config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "
Any following update? Is CP usable now?
Any following update? Is CP usable now?
CP is still unusable
usable
I can use qwen35+ megatron+sglang with cp now,which megatron-core 0.18.0+a2d71539d. At the same time, you need to update mbridge, mbridge commit 1cd9ee984460e36f8ee5f35b8d20b30271bf3af5. Now i can use cp=8 with 128 H200.
usable
I can use qwen35+ megatron+sglang with cp now,which megatron-core 0.18.0+a2d71539d. At the same time, you need to update mbridge, mbridge commit 1cd9ee984460e36f8ee5f35b8d20b30271bf3af5. Now i can use cp=8 with 128 H200.
@tongruiliu I use the same versions of megatron-core and mbridge as yours, but when I train Qwen3.5-35B-A3B with both cp > 1 and pp > 1, the following error occurs. It seems there is something wrong when using both cp and pp together:
(TaskRunner pid=187523) ^^^^^^^^^^^^^^^^^^^^^^
(TaskRunner pid=187523) File "/usr/local/lib/python3.12/site-packages/megatron/core/pipeline_parallel/schedules.py", line 2403, in forward_backward_pipelining_without_interleaving
(TaskRunner pid=187523) output_tensor, num_tokens = forward_step(
(TaskRunner pid=187523) ^^^^^^^^^^^^^
(TaskRunner pid=187523) File "/usr/local/lib/python3.12/site-packages/megatron/core/pipeline_parallel/schedules.py", line 440, in forward_step
(TaskRunner pid=187523) output_tensor, loss_func = forward_step_func(data_iterator, model)
(TaskRunner pid=187523) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(TaskRunner pid=187523) File "/usr/local/lib/python3.12/site-packages/verl/workers/engine/megatron/transformer_impl.py", line 905, in forward_step
(TaskRunner pid=187523) output = forward_fn(
(TaskRunner pid=187523) ^^^^^^^^^^^
(TaskRunner pid=187523) File "/usr/local/lib/python3.12/site-packages/verl/models/mcore/model_forward.py", line 394, in gptmodel_forward_model_engine
(TaskRunner pid=187523) output = postprocess_bshd_engine(output_orig, attention_mask_bshd, post_process=post_process)
(TaskRunner pid=187523) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(TaskRunner pid=187523) File "/usr/local/lib/python3.12/site-packages/verl/models/mcore/util.py", line 640, in postprocess_bshd_engine
(TaskRunner pid=187523) assert output.shape[:2] == attention_mask.shape, (
(TaskRunner pid=187523) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(TaskRunner pid=187523) AssertionError: output.shape: torch.Size([155, 1, 2048]), attention_mask.shape: torch.Size([1, 310])
@MrYYYYYYYYYYY 你好 请问现在你可以用sgl + Megatron训练qwen3.5 a3b了吗?
- Megatron dev branch has supported BSHD/THD+CP, upgrade following deps: pip install transformers==5.5.0 flash-linear-attention pip install --no-deps git+https://github.com/NVIDIA/Megatron-LM.git@dev pip install --force-reinstall git+https://github.com/ISEEKYAN/mbridge.git
Could you please share the commit id of Megatron-LM and mbridge, which are installed in this way?