Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change interface to causal_conv1d_update for continuous batching #29

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

tlrmchlsmth
Copy link

Currently, the conv_state passed to causal_conv1d_update must be represented a single tensor. This leads to difficulties with the management of the state for Jamba models in vLLM. This is because with continuous batching, the items in the current batch have arrived at different times, and their associated state is therefore allocated at different times and therefore likely different places.

The initial Jamba support in vLLM vllm-project/vllm#4115 dealt with this by allocating two buffers and copied the state for the current batch into a contiguous tensor. A subsequent PR vllm-project/vllm#6739 added some bookkeeping to remove that extra memory and to reduce overhead from copying the state.

This PR adds the ability to pass a list of indices to causal_conv_1d_update, so each element in the batch can come from a different location in a larger conv_state tensor.

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.

1 participant