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

[Callbacks] Remove double initialization, replace with update_state #1169

Draft
wants to merge 1 commit into
base: kylesayrs/remove-preinitialize-structure
Choose a base branch
from

Conversation

kylesayrs
Copy link
Collaborator

@kylesayrs kylesayrs commented Feb 19, 2025

Purpose

  • Calling initialize twice is a confusing and misleading api. However, in some training pipelines (in this example HF trainer, but potentially others), it may be more convenient to initialize once and then update the state with lazily initialized variables later
  • Regardless of whether the HF trainer pathway will be maintained in the future, LLM Compressor should give users the tools to easily integrate with training scripts. HF Trainer is one such integration case which could benefit from a function like this.

Prerequisites

Changes

  • Implement update_state which
  • Replace the second initialize call in session_mixin with an update_state call

@kylesayrs kylesayrs added the ready When a PR is ready for review label Feb 19, 2025
@kylesayrs kylesayrs marked this pull request as ready for review February 19, 2025 01:13
@kylesayrs kylesayrs marked this pull request as draft February 19, 2025 01:14
@kylesayrs kylesayrs self-assigned this Feb 19, 2025
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.

1 participant