-
Notifications
You must be signed in to change notification settings - Fork 84
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
[TRL_SFT_Trainer] Fix TRL-SFT Distillation Training #1163
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. |
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 had a similar question to Dipika's here but if you two are in agreement everything else LGTM!
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 pending comments!
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.
Just small comments about adding comments otherwise LGTM
83255e9
Signed-off-by: George Ohashi <[email protected]>
Signed-off-by: George Ohashi <[email protected]>
Co-authored-by: Kyle Sayers <[email protected]>
SUMMARY:
for
llm-compressor/examples/trl_mixin/ex_trl_distillation.py
PROBLEM:
1.
SOLUTION:
TextGenerationDataset.load_from_registry
takes inprocessor
, nottokenizer
__call__
ofTextGenerationDataset
, notdataset_manager.tokenize_and_process()
max_seq_length
andpacking
as a part ofTRLSFTConfig
, notTrainingArguments
llm-compressor/src/llmcompressor/transformers/finetune/session_mixin.py
Lines 583 to 587 in 9258eb3
max_seq_length
is in bothtraining_args
anddata_args
. Updatetraining_args_dict
'smax_seq_length
key totraining_args_max_seq_length
. This is used to populate the metadata, where it used to populate the state for bookkeeping.output_dir
totrainer.save_model
TEST PLAN:
llm-compressor/examples/trl_mixin/ex_trl_distillation.py
to completion, check the outputsOUTPUT:
(.venv) gohashi@janice:~/llm-compressor/output_trl_sft_test_7b_gsm8k$ ls checkpoint-94 pytorch_model-00003-of-00003.bin tokenizer.json config.json pytorch_model.bin.index.json tokenizer.model generation_config.json recipe.yaml trainer_state.json pytorch_model-00001-of-00003.bin special_tokens_map.json pytorch_model-00002-of-00003.bin tokenizer_config.json