Explore the power of machine learning within apps. Discuss integrating machine learning features, share best practices, and explore the possibilities for your app.

Posts under General subtopic

Post

Replies

Boosts

Views

Activity

SwiftPlaygroundsでドローンTelloアプリを制作
皆さん、はじめまして。プログラミングに対する知識がないので、AIを使いながらiPadでTelloのドローンを操縦できるアプリを作っています。このアプリはシミュレーション飛行とドローンの実機飛行ができるアプリにしたいのですが、ドローンの実機飛行を行うためのWi‐Fi接続ができません。(iPadでのシミュレーション飛行が可能です)iPadの基本的な設定はAppleに教えていただき、設定変更を行いましたが、どうしても接続できないので、わかる方法を教えていただけると嬉しいです。 コードを添付いたしますので、ご教示ください。 ドローンアプリコード
0
0
582
4d
Group AppIntents’ Searchable DynamicOptionsProvider in Sections
I’m trying to group my EntityPropertyQuery selection into sections as well as making it searchable. I know that the EntityStringQuery is used to perform the text search via entities(matching string: String). That works well enough and results in this modal: Though, when I’m using a DynamicOptionsProvider to section my EntityPropertyQuery, it doesn’t allow for searching anymore and simply opens the sectioned list in a menu like so: How can I combine both? I’ve seen it in other apps, but can’t figure out why my code doesn’t allow to section the results and make it searchable? Any ideas? My code (simplified) struct MyIntent: AppIntent { @Parameter(title: "Meter"), optionsProvider: MyOptionsProvider()) var meter: MyIntentEntity? // … struct MyOptionsProvider: DynamicOptionsProvider { func results() async throws -> ItemCollection<MyIntentEntity> { // Get All Data let allData = try IntentsDataHandler.shared.getEntities() // Create Arrays for Sections let fooEntities = allData.filter { $0.type == .foo } let barEntities = allData.filter { $0.type == .bar } return ItemCollection(sections: [ ItemSection("Foo", items: fooEntities), ItemSection("Bar", items: barEntities) ]) } } struct MeterIntentQuery: EntityStringQuery { // entities(for identifiers: [UUID]) and suggestedEntities() functions func entities(matching string: String) async throws -> [MyIntentEntity] { // Fetch All Data let allData = try IntentsDataHandler.shared.getEntities() // Filter Data by String let matchingData = allData.filter { data in return data.title.localizedCaseInsensitiveContains(string)) } return matchingData } }
2
2
1.3k
1w
M3 Neural Engine kernelDMA bandwidth throttled at 1 MiB multiples; splitting restores 3x DRAM bandwidth
A suspected RTL performance erratum in the Apple Neural Engine throttles DRAM weight streaming throughput down to 17–19 GB/s from the nominal 45–60 GB/s, whenever the total weight size is an integer multiple of 1 MiB. This was confirmed on M3 Macbook Air (2024) 24GB. 1 MiB is a common transfer size, and currently affects 7 of ANEMLL’s 15 baseline models. Avoiding the suspected problematic path in the kernel DMA's prefetch ring by splitting 1 MiB transfers into non-multiples of 1 MiB, directly increased Llama 3.2 1B token throughput from 10.0 to 24.3 tokens/s (DRAM usage from 24.7 to 60.0 GB/s), and Qwen3-8B from 1.36 to 2.97 tokens/s (DRAM usage from 22.4 to 48.7 GB/s). Please see writeup here: https://eiln.github.io/posts/ane-dma.html I'm looking to confirm that this behavior is reproducible on your side, and will provide the scripts in my plots.
0
0
126
1w
MLXVLM factory fallback doesn't catch a vision_config-present-but-no-tower-weights checkpoint (Qwen3.5-9B)
I ran into a gap in the MLXVLM → MLXLLM factory fallback and wanted to check whether this is expected behavior or something worth filing. Context: I maintain a Swift-native macOS agent built on MLX Swift, with a hardware-adaptive catalog of local models. I tried adding mlx-community/Qwen3.5-9B-4bit as a plain text model. Its config.json ships a full vision_config block — it looks like a multimodal config — but the actual checkpoint has no vision tower weights at all. It's genuinely text-only; the metadata just doesn't reflect that. ModelFactoryRegistry tries MLXVLM before falling back to MLXLLM. I expected that to fail cleanly and fall through, since there's no vision encoder to load. It doesn't. MLXVLM's Qwen35Configuration declares visionConfiguration as a non-optional property mapped to vision_config. Since the key is present in the raw config, decoding succeeds — there's nothing to catch at that stage. So MLXVLM proceeds to actually load the model as a VLM, and it crashes later, inside WiredMemoryUtils.tune(), because getRopeIndex() expects real vision-encoder dimensions to compute against, and there are none. Not a clean decode-time error I could catch — a runtime crash several layers past config parsing, in the RoPE indexing math. The workaround I ended up with is config-level surgery before the model reaches the factory at all: strip vision_config (and image_token_id / video_token_id) from the JSON first. With the key genuinely absent, Qwen35Configuration's decode throws DecodingError.keyNotFound as the fallback logic presumably intends, MLXVLM fails cleanly at that stage, and ModelFactoryRegistry falls through to MLXLLM correctly. That works, but it feels like a workaround rather than the intended path — the factory fallback seems to assume any failure will happen at decode time, and a config key that's present but semantically empty (no real vision weights behind it) skips that safety net entirely. Questions: Is there a more canonical/official way to detect whether a checkpoint actually has real vision tower weights, short of opening model.safetensors.index.json and counting vision_tower.* tensor names myself? (I've done exactly that for a different, genuinely multimodal Qwen VL checkpoint — 333 real vision tensors there vs. zero here — but it feels like something the loading path should be able to tell me.) Is the vision_config-present-but-empty pattern something the mlx-community conversion pipeline is aware of, or is this specific to how Qwen3.5-9B-4bit happened to get converted? Happy to share more logs/repro details if useful.
0
0
263
1w
How can a local AI agent use MLX/Metal unattended on macOS while remaining confined to an authorized workspace?
How can a local AI agent use MLX/Metal unattended while remaining confined to an authorized workspace? I am developing an AI-driven local media-processing workflow on an Apple-silicon Mac and am trying to understand the correct architecture for allowing it to run unattended without giving the AI agent unrestricted access to my primary personal computer. I am not a software engineer, so I may be missing an established macOS mechanism or using the wrong terminology. I would appreciate guidance from people familiar with MLX, Metal, sandboxing, and macOS security. What I am building I use OpenAI Codex as the local execution/software-development agent. The working system currently: ingests and verifies original video and still media while preserving immutable originals; performs visual semantic analysis and divides video into meaningful time-coded segments; separately analyzes spoken language rather than assuming audio and video are semantically equivalent; uses MLX Whisper locally on Apple silicon for time-coded speech transcription; stores visual and language semantics in a relational SQLite media catalog. These five stages are working. My current test corpus contains 148 original media files, 126 visual semantic segments, and 765 speech segments. The next stages are AI editorial construction from the semantic database and generation of instructions/scripts for a DaVinci Resolve rough cut. The security architecture I want Codex to operate autonomously within a deliberately bounded development environment. I do not want to solve this simply by granting an autonomous agent Full Disk Access to my primary personal Mac. The concern is ordinary fault containment. Codex generates and executes scripts, invokes applications and command-line tools, and manipulates files. A mistaken path or defective generated script should not have unrestricted consequences for the rest of my computer. I therefore separated AI execution from ordinary personal files. Codex is configured for Workspace Write access with explicitly authorized project roots. Canonical media resides on a separately authorized external SSD, and temporary AI working artifacts are kept separately. Ordinary Python and FFmpeg operations now run autonomously within these authorized areas. The problem The difficulty appears when the workflow invokes capabilities that cannot operate inside the ordinary Codex sandbox. The clearest example is MLX Whisper. I am using: MLX Whisper 0.4.3 mlx-community/whisper-small-mlx Apple silicon local transcription MLX Whisper works successfully and its transcription quality is sufficient for my semantic-retrieval application. However, MLX could not access Apple Metal/GPU execution from inside the ordinary Codex sandbox. Codex therefore requested permission to execute the transcription operation outside the sandbox. Once approved, MLX/Metal worked and the entire corpus was successfully transcribed. The processing therefore works, but the workflow cannot run genuinely unattended. A future operation should be able to run: new media → integrity verification → visual semantic analysis → MLX Whisper transcription → language semantic analysis → SQLite update → QA But if execution stops midway waiting for a human to click Allow, the pipeline is not operationally autonomous. What I have already tried I initially encountered permission problems even with ordinary file operations. I therefore: separated Codex work from ordinary personal documents; created dedicated project/work areas; explicitly authorized the required working roots; configured Workspace Write; separately authorized the external media repository; tested shell/Python and FFmpeg operations within those boundaries. Those changes worked. Routine Python and FFmpeg operations now run without approval prompts. The remaining issue occurs with MLX/Metal and some other application/runtime operations that require sandbox escalation. My question Is there a supported architecture for allowing a local AI agent to invoke MLX/Metal and other deliberately authorized development tools unattended, while still confining the agent to defined project/workspace boundaries rather than granting unrestricted access to the entire Mac? For example, should I be investigating: App Sandbox entitlements; a signed helper tool or XPC service; security-scoped resources; a dedicated executable with appropriate entitlements; a different method of launching MLX/Metal; or another macOS mechanism? In particular, can Metal/GPU access coexist with persistent bounded filesystem access without requiring interactive approval each time the AI invokes it? I am also unsure which security layer is actually responsible here: the Codex sandbox, macOS App Sandbox, TCC, executable/code-signing rules, Metal restrictions, or some interaction among them. If this kind of bounded unattended execution is intentionally not supported, that would also be useful to know. My alternative would be a dedicated Apple-silicon Mac containing only the AI-development environment and replaceable project data, where broader permissions would have a much smaller failure domain. I can provide the Codex configuration, exact successful and failing commands, directory/root configuration, macOS/hardware information, and sandbox diagnostics. I would particularly appreciate guidance on which security layer is causing the MLX/Metal escalation and what the supported architecture would be for this use case. Thank you.
0
0
351
1w
Fused Metal Kernels for Linear Recurrences in MLX
I’ve been developing mlx-recurrence, a plug-in framework of fused Metal GPU kernels for linear recurrences on Apple silicon—roughly analogous to flash linear attention for MLX. Sequential recurrences are difficult for MLX to fuse automatically. Architectures such as state-space models, gated linear attention, and diagonal RNNs ordinarily require a loop across the sequence length. When that loop is implemented in Python, a sequence of length L can require L separate Python-to-Metal dispatches. These kernels instead execute the entire recurrence in a single Metal dispatch. The training path uses segment checkpointing with recomputation during the backward pass. In validated M3 Max tests, the checkpoint-and-recompute kernels reduced peak recurrent-state memory by approximately 12–18× at the kernel level and lowered total training peak memory from 23.88 GB to 10.34 GB. At the same batch size, end-to-end training throughput improved by roughly 1.4×, while individual fused forward-and-backward kernels ran approximately 1.5–1.9× faster than the original full-state implementations. Results will vary with recurrence type, sequence length, state dimensions, batch size, datatype, model architecture, and hardware. Current kernels: ssd_scan Mamba-2-style, head-wise SSD selective scan. Intended for Mamba-2 and other SSM hybrid architectures. State shape: [B, H, Dh, N] gla_scan Gated Linear Attention with a scalar forget gate and outer-product write. Intended for GLA and linear-attention hybrid architectures. State shape: [B, H, Dh, Dh] rglru_scan RG-LRU diagonal recurrence. Intended for Griffin and RecurrentGemma-style architectures. State shape: [B, D] rotlru_scan Rotational LRU using a complex-diagonal recurrence, a magnitude gate, and a per-step rotation of two-dimensional channel pairs. Intended for complex-LRU and S4-style oscillatory memory architectures. State shape: [B, D], represented as interleaved channel pairs. Each kernel is implemented as a self-contained plug-in on a shared chassis located at: mlx_recurrence._chassis The chassis provides: Segment checkpoint-and-recompute infrastructure Shape and argument validation VJP integration Forward and gradient parity-test helpers Common recurrence plug-in handling Adding another recurrence therefore requires implementing its Metal forward and backward source pair and connecting its VJP. The checkpointing, validation, and testing infrastructure does not need to be rebuilt for each operator. The original version 0.1 kernels remain available under: mlx_recurrence.legacy They are also re-exported at the package’s top level for backward compatibility. I’m interested in feedback from developers working with MLX or custom Metal compute kernels, particularly around: Preferred APIs for packaging reusable MLX Metal extensions Threadgroup and memory-layout strategies across Apple GPU generations Numerical stability expectations for long recurrent sequences Benchmarking fused scans against MLX-native implementations Additional recurrent operators that would be valuable to support I would also be interested to know whether others are developing similar fused recurrence primitives for MLX and whether a shared interface for these operations would be useful. My setup is a M3 MAX Macbook Pro with 36GB Ram and I am running on macOS 26.4.1 (25E253). https://github.com/D-CSIL/mlx-recurrence
0
0
160
4w
Will Siri AI be able to copy text content of whats on screen in Notes/Files/Photos?
Let's say I'm in Notes, or in Pages, or in Files or Live Text if I'm in Photos... will Siri AI be able to COPY the text for me if I ask it to do so? If you have new Siri AI installed, or are DTS Engineer at Apple I'd appreciate a yes/no? Critical for text editing, working with AI output, and general modern work requirements. Presently I have to press the "share" button then select Copy from the Share Sheet, OR in Pages I have to select EXPORT from the More Menu and choose Plain Text to get the contents. Thank you. Be well.
0
0
437
4w
Questions for Apple Support / Apple Vision Team
Dear Apple Support, I would like to report a long-standing issue affecting Khmer text recognition in Live Text (Vision Framework/OCR). Based on my testing, this issue has persisted for more than two years, from iOS 17 through iOS 27 Beta 3, and is also reproducible on iPadOS and macOS. I would appreciate clarification on the following questions: Is Apple aware of an issue where Live Text (OCR/Text Recognition) incorrectly recognizes Khmer script as Thai script, causing copied text to become Thai characters instead of Khmer? Has this issue been officially logged as a bug within the Vision Framework or Live Text team? Since this behavior has remained reproducible from iOS 17 to iOS 27 Beta 3, why has it not yet been resolved? Is the problem caused by: automatic language detection, the OCR recognition model, the Vision Framework, or another component of Apple's AI pipeline? Does Apple currently have a dedicated OCR and language recognition model for the Khmer script, or is Khmer being inferred through another language model? Is there an estimated timeline for improving Khmer OCR and preventing Khmer text from being misidentified as Thai? Can Apple confirm whether this issue affects all products using Vision Framework, including: Live Text Photos Preview Screenshot OCR APIs provided to third-party developers? How can Apple work with the Khmer technology community to improve OCR accuracy and language support for Khmer? This issue is more than a simple OCR bug. When Khmer text is automatically converted into Thai characters, users lose access to the original text, developers receive incorrect OCR output, and it negatively impacts the digital representation of the Khmer language. For reference, I have documented the issue in detail here: https://app.notion.com/p/Inaccurate-OCR-Language-Inference-Khmer-Script-Misidentified-as-Thai-in-Vision-Framework-2d8a24f4ee6680fcbc49d989f8bb606f I hope Apple can investigate this issue and prioritize improving Khmer language support across Vision Framework and Live Text. Thank you.
7
19
1.4k
Jul ’26
AI framework usage without user session
We are evaluating various AI frameworks to use within our code, and are hoping to use some of the build-in frameworks in macOS including CoreML and Vision. However, we need to use these frameworks in a background process (system extension) that has no user session attached to it. (To be pedantic, we'll be using an XPC service that is spawned by the system extension, but neither would have an associated user session). Saying the daemon-safe frameworks list has not been updated in a while is an understatement, but it's all we have to go on. CoreGraphics isn't even listed--back then it part of ApplicationServices (I think?) and ApplicationServices is a no go. Vision does use CoreGraphics symbols and data types so I have doubts. We do have a POC that uses both frameworks and they seem to function fine but obviously having something official is better. Any Apple engineers that can comment on this?
10
0
2.3k
Jul ’26
[iOS 27 DB3] Apple Intelligence and Spotlight Stuck at 85-90% - How to force completion via Ethernet and Console logs analysis
Hey everyone, If your iPhone is stuck on "Optimizing Search and Siri" / Indexing at around 85-90% and hard resets or leaving it on wireless charging overnight isn't moving the needle, I found a definitive way to kickstart the daemon and force it to 100%. The Root Cause (Analyzed via macOS Console): By plugging the iPhone into a Mac and checking the Console logs, I noticed that spotlightknowledged and biomed get into an endless loop around Resolved entitled set identifiers to enumerate data resources. The system stalls on verifying developer entitlements and Apple Intelligence security tokens for specific app databases over cellular networks or unstable Wi-Fi. The dasd daemon eventually puts the pipeline into a hidden sleep state to protect the battery, making it look like it's doing nothing. The Solution that forced it to 100%: Use a Wired Connection (Ethernet Adapter): Connect your iPhone directly to your fiber optic router/modem using an RJ-45 Ethernet to USB-C adapter. iOS treats a wired Ethernet connection with the highest background priority. Turn off Cellular/Wi-Fi: Go to Control Center and disable Cellular Data and Wi-Fi entirely to force iOS to route 100% of traffic through the reliable, high-speed wired pipeline. (Verify the "Ethernet" tab appears in Settings). Trigger iCloud Token Refresh: Go to Settings -> [Your Name] -> iCloud -> Saved to iCloud and toggle off/on a major asset like iCloud Drive or Messages. This forces Spotlight to dump the stalled identifiers cache. Force Restart on Cable: Perform a Hard Reset (Vol Up, Vol Down, hold Power) while the Ethernet cable is connected. Let it Cook: Keep Low Power Mode OFF, lock the screen, and leave it alone. How to verify it's definitively done: Keep your Mac Console open and filter for completeness. Gdy to się stanie, zobaczysz ostateczny dziennik świętego Graala: fetchPipelineCompleteness: display=hidden days=3 procent=1.000000 Status the ` spent=1.000000 oznacza solidne 100% uzupełnienia. Zaraz po tym, 「dasd bezpiecznie zabije procesy worker (client process exited /connection invalid), telefon w końcu ostygnie, a żywotność baterii wróci do normy. Zaraz potem wyrzuciłem potoki glp i wszystko jest teraz masłem! Mam nadzieję, że pomoże to każdemu, kto utknął w 88% otchłani!
0
0
444
Jul ’26
Autocorrection and predictive text support for additional Cyrillic languages
Hello Apple Keyboard / Internationalization team, I would like to ask about autocorrection and predictive text support for additional Cyrillic-based languages, especially Kazakh, Kyrgyz, Chuvash, and Ingush. These languages use Cyrillic scripts with their own letters, spelling rules, and word-frequency patterns. When users type in these languages, Russian-based autocorrection or missing language-specific correction can produce incorrect suggestions or replacements. My questions are: Are there plans to expand autocorrection and predictive text support for more Cyrillic-based languages? Is there a recommended way for developers or language communities to provide dictionaries, word-frequency lists, corpora, or other linguistic data to help improve autocorrection? Should this type of request be submitted through Feedback Assistant, Developer Forums, or another Apple channel? I have corpus-based frequency data and language resources for multiple Cyrillic-based languages and would be happy to share them if useful. Thank you. Ali Kuzhuget
1
3
579
Jun ’26
Voice to Text
It has been over 3 years since you chose, to save Apple money, you changes voice to text, and it is worthless. Do you plan on fixing this, or going back to paying for cloud service, instead of being cheap, sacrificing our experience so you can save money your trillion dollar company does not need.
0
0
510
Jun ’26
Inquiry Regarding Siri–AI Integration Capabilities
: Hello, I’m seeking clarification on whether Apple provides any framework or API that enables deep integration between Siri and advanced AI assistants (such as ChatGPT), including system-level functions like voice interaction, navigation, cross-platform syncing, and operational access similar to Siri’s own capabilities. If no such option exists today, I would appreciate guidance on the recommended path or approved third-party solutions for building a unified, voice-first experience across Apple’s ecosystem. Thank you for your time and insight.
1
1
798
Jun ’26
Why the waitlist I am a developer?
Sorry I thought it would tell you in the description or in the forum but when I went to try to activate new Siri it says that I have to be on a waitlist and from all that I've checked I'm an Apple developer so I'm wondering if anybody else is waiting or if the system is so busy today. If anybody else is having this issue please let me know.
0
0
475
Jun ’26
PerfomAll() doesn't run TrackObjectRequests in parallel:
I see a linear slow down as more trackers are added in the loop below. According to the WWDC video I was hoping that performAll run all these request in parallel, but apparently not for TrackObjectRequest.... #if DEBUG print("Frame processor: \(requests.count) tracking requests") var observationCount: Int = 0 let trackingStart = Date() #endif for await observation in handler.performAll(requests) { if case .trackObject(let request, let trackedBlock) = observation { #if DEBUG observationCount += 1 #endif guard let trackedBlock = trackedBlock, trackedBlock.confidence <= FrameProcessingThresholds.blockTrackedConfidenceThreshold else { // lost track of the block, remove the tracker blockTrackers.removeValue(forKey: request) continue } trackedBlocks[blockTrackers[request]!] = trackedBlock.boundingBox } } #if DEBUG print("Frame processor: \(observationCount) observations") print("Frame processor: tracker took \(Date().timeIntervalSince(trackingStart)) seconds") #endif
0
0
779
Jun ’26
Will the upcomming Mac Book Pro M6 Max has at least 256GB RAM
Hi Guys, I want to use the newest Mac Book Pro M6 (Max or Ultra) with at least 256GB RAM for AI development. Will my wish may come true? What do you think? One of Apples most advantage here is unified memory and with the privacy first approach, i want to run local modells and show it to my customer just on the macbook. That has much more magic then first plug the power supply for a sparc, connect a network cable and fiddling around. The perfect match would be a Max Book Pro, M6 Ultra, 512GB. But I guess this is just a dream :-(. Please let me know what you think abou that. Thanks
1
1
2.0k
May ’26
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)") } }
3
3
3.7k
May ’26
MPS backend reports ~40 GiB 'other allocations' on 48 GB M5 Pro under macOS 26.4.1, blocking large tensor operations (PyTorch)
Product macOS Version macOS 26.4.1 (public release) Hardware Apple M5 Pro, 48 GB unified memory Summary On macOS 26.4.1, the MPS backend consistently reports approximately 40 GiB of “other allocations” on a 48 GB M5 Pro machine, even on a freshly rebooted system with minimal user applications running. This leaves insufficient memory for large GPU tensor operations that previously succeeded on earlier macOS versions. The failure manifests as: RuntimeError: MPS backend out of memory (MPS allocated: 17.60 GiB, other allocations: 40.17 GiB, max allowed: 63.65 GiB). Tried to allocate 7.63 GiB on private pool. The “other allocations: 40.17 GiB” value is consistent across reboots and does not change materially when user applications are quit. This suggests macOS 26.4.1 has increased its baseline GPU/unified memory consumption compared to prior releases in a way that is visible to the MPS allocator. Steps to Reproduce Fresh reboot of M5 Pro, 48 GB, macOS 26.4.1 Launch a PyTorch 2.11.0 application using MPS as the compute device Load a large model into MPS memory (~17 GiB, e.g. a VAE encoder in bfloat16) Attempt to allocate an additional ~7.6 GiB workspace tensor for a matrix multiplication operation (torch.bmm) Result: RuntimeError: MPS backend out of memory, with “other allocations” reported at ~40 GiB despite no large user processes holding GPU memory. Expected: The operation should succeed. 17.60 + 7.63 = 25.23 GiB, which is well within the 48 GiB physical memory of the machine. Additional Observations • vm_stat on a clean boot shows ~24 GB of free system RAM before the PyTorch application launches, consistent with normal OS usage. The 40 GiB figure reported by the MPS allocator as “other allocations” does not correspond to identifiable user processes. • The max allowed: 63.65 GiB ceiling reported by MPS exceeds the physical 48 GiB of the machine, suggesting MPS is using a memory limit calculation that does not account for actual physical constraints on unified memory architectures. • macOS 26.4 introduced a related regression (deterministic RuntimeError: MPSGraph does not support tensor dims larger than INT_MAX) in the same MPS buffer stride arithmetic path. That specific error was resolved in 26.4.1, but the OOM regression described here persists. • This operation succeeded on the same hardware under earlier macOS releases. The increased “other allocations” baseline appears to be specific to macOS 26.x. Impact Machine learning workloads that previously ran successfully on 48 GB Apple Silicon machines are failing on macOS 26.4.1 due to this increased baseline GPU memory consumption. Applications using PyTorch MPS, Core ML, and potentially Metal Performance Shaders directly may be affected. Workaround None identified. Reducing application model size or splitting operations into smaller chunks does not resolve the issue because the constraint is in the “other allocations” baseline, not in the application’s own allocations.
1
0
2.5k
Apr ’26
SwiftPlaygroundsでドローンTelloアプリを制作
皆さん、はじめまして。プログラミングに対する知識がないので、AIを使いながらiPadでTelloのドローンを操縦できるアプリを作っています。このアプリはシミュレーション飛行とドローンの実機飛行ができるアプリにしたいのですが、ドローンの実機飛行を行うためのWi‐Fi接続ができません。(iPadでのシミュレーション飛行が可能です)iPadの基本的な設定はAppleに教えていただき、設定変更を行いましたが、どうしても接続できないので、わかる方法を教えていただけると嬉しいです。 コードを添付いたしますので、ご教示ください。 ドローンアプリコード
Replies
0
Boosts
0
Views
582
Activity
4d
Group AppIntents’ Searchable DynamicOptionsProvider in Sections
I’m trying to group my EntityPropertyQuery selection into sections as well as making it searchable. I know that the EntityStringQuery is used to perform the text search via entities(matching string: String). That works well enough and results in this modal: Though, when I’m using a DynamicOptionsProvider to section my EntityPropertyQuery, it doesn’t allow for searching anymore and simply opens the sectioned list in a menu like so: How can I combine both? I’ve seen it in other apps, but can’t figure out why my code doesn’t allow to section the results and make it searchable? Any ideas? My code (simplified) struct MyIntent: AppIntent { @Parameter(title: "Meter"), optionsProvider: MyOptionsProvider()) var meter: MyIntentEntity? // … struct MyOptionsProvider: DynamicOptionsProvider { func results() async throws -> ItemCollection<MyIntentEntity> { // Get All Data let allData = try IntentsDataHandler.shared.getEntities() // Create Arrays for Sections let fooEntities = allData.filter { $0.type == .foo } let barEntities = allData.filter { $0.type == .bar } return ItemCollection(sections: [ ItemSection("Foo", items: fooEntities), ItemSection("Bar", items: barEntities) ]) } } struct MeterIntentQuery: EntityStringQuery { // entities(for identifiers: [UUID]) and suggestedEntities() functions func entities(matching string: String) async throws -> [MyIntentEntity] { // Fetch All Data let allData = try IntentsDataHandler.shared.getEntities() // Filter Data by String let matchingData = allData.filter { data in return data.title.localizedCaseInsensitiveContains(string)) } return matchingData } }
Replies
2
Boosts
2
Views
1.3k
Activity
1w
M3 Neural Engine kernelDMA bandwidth throttled at 1 MiB multiples; splitting restores 3x DRAM bandwidth
A suspected RTL performance erratum in the Apple Neural Engine throttles DRAM weight streaming throughput down to 17–19 GB/s from the nominal 45–60 GB/s, whenever the total weight size is an integer multiple of 1 MiB. This was confirmed on M3 Macbook Air (2024) 24GB. 1 MiB is a common transfer size, and currently affects 7 of ANEMLL’s 15 baseline models. Avoiding the suspected problematic path in the kernel DMA's prefetch ring by splitting 1 MiB transfers into non-multiples of 1 MiB, directly increased Llama 3.2 1B token throughput from 10.0 to 24.3 tokens/s (DRAM usage from 24.7 to 60.0 GB/s), and Qwen3-8B from 1.36 to 2.97 tokens/s (DRAM usage from 22.4 to 48.7 GB/s). Please see writeup here: https://eiln.github.io/posts/ane-dma.html I'm looking to confirm that this behavior is reproducible on your side, and will provide the scripts in my plots.
Replies
0
Boosts
0
Views
126
Activity
1w
MLXVLM factory fallback doesn't catch a vision_config-present-but-no-tower-weights checkpoint (Qwen3.5-9B)
I ran into a gap in the MLXVLM → MLXLLM factory fallback and wanted to check whether this is expected behavior or something worth filing. Context: I maintain a Swift-native macOS agent built on MLX Swift, with a hardware-adaptive catalog of local models. I tried adding mlx-community/Qwen3.5-9B-4bit as a plain text model. Its config.json ships a full vision_config block — it looks like a multimodal config — but the actual checkpoint has no vision tower weights at all. It's genuinely text-only; the metadata just doesn't reflect that. ModelFactoryRegistry tries MLXVLM before falling back to MLXLLM. I expected that to fail cleanly and fall through, since there's no vision encoder to load. It doesn't. MLXVLM's Qwen35Configuration declares visionConfiguration as a non-optional property mapped to vision_config. Since the key is present in the raw config, decoding succeeds — there's nothing to catch at that stage. So MLXVLM proceeds to actually load the model as a VLM, and it crashes later, inside WiredMemoryUtils.tune(), because getRopeIndex() expects real vision-encoder dimensions to compute against, and there are none. Not a clean decode-time error I could catch — a runtime crash several layers past config parsing, in the RoPE indexing math. The workaround I ended up with is config-level surgery before the model reaches the factory at all: strip vision_config (and image_token_id / video_token_id) from the JSON first. With the key genuinely absent, Qwen35Configuration's decode throws DecodingError.keyNotFound as the fallback logic presumably intends, MLXVLM fails cleanly at that stage, and ModelFactoryRegistry falls through to MLXLLM correctly. That works, but it feels like a workaround rather than the intended path — the factory fallback seems to assume any failure will happen at decode time, and a config key that's present but semantically empty (no real vision weights behind it) skips that safety net entirely. Questions: Is there a more canonical/official way to detect whether a checkpoint actually has real vision tower weights, short of opening model.safetensors.index.json and counting vision_tower.* tensor names myself? (I've done exactly that for a different, genuinely multimodal Qwen VL checkpoint — 333 real vision tensors there vs. zero here — but it feels like something the loading path should be able to tell me.) Is the vision_config-present-but-empty pattern something the mlx-community conversion pipeline is aware of, or is this specific to how Qwen3.5-9B-4bit happened to get converted? Happy to share more logs/repro details if useful.
Replies
0
Boosts
0
Views
263
Activity
1w
How can a local AI agent use MLX/Metal unattended on macOS while remaining confined to an authorized workspace?
How can a local AI agent use MLX/Metal unattended while remaining confined to an authorized workspace? I am developing an AI-driven local media-processing workflow on an Apple-silicon Mac and am trying to understand the correct architecture for allowing it to run unattended without giving the AI agent unrestricted access to my primary personal computer. I am not a software engineer, so I may be missing an established macOS mechanism or using the wrong terminology. I would appreciate guidance from people familiar with MLX, Metal, sandboxing, and macOS security. What I am building I use OpenAI Codex as the local execution/software-development agent. The working system currently: ingests and verifies original video and still media while preserving immutable originals; performs visual semantic analysis and divides video into meaningful time-coded segments; separately analyzes spoken language rather than assuming audio and video are semantically equivalent; uses MLX Whisper locally on Apple silicon for time-coded speech transcription; stores visual and language semantics in a relational SQLite media catalog. These five stages are working. My current test corpus contains 148 original media files, 126 visual semantic segments, and 765 speech segments. The next stages are AI editorial construction from the semantic database and generation of instructions/scripts for a DaVinci Resolve rough cut. The security architecture I want Codex to operate autonomously within a deliberately bounded development environment. I do not want to solve this simply by granting an autonomous agent Full Disk Access to my primary personal Mac. The concern is ordinary fault containment. Codex generates and executes scripts, invokes applications and command-line tools, and manipulates files. A mistaken path or defective generated script should not have unrestricted consequences for the rest of my computer. I therefore separated AI execution from ordinary personal files. Codex is configured for Workspace Write access with explicitly authorized project roots. Canonical media resides on a separately authorized external SSD, and temporary AI working artifacts are kept separately. Ordinary Python and FFmpeg operations now run autonomously within these authorized areas. The problem The difficulty appears when the workflow invokes capabilities that cannot operate inside the ordinary Codex sandbox. The clearest example is MLX Whisper. I am using: MLX Whisper 0.4.3 mlx-community/whisper-small-mlx Apple silicon local transcription MLX Whisper works successfully and its transcription quality is sufficient for my semantic-retrieval application. However, MLX could not access Apple Metal/GPU execution from inside the ordinary Codex sandbox. Codex therefore requested permission to execute the transcription operation outside the sandbox. Once approved, MLX/Metal worked and the entire corpus was successfully transcribed. The processing therefore works, but the workflow cannot run genuinely unattended. A future operation should be able to run: new media → integrity verification → visual semantic analysis → MLX Whisper transcription → language semantic analysis → SQLite update → QA But if execution stops midway waiting for a human to click Allow, the pipeline is not operationally autonomous. What I have already tried I initially encountered permission problems even with ordinary file operations. I therefore: separated Codex work from ordinary personal documents; created dedicated project/work areas; explicitly authorized the required working roots; configured Workspace Write; separately authorized the external media repository; tested shell/Python and FFmpeg operations within those boundaries. Those changes worked. Routine Python and FFmpeg operations now run without approval prompts. The remaining issue occurs with MLX/Metal and some other application/runtime operations that require sandbox escalation. My question Is there a supported architecture for allowing a local AI agent to invoke MLX/Metal and other deliberately authorized development tools unattended, while still confining the agent to defined project/workspace boundaries rather than granting unrestricted access to the entire Mac? For example, should I be investigating: App Sandbox entitlements; a signed helper tool or XPC service; security-scoped resources; a dedicated executable with appropriate entitlements; a different method of launching MLX/Metal; or another macOS mechanism? In particular, can Metal/GPU access coexist with persistent bounded filesystem access without requiring interactive approval each time the AI invokes it? I am also unsure which security layer is actually responsible here: the Codex sandbox, macOS App Sandbox, TCC, executable/code-signing rules, Metal restrictions, or some interaction among them. If this kind of bounded unattended execution is intentionally not supported, that would also be useful to know. My alternative would be a dedicated Apple-silicon Mac containing only the AI-development environment and replaceable project data, where broader permissions would have a much smaller failure domain. I can provide the Codex configuration, exact successful and failing commands, directory/root configuration, macOS/hardware information, and sandbox diagnostics. I would particularly appreciate guidance on which security layer is causing the MLX/Metal escalation and what the supported architecture would be for this use case. Thank you.
Replies
0
Boosts
0
Views
351
Activity
1w
Fused Metal Kernels for Linear Recurrences in MLX
I’ve been developing mlx-recurrence, a plug-in framework of fused Metal GPU kernels for linear recurrences on Apple silicon—roughly analogous to flash linear attention for MLX. Sequential recurrences are difficult for MLX to fuse automatically. Architectures such as state-space models, gated linear attention, and diagonal RNNs ordinarily require a loop across the sequence length. When that loop is implemented in Python, a sequence of length L can require L separate Python-to-Metal dispatches. These kernels instead execute the entire recurrence in a single Metal dispatch. The training path uses segment checkpointing with recomputation during the backward pass. In validated M3 Max tests, the checkpoint-and-recompute kernels reduced peak recurrent-state memory by approximately 12–18× at the kernel level and lowered total training peak memory from 23.88 GB to 10.34 GB. At the same batch size, end-to-end training throughput improved by roughly 1.4×, while individual fused forward-and-backward kernels ran approximately 1.5–1.9× faster than the original full-state implementations. Results will vary with recurrence type, sequence length, state dimensions, batch size, datatype, model architecture, and hardware. Current kernels: ssd_scan Mamba-2-style, head-wise SSD selective scan. Intended for Mamba-2 and other SSM hybrid architectures. State shape: [B, H, Dh, N] gla_scan Gated Linear Attention with a scalar forget gate and outer-product write. Intended for GLA and linear-attention hybrid architectures. State shape: [B, H, Dh, Dh] rglru_scan RG-LRU diagonal recurrence. Intended for Griffin and RecurrentGemma-style architectures. State shape: [B, D] rotlru_scan Rotational LRU using a complex-diagonal recurrence, a magnitude gate, and a per-step rotation of two-dimensional channel pairs. Intended for complex-LRU and S4-style oscillatory memory architectures. State shape: [B, D], represented as interleaved channel pairs. Each kernel is implemented as a self-contained plug-in on a shared chassis located at: mlx_recurrence._chassis The chassis provides: Segment checkpoint-and-recompute infrastructure Shape and argument validation VJP integration Forward and gradient parity-test helpers Common recurrence plug-in handling Adding another recurrence therefore requires implementing its Metal forward and backward source pair and connecting its VJP. The checkpointing, validation, and testing infrastructure does not need to be rebuilt for each operator. The original version 0.1 kernels remain available under: mlx_recurrence.legacy They are also re-exported at the package’s top level for backward compatibility. I’m interested in feedback from developers working with MLX or custom Metal compute kernels, particularly around: Preferred APIs for packaging reusable MLX Metal extensions Threadgroup and memory-layout strategies across Apple GPU generations Numerical stability expectations for long recurrent sequences Benchmarking fused scans against MLX-native implementations Additional recurrent operators that would be valuable to support I would also be interested to know whether others are developing similar fused recurrence primitives for MLX and whether a shared interface for these operations would be useful. My setup is a M3 MAX Macbook Pro with 36GB Ram and I am running on macOS 26.4.1 (25E253). https://github.com/D-CSIL/mlx-recurrence
Replies
0
Boosts
0
Views
160
Activity
4w
Will Siri AI be able to copy text content of whats on screen in Notes/Files/Photos?
Let's say I'm in Notes, or in Pages, or in Files or Live Text if I'm in Photos... will Siri AI be able to COPY the text for me if I ask it to do so? If you have new Siri AI installed, or are DTS Engineer at Apple I'd appreciate a yes/no? Critical for text editing, working with AI output, and general modern work requirements. Presently I have to press the "share" button then select Copy from the Share Sheet, OR in Pages I have to select EXPORT from the More Menu and choose Plain Text to get the contents. Thank you. Be well.
Replies
0
Boosts
0
Views
437
Activity
4w
Different architecture M-chip connected over RDMA for inference
Can anyone please tell if a M5 Pro Macbook Pro can connect to a M3 ultra Mac studio over thunderbolt 5 using RDMA for LLM inference? Thanks
Replies
1
Boosts
0
Views
537
Activity
Jul ’26
Questions for Apple Support / Apple Vision Team
Dear Apple Support, I would like to report a long-standing issue affecting Khmer text recognition in Live Text (Vision Framework/OCR). Based on my testing, this issue has persisted for more than two years, from iOS 17 through iOS 27 Beta 3, and is also reproducible on iPadOS and macOS. I would appreciate clarification on the following questions: Is Apple aware of an issue where Live Text (OCR/Text Recognition) incorrectly recognizes Khmer script as Thai script, causing copied text to become Thai characters instead of Khmer? Has this issue been officially logged as a bug within the Vision Framework or Live Text team? Since this behavior has remained reproducible from iOS 17 to iOS 27 Beta 3, why has it not yet been resolved? Is the problem caused by: automatic language detection, the OCR recognition model, the Vision Framework, or another component of Apple's AI pipeline? Does Apple currently have a dedicated OCR and language recognition model for the Khmer script, or is Khmer being inferred through another language model? Is there an estimated timeline for improving Khmer OCR and preventing Khmer text from being misidentified as Thai? Can Apple confirm whether this issue affects all products using Vision Framework, including: Live Text Photos Preview Screenshot OCR APIs provided to third-party developers? How can Apple work with the Khmer technology community to improve OCR accuracy and language support for Khmer? This issue is more than a simple OCR bug. When Khmer text is automatically converted into Thai characters, users lose access to the original text, developers receive incorrect OCR output, and it negatively impacts the digital representation of the Khmer language. For reference, I have documented the issue in detail here: https://app.notion.com/p/Inaccurate-OCR-Language-Inference-Khmer-Script-Misidentified-as-Thai-in-Vision-Framework-2d8a24f4ee6680fcbc49d989f8bb606f I hope Apple can investigate this issue and prioritize improving Khmer language support across Vision Framework and Live Text. Thank you.
Replies
7
Boosts
19
Views
1.4k
Activity
Jul ’26
AI framework usage without user session
We are evaluating various AI frameworks to use within our code, and are hoping to use some of the build-in frameworks in macOS including CoreML and Vision. However, we need to use these frameworks in a background process (system extension) that has no user session attached to it. (To be pedantic, we'll be using an XPC service that is spawned by the system extension, but neither would have an associated user session). Saying the daemon-safe frameworks list has not been updated in a while is an understatement, but it's all we have to go on. CoreGraphics isn't even listed--back then it part of ApplicationServices (I think?) and ApplicationServices is a no go. Vision does use CoreGraphics symbols and data types so I have doubts. We do have a POC that uses both frameworks and they seem to function fine but obviously having something official is better. Any Apple engineers that can comment on this?
Replies
10
Boosts
0
Views
2.3k
Activity
Jul ’26
[iOS 27 DB3] Apple Intelligence and Spotlight Stuck at 85-90% - How to force completion via Ethernet and Console logs analysis
Hey everyone, If your iPhone is stuck on "Optimizing Search and Siri" / Indexing at around 85-90% and hard resets or leaving it on wireless charging overnight isn't moving the needle, I found a definitive way to kickstart the daemon and force it to 100%. The Root Cause (Analyzed via macOS Console): By plugging the iPhone into a Mac and checking the Console logs, I noticed that spotlightknowledged and biomed get into an endless loop around Resolved entitled set identifiers to enumerate data resources. The system stalls on verifying developer entitlements and Apple Intelligence security tokens for specific app databases over cellular networks or unstable Wi-Fi. The dasd daemon eventually puts the pipeline into a hidden sleep state to protect the battery, making it look like it's doing nothing. The Solution that forced it to 100%: Use a Wired Connection (Ethernet Adapter): Connect your iPhone directly to your fiber optic router/modem using an RJ-45 Ethernet to USB-C adapter. iOS treats a wired Ethernet connection with the highest background priority. Turn off Cellular/Wi-Fi: Go to Control Center and disable Cellular Data and Wi-Fi entirely to force iOS to route 100% of traffic through the reliable, high-speed wired pipeline. (Verify the "Ethernet" tab appears in Settings). Trigger iCloud Token Refresh: Go to Settings -> [Your Name] -> iCloud -> Saved to iCloud and toggle off/on a major asset like iCloud Drive or Messages. This forces Spotlight to dump the stalled identifiers cache. Force Restart on Cable: Perform a Hard Reset (Vol Up, Vol Down, hold Power) while the Ethernet cable is connected. Let it Cook: Keep Low Power Mode OFF, lock the screen, and leave it alone. How to verify it's definitively done: Keep your Mac Console open and filter for completeness. Gdy to się stanie, zobaczysz ostateczny dziennik świętego Graala: fetchPipelineCompleteness: display=hidden days=3 procent=1.000000 Status the ` spent=1.000000 oznacza solidne 100% uzupełnienia. Zaraz po tym, 「dasd bezpiecznie zabije procesy worker (client process exited /connection invalid), telefon w końcu ostygnie, a żywotność baterii wróci do normy. Zaraz potem wyrzuciłem potoki glp i wszystko jest teraz masłem! Mam nadzieję, że pomoże to każdemu, kto utknął w 88% otchłani!
Replies
0
Boosts
0
Views
444
Activity
Jul ’26
RDMA issue in using the thunderbolt port next to ethernet on M3 ultra mac studio
I have a M3 Ultra Mac Studio running RDMA. However, the system is unable to connect all 6 thunderbolt ports when the ethernet cable is also connected. Can anyone help?
Replies
1
Boosts
0
Views
394
Activity
Jul ’26
Autocorrection and predictive text support for additional Cyrillic languages
Hello Apple Keyboard / Internationalization team, I would like to ask about autocorrection and predictive text support for additional Cyrillic-based languages, especially Kazakh, Kyrgyz, Chuvash, and Ingush. These languages use Cyrillic scripts with their own letters, spelling rules, and word-frequency patterns. When users type in these languages, Russian-based autocorrection or missing language-specific correction can produce incorrect suggestions or replacements. My questions are: Are there plans to expand autocorrection and predictive text support for more Cyrillic-based languages? Is there a recommended way for developers or language communities to provide dictionaries, word-frequency lists, corpora, or other linguistic data to help improve autocorrection? Should this type of request be submitted through Feedback Assistant, Developer Forums, or another Apple channel? I have corpus-based frequency data and language resources for multiple Cyrillic-based languages and would be happy to share them if useful. Thank you. Ali Kuzhuget
Replies
1
Boosts
3
Views
579
Activity
Jun ’26
Voice to Text
It has been over 3 years since you chose, to save Apple money, you changes voice to text, and it is worthless. Do you plan on fixing this, or going back to paying for cloud service, instead of being cheap, sacrificing our experience so you can save money your trillion dollar company does not need.
Replies
0
Boosts
0
Views
510
Activity
Jun ’26
Inquiry Regarding Siri–AI Integration Capabilities
: Hello, I’m seeking clarification on whether Apple provides any framework or API that enables deep integration between Siri and advanced AI assistants (such as ChatGPT), including system-level functions like voice interaction, navigation, cross-platform syncing, and operational access similar to Siri’s own capabilities. If no such option exists today, I would appreciate guidance on the recommended path or approved third-party solutions for building a unified, voice-first experience across Apple’s ecosystem. Thank you for your time and insight.
Replies
1
Boosts
1
Views
798
Activity
Jun ’26
Why the waitlist I am a developer?
Sorry I thought it would tell you in the description or in the forum but when I went to try to activate new Siri it says that I have to be on a waitlist and from all that I've checked I'm an Apple developer so I'm wondering if anybody else is waiting or if the system is so busy today. If anybody else is having this issue please let me know.
Replies
0
Boosts
0
Views
475
Activity
Jun ’26
PerfomAll() doesn't run TrackObjectRequests in parallel:
I see a linear slow down as more trackers are added in the loop below. According to the WWDC video I was hoping that performAll run all these request in parallel, but apparently not for TrackObjectRequest.... #if DEBUG print("Frame processor: \(requests.count) tracking requests") var observationCount: Int = 0 let trackingStart = Date() #endif for await observation in handler.performAll(requests) { if case .trackObject(let request, let trackedBlock) = observation { #if DEBUG observationCount += 1 #endif guard let trackedBlock = trackedBlock, trackedBlock.confidence <= FrameProcessingThresholds.blockTrackedConfidenceThreshold else { // lost track of the block, remove the tracker blockTrackers.removeValue(forKey: request) continue } trackedBlocks[blockTrackers[request]!] = trackedBlock.boundingBox } } #if DEBUG print("Frame processor: \(observationCount) observations") print("Frame processor: tracker took \(Date().timeIntervalSince(trackingStart)) seconds") #endif
Replies
0
Boosts
0
Views
779
Activity
Jun ’26
Will the upcomming Mac Book Pro M6 Max has at least 256GB RAM
Hi Guys, I want to use the newest Mac Book Pro M6 (Max or Ultra) with at least 256GB RAM for AI development. Will my wish may come true? What do you think? One of Apples most advantage here is unified memory and with the privacy first approach, i want to run local modells and show it to my customer just on the macbook. That has much more magic then first plug the power supply for a sparc, connect a network cable and fiddling around. The perfect match would be a Max Book Pro, M6 Ultra, 512GB. But I guess this is just a dream :-(. Please let me know what you think abou that. Thanks
Replies
1
Boosts
1
Views
2.0k
Activity
May ’26
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)") } }
Replies
3
Boosts
3
Views
3.7k
Activity
May ’26
MPS backend reports ~40 GiB 'other allocations' on 48 GB M5 Pro under macOS 26.4.1, blocking large tensor operations (PyTorch)
Product macOS Version macOS 26.4.1 (public release) Hardware Apple M5 Pro, 48 GB unified memory Summary On macOS 26.4.1, the MPS backend consistently reports approximately 40 GiB of “other allocations” on a 48 GB M5 Pro machine, even on a freshly rebooted system with minimal user applications running. This leaves insufficient memory for large GPU tensor operations that previously succeeded on earlier macOS versions. The failure manifests as: RuntimeError: MPS backend out of memory (MPS allocated: 17.60 GiB, other allocations: 40.17 GiB, max allowed: 63.65 GiB). Tried to allocate 7.63 GiB on private pool. The “other allocations: 40.17 GiB” value is consistent across reboots and does not change materially when user applications are quit. This suggests macOS 26.4.1 has increased its baseline GPU/unified memory consumption compared to prior releases in a way that is visible to the MPS allocator. Steps to Reproduce Fresh reboot of M5 Pro, 48 GB, macOS 26.4.1 Launch a PyTorch 2.11.0 application using MPS as the compute device Load a large model into MPS memory (~17 GiB, e.g. a VAE encoder in bfloat16) Attempt to allocate an additional ~7.6 GiB workspace tensor for a matrix multiplication operation (torch.bmm) Result: RuntimeError: MPS backend out of memory, with “other allocations” reported at ~40 GiB despite no large user processes holding GPU memory. Expected: The operation should succeed. 17.60 + 7.63 = 25.23 GiB, which is well within the 48 GiB physical memory of the machine. Additional Observations • vm_stat on a clean boot shows ~24 GB of free system RAM before the PyTorch application launches, consistent with normal OS usage. The 40 GiB figure reported by the MPS allocator as “other allocations” does not correspond to identifiable user processes. • The max allowed: 63.65 GiB ceiling reported by MPS exceeds the physical 48 GiB of the machine, suggesting MPS is using a memory limit calculation that does not account for actual physical constraints on unified memory architectures. • macOS 26.4 introduced a related regression (deterministic RuntimeError: MPSGraph does not support tensor dims larger than INT_MAX) in the same MPS buffer stride arithmetic path. That specific error was resolved in 26.4.1, but the OOM regression described here persists. • This operation succeeded on the same hardware under earlier macOS releases. The increased “other allocations” baseline appears to be specific to macOS 26.x. Impact Machine learning workloads that previously ran successfully on 48 GB Apple Silicon machines are failing on macOS 26.4.1 due to this increased baseline GPU memory consumption. Applications using PyTorch MPS, Core ML, and potentially Metal Performance Shaders directly may be affected. Workaround None identified. Reducing application model size or splitting operations into smaller chunks does not resolve the issue because the constraint is in the “other allocations” baseline, not in the application’s own allocations.
Replies
1
Boosts
0
Views
2.5k
Activity
Apr ’26