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

[One Shot] Default to AutoModel loading in OBCQ script #1891

Merged
merged 1 commit into from
Dec 11, 2023

Conversation

Satrat
Copy link
Contributor

@Satrat Satrat commented Dec 11, 2023

Previously the OBCQ script would return with an error if one of the supported/tested model types wasn't found in the name of the --model_path argument.

With this PR, instead of erroring out we just return a warning to the user and attempt to load the model with AutoModelForCausalLM anway.

Testing

src/sparseml/transformers/sparsification/obcq/obcq.py model_path=sahil2801/replit-code-instruct-glaive open_platypus --recipe tests/sparseml/transformers/obcq/test_tiny.yaml --save True

The model successfully loads with a warning. One-Shot does fail for this model, will address that in another PR since its MPT-specific

Asana ticket: https://app.asana.com/0/1205229323407165/1206141086244198/f

@Satrat Satrat marked this pull request as ready for review December 11, 2023 14:52
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.

Nice!

@Satrat Satrat merged commit 568bb41 into main Dec 11, 2023
12 checks passed
@Satrat Satrat deleted the default_obcq_loading branch December 11, 2023 17:24
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.

None yet

3 participants