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
{{ message }}
Repository navigation
Commit 52990f6
Browse filesBrowse the repository at this point in the historyBrowse files
Give stock HF attention the boundaries HF derives: each pad token on its own
real_max_seqlen dropped the pad segment from max_length while cu_seqlens still
carried it as one segment of up to 127 tokens; FlashAttention leaves rows past
max_length unwritten, so pad rows could get uninitialized outputs and
gradients. hf_attention_packing_kwargs now passes the documents, then each
pad token as a 1-token segment, exactly what HF's position_ids path derives,
so the longest real document covers every segment. It is built on the device
from host lengths, without a sync. Qwen3.5 keeps get_batch's boundaries and
max_seqlen as on main.
Reported by claude[bot] on #4316.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
0 commit comments