Skip to content

add sliding window to varlen - #172238

Closed
liangel-02 wants to merge 16 commits into
gh/liangel-02/4/basefrom
gh/liangel-02/4/head
Closed

liangel-02 wants to merge 16 commits into
gh/liangel-02/4/basefrom
gh/liangel-02/4/head

Conversation

@liangel-02

@liangel-02 liangel-02 commented Jan 12, 2026 •

Copy link
Copy Markdown
Contributor

original pr: #171578
adding sliding window attention to varlen_attn. modifying optional args to be positional instead for future proofing

Stack from ghstack (oldest at bottom):

cc @albanD @mruberry @jbschlosser @walterddr @mikaylagawarecki

[ghstack-poisoned]
@pytorch-bot

pytorch-bot Bot commented Jan 12, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/172238

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 5b80f9a with merge base fb5eb91 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

liangel-02 added a commit that referenced this pull request Jan 12, 2026
ghstack-source-id: af14778
Pull Request resolved: #172238
liangel-02 added a commit that referenced this pull request Jan 12, 2026
ghstack-source-id: cbab444
Pull Request resolved: #172238
@liangel-02 liangel-02 added the module: nn Related to torch.nn label Jan 12, 2026
@liangel-02
liangel-02 requested a review from drisspg January 12, 2026 18:20
original pr: #171578
adding sliding window attention to `varlen_attn`. modifying optional args to be positional instead for future proofing




[ghstack-poisoned]
liangel-02 added a commit that referenced this pull request Jan 12, 2026
deprecating `is_causal` flag since this can be expressed with `window_size = (-1, 0)`

Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):

* __->__ #172245
* #172238



[ghstack-poisoned]
liangel-02 added a commit that referenced this pull request Jan 12, 2026
deprecating `is_causal` flag since this can be expressed with `window_size = (-1, 0)`

Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):

* __->__ #172245
* #172238



[ghstack-poisoned]
@liangel-02 liangel-02 added suppress-bc-linter Suppresses the failures of API backward-compatibility linter (Lint/bc_linter) release notes: nn release notes category and removed module: nn Related to torch.nn labels Jan 12, 2026
@mikaylagawarecki
mikaylagawarecki removed their request for review January 12, 2026 21:38
Comment thread torch/nn/attention/varlen.py Resolved
Comment thread torch/nn/attention/varlen.py Resolved
@liangel-02 liangel-02 added topic: bc breaking topic category and removed suppress-bc-linter Suppresses the failures of API backward-compatibility linter (Lint/bc_linter) labels Jan 13, 2026
original pr: #171578
adding sliding window attention to `varlen_attn`. modifying optional args to be positional instead for future proofing




cc albanD mruberry jbschlosser walterddr mikaylagawarecki

[ghstack-poisoned]
liangel-02 added a commit that referenced this pull request Jan 13, 2026
deprecating `is_causal` flag in `varlen_attn` since this can be expressed with `window_size = (-1, 0)`

Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):

* __->__ #172245
* #172238



cc albanD mruberry jbschlosser walterddr mikaylagawarecki

[ghstack-poisoned]
liangel-02 added a commit that referenced this pull request Jan 13, 2026
deprecating `is_causal` flag in `varlen_attn` since this can be expressed with `window_size = (-1, 0)`

Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):

* __->__ #172245
* #172238



cc albanD mruberry jbschlosser walterddr mikaylagawarecki

[ghstack-poisoned]
original pr: #171578
adding sliding window attention to `varlen_attn`. modifying optional args to be positional instead for future proofing




cc albanD mruberry jbschlosser walterddr mikaylagawarecki

[ghstack-poisoned]
liangel-02 added a commit that referenced this pull request Jan 14, 2026
the `is_causal` flag is now deprecated in `varlen_attn`. to express causal attention, use `window_size = (-1, 0)`

Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):

* __->__ #172245
* #172238



cc albanD mruberry jbschlosser walterddr mikaylagawarecki

[ghstack-poisoned]
liangel-02 added a commit that referenced this pull request Jan 14, 2026
the `is_causal` flag is now deprecated in `varlen_attn`. to express causal attention, use `window_size = (-1, 0)`

Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):

* __->__ #172245
* #172238



cc albanD mruberry jbschlosser walterddr mikaylagawarecki

[ghstack-poisoned]
@liangel-02
liangel-02 requested a review from drisspg January 14, 2026 20:22
original pr: #171578
adding sliding window attention to `varlen_attn`. modifying optional args to be positional instead for future proofing




cc albanD mruberry jbschlosser walterddr mikaylagawarecki

[ghstack-poisoned]
liangel-02 added a commit that referenced this pull request Jan 15, 2026
the `is_causal` flag is now deprecated in `varlen_attn`. to express causal attention, use `window_size = (-1, 0)`

Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):

* __->__ #172245
* #172238



cc albanD mruberry jbschlosser walterddr mikaylagawarecki

[ghstack-poisoned]
liangel-02 added a commit that referenced this pull request Jan 15, 2026
the `is_causal` flag is now deprecated in `varlen_attn`. to express causal attention, use `window_size = (-1, 0)`

Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):

* __->__ #172245
* #172238



cc albanD mruberry jbschlosser walterddr mikaylagawarecki

