You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am facing this issue while using zigzag_ring_attn with 128k context length. Has anyone run into the same problem?
[rank0]: File "/app/c2j-long-context-model-training/EasyContext/easy_context/zigzag_ring_attn/monkey_patch.py", line 69, in new_decoder_forward
[rank0]: hidden_states, self_attn_weights, present_key_value = self.self_attn(
[rank0]: File "/opt/conda/envs/ai/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
[rank0]: return self._call_impl(*args, **kwargs)
[rank0]: File "/opt/conda/envs/ai/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1603, in _call_impl
[rank0]: result = forward_call(*args, **kwargs)
[rank0]: File "/opt/conda/envs/ai/lib/python3.10/site-packages/transformers/models/llama/modeling_llama.py", line 469, in forward
[rank0]: attn_output = self._flash_attention_forward(
[rank0]: File "/app/c2j-long-context-model-training/EasyContext/easy_context/zigzag_ring_attn/monkey_patch.py", line 29, in new_flash_attn_forward
[rank0]: attn_output = zigzag_ring_flash_attn_func(
[rank0]: File "/opt/conda/envs/ai/lib/python3.10/site-packages/ring_flash_attn/zigzag_ring_flash_attn.py", line 312, in zigzag_ring_flash_attn_func
[rank0]: return ZigZagRingFlashAttnFunc.apply(
[rank0]: File "/opt/conda/envs/ai/lib/python3.10/site-packages/torch/autograd/function.py", line 574, in apply
[rank0]: return super().apply(*args, **kwargs) # type: ignore[misc]
[rank0]: File "/opt/conda/envs/ai/lib/python3.10/site-packages/ring_flash_attn/zigzag_ring_flash_attn.py", line 202, in forward
[rank0]: out, softmax_lse = zigzag_ring_flash_attn_forward(
[rank0]: File "/opt/conda/envs/ai/lib/python3.10/site-packages/ring_flash_attn/zigzag_ring_flash_attn.py", line 59, in zigzag_ring_flash_attn_forward
[rank0]: out, lse = update_out_and_lse(
[rank0]: File "/opt/conda/envs/ai/lib/python3.10/site-packages/ring_flash_attn/utils.py", line 44, in update_out_and_lse
[rank0]: slice_out, slice_lse = _update_out_and_lse(
[rank0]: RuntimeError: The following operation failed in the TorchScript interpreter.
[rank0]: Traceback of TorchScript (most recent call last):
[rank0]: File "/opt/conda/envs/ai/lib/python3.10/site-packages/ring_flash_attn/utils.py", line 24, in _update_out_and_lse
[rank0]: # For additional context and discussion, please refer to:
[rank0]: # https://github.com/zhuzilin/ring-flash-attention/pull/34#issuecomment-2076126795
[rank0]: out = out - F.sigmoid(block_lse - lse) * (out - block_out)
[rank0]: ~~~~~~~~~ <--- HERE
[rank0]: lse = lse - F.logsigmoid(lse - block_lse)
[rank0]: File "/opt/conda/envs/ai/lib/python3.10/site-packages/torch/nn/functional.py", line 2013, in sigmoid
[rank0]: See :class:`~torch.nn.Sigmoid` for more details.
[rank0]: """
[rank0]: return input.sigmoid()
[rank0]: ~~~~~~~~~~~~~ <--- HERE
[rank0]: RuntimeError: CUDA error: an illegal memory access was encountered
The text was updated successfully, but these errors were encountered:
I am facing this issue while using
zigzag_ring_attn
with 128k context length. Has anyone run into the same problem?The text was updated successfully, but these errors were encountered: