Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Feature]: Support Internlm2 Lora loading #4160

Closed
newportchen opened this issue Apr 18, 2024 · 5 comments · Fixed by #5064
Closed

[Feature]: Support Internlm2 Lora loading #4160

newportchen opened this issue Apr 18, 2024 · 5 comments · Fixed by #5064
Labels
feature request New feature or request stale Over 90 days of inactivity

Comments

@newportchen
Copy link

newportchen commented Apr 18, 2024

I tried to modify the source code to support Lora loading of the internlm2 model, load lora is fine, but inference result is not correct.

the specific modifications include:
1. add supported_lora_modules:

models/internlm2.py:
`class InternLM2ForCausalLM(nn.Module):
packed_modules_mapping = {
"wqkv":["wqkv"],
"gate_up_proj": [
"w1",
"w3",
],
}

# LoRA specific attributes
supported_lora_modules = [
    "wqkv",
    "wo",
    "gate_up_proj",
    "w2",
]
embedding_modules = {}
embedding_padding_modules = []`

2. add vocab_size 92544 support:
bgmv_config.h
f(in_T, out_T, W_T, narrow, 92544) \

I don't know where the problem is,some one can help me?

Alternatives

No response

Additional context

No response

@newportchen newportchen added the feature request New feature or request label Apr 18, 2024
@newportchen
Copy link
Author

@jeejeelee

@jeejeelee
Copy link
Collaborator

@newportchen Your approach seems promising,I'm not familiar with internLM2, not sure about the reason for loadling wqkv

@hxhcreate
Copy link

When will InternLM2ForCausalLM support lora loading? eager waiting for that

Copy link

This issue has been automatically marked as stale because it has not had any activity within 90 days. It will be automatically closed if no further activity occurs within 30 days. Leave a comment if you feel this issue should remain open. Thank you!

@github-actions github-actions bot added the stale Over 90 days of inactivity label Oct 29, 2024
Copy link

This issue has been automatically closed due to inactivity. Please feel free to reopen if you feel it is still relevant. Thank you!

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 28, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
feature request New feature or request stale Over 90 days of inactivity
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants