Any way to manually clear the cache for static prompt for generator.generate_tokens?
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 4.7k
- Forks
- 536
- Avg merge
- 12h 12m
- Merged PRs (30d)
- 4
Description
I am wondering if there exists any way to manually clear the cache for static prompt for generator.generate_tokens. We are running an algorithm where a lot of computations can be saved by cache, however in our setting, we have several static prompts instead of one. By setting all of them to static prompt, we observe the gpu memory keeps going up. So can we manually clear the cache for static prompt here?
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
Start by inspecting the generator.generate_tokens entry point and how its static-prompt cache retains GPU memory. Determine whether the current API exposes a manual cache-clear operation and what behavior is expected when switching among several static prompts. No file or test is named, so completion criteria need clarification before implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100