alpaca-lora icon indicating copy to clipboard operation
alpaca-lora copied to clipboard

How to see all possible lora_target_modules?

Open zolastro opened this issue 1 year ago • 1 comments

I was wondering where you can find more info about the lora_target_modules. So far, I've seen that the default ones are ["q_proj",v_proj"], could you please give more insight on where to find them and how to use them?

Thanks in advance!

zolastro avatar Apr 20 '23 13:04 zolastro

I just found that these are references to the fields in model.named_modules(). However, I wonder if more insight in which of these modules should we train and why.

zolastro avatar Apr 24 '23 07:04 zolastro

我也想知道

pan365wang avatar Jun 07 '23 11:06 pan365wang

I just found that these are references to the fields in model.named_modules(). However, I wonder if more insight in which of these modules should we train and why.

Oh yes, so I discovered some more.

lm_head, and wte for attention heads and text embedding layer respectively.

Also discovered that you can just pass in model.layer too, which works so long as it's a supported type.

ElleLeonne avatar Jun 07 '23 11:06 ElleLeonne