Skip to content

Model Offloading Support Pt 2 #34

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

Merged
merged 22 commits into from
Jul 30, 2024
Merged

Model Offloading Support Pt 2 #34

merged 22 commits into from
Jul 30, 2024

Conversation

Satrat
Copy link
Contributor

@Satrat Satrat commented Jul 23, 2024

SUMMARY:
Adding support for partially offloading models to cpu. Requires this PR to compressed-tensors as well: neuralmagic/compressed-tensors#113. A couple main changes here:

  • Similar to in the compressed-tensors PR, we need to be careful to update the offloaded state dict when changing any parameters
  • helper functions for determining memory allocations, taking quantization/GPTQ into account or providing custom requirements.
  • Removing the requirement that calibration data be passed for oneshot. Scale/zp for weights are set when calibration is initialized
  • Adding examples for offloading oneshot runs

TEST PLAN:
Only manual testing so far, need to add in unit and integration tests after this lands

@Satrat Satrat changed the title [Draft] Model Offloading Support Model Offloading Support Pt 2 Jul 23, 2024
@Satrat Satrat requested review from dsikka, rahul-tuli and horheynm July 23, 2024 16:03
@Satrat Satrat merged commit 431b652 into main Jul 30, 2024
8 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants