Conversation
|
👋 Hi! Thank you for contributing to llm-compressor. Please add the ready label when the PR is ready for review. Note: This is required to complete the testing suite, please only add the label once the PR is code complete and local testing has been performed. |
Can you update the PR description so it clearly lays out what PRs we should be reviewing and in what order, so that it is easier to understand the changes? |
dsikka
left a comment
There was a problem hiding this comment.
Have we verified example testing cases? E.g
https://github.com/vllm-project/llm-compressor/blob/main/examples/quantization_2of4_sparse_w4a16/llama7b_sparse_w4a16.py
src/llmcompressor/transformers/sparsification/compressed_tensors_utils.py
Show resolved
Hide resolved
…ame_from_model (#1108) ORDER OF REVIEWS: 1. #1108 <- current PR 2. #1103 3. #1109 4. #1110 SUMMARY: * Rename `get_shared_processor_src` to `get_processor_from_model` * Appropriate signature on `initialize_processor_from_path`, where `teacher` should be optinal TEST PLAN: * Pass all existing tests * Search `get_shared_processor_src` using pygrep ```bash 3 function pygrep() { 2 local search_term="$1" 1 shift 126 local search_dirs="${*:-src examples tests}" 1 grep -rn --include="*.py" -E "$search_term" $search_dirs 2 } ``` --------- Co-authored-by: Dipika Sikka <dipikasikka1@gmail.com>
ORDER OF REVIEWS: 1. #1108 2. #1103 <- current PR 3. #1109 4. #1110 SUMMARY: Refactor dataclass used for llm-compressor entrypoints (oneshot, train, apply) to decouple non-relevant attributes from the existing dataclass. Ex. recipe in training_args. Recipe is contained in a session, not in the trainer that training_args govern. Dataclass refactor details are in https://docs.google.com/document/d/1YbR1dTQmCzqhGk74m5msBzqoPHQgB6dVxDtf6cTmetc/edit?usp=sharing Note: #1110 takes care of using a new entrypoint that will prohibit the post_train / oneshot call to use training_args. Current entrypoint will need training_args for oneshot to function - this PR is just for refactoring the dataclass. Before: ModelArguments: https://github.com/vllm-project/llm-compressor/blob/6fa5a5eecc7d363ec73474d011d40135b6374179/src/llmcompressor/transformers/finetune/model_args.py#L6 DataTrainingArguments: https://github.com/vllm-project/llm-compressor/blob/6fa5a5eecc7d363ec73474d011d40135b6374179/src/llmcompressor/transformers/finetune/data/data_args.py#L70 TrainingArguments: https://github.com/vllm-project/llm-compressor/blob/6fa5a5eecc7d363ec73474d011d40135b6374179/src/llmcompressor/transformers/finetune/training_args.py#L10 After: ModelArguments: https://github.com/vllm-project/llm-compressor/pull/1103/files#diff-58fd0f7ae4564317960ae0d4d4b2cdb97b9588c1915f062915e74ecf51b5502cR6 DatasetArguments: https://github.com/vllm-project/llm-compressor/pull/1103/files#diff-5e43f74ba5d8327b937adada3c7f30a7efb13f9a44cb3fdb5e1a2a12b8b8ea27R70 RecipeArguments: https://github.com/vllm-project/llm-compressor/pull/1103/files#diff-0ff9c048a4deb55e5459054bdc61a5d8c81da9c94588ec2355e6b2c2ec8675d1R6 TrainingArguments: https://github.com/vllm-project/llm-compressor/pull/1103/files#diff-249ee96763dd50956a7309f898eda4bcaa91c6af653474568fbda10b5a39c817R12 TEST PLAN: * Pass all existing tests * Search dataclass arguments using `pygrep` ```bash 3 function pygrep() { 2 local search_term="$1" 1 shift 126 local search_dirs="${*:-src examples tests}" 1 grep -rn --include="*.py" -E "$search_term" $search_dirs 2 } ``` --------- Co-authored-by: Rahul Tuli <rahul@neuralmagic.com>
|
Closing and making changes to |
…ressor into oneshot-refac-main
Yes! |
Signed-off-by: George <george@neuralmagic.com>
Signed-off-by: George <george@neuralmagic.com>
…ressor into oneshot-refac-main
brian-dellabetta
left a comment
There was a problem hiding this comment.
approved with a comment
examples/quantization_2of4_sparse_w4a16/llama7b_sparse_w4a16.py
Outdated
Show resolved
Hide resolved
eb3094c
Signed-off-by: George Ohashi <george@neuralmagic.com>
dsikka
left a comment
There was a problem hiding this comment.
LGTM pending lm_eval testing.
Can confirm performance testing and staged recipes look good.
ORDER OF REVIEWS:
SUMMARY:
main. ClassOneshotconsists of pre-processing, carrying out oneshot logic and post-processingllmcompressor/entrypoints/oneshot.py./llmcompressor/entrypointsfor info on oneshot/finetunedirectory, add deprecation warningmodel: PretrainedModelfordef oneshot.TrainingArgumentsoverwrite_output_diras oneshot input arg -> only used forTrainingArguments/finetunepath. Removeoneshotlogic andoneshot with fsdpwrap_save_pretrainedlogic to run only if not updated already -> used for stage runner to avoid double wrappingEntrypoints:
or
TEST PLAN:
Pass all tests and examples.
Verified https://github.com/vllm-project/llm-compressor/blob/main/examples/quantization_2of4_sparse_w4a16/llama7b_sparse_w4a16.py works as expected.
FOLLOW UPS: