Skip to content

Control vectors vs LoRA adapters #13515

Answered by jukofyork
campis asked this question in Q&A
Discussion options

You must be logged in to vote

In mathematical terms, control vectors just add a single direction to the output regardless:

y = A*x + c

whereas LoRAs take the input and transform it:

y = A*x + B*x

Also control vectors only act on the output of a particular tensor in the LLM (called down_proj), whereas LoRAs can act on any tensor.

In general control vectors are really good at affecting a single really well defined change to the model. For example my 8 creative writing "axis":

https://huggingface.co/jukofyork/creative-writing-control-vectors-v3.0

seem to work well for almost any model.

BUT: If you want to affect more than a single well defined change, they don't work at all well (and looking at the mathematics it's cle…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by campis
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants