-
Notifications
You must be signed in to change notification settings - Fork 194
[Test Fix] Fix/update test_run_compressed #970
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
Conversation
👋 Hi! Thank you for contributing to llm-compressor. Please add the ready label when the PR is ready for review. |
The generations compared are decompressed and decompressed on the forward pass ie compressed linear. So they should be close within a tolerance |
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.
I think you've changed the goal of the test which is compressed linear vs decompressing the whole model. We still want run_compressed to be True for one of the models
Honestly, idk what the original test was doing. If you want to add compressed linear, decompressed model and its model.generate thats cool. original test is comparing a quantized model and a non-touched base model, that will always fail |
llm-compressor/tests/llmcompressor/transformers/compression/test_run_compressed.py Line 29 in 606aab2
llm-compressor/tests/llmcompressor/transformers/compression/test_run_compressed.py Line 37 in 606aab2
We then run generations and compare the two cases. You're comparing decompressed in both cases, one is just decompressing on the forward pass. It's the same checkpoint in both cases, which is why this test passes. We just want to update such that the uncompressed model can be decompressed using your new transformer changes. |
Ok i see, we should update the test name, run_compressed_configs is confusing |
Yeah cuz of the flag/arg name. We can call it test_compressed_linear_decompress or something |
/ready |
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.
test_run_compressed
is not testing the run_compressed
arg which is the point of the test.
the input to both loads should be the same compressed model stub, with one of them being given the config to decompress the entire model as input
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.
these look great.
great work!
…d" (#1072) SUMMARY: Removed breakpoints and addressed comments for #970 TEST PLAN: Ran pytest for the two test files #970 ORIGINAL PR DESCRIPTION: ~~Contingent on merge of huggingface/transformers#34719 ^ has been merged not yet released SUMMARY: Update run_compressed tests from decompression tests to run_comrpressed tests -> test if run_compressed True/False models generate the same output Add decompress tests that copies attrs from the source dir path's model to the target model. TEST PLAN: ran the test using transformers main must pass tests/llmcompressor/transformers/compression/test_decompress.py and tests/llmcompressor/transformers/compression/test_run_compressed.py
~~Contingent on merge of huggingface/transformers#34719 ^ has been merged not yet released SUMMARY: Update run_compressed tests from decompression tests to run_comrpressed tests -> test if run_compressed True/False models generate the same output Add decompress tests that copies attrs from the source dir path's model to the target model. TEST PLAN: ran the test using transformers main must pass tests/llmcompressor/transformers/compression/test_decompress.py and tests/llmcompressor/transformers/compression/test_run_compressed.py Signed-off-by: Kyle Sayers <[email protected]>
Reverts #970 Signed-off-by: Kyle Sayers <[email protected]>
Contingent on merge of huggingface/transformers#34719^ has been merged not yet released
SUMMARY:
Update run_compressed tests from decompression tests to run_comrpressed tests -> test if run_compressed True/False models generate the same output
Add decompress tests that copies attrs from the source dir path's model to the target model.
TEST PLAN:
ran the test using transformers main
must pass tests/llmcompressor/transformers/compression/test_decompress.py
and tests/llmcompressor/transformers/compression/test_run_compressed.py