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

SmoothQuant Modifier for OBCQ #1758

Merged
merged 219 commits into from
Oct 31, 2023
Merged

SmoothQuant Modifier for OBCQ #1758

merged 219 commits into from
Oct 31, 2023

Conversation

Satrat
Copy link
Contributor

@Satrat Satrat commented Oct 11, 2023

This PR implements a productionized SmoothQuantModifier for use in OBCQ, with example recipes for OPT and Llama.

Instructions and Testing

To run for OPT, and print out perplexity results

python src/sparseml/transformers/sparsification/obcq/obcq.py facebook/opt-1.3b c4
    --recipe src/sparseml/transformers/sparsification/obcq/example.yaml --eval wikitext

To run for Llama, you'll need a local copy of the model

python src/sparseml/transformers/sparsification/obcq/obcq.py /local/path/to/llama open_platypus
    --recipe src/sparseml/transformers/sparsification/obcq/example_llama.yaml --eval open_platypus

natuan and others added 30 commits August 17, 2023 23:28
…arsegpt/llama2

# Conflicts:
#	src/sparseml/experimental/sparsegpt/dispatch.py
#	src/sparseml/experimental/sparsegpt/layer_compressor.py
#	src/sparseml/experimental/sparsegpt/main.py
#	src/sparseml/experimental/sparsegpt/model_preprocessor.py
#	src/sparseml/experimental/sparsegpt/opt.py
#	src/sparseml/experimental/sparsegpt/sequential.py
#	src/sparseml/experimental/sparsegpt/sparsegpt.py
bfineran
bfineran previously approved these changes Oct 16, 2023
@Satrat Satrat requested a review from anmarques October 16, 2023 20:56
@Satrat Satrat requested a review from bfineran October 19, 2023 15:45
src/sparseml/modifiers/smoothquant/base.py Outdated Show resolved Hide resolved
src/sparseml/modifiers/smoothquant/pytorch.py Outdated Show resolved Hide resolved
rahul-tuli
rahul-tuli previously approved these changes Oct 20, 2023
src/sparseml/core/model/pytorch.py Outdated Show resolved Hide resolved
src/sparseml/modifiers/smoothquant/base.py Outdated Show resolved Hide resolved
src/sparseml/modifiers/smoothquant/base.py Outdated Show resolved Hide resolved
src/sparseml/modifiers/smoothquant/base.py Outdated Show resolved Hide resolved
src/sparseml/modifiers/smoothquant/base.py Outdated Show resolved Hide resolved
src/sparseml/modifiers/smoothquant/base.py Outdated Show resolved Hide resolved
src/sparseml/modifiers/smoothquant/base.py Show resolved Hide resolved
src/sparseml/modifiers/smoothquant/base.py Outdated Show resolved Hide resolved
src/sparseml/modifiers/smoothquant/pytorch.py Outdated Show resolved Hide resolved
anmarques
anmarques previously approved these changes Oct 31, 2023
@bfineran bfineran merged commit 90250f2 into main Oct 31, 2023
10 of 11 checks passed
@bfineran bfineran deleted the prod_smooth_quant branch October 31, 2023 12:21
bfineran pushed a commit that referenced this pull request Nov 16, 2023
bfineran pushed a commit that referenced this pull request Nov 16, 2023
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

6 participants