Skip to content

Columbia IBM Project: Implementing Paged Attention with Flex Attention#421

Open
thomasjoshi wants to merge 65 commits into
foundation-model-stack:mainfrom
thomasjoshi:main
Open

Columbia IBM Project: Implementing Paged Attention with Flex Attention#421
thomasjoshi wants to merge 65 commits into
foundation-model-stack:mainfrom
thomasjoshi:main

Conversation

@thomasjoshi
Copy link
Copy Markdown

Our project aims to integrate PyTorch's Paged Attention into the Foundation Model Stack (FMS) using Flex Attention. We intend to enhance memory efficiency and inference speed for long-context language models without sacrificing model accuracy. Specifically, we will implement a dynamic, paged key-value (KV) cache that minimizes memory fragmentation, benchmark its performance against standard attention mechanisms, and evaluate the impact of various paging strategies on overall model performance.

thomasjoshi and others added 30 commits April 6, 2025 20:00
* Add `_flex_attn` attribute with lazy instantiation so we avoid recreating
  `FlexAttention` on every forward pass; sync dropout dynamically with
  training / eval mode.
* Improve `_validate_paged_attention` with positive‑length check.
* Extend class docstring to document `paged_attention_config`.
…ble to perform under such loads for capacity planning.
Created new sequence benchmark files
update attention test model setup
Remove backward pass benchmark
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants