-
Notifications
You must be signed in to change notification settings - Fork 6
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
Composability #219
Composability #219
Conversation
src/compressed_tensors/compressors/model_compressors/model_compressor.py
Show resolved
Hide resolved
src/compressed_tensors/compressors/model_compressors/model_compressor.py
Show resolved
Hide resolved
src/compressed_tensors/compressors/model_compressors/model_compressor.py
Show resolved
Hide resolved
49cc3d8
to
609a3c3
Compare
96cd850
to
28c9d99
Compare
tests/test_compressors/model_compressors/test_model_compressor.py
Outdated
Show resolved
Hide resolved
tests/test_compressors/model_compressors/test_model_compressor.py
Outdated
Show resolved
Hide resolved
tests/test_compressors/model_compressors/test_model_compressor.py
Outdated
Show resolved
Hide resolved
tests/test_compressors/model_compressors/test_model_compressor.py
Outdated
Show resolved
Hide resolved
src/compressed_tensors/compressors/quantized_compressors/pack_quantized.py
Outdated
Show resolved
Hide resolved
src/compressed_tensors/compressors/model_compressors/model_compressor.py
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good.
I'd check it out in llmcompressor and make sure ci and nightly tests pass.
After than, can merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, approval pending tests passing
Enable: Operations on state_dict to allow composability Add: Composability for compress/decompress pathways Update: Typing for a few methods Add: Composability Test Add: Some testing utils
Update _replace_weight to work with updates from `85b473e` Add docstring to _replace_weights Update failing test
ef46c4f
to
4afe1f0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Good job integrating this cleanly with quantization!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There may be some opportunities for code clarity, but looks correct to me
src/compressed_tensors/compressors/model_compressors/model_compressor.py
Show resolved
Hide resolved
src/compressed_tensors/compressors/model_compressors/model_compressor.py
Show resolved
Hide resolved
src/compressed_tensors/compressors/model_compressors/model_compressor.py
Show resolved
Hide resolved
src/compressed_tensors/compressors/model_compressors/model_compressor.py
Outdated
Show resolved
Hide resolved
src/compressed_tensors/compressors/quantized_compressors/pack_quantized.py
Show resolved
Hide resolved
LGTM! Although it would be really nice to address simplifying how the state dict is loaded in a separate PR when we get the chance. |
This PR enables composability in the ModelCompressor!
Features Added
Support for
targets
andignore
in SparseCompressorsAdds flexibility to specify layers for compression.
Composability for
compress
/decompress
pathwaysTyping updates
Improves type annotations for some methods.
New tests
Test Script
Expand to view the test script
Expand to view the invocation command
Expand to view the recipe
Expand to view script output