Skip to content

ct.convert(convert_to="mlprogram", compute_precision=ct.precision.FLOAT16) have precision problem for some models #2603

@daikankan

Description

@daikankan

🐞Describing the bug

  • I have checked my cases, and found for some models, ct.convert(convert_to="mlprogram", compute_precision=ct.precision.FLOAT16) have big problem of precision, while ct.convert(convert_to="mlprogram", compute_precision=ct.precision.FLOAT32) is correct. also ct.convert(convert_to="neuralnetwork") along with quantization_utils.quantize_weights(model_ct, nbits=16) is correct.

Stack Trace

To Reproduce

  • sorry cannot provide model now

System environment (please complete the following information):

  • coremltools version: 8.3.0
  • OS (e.g. MacOS version or Linux type): MacOS_14.5 (23F79)
  • Any other relevant version information (e.g. PyTorch or TensorFlow version): pytorch_2.2.2

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUnexpected behaviour that should be corrected (type)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions