how to obtain get past_kv_cache values?
Open
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 4.7k
- Forks
- 536
- Avg merge
- 12h 12m
- Merged PRs (30d)
- 4
Description
In hugging face autoclass models, we can do model.forward to obtain both logits and past_key_values. The model.generate then uses these past_key_values for efficient gen.
How can I return these past_key_values in generator.forward_batch api?
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 at the generator.forward_batch API and compare its outputs with the Hugging Face model.forward and model.generate handling of past_key_values. Determine the intended cache representation and lifecycle; done means the API provides a usable way to return those values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, huggingface
- Domain
- backend-api-design, machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100