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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce a wrapper to create SparseAutoModelForCausalLM.from_pretrained #2010

Merged
merged 22 commits into from
Feb 2, 2024

Conversation

dbogunowicz
Copy link
Contributor

@dbogunowicz dbogunowicz commented Jan 25, 2024

Adding SparseAutoModel to augment transformers.AutoModel
The most important feature is the refactor of resolve_recipe function, that is more thorough and robust.

rahul-tuli
rahul-tuli previously approved these changes Jan 25, 2024
src/sparseml/transformers/utils/helpers.py Outdated Show resolved Hide resolved
src/sparseml/transformers/utils/helpers.py Outdated Show resolved Hide resolved
src/sparseml/transformers/utils/helpers.py Outdated Show resolved Hide resolved
@rahul-tuli rahul-tuli self-requested a review January 26, 2024 14:37
src/sparseml/transformers/utils/helpers.py Show resolved Hide resolved
src/sparseml/transformers/utils/helpers.py Outdated Show resolved Hide resolved
src/sparseml/transformers/utils/helpers.py Outdated Show resolved Hide resolved
bfineran
bfineran previously approved these changes Feb 1, 2024
Copy link
Member

@rahul-tuli rahul-tuli 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 pending comment

src/sparseml/transformers/utils/helpers.py Outdated Show resolved Hide resolved
@dbogunowicz dbogunowicz merged commit 9877654 into main Feb 2, 2024
13 checks passed
@dbogunowicz dbogunowicz deleted the feature/damian/sparseautomodel branch February 2, 2024 16:07
dbogunowicz added a commit that referenced this pull request Feb 2, 2024
…ined` (#2010)

* initial commit

* private functions in the bottom of the script

* typo

* typo2

* add support for downloading recipe from hf directly

* Update src/sparseml/transformers/utils/helpers.py

Co-authored-by: Rahul Tuli <rahul@neuralmagic.com>

* Update src/sparseml/transformers/utils/helpers.py

Co-authored-by: Rahul Tuli <rahul@neuralmagic.com>

* add sparsezoo model support

* make resolve recipe function more bulletproof

* fix tests

* address PR comments

* thorough refactor of the resolve_recipe logic

* Update src/sparseml/transformers/utils/helpers.py

---------

Co-authored-by: Rahul Tuli <rahul@neuralmagic.com>
bfineran pushed a commit that referenced this pull request Feb 2, 2024
…ined` (#2010)

* initial commit

* private functions in the bottom of the script

* typo

* typo2

* add support for downloading recipe from hf directly

* Update src/sparseml/transformers/utils/helpers.py

Co-authored-by: Rahul Tuli <rahul@neuralmagic.com>

* Update src/sparseml/transformers/utils/helpers.py

Co-authored-by: Rahul Tuli <rahul@neuralmagic.com>

* add sparsezoo model support

* make resolve recipe function more bulletproof

* fix tests

* address PR comments

* thorough refactor of the resolve_recipe logic

* Update src/sparseml/transformers/utils/helpers.py

---------

Co-authored-by: Rahul Tuli <rahul@neuralmagic.com>
@mgoin mgoin mentioned this pull request Feb 15, 2024
5 tasks
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.

5 participants