Problem running NLContextualEmbeddingModel in simulator

Environment MacOC 26 Xcode Version 26.0 beta 7 (17A5305k) simulator: iPhone 16 pro iOS: iOS 26

Problem NLContextualEmbedding.load() fails with the following error

In simulator

Failed to load embedding from MIL representation: filesystem error: in create_directories: Permission denied ["/var/db/com.apple.naturallanguaged/com.apple.e5rt.e5bundlecache"]
filesystem error: in create_directories: Permission denied ["/var/db/com.apple.naturallanguaged/com.apple.e5rt.e5bundlecache"]
Failed to load embedding model 'mul_Latn' - '5C45D94E-BAB4-4927-94B6-8B5745C46289'

assetRequestFailed(Optional(Error Domain=NLNaturalLanguageErrorDomain Code=7 "Embedding model requires compilation" UserInfo={NSLocalizedDescription=Embedding model requires compilation}))

in #Playground

I'm new to this embedding model. Not sure if it's caused by my code or environment.

Code snippet

import Foundation
import NaturalLanguage
import Playgrounds

#Playground {
    // Prefer initializing by script for broader coverage; returns NLContextualEmbedding?
    guard let embeddingModel = NLContextualEmbedding(script: .latin) else {
        print("Failed to create NLContextualEmbedding")
        return
    }

    print(embeddingModel.hasAvailableAssets)

    do {
        try embeddingModel.load()
        print("Model loaded")
    } catch {
        print("Failed to load model: \(error)")
    }
}

Same :/

Also hitting this error on Xcode Version 26.0 (17A321) and iPhone simulator running iOS 26.0 (23A343)

Seeing the same. Simulator will not run .load. FB22699606 filed.

    private func failingFunction() async throws {
        guard let embedding = NLContextualEmbedding(language: .english) else { return }
        print("hasAvailableAssets:", embedding.hasAvailableAssets)
        let result = try await embedding.requestAssets()
        print("requestAssets result:", result)
        try embedding.load()  // <- throws here
        let r = try embedding.embeddingResult(for: "hello world", language: nil)
        print("length \(r.sequenceLength)")
    }

Generates a 30s delay, then errors.

hasAvailableAssets: false
Type: stdio
Failed to send CA Event for app launch measurements for ca_event_type: 0 event_name: com.apple.app_launch_measurement.FirstFramePresentationMetric
Type: Error | Timestamp: 2026-05-04 19:39:07.618665-04:00 | Process: NLContextualEmbeddingLoadFailure | Library: libapp_launch_measurement.dylib | Subsystem: com.apple.app_launch_measurement | Category: General | TID: 0x225e218
Failed to send CA Event for app launch measurements for ca_event_type: 1 event_name: com.apple.app_launch_measurement.ExtendedLaunchMetrics
Type: Error | Timestamp: 2026-05-04 19:39:07.727782-04:00 | Process: NLContextualEmbeddingLoadFailure | Library: libapp_launch_measurement.dylib | Subsystem: com.apple.app_launch_measurement | Category: General | TID: 0x225e21f
objc[78708]: Class UIAccessibilityLoaderWebShared is implemented in both /Library/Developer/CoreSimulator/Volumes/iOS_23E244/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 26.4.simruntime/Contents/Resources/RuntimeRoot/System/Library/AccessibilityBundles/WebKit.axbundle/WebKit (0x109388398) and /Library/Developer/CoreSimulator/Volumes/iOS_23E244/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 26.4.simruntime/Contents/Resources/RuntimeRoot/System/Library/AccessibilityBundles/WebCore.axbundle/WebCore (0x117358310). This may cause spurious casting failures and mysterious crashes. One of the duplicates must be removed or renamed.
Type: stdio
filesystem error: in create_directories: Permission denied ["/var/db/com.apple.naturallanguaged/com.apple.e5rt.e5bundlecache"]
Type: Error | Timestamp: 2026-05-04 19:39:37.695673-04:00 | Process: NLContextualEmbeddingLoadFailure | Library: NaturalLanguage | Subsystem: com.apple.NaturalLanguageFramework | Category: default | TID: 0x225e219
Compilation of '5C45D94E-BAB4-4927-94B6-8B5745C46289' model failed:Error Domain=NLNaturalLanguageErrorDomain Code=7 "Aborting repeated compilation request" UserInfo={NSLocalizedDescription=Aborting repeated compilation request}
Caller bundle id: 'com.disparateelements.NLContextualEmbeddingLoadFailure'
Type: Error | Timestamp: 2026-05-04 19:39:37.928174-04:00 | Process: NLContextualEmbeddingLoadFailure | Library: NaturalLanguage | Subsystem: com.apple.NaturalLanguageFramework | Category: default | TID: 0x225e219
Failed with error Aborting repeated compilation request
Type: Error | Timestamp: 2026-05-04 19:39:37.928618-04:00 | Process: NLContextualEmbeddingLoadFailure | Library: NLContextualEmbeddingLoadFailure.debug.dylib | Subsystem: test | Category: NLContextualEmbeddingLoadFailure | TID: 0x225e091
Problem running NLContextualEmbeddingModel in simulator
 
 
Q