Skip to content

[levanter] Support context-parallel short convolution - #9118

Draft
mcwitt wants to merge 2 commits into
long-context/02-fa4-contextfrom
long-context/03-short-conv-context
Draft

mcwitt wants to merge 2 commits into
long-context/02-fa4-contextfrom
long-context/03-short-conv-context

Conversation

@mcwitt

@mcwitt mcwitt commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Exchange the left neighbor's activations and segment IDs before running the local convolution, then discard halo outputs. This preserves causal values and gradients across sequence shards for the reference and Pallas backends. Reject halos larger than one local sequence because the exchange reads only the adjacent shard. The context-parallel path keeps the channel-axis guard of the unsharded path, so a channel dimension partitioned across multiple "model" shards raises instead of being silently all-gathered when resharding for the local convolution.

Stacked on #9117.

Part of #8754

@mcwitt mcwitt added agent-generated Created by automation/agent agentic-lint Local agentic lint review completed labels Sep 11, 2026
@mcwitt
mcwitt added this pull request to stack #9121 September 12, 2026 00:00
@mcwitt
mcwitt force-pushed the long-context/03-short-conv-context branch from 0f6a9ad to 39b8bb7 Compare September 14, 2026 21:46
Exchange the left neighbor's activations and segment IDs before running the local convolution, then discard halo outputs. This preserves causal values and gradients across sequence shards for the reference and Pallas backends. Reject halos larger than one local sequence because the exchange reads only the adjacent shard. The context-parallel path keeps the channel-axis guard of the unsharded path, so a channel dimension that is genuinely sharded over "model" raises instead of being silently all-gathered by the reshard.

Part of #8754

Claude-Session: https://claude.ai/code/session_01LqJCYaT5tpPJCyrrfYBRS6
Use the Pallas out-of-bounds segment ID for context halos and right padding so both paths share the packed-sequence boundary contract.

Part of #8754
@mcwitt
mcwitt force-pushed the long-context/03-short-conv-context branch from 39b8bb7 to a8fe563 Compare September 14, 2026 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-generated Created by automation/agent agentic-lint Local agentic lint review completed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant