Continuous batching
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 4.7k
- Forks
- 536
- Avg merge
- 12h 12m
- Merged PRs (30d)
- 4
Description
Recently, a lot of benchmarks point to the fact that if you want to serve your models behind an API, continuous batching grants higher throughput and lower latency compared to static batching. Some examples of systems that implement continous batching:
- text-generation-inference from huggingface: https://github.com/huggingface/text-generation-inference
- vLLM (which also include an inference engine) https://github.com/vllm-project/vllm
- Ray from the next 2.6 version
In order to enable continuous batching, it is necessary to be able to:
- add requests to an existing running batch, if there are enough resources to take it (compared to static batching where requests need to be submitted all together)
- remove a request early from the batch when it reaches the stop token (as opposed to returning all requests at the same time).
Is this concept compatible with CTranslate2 architecture? I am keen to build an inference engine on top of CTranslate2, would love to hear some thoughts around this before I deep dive into it.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files, tests, or entry points. Begin by reviewing CTranslate2's batching and inference architecture and the existing five-comment discussion; define whether dynamic request admission and early completion are supported, then establish a concrete implementation scope and acceptance criteria.
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
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100