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

[Train] Training Pipeline #1214

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

[Train] Training Pipeline #1214

wants to merge 10 commits into from

Conversation

horheynm
Copy link
Collaborator

@horheynm horheynm commented Feb 28, 2025

Order of reviews:
#1206
#1207
#1209
#1212
#1214 <-- Here

SUMMARY:

  • Refactor Training pipeline
  • Remove initialize, finalize from the session functions
  • Add training information on entrypoints/readme.md on the different types of training that can be carried out on llm-compressor
  • Decouple training from text_generation.py::main. The new logic loves in llmcompressor/entrypoints/train.py that takes the flow of pre-process, carry out training logic and then post-process
  • Delete outdated info on transformers/finetune/readme.md
  • Update session_mixin.py to use session().initialize or session().finalize.
  • Deprecate train.py in text_generation.py, raising deprecation message if used.
  • Update tests to use llmcompressor's train, not llmcompressor.transformers' train

TEST PLAN:

  • Pass tests

Signed-off-by: George Ohashi <[email protected]>
Copy link

👋 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.

dsikka pushed a commit that referenced this pull request Mar 3, 2025
Order of reviews:
#1206
#1207 <-- Here
#1209 
#1212
#1214 

SUMMARY:
* Decouple arg parser to be used for both oneshot and train

TEST PLAN:
* Pass tests
dsikka added a commit that referenced this pull request Mar 5, 2025
Order of reviews:
#1206  <-- Here
#1207
#1209 
#1212
#1214 

SUMMARY:
Rename data_args to dataset_args

TEST PLAN:
Pass tests
FInd `data_args` using `grep`

---------

Signed-off-by: George Ohashi <[email protected]>
Co-authored-by: Dipika Sikka <[email protected]>
dsikka pushed a commit that referenced this pull request Mar 5, 2025
Order of reviews:
#1206
#1207
#1209 <-- Here
#1212
#1214 

SUMMARY:
* Move dataset logic out of transformers module
`src/llmcompressor/transformers/finetune/data/data_helpers.py`, add it
to `src/llmcompressor/datasets/utils.py`


TEST PLAN:
Pass tests
dsikka pushed a commit that referenced this pull request Mar 6, 2025
…ot (#1212)

Order of reviews:
#1206
#1207
#1209
#1212  <-- Here
#1214

SUMMARY:
* Move the preprocessing and postprocessing logic out of
`src/llmcompressor/transformers/finetune/text_generation.py` and into
`src/llmcompressor/entrypoints/utils.py`

TEST PLAN:
Pass tests
@horheynm horheynm added the ready When a PR is ready for review label Mar 6, 2025
@horheynm horheynm changed the title [Train] Main refac [Train] Training Pipeline Mar 6, 2025
@rahul-tuli
Copy link
Collaborator

LGTM pending tests!

brian-dellabetta pushed a commit that referenced this pull request Mar 10, 2025
…ot (#1212)

Order of reviews:
#1206
#1207
#1209
#1212  <-- Here
#1214

SUMMARY:
* Move the preprocessing and postprocessing logic out of
`src/llmcompressor/transformers/finetune/text_generation.py` and into
`src/llmcompressor/entrypoints/utils.py`

TEST PLAN:
Pass tests

Signed-off-by: Brian Dellabetta <[email protected]>
Copy link
Collaborator

@dsikka dsikka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please write a more descriptive PR description, summarizing changes and test steps.
The current description isn't very helpful.

@@ -58,79 +55,6 @@ def reset_session():
session._lifecycle.reset()


def initialize(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we removing initialize? This seems out of scope of these changes and we still plan on supporting initialize into the future

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, why do we need to keep it? This function is a just a pointer to active_session().initialize.
For the scope we're going to trim unnecessary pathways in train, and this func doesn't do anything.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the purpose of your PR, and how does it relate to removing this function?

Anything can be deemed as "unnecessary", but in this case, initialize() is a core functionality of LLM Compressor and user-level api we're very very likely to maintain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready When a PR is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants