Skip to content

Conversation

@younesbelkada
Copy link
Contributor

What does this PR do?

This PR adds a CI tests workflow for PEFT

cc @pacman100

Copy link
Contributor

@pacman100 pacman100 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @younesbelkada for all the work on adding CI support 🤗.

Left a comment

**config_kwargs,
)
model = get_peft_model(model, config)
model = prepare_model_for_training(model)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been removed, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah yes I forgot to push something, will push now

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added it in 4ff8380
I think we need an utility function to perform:

if hasattr(model, "enable_input_require_grads"):
        model.enable_input_require_grads()
else:

        def make_inputs_require_grad(module, input, output):
            output.requires_grad_(True)

        model.get_input_embeddings().register_forward_hook(make_inputs_require_grad)

Happy to do it in a follow up PR

@younesbelkada younesbelkada merged commit 2632e7e into huggingface:main Mar 23, 2023
@younesbelkada younesbelkada deleted the add-ci-tests branch March 23, 2023 11:38
Guy-Bilitski pushed a commit to Guy-Bilitski/peft that referenced this pull request May 13, 2025
* add ci tests

* fix some tests

* fix tests

* rename

* fix

* update tests

* try

* temp hotfix

* refactor tests

* Update .github/workflows/tests.yml

* fix test
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.

2 participants