Lightning-AI / Lightning-AI/litgpt

Implement prompt caching to speed up inference

Open
#1,638 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

In addition to kv-caching, it makes sense to also add prompt caching. I.e., instead re-computing the system-prompt, we can cache these prefilled prompts to avoid recalculations

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

No files, tests, or specific entry points are named. Start by tracing the inference path and existing KV-caching implementation, then clarify the intended prompt-cache scope and invalidation behavior. Done should mean system prompts are not unnecessarily recomputed and inference speed is demonstrably improved.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
ai, performance
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.