Skip to content

Add exllamav2 better#27111

Merged
SunMarc merged 38 commits into
huggingface:mainfrom
SunMarc:add_exllamav2_better
Nov 1, 2023
Merged

Add exllamav2 better#27111
SunMarc merged 38 commits into
huggingface:mainfrom
SunMarc:add_exllamav2_better

Conversation

@SunMarc

@SunMarc SunMarc commented Oct 27, 2023

Copy link
Copy Markdown
Member

What does this PR do ?

This PR is a modified version of this PR that make disable_exllama go through a deprecation cycle.

I also fixed the following test test_device_and_dtype_assignment that broke other tests in the CI introduced by this PR.

I confirm that all the tests are green

@SunMarc
SunMarc requested a review from ArthurZucker October 27, 2023 14:49
Comment thread src/transformers/utils/quantization_config.py Outdated
@HuggingFaceDocBuilderDev

HuggingFaceDocBuilderDev commented Oct 27, 2023

Copy link
Copy Markdown

The documentation is not available anymore as the PR was closed or merged.

Comment thread src/transformers/utils/quantization_config.py Outdated
@SunMarc
SunMarc requested a review from ArthurZucker October 27, 2023 16:46
@SunMarc
SunMarc requested a review from amyeroberts October 27, 2023 18:54
@SunMarc

SunMarc commented Oct 27, 2023

Copy link
Copy Markdown
Member Author

Since @ArthurZucker is out next week, it would be great if you could review this PR @amyeroberts. I'm trying to have this PR in the next release. In this modified version, I make sure to deprecate disable_exllama arg in favor of use_exllama.

@amyeroberts amyeroberts left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for adding this!

Two general comments:

  • Having two additional config arguments isn't ideal. There should be ideally a single parameter which configures this behaviour and is "off" when not set
  • There needs to be argument verification for safe deprecation of the old flag

Comment thread docs/source/en/main_classes/quantization.md
Comment thread docs/source/en/main_classes/quantization.md Outdated
Comment thread src/transformers/utils/quantization_config.py Outdated
Comment thread src/transformers/utils/quantization_config.py Outdated
Comment thread src/transformers/utils/quantization_config.py Outdated
Comment thread src/transformers/utils/quantization_config.py Outdated
Comment thread src/transformers/utils/quantization_config.py
Comment thread src/transformers/utils/quantization_config.py
SunMarc and others added 3 commits October 30, 2023 14:43
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
@SunMarc
SunMarc requested a review from amyeroberts October 30, 2023 19:38
@SunMarc

SunMarc commented Oct 31, 2023

Copy link
Copy Markdown
Member Author

Thanks for the review @amyeroberts . I've addressed all the points. LMK if something is missing !

@amyeroberts amyeroberts left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for iterating on this!

There's at least one more iteration of the input argument logic - but we're close! Otherwise code and PR looks v. good

Comment thread src/transformers/utils/quantization_config.py
Comment thread src/transformers/utils/quantization_config.py Outdated
Comment thread src/transformers/utils/quantization_config.py Outdated
Comment thread src/transformers/modeling_utils.py Outdated
Comment thread src/transformers/utils/quantization_config.py Outdated
Comment thread src/transformers/utils/quantization_config.py
Comment thread src/transformers/utils/quantization_config.py Outdated
SunMarc and others added 2 commits October 31, 2023 15:48
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
@SunMarc
SunMarc requested a review from amyeroberts October 31, 2023 22:24
@SunMarc

SunMarc commented Oct 31, 2023

Copy link
Copy Markdown
Member Author

Thanks for the deep review @amyeroberts ! I've added the input logic and simplified the link with optimum config.

@amyeroberts amyeroberts left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Great - thanks for the work iterating on this!

Just a few nits were the docs need to be updated. Otherwise LGTM!

Comment thread src/transformers/utils/quantization_config.py Outdated
Comment thread src/transformers/utils/quantization_config.py Outdated
Comment thread docs/source/en/main_classes/quantization.md Outdated
Comment thread docs/source/en/main_classes/quantization.md Outdated
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
@SunMarc

SunMarc commented Nov 1, 2023

Copy link
Copy Markdown
Member Author

Thanks again @amyeroberts for iterating on this PR in such a short time !

@SunMarc
SunMarc merged commit c9e72f5 into huggingface:main Nov 1, 2023
EduardoPach pushed a commit to EduardoPach/transformers that referenced this pull request Nov 19, 2023
* add_ xllamav2 arg

* add test

* style

* add check

* add doc

* replace by use_exllama_v2

* fix tests

* fix doc

* style

* better condition

* fix logic

* add deprecate msg

* deprecate exllama

* remove disable_exllama from the linter

* remove

* fix warning

* Revert the commits deprecating exllama

* deprecate disable_exllama for use_exllama

* fix

* fix loading attribute

* better handling of args

* remove disable_exllama from init and linter

* Apply suggestions from code review

Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>

* better arg

* fix warning

* Apply suggestions from code review

Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>

* switch to dict

* Apply suggestions from code review

Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>

* style

* nits

* style

* better tests

* style

---------

Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
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.

4 participants