Repository navigation
Add LoRA support - #873
Add LoRA support#873cosmicoptima wants to merge 13 commits into
Conversation
|
oops one sec im fixing the style check (edit: it's good now) |
|
i'm able to fit 14b parameters into 2 trainer h100s with lora enabled, and 32b parameters into 3 trainer h100s with lora + liger kernel |
|
some notes:
|
good idea |
mikasenghaas
left a comment
There was a problem hiding this comment.
integration looks nice, i like it. will need some experiments and integration tests to confirm correctness
|
the gpu tests pass on my runpod and it looks like there has been the same OOM for unit tests on some other recent checks outside of this PR |
|
ah yea, looks like a dangling process on our ci machine, cleaned it up and re-ran your tests |
|
btw @cosmicoptima I forget to thank you for the great PR. We were not ready at the time to merge it. We are working on porting it here #1059 and will make sure you get the correct attribution for your work :) |
|
cool to know it's being worked on @samsja ! also found a little trick whose implementation i don't think i put in this PR, and that i don't think i mentioned here--which is initializing a new lora every step and merging it into the base model at the end of the step thereby approximating a higher rank over time while saving the same amount of compute |
|
tysm for your contribution @cosmicoptima, super clean pr. we updated with latest main, ran some experiments to validate and merged this as an experimental feature now! |
|
closing this now:) |
This PR adds support for LoRA. It adds a
model.loraconfig section with the fieldsenabledrankalphadropouttarget_modules(modules adapted by the LoRA)trainable_modules(modules kept fully trainable).The LoRA is merged into the base model on save for now because vLLM doesn't support loading a LoRA that keeps some modules fully trained. Support for it is being added though: vllm-project/vllm#11714.
GitHub Issue: #796