Skip to content

[CB] Fix seqlens and use TypedDict#46593

Merged
remi-or merged 9 commits into
mainfrom
cb-fix-seqlens
Jun 13, 2026
Merged

[CB] Fix seqlens and use TypedDict#46593
remi-or merged 9 commits into
mainfrom
cb-fix-seqlens

Conversation

@remi-or

@remi-or remi-or commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

This PR fixes a race condition where the cumulative_seqlens tensors would be padded on the device during their transfer. It seems the bug did not happen often in a non-distributed setting, but it appeared when running the continuous batching overall script in DP 8. It is now fixed: the padding happens before the tensor is constructed and moved to the device.

This PR also removes the @dataclass decorator that was used to define PagedAttentionArgs in favor of a TypedDict, which is cleaner.

Performance ✅

No performance changes

Tests ✅

All tests pass.

AI Review ✅

Reviewed by claude

@remi-or remi-or self-assigned this Jun 12, 2026
@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@remi-or remi-or moved this from Backlog to In review in Continuous batching Jun 12, 2026
@remi-or remi-or enabled auto-merge June 13, 2026 04:27
@remi-or remi-or added this pull request to the merge queue Jun 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor

CI Dashboard: View test results in Grafana

Merged via the queue into main with commit 08a7ef0 Jun 13, 2026
121 checks passed
@remi-or remi-or deleted the cb-fix-seqlens branch June 13, 2026 04:52
@github-project-automation github-project-automation Bot moved this from In review to Done in Continuous batching Jun 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants