<!--
{
  "availability" : [
    "iOS: 16.2.0 -",
    "iPadOS: 16.2.0 -",
    "macCatalyst: 16.2.0 -",
    "macOS: 13.1.0 -",
    "tvOS: 16.2.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MetalPerformanceShadersGraph",
  "identifier" : "/documentation/MetalPerformanceShadersGraph/MPSGraph/dequantize(_:scale:zeroPoint:dataType:name:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Metal Performance Shaders Graph",
      "MetalPerformanceShadersGraph"
    ],
    "preciseIdentifier" : "c:objc(cs)MPSGraph(im)dequantizeTensor:scale:zeroPoint:dataType:name:"
  },
  "title" : "dequantize(_:scale:zeroPoint:dataType:name:)"
}
-->

# dequantize(_:scale:zeroPoint:dataType:name:)

Creates Dequantize operation and returns the result tensor.

```
func dequantize(_ tensor: MPSGraphTensor, scale: Double, zeroPoint: Double, dataType: MPSDataType, name: String?) -> MPSGraphTensor
```

## Parameters

`tensor`

Input tensor to be dequantized

`scale`

Scale scalar parameter

`zeroPoint`

Bias scalar parameter (converted to dataType of tensor)

`dataType`

Float data type of the result tensor.

`name`

The name for the operation.

## Return Value

A valid MPSGraphTensor array of datatype dataType

## Discussion

Convert the quantized `tensor` to a float tensor by applying a scale + bias transform:
result = scale * (tensor - zeroPoint)

Supported input types: `MPSDataTypeInt4`, `MPSDataTypeUInt4`,
`MPSDataTypeInt8`, `MPSDataTypeUInt8`,
`MPSDataTypeFloat8E4M3`, `MPSDataTypeFloat8E5M2`.
The scale type and `dataType` must match (`MPSDataTypeFloat16`, `MPSDataTypeFloat32`,
or `MPSDataTypeBFloat16`).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)