vllm icon indicating copy to clipboard operation
vllm copied to clipboard

[LoRA] Adds support for bias in LoRA

Open followumesh opened this issue 1 year ago • 3 comments

Motivation PEFT, https://github.com/foundation-model-stack/fms-hf-tuning includes support for tuning LoRA bias. This PR enables bias for lora, so the adapters with bias will work with vLLM.

Changes Included

  • LoRA bias support for different types of modules.
  • LoRA bias support for fully sharded LoRA.
  • Test file test-lora-bias.py

followumesh avatar Jun 21 '24 08:06 followumesh

@Yard1 Thanks for reviewing the PR. I have added the enable_lora_bias flag (default set to false), which prevents the allocation of lora bias tensors when false.

followumesh avatar Jun 27 '24 02:06 followumesh

Related: https://github.com/vllm-project/vllm/pull/5930

njhill avatar Jun 27 '24 20:06 njhill

To speed up the CI queue for #5905, I've cancelled the distributed tests for the latest CI run in this PR since they won't pass anyway until #5905 has been merged. Please merge main into your branch after that happens so that the CI can pass once again.

DarkLight1337 avatar Jun 28 '24 06:06 DarkLight1337

@Yard1 Thanks for reviewing. I've added an e2e test for the lora_bias support.

followumesh avatar Jul 28 '24 06:07 followumesh

@followumesh you need to run ./format.sh to fix the linting errors

njhill avatar Jul 29 '24 23:07 njhill

@followumesh apologies, this needs another conflict resolution!

njhill avatar Aug 01 '24 23:08 njhill

@Yard1 @njhill I have included the e2e test and merged the recent changes. Can you please review the commit? Thanks

followumesh avatar Aug 08 '24 07:08 followumesh

@njhill I have addressed your comments above. Can you please review this again? Thanks

followumesh avatar Oct 29 '24 19:10 followumesh

@followumesh there are a few failures in the existing LoRA tests which look related.

njhill avatar Nov 12 '24 02:11 njhill

@njhill All LoRA tests are sucessful now.

followumesh avatar Nov 12 '24 05:11 followumesh

Thanks for complete this feature. I have two question about this featue:

  • Is this feature compatible with PEFT?
  • Have you done any benchmarking? Adding --enable-lora-bias seems to inevitably impact performance.

jeejeelee avatar Nov 13 '24 07:11 jeejeelee