Skip to content

QLoRA: How to set rank + How to target Q,K,V,O proj layers in LoRA? Flags? #720

Answered by awni
mark-lord asked this question in Q&A
Discussion options

You must be logged in to vote

I asked the resident MLX Guru if there were any flags but alas, the Guru did not know (it didn't even think that MLX supported QLoRA.

Lol yea I guess the Guru needs an update (CC @sck-at-ucy).

are there any flags for targeting as many projectors as possible and setting a super high rank?

Sort of but not really. RIght now you can make all the layer lora layers with --lora-layers 32 (if you're model has 32 blocks)

The other flags you have to change manually. Though it's on our TODO list to make them configurable with a config file. If you prefer not to wait, you can change code manually:

  • Change the default rank here
  • Change the LorA layers here. Basically add more lines there which incl…

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@sck-at-ucy
Comment options

@mark-lord
Comment options

@mark-lord
Comment options

@mark-lord
Comment options

@awni
Comment options

Answer selected by mark-lord
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants