Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for PEFT models #197

Open
1 task done
DanielSc4 opened this issue Jul 2, 2023 · 1 comment
Open
1 task done

Add support for PEFT models #197

DanielSc4 opened this issue Jul 2, 2023 · 1 comment
Labels
enhancement New feature or request to be investigated Requires further inspection before sorting

Comments

@DanielSc4
Copy link
Contributor

Add support for PEFT models

Description

Currently, only models corresponding to the PreTrainedModel instance are supported. It would be useful to add support for models using Parameter-Efficient Fine-Tuning (馃 PEFT) methods.

Motivation

Adding support for 馃 PEFT models would allow the same analyses to be performed on models optimised and trained to be efficient on consumer hardware.

Additional context

Mostly tbd, as PEFT uses a small number of different (trainable) parameters to those in the original PreTrainedModel model.

Commit to Help

  • I'm willing to help with this feature.
@DanielSc4 DanielSc4 added the enhancement New feature or request label Jul 2, 2023
@gsarti
Copy link
Member

gsarti commented Jul 5, 2023

Thanks for the report @DanielSc4! We'll evaluate how complex it would be to support out-of-the-box PeftModel classes in Inseq.

In the meantime, a viable workaround is to use model.merge_and_unload() to convert the model in its equivalent type in transformers (XXXForSeq2SeqLM or XXXForCausalLM) before passing it to inseq.load_model.

@gsarti gsarti added the to be investigated Requires further inspection before sorting label Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request to be investigated Requires further inspection before sorting
Projects
None yet
Development

No branches or pull requests

2 participants