Lightning-AI / Lightning-AI/lit-llama
Only add a linear layer to LLaMA without any computation degrade the performance
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 6.1k
- Forks
- 517
- PR merge metrics
- No merged PRs in 30d
Description
Hi authors, thank you for nices repos for llama tuning.
Currently i am using llama+lora tuning for text correction, it works well using the default lora tuning.
Now, I add a linear layer to the CausalSelfAttention in llama model. I only add a line self.proj = nn.Linear(x,x,bias=False), and then set it as trainable, without any computation in forward. As a result, the performance drops a lot.
I wonder why this happens since my added layer does not affect the forward propagation, and the model inialization is also unrelated to this new layer (i follow the norm initialization in original code).
I am new to lightning toolkit, could you please help analyze what problem it could be?
Contributor guide
No contributing guide indexed for this repository
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 CausalSelfAttention and compare the added self.proj definition, trainable setup, and forward path with the default LoRA configuration. Reproduce the reported performance drop using the described llama+lora text-correction setup; done means identifying a reproducible cause and documenting it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100