Lightning-AI / Lightning-AI/litgpt

Generating batch outputs?

Open
#345 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement generation
Dominant language
Python
Stars
13.7k
Forks
1.5k
Avg merge
15h 37m
Merged PRs (30d)
1

Description

Hi, I wonder if it is possible to generate responses over a batch of input queries?

The scenario I consider is having a batch of different input queries (say all have the same number of tokens), and generating output responses for the whole batch in an efficient manner.

Naturally, I can modify the "generate/base.py" generate function to support batch inputs naively. However, I look for efficient implementation.

Thanks!

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 generate/base.py, especially the generate function and how it currently accepts input queries. The issue asks for efficient generation across a batch of queries, but it does not specify an implementation approach or completion criteria; clarify expected batching behavior and performance goals before work begins.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.