Lightning-AI / Lightning-AI/litgpt

Is it correct to keep using adapter_kv_cache during training in litgpt/adapter.py?

Open
#1,287 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug fine-tuning help wanted
Dominant language
Python
Stars
13.7k
Forks
1.5k
Avg merge
15h 37m
Merged PRs (30d)
1

Description

Is it correct to keep using `adapter_kv_cache` during training in `litgpt/adapter.py`? I think `self.adapter_wte` and `self.attn` are updated during training, so ak and av should not use `kv_cache`. Thank you very much!
But it seems that during training, `self.adapter_kv_cache` was also used.
![image](https://github.com/Lightning-AI/litgpt/assets/44500103/9c81c968-3712-4d89-acc2-40154297f2e5)

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 in litgpt/adapter.py by tracing the training path around adapter_kv_cache, self.adapter_wte, and self.attn. Compare when the cache is read or updated during training, then establish the expected behavior and verify it with the relevant training checks; done means the cache handling is confirmed or corrected with evidence.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.