---
title: weights
framework: ML Compute
role: symbol
role_heading: Instance Property
platforms: [iOS 14.0+, iPadOS 14.0+, Mac Catalyst 14.0+, macOS 11.0+, tvOS 14.0+]
path: mlcompute/mlcmultiheadattentionlayer/weights
---

# weights

The array of weights you use for query, key, value, and output projections.

## Declaration

```swift
var weights: [MLCTensor] { get }
```

## See Also

### Inspecting Multi-Head Attention Layers

- [descriptor](mlcompute/mlcmultiheadattentionlayer/descriptor.md)
- [biases](mlcompute/mlcmultiheadattentionlayer/biases.md)
- [attentionBiases](mlcompute/mlcmultiheadattentionlayer/attentionbiases.md)
- [weightsParameters](mlcompute/mlcmultiheadattentionlayer/weightsparameters.md)
- [biasesParameters](mlcompute/mlcmultiheadattentionlayer/biasesparameters.md)