[ghstack-poisoned]
@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Starting merge as part of PR stack under #172245

liangel-02 added a commit that referenced this pull request Jan 15, 2026
the `is_causal` flag is now deprecated in `varlen_attn`. to express causal attention, use `window_size = (-1, 0)`

Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):

* __->__ #172245
* #172238



cc albanD mruberry jbschlosser walterddr mikaylagawarecki

[ghstack-poisoned]
liangel-02 added a commit that referenced this pull request Jan 15, 2026
the `is_causal` flag is now deprecated in `varlen_attn`. to express causal attention, use `window_size = (-1, 0)`

Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):

* __->__ #172245
* #172238



cc albanD mruberry jbschlosser walterddr mikaylagawarecki

[ghstack-poisoned]
@liangel-02 liangel-02 added the ciflow/trunk Trigger trunk jobs on your pull request label Jan 15, 2026
original pr: #171578
adding sliding window attention to `varlen_attn`. modifying optional args to be positional instead for future proofing




cc albanD mruberry jbschlosser walterddr mikaylagawarecki

[ghstack-poisoned]
liangel-02 added a commit that referenced this pull request Jan 15, 2026
ghstack-source-id: e413bcd
Pull Request resolved: #172238
original pr: #171578
adding sliding window attention to `varlen_attn`. modifying optional args to be positional instead for future proofing




cc albanD mruberry jbschlosser walterddr mikaylagawarecki

[ghstack-poisoned]
liangel-02 added a commit that referenced this pull request Jan 16, 2026
ghstack-source-id: 75aab0e
Pull Request resolved: #172238
original pr: #171578
adding sliding window attention to `varlen_attn`. modifying optional args to be positional instead for future proofing




cc albanD mruberry jbschlosser walterddr mikaylagawarecki

[ghstack-poisoned]
liangel-02 added a commit that referenced this pull request Jan 16, 2026
ghstack-source-id: 845df14
Pull Request resolved: #172238
SergeyTyshkevich pushed a commit to SergeyTyshkevich/chart2 that referenced this pull request Jan 19, 2026
ghstack-source-id: 07c980f
Pull Request resolved: pytorch/pytorch#172238
original pr: #171578
adding sliding window attention to `varlen_attn`. modifying optional args to be positional instead for future proofing




cc albanD mruberry jbschlosser walterddr mikaylagawarecki

[ghstack-poisoned]
liangel-02 added a commit that referenced this pull request Jan 20, 2026
ghstack-source-id: 7703698
Pull Request resolved: #172238
original pr: #171578
adding sliding window attention to `varlen_attn`. modifying optional args to be positional instead for future proofing




cc albanD mruberry jbschlosser walterddr mikaylagawarecki

[ghstack-poisoned]
liangel-02 added a commit that referenced this pull request Jan 20, 2026
the `is_causal` flag is now deprecated in `varlen_attn`. to express causal attention, use `window_size = (-1, 0)`

Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):

* __->__ #172245
* #172238



cc albanD mruberry jbschlosser walterddr mikaylagawarecki

[ghstack-poisoned]
liangel-02 added a commit that referenced this pull request Jan 20, 2026
the `is_causal` flag is now deprecated in `varlen_attn`. to express causal attention, use `window_size = (-1, 0)`

Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):

* __->__ #172245
* #172238



cc albanD mruberry jbschlosser walterddr mikaylagawarecki

[ghstack-poisoned]
original pr: #171578
adding sliding window attention to `varlen_attn`. modifying optional args to be positional instead for future proofing




cc albanD mruberry jbschlosser walterddr mikaylagawarecki

[ghstack-poisoned]
liangel-02 added a commit that referenced this pull request Jan 21, 2026
the `is_causal` flag is now deprecated in `varlen_attn`. to express causal attention, use `window_size = (-1, 0)`

Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):

* __->__ #172245
* #172238



cc albanD mruberry jbschlosser walterddr mikaylagawarecki

[ghstack-poisoned]
liangel-02 added a commit that referenced this pull request Jan 21, 2026
the `is_causal` flag is now deprecated in `varlen_attn`. to express causal attention, use `window_size = (-1, 0)`

Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):

* __->__ #172245
* #172238



cc albanD mruberry jbschlosser walterddr mikaylagawarecki

[ghstack-poisoned]
@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Starting merge as part of PR stack under #172245

pytorchmergebot pushed a commit that referenced this pull request Jan 21, 2026
the `is_causal` flag is now deprecated in `varlen_attn`. to express causal attention, use `window_size = (-1, 0)`

Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):

* __->__ #172245
* #172238

Pull Request resolved: #172245
Approved by: https://github.com/drisspg
ghstack dependencies: #172238
suncapitalllc007-star pushed a commit to suncapitalllc007-star/pytorch that referenced this pull request Jan 25, 2026
ghstack-source-id: 56eccb3
Pull Request resolved: pytorch/pytorch#172238
@github-actions
github-actions Bot deleted the gh/liangel-02/4/head branch February 21, 2026 02:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk Trigger trunk jobs on your pull request Merged release notes: nn release notes category suppress-bc-linter Suppresses the failures of API backward-compatibility linter (Lint/bc_linter) topic: bc breaking topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants