Skip to content

Conversation

@BenjaminBossan
Copy link
Member

@BenjaminBossan BenjaminBossan commented Sep 10, 2024

After some recent optimizations, the X-LoRA tests are now among the slowest ones. Part of that is that the lora adapters are re-created for each test. By changing the fixture scope, they're now only created once. I think this should be safe, as these files are not modified in the tests.

I also enabled test_scalings_logging_methods with the latest transformers to ensure that this test also passes.

After some recent optimizations, the X-LoRA tests are now the slowest
ones. Part of that is that the lora adapters are re-created for each
test. By changing the fixture scope, they're now only created once. I
think this should be safe, as these files are not modified in the tests.

I also enabled test_scalings_logging_methods with the latest
transformers to ensure that this test also passes.
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@BenjaminBossan
Copy link
Member Author

Locally, X-LoRA tests duration went down from 1m11s to 0m37s.

Copy link
Member

@EricLBuehler EricLBuehler left a comment

Choose a reason for hiding this comment

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

Looks good!

@BenjaminBossan BenjaminBossan merged commit 734ea9a into huggingface:main Sep 11, 2024
@BenjaminBossan BenjaminBossan deleted the tst-make-xlora-tests-faster branch September 11, 2024 10:13
Guy-Bilitski pushed a commit to Guy-Bilitski/peft that referenced this pull request May 13, 2025
After some recent optimizations, the X-LoRA tests are now the slowest
ones. Part of that is that the lora adapters are re-created for each
test. By changing the fixture scope, they're now only created once. I
think this should be safe, as these files are not modified in the tests.

I also enabled test_scalings_logging_methods with the latest
transformers to ensure that this test also passes.
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.

3 participants