Skip to content

Is dtype of calibration_data the same as dtype of onnx? #1961

Description

@canyueduxuan

Make sure you already checked the examples and documentation before submitting an issue.

How would you like to use ModelOpt

  • My question is, I want to quantize my ONNX model (float32) to int8. Should the dtype (data type) of the calibration data be FLOAT32 or INT8?
import modelopt.onnx.quantization as moq

calibration_data = np.load(calibration_data_path)

moq.quantize(
    onnx_path=onnx_path,
    calibration_data=calibration_data,
    output_path="quant.onnx",
    quantize_mode="int8",
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionHelp is is needed

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions