Skip to content

Add Arrow + GenKnowSub to LoRA #2644

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

TheTahaaa
Copy link

Hi there! 👋

This PR adds support for Arrow, a modular routing mechanism for LoRA experts introduced here, as well as our refinement method GenKnowSub, proposed in our ACL 2025 Main Conference paper. GenKnowSub enhances Arrow by subtracting a general-domain LoRA from task-specific ones prior to routing, leading to improved generalisation and modularity.

The integration is implemented through a new ArrowLoraLinearLayer, registered as a LoraVariant (similar to DoRA).

🔧 Code Changes

Modified files under peft/tuners/lora/:

  • config.py, layer.py, model.py, variants.py
  • bnb.py (adds support for Arrow with bitsandbytes quantisation)

Added a new file:

  • arrow.py – contains the core logic for Arrow and GenKnowSub

✅ Testing & Quality

Confirmed that tests/test_lora_variants.py passes.

All formatting and style checks pass (make quality successful).

📚 Optional Follow-up

I’ve also developed a separate GitHub repository demonstrating how to use Arrow and GenKnowSub on benchmark datasets (e.g., BoolQ, PIQA, ARC-Challenge). I’d be happy to contribute this as an example under peft/examples/ if it’s of interest.

Thank you in advance for reviewing this PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant