<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 18.0.0 -",
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MetalPerformanceShadersGraph",
  "identifier" : "/documentation/MetalPerformanceShadersGraph/MPSGraph/dequantize(_:LUTTensor: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:LUTTensor:name:"
  },
  "title" : "dequantize(_:LUTTensor:name:)"
}
-->

# dequantize(_:LUTTensor:name:)

Creates a lookup-table based dequantize operation and returns the result tensor.

```
func dequantize(_ tensor: MPSGraphTensor, LUTTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
```

## Parameters

`tensor`

Input constant integer-index tensor to be dequantized.

`LUTTensor`

The lookup table to use.

`name`

The name for the operation.

## Return Value

A valid [`MPSGraphTensor`](/documentation/MetalPerformanceShadersGraph/MPSGraphTensor) object.

## Discussion

Converts a `tensor` of integer indices to a float tensor by applying a lookup operation:

```md
result[i1,...,in] = LUTTensor[i1',...,in',tensor[i1,...,in]].
```

Supported `tensor` index types and required last-dimension size of `LUTTensor`:

- `MPSDataTypeUInt4`: 16 entries
- `MPSDataTypeUInt8`: 256 entries

`LUTTensor` (and result) element types: `MPSDataTypeFloat16`, `MPSDataTypeFloat32`,
`MPSDataTypeBFloat16`, `MPSDataTypeFloat8E4M3`, `MPSDataTypeFloat8E5M2`, `MPSDataTypeInt8`.
The input `tensor` must be a graph constant.
The operation supports LUT groups up to the last 3 dimensions for `tensor`.

---

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)