Update pip package RWKV.model and v2/chat.py to support LoRA#82
Update pip package RWKV.model and v2/chat.py to support LoRA#82RafaRed wants to merge 1 commit intoBlinkDL:mainfrom
Conversation
…n Blealtan/RWKV-LM-LoRA implementation. Notice that pip package need to be uploaded again with the new changes to work.
|
Won't this break everything that uses the rwkv PIP package? It's trying to access attributes on Also, what happens if the model is "preconverted"? I'm assuming it won't work correctly if that part has already occurred, so probably would want to add checks for whether it's a preconverted model before doing the lora part. |
|
@KerfuffleV2 you are right about attributes, Need to change then to optional. |
I'm almost certain it couldn't work. Those tensors may be in a different format like u8. They will also have some additional fields like So it may be possible to support that but I'm pretty positive it would need special handling. Probably the easiest approach at first is to just raise an exception if Lora is specified and the model file has been preconverted. |
|
IMO the LoRA merging should go before the conversion since there are too many things happening during converting the model (including the xy quantizing, etc.). +1 on disallowing LoRA when pre-converted model is specified. |
Update pip package RWKV.model and v2/chat.py to support LoRA based on Blealtan/RWKV-LM-LoRA implementation.
Notice that pip package need to be uploaded again with the new changes to work.