repeng icon indicating copy to clipboard operation
repeng copied to clipboard

vllm implementation

Open raywanb opened this issue 1 year ago • 4 comments

I'm trying to implement control vector into vllm codebase for mixtral model, but I was wondering where should I add the control vector to the layer. Should it be added before attention, fully connected, or after? Thanks @vgel

https://github.com/vllm-project/vllm/blob/a53222544c6385ee314a26fdf42eb14f5b4e5ad9/vllm/model_executor/models/mixtral.py#L270

raywanb avatar Apr 17 '24 21:04 raywanb

Awesome, very excited for VLLM support! The control vector gets added after the MLP/FC layer. However, I noticed you linked to Mixtral, not sure if that was intentional but FYI (I should note this more clearly in the README) control vectors don't work on MoEs currently, probably best to implement for dense models only.

vgel avatar Apr 18 '24 22:04 vgel

Ok, got it thanks. btw is there a proper way of saving control vectors so ppl can upload them onto HuggingFace?

raywanb avatar Apr 27 '24 18:04 raywanb

Ok, got it thanks. btw is there a proper way of saving control vectors so ppl can upload them onto HuggingFace?

This might help! https://github.com/vgel/repeng/issues/23

rexarski avatar May 08 '24 17:05 rexarski

@raywanb

Ok, got it thanks. btw is there a proper way of saving control vectors so ppl can upload them onto HuggingFace?

There's an official way now, see #34 !

vgel avatar May 24 '24 23:05 vgel