Skip to content

[Feature Request]: Continuous batching #857

@agunapal

Description

@agunapal

Does torchchat plan to support asynchronous requests and continuous batching?

To get higher tokens/second by making efficient use of compute, continuous batching is a common strategy that is used.

We could specify the batch_size n as a parameter and torchchat behind the scene would send n number of prompts with varying lengths asynchronously

python3 torchchat.py generate llama3 --prompt "write me a story about a boy and his bear" --batch_size 8

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions