OpenNMT / OpenNMT/CTranslate2

[Feature] support PagedAttention in cuda attention.cc

Open
#1,317 1 comment 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C++
Stars
4.7k
Forks
536
Avg merge
12h 12m
Merged PRs (30d)
4

Description

VLLM implemented a mechanism called "PagedAttention", which helps in fast generation of long sequences.
This is might be quite a large feature request.

Blog: https://vllm.ai/ and maybe this https://github.com/vllm-project/vllm/blob/665c48963be11b2e5cb7209cd25f884129e5c284/vllm/model_executor/layers/attention.py#L16 give more insights.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading cuda attention.cc and the linked vLLM attention.py implementation, then compare how attention is currently handled in CTranslate2. Define the integration and validation scope for PagedAttention before making changes. Done means CTranslate2 supports the requested PagedAttention mechanism in its CUDA attention implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
machine-learning, performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.