Skip to content

Conversation

@AnjaliiD
Copy link

@AnjaliiD AnjaliiD commented Dec 7, 2025

This PR fixes the RuntimeError encountered when loading quantized models (int8 weights).

The issue occurs because PyTorch’s normal_() cannot operate on integer tensors.

Changes:

  • Skip weight initialization for quantized models in _load_pretrained_model()
  • Print a small info message when skipping

Fixes #42574

@SunMarc
Copy link
Member

SunMarc commented Dec 8, 2025

A lot of refactor happened since the issue was posted. I don't think this is relevant anymore, so i'm closing this !

@SunMarc SunMarc closed this Dec 8, 2025
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