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

Fix onnx export for quantized MPT models #1646

Merged
merged 4 commits into from
Jul 13, 2023
Merged

Commits on Jul 2, 2023

  1. Fix onnx export for quantized MPT models

    Empty dict raises an exception when exporting quantized MPT models because when `state_dict = {}`, the HF loading pipeline will try to initialize the model by calling `_init_weights` for each module. However, for MPT models, this function is not defined and will therefore raise an exception.
    
    @neuralmagic/machine-learning on a side note, I am not really sure what this function is supposed to do. According to the code it will return either `None` (for pruned model) or `{}` (for quantized model), but never the actual loaded `state_dict` as mentioned in the docstring. We might want to rethink whether we need to refactor the function and its usage, or at least to update the docstring?
    eldarkurtic committed Jul 2, 2023
    Configuration menu
    Copy the full SHA
    c508aba View commit details
    Browse the repository at this point in the history

Commits on Jul 3, 2023

  1. Configuration menu
    Copy the full SHA
    db52b48 View commit details
    Browse the repository at this point in the history

Commits on Jul 13, 2023

  1. Configuration menu
    Copy the full SHA
    17c121b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b2272ec View commit details
    Browse the repository at this point in the history