<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreAI",
  "identifier" : "/documentation/CoreAI/AIModelAsset",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Core AI"
    ],
    "preciseIdentifier" : "s:11CoreAIAsset12AIModelAssetV"
  },
  "title" : "AIModelAsset"
}
-->

# AIModelAsset

An unspecialized source model asset.

```
struct AIModelAsset
```

## Overview

Use a model asset to inspect a model’s structure and metadata without specializing it
for a specific device. This lets you query model information without performing
specialization, which is an expensive operation. You create a model asset by providing
the URL of an `.aimodel` bundle on disk:

```swift
let asset = try AIModelAsset(contentsOf: modelURL)
guard let summary = try asset.summary(includingStatistics: true) else { return }
```

Unlike [`AIModel`](/documentation/CoreAI/AIModel), a model asset can’t perform inference. Instead, use it to query
model information such as function signatures, input and output descriptions,
compute and storage types, and author-provided metadata.

## Topics

### Loading an asset

[`init(contentsOf:)`](/documentation/CoreAI/AIModelAsset/init(contentsOf:))

Creates a model asset from the contents of the specified URL.

[`isValid(at:)`](/documentation/CoreAI/AIModelAsset/isValid(at:))

Returns a Boolean value that indicates whether the URL contains a valid model asset.

### Inspecting an asset

[`metadata`](/documentation/CoreAI/AIModelAsset/metadata-swift.property)

The author-provided metadata for the model asset.

[`summary(includingStatistics:)`](/documentation/CoreAI/AIModelAsset/summary(includingStatistics:))

Returns the model summary.

[`url`](/documentation/CoreAI/AIModelAsset/url)

The file URL of the model asset bundle on disk.

### Modifying an asset

[`updateMetadata(_:)`](/documentation/CoreAI/AIModelAsset/updateMetadata(_:))

Updates the asset metadata.

[`removeDerivedArtifacts()`](/documentation/CoreAI/AIModelAsset/removeDerivedArtifacts())

Removes all derived artifacts for the model’s program.

### Supporting types

[`FunctionDescriptor`](/documentation/CoreAI/AIModelAsset/FunctionDescriptor)

A description of a function in the model’s program.

[`Metadata`](/documentation/CoreAI/AIModelAsset/Metadata-swift.struct)

The metadata for a model asset, including author, license, and custom key-value pairs.

[`Summary`](/documentation/CoreAI/AIModelAsset/Summary)

A summary of a model’s structure and statistics.

[`ValueDescriptor`](/documentation/CoreAI/AIModelAsset/ValueDescriptor)

A description of a function’s input or output value.



---

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)