Posts under Machine Learning & AI topic

Post

Replies

Boosts

Views

Activity

Rich SwiftUI Rendering in the Siri Overlay
For intents that return complex markdown, code snippets, or structured layouts, what are the rendering capabilities and resource constraints of custom SwiftUI views returned via Snippet inside the Siri voice overlay? Are interactive controls (like buttons, copy-to-clipboard, or scroll views) supported inside the Siri-overlay SwiftUI container?
1
0
32
10m
No such module 'CoreAI'
Hi everyone, Recently I downloaded the last XCode (Version 27.0 beta) and I'm trying to start to play with CoreAI but it's not possible so far to import the CoreAI framework. I'm using the last version of the iPhone simulator. What am I missing?
0
0
20
7h
If you are having problems and find that you need to downgrade and then image playground doesn't work please follow these steps
Make sure that you have everything Apple Intelligence enabled because it took up to 24 to 48 hours for the image playground app to work for me. Note this is coming from a fellow developer not official update as we cannot do that on the forums. I am only sharing my own experience. It may take some time for the support files like it did for me to become available for image playground again. Sincerely, Donald Kirby
1
0
23
11h
Guardrail configuration options?
Is anything configurable for LanguageModelSession.Guardrails besides the default? I'm prototyping a camping app, and it's constantly slamming into guardrail errors when I use the new foundation model interface. Any subjects relating to fishing, survival, etc. won't generate. For example the prompt "How can I kill deer ticks using a clothing treatment?" returns a generation error. The results that I get are great when it works, but so far the local model sessions are extremely unreliable.
3
2
364
15h
New Siri Waitlist not activating on iPhone/iPad after 4 days — macOS workaround works but not syncing
Hi, I joined the New Siri waitlist on June 8 (the day of WWDC 2026) and as of June 12, I have still not been granted access on iPhone or iPad — that's 4 days with no activation. I used the Terminal workaround on macOS 27 Golden Gate Beta (EnhancedSiriWaitlist → Enabled = NO), which successfully activated New Siri on my Mac. However, it has not synced to my other devices despite being on the same Apple ID with iCloud Siri sync enabled. Device details: Mac mini (macOS 27 Golden Gate Beta) — New Siri active ✓ iPhone (iOS 27.0 Developer Beta 1) — Joined Waitlist since June 8 iPad (iPadOS 27.0 Developer Beta 1) — Joined Waitlist since June 8 Steps already attempted: Multiple restarts on iPhone and iPad Toggled iCloud Siri sync off/on Toggled Siri off/on multiple times iCloud storage sufficient (200GB plan, 53GB used) 4 days seems far beyond normal rollout time. Is this a known issue? Is there anything on the account side that could be blocking activation? Thank you.
0
0
29
15h
New Siri Wait List on MacOS Golden Gate
I installed the new MacOS Beta 1 on Monday, June 8 and Siri was requested. It is now Thursday, June 11 and I am still on the wait list. The conference is almost over with any interactive sessions. I am concerned that my configuration may be causing a bug. The AppleID I am logged in on the Mac (M4, 24GBs RAM, 512GB storage-130GB free) is not the same as my paid Developer AppleID used to download Xcode, etc. (it is however a Developer ID). This has never been a problem before. Could this be causing an issue? Related question, since I have not gotten the "New Siri" will this actually change the Foundation Models?
1
0
72
17h
Using AssistantEntity with existing AppEntities for iOS17+
Hi, I have an existing app with AppEntities defined, that works on iOS17+. The AppEntities also have EntityPropertyQuery defined, so they work as 'find intents'. I want to use the new @AssistantEntity which is iOS18+ where possible, while supporting the previous versions. What's the best way to do this? For e.g. I have a 'log' AppEntity: @available(iOS 17.0, *) struct CJLogAppEntity: AppEntity { static var defaultQuery = CJLogAppEntityQuery() .... } struct CJLogAppEntityQuery: EntityPropertyQuery { ... } How do I adopt this with @AssistantEntity(schema: .journal.entry) for iOS18, while maintaining compatibility with iOS17? I don't want to include two different versions of the same AppEntity. Would it just with with the correct @available annotations on both entities?
5
1
93
21h
Using EntityPropertyQuery with SwiftData
I’m using SwiftData in my app and would like to support the standard „Find“ Shortcut. What is the best way to use the EntityPropertyQuery’s entities(matching: mode: sortedBy: limit:) function with SwiftData? I’m currently using a Swift Package called CompoundPredicate to construct my predicates based on the QueryProperties and the SortingOptions. I know that SwiftData started to support compound predicates with macOS 14.4/iOS 17.4 or later. But from what I understand they are not dynamic and are validated at compile time. What is a native way to handle this dynamic predicate case of App Intent fetches?
1
0
51
22h
Foundation Model Variation within the same iOS different hardware.
We understand that on-device Foundation Models (FMs) can evolve between OS releases. To help us accurately scope our application capabilities and performance expectations for multiplatform development, could you clarify the variation of these new on-device models across different hardware? Specifically: Within the same OS & device family: Do the architecture, parameters, or capabilities of the on-device models vary based on hardware tiers (e.g., iPhone vs. iPhone Pro, or MacBook Air M5 vs. MacBook Pro with M5 Pro)? Across different device form factors: Are there model variations between hardware families running equivalent OS releases (e.g., Mac vs. iPhone)? Knowing if we are targeting a uniform model baseline or a tiered model ecosystem will greatly help us optimise our App Intelligence features or at least set us with proper expectations in scope and capabilities. Thanks.
2
0
55
1d
关于我使用Swift和Metal制作的神经网络引擎
我今年18岁。没有机器学习背景,没有上过大学,高中都没去上,没有导师。 几天前我盯着一张纸发呆。突然想:为什么计算机神经网络一定要是2D的?可以模拟生物吗?为什么一定要在平面上算?如果多个平面,岂不是翻倍?如果把六张纸想象成一个魔方,六个面各自承载神经元,八条体对角线变成新的通信通道会怎么样? 我真的很喜欢折腾这些,然后我立刻制定了详细计划,使用AI工具辅助写下了第一个 kernel。跑崩了。我又重新想了一下,和qq群友分享了我的目标,又写。又崩。连续几十次。没有 PyTorch,没有 TensorFlow,没有 CUDA。只有Swift和Metal。因为我的电脑显卡是AMD Vega 64,没装任何框架辅助,因为我想明白最底层的运行方式是什么原理。 这就是CubeNN。 ##以下为AI的详细解答,内容与架构改动太多,我在这里一次讲不清楚 它是什么 一个用魔方几何作为计算架构的神经网络引擎。 标准 Transformer: 把数据排成一行,O(n²) 地互相看 CubeNN: 把数据分布在 14 个面上,只在该看的地方看 6 个标准面 → 块稀疏注意力(粗看全局 + 细看局部) 8 个 X 面对角线 → 跨面信息桥(不做 Attention,只负责传递) 每轮:6 面算 → 投影到 8 X 面 → 上采样精炼 → 融合回 6 面 最关键的是 Cube Cascade——一个树+链级联推理: 树阶段: 1 个魔方 spawn 8 个 → 8 个 spawn 64 个 → 73 个并行探索 GPU 上同时跑,选最优路径 链阶段: 最优叶子无限深度精炼 3-5 步收敛,方差提升 ~7% 怎么实现的 纯 Swift + Metal。零依赖。零框架。 // 大致代码就是这些 import Metal import Foundation let device = MTLCreateSystemDefaultDevice()! let library = try! device.makeLibrary(filepath: "cube_nn.metallib") // ...12 个 GPU kernel,12,000 次 dispatch 关键技术决策: 单 Command Buffer:整个树阶段 73 个魔方的全部 kernel dispatch 打包进一个 CB,0 次 CPU-GPU 同步 Pipeline State 缓存:编码从 1022ms 降到 42ms Buffer 偏移:所有 73 个魔方的 14 个面存进一个连续 buffer,kernel 通过 buffer(15) 传偏移量 FP16:N≥64 时半精度提速 21% 性能 ##经过测试,但是因设备差异可能不准确,仅参考 AMD Radeon RX Vega 64 (2017 年显卡, 14nm, 295W): 规模 神经元 魔方数 耗时 N=32 6,144 73 (树) 435ms N=64 24,576 21 (树) 817ms N=128 98,304 1 116ms N=32 全连接 Attention 每层 201M FLOP → CubeNN 块稀疏 370K FLOP (544× 减少) N=128 全连接需要 32GB 显存(物理上不存在)→ CubeNN 用 192KB N=256 全连接需要 2.2T FLOP → CubeNN 52M FLOP (42,300× 减少) 代码体积:161KB。 对比 PyTorch 的 800MB。 我经历了什么 这个项目最困难的不是写 kernel,是在没有任何人告诉我"能不能做"的情况下,靠反复试错找到路。 第一次试图跑 73 个魔方,GPU 直接 hang 了。花了 3 天定位到是 Command Buffer 堆叠过多。 改了 single encoder 方案,又碰上 SIGILL——Metal 不允许 makeBuffer(length: 0),B=0 时创建了零长度 buffer。 想用 threadgroup memory 做 kernel fusion,结果跨 threadgroup 读不到数据,才明白 LDS 是 per-group 的。 N=64 的 FP16 要手动写 float↔half 转换函数,因为 macOS 11 上 Float16 类型被标为 unavailable。 每一次崩溃都教会我一个 Metal 的底层细节。没有人教我,但 Metal 的报错信息就是最好的老师。 为什么发在 Apple 开发者论坛 因为这是为苹果生态而生的项目。CubeNN 从头到尾只用了两个东西:Swift 和 Metal。它不需要移植就能跑在任何 Apple Silicon Mac 上(API兼容)。如果未来能把部分 kernel 映射到 Neural Engine,效率会再翻几倍。 我想问 Apple 的 Metal 工程师和 Core ML 团队: ** 有没有更好的 GPU 任务调度方式?**目前表现仍然欠佳(对于我这个完美主义者来说),可能改得有点乱了 有没有兴趣评估这个架构在 M4 上的表现? 我手里只有 Vega 64。M4 GPU + ANE方法 跑 CubeNN 会是什么效果? 源代码 ├── run.swift # 统一 CLI,参数化 N/B/depth ├── src/ │ ├── cube_nn.metal # FP16 kernel │ └── cube_nn_fp32.metal # FP32 kernel └── benchmarks/ # 实测数据 如果你读到了这里——谢谢你。一个门外汉靠痴狂的,纯粹到几乎是妄想的主意和Metal走到了这里。我懂的不是很多,如果这个架构有任何价值,我想让它变得更好。任何建议、批评、或者指教,都非常欢迎。
0
0
35
1d
Rich SwiftUI Rendering in the Siri Overlay
For intents that return complex markdown, code snippets, or structured layouts, what are the rendering capabilities and resource constraints of custom SwiftUI views returned via Snippet inside the Siri voice overlay? Are interactive controls (like buttons, copy-to-clipboard, or scroll views) supported inside the Siri-overlay SwiftUI container?
Replies
1
Boosts
0
Views
32
Activity
10m
No such module 'CoreAI'
Hi everyone, Recently I downloaded the last XCode (Version 27.0 beta) and I'm trying to start to play with CoreAI but it's not possible so far to import the CoreAI framework. I'm using the last version of the iPhone simulator. What am I missing?
Replies
0
Boosts
0
Views
20
Activity
7h
Custom vocabulary for speech and entity resolution
Whisper and other STT APIs let you pass a custom vocabulary or initial_prompt to bias recognition toward domain-specific proper nouns. In the App Intents / Siri stack, is there an equivalent way to supply dynamic, per-user term lists — for example favorites or recently used items — to improve how spoken names are transcribed or resolved?
Replies
1
Boosts
0
Views
36
Activity
9h
If you are having problems and find that you need to downgrade and then image playground doesn't work please follow these steps
Make sure that you have everything Apple Intelligence enabled because it took up to 24 to 48 hours for the image playground app to work for me. Note this is coming from a fellow developer not official update as we cannot do that on the forums. I am only sharing my own experience. It may take some time for the support files like it did for me to become available for image playground again. Sincerely, Donald Kirby
Replies
1
Boosts
0
Views
23
Activity
11h
Running ML Models on software and hardware stack layer.
This year, new APIs were introduced such as l Metal Performance Shaders which provide access to high-performance Metal kernel. But this is still GPU. Are there APIs or plans to provide API and language to access ANE layer?
Replies
1
Boosts
0
Views
30
Activity
12h
Do we need to migrate SiriKit INIntent to AppIntent for Siri AI?
Can the new Siri correctly handle SiriKit INIntent? My app uses INIntent like INSendMessageIntent. It is used not only for Siri action but also used Communication notifications and CarPlay and more OS features. Is any migration required?
Replies
1
Boosts
0
Views
37
Activity
14h
Guardrail configuration options?
Is anything configurable for LanguageModelSession.Guardrails besides the default? I'm prototyping a camping app, and it's constantly slamming into guardrail errors when I use the new foundation model interface. Any subjects relating to fishing, survival, etc. won't generate. For example the prompt "How can I kill deer ticks using a clothing treatment?" returns a generation error. The results that I get are great when it works, but so far the local model sessions are extremely unreliable.
Replies
3
Boosts
2
Views
364
Activity
15h
Core AI ComputeStream Init Function question.
Does this API only work for inference running on the GPU? If the inference runs on the ANE, can I still use this API? I noticed that the commandQueue parameter is an MTLCommandqueue? https://developer.apple.com/documentation/coreai/computestream/init(commandqueue:)
Replies
0
Boosts
0
Views
22
Activity
15h
I’ve been waiting for Siri AI for 48 hours, does anyone have any information about this?
I’ve found nothing about the waitlist, like when are there expected openings, how does an opening occur, and do I need to do anything else except join the waitlist? It’s been indexing for the same amount of time that I’ve been waiting for Siri, so is that a factor?
Replies
6
Boosts
0
Views
163
Activity
15h
TTS Advanced Speech Generation: Expressive voices
During WWDC26 Keynote a second generation on-device model was announced with better speech generation capabilities. Is there a new API available for developers to generate speech?
Replies
0
Boosts
1
Views
32
Activity
15h
Siri waitlist
I downloaded the beta iOS 27 and I’m still on the waitlist, as are a whole bunch of other people. Is there like a bug of people not getting past the new Siri waitlist?
Replies
9
Boosts
1
Views
4.2k
Activity
15h
New Siri Waitlist not activating on iPhone/iPad after 4 days — macOS workaround works but not syncing
Hi, I joined the New Siri waitlist on June 8 (the day of WWDC 2026) and as of June 12, I have still not been granted access on iPhone or iPad — that's 4 days with no activation. I used the Terminal workaround on macOS 27 Golden Gate Beta (EnhancedSiriWaitlist → Enabled = NO), which successfully activated New Siri on my Mac. However, it has not synced to my other devices despite being on the same Apple ID with iCloud Siri sync enabled. Device details: Mac mini (macOS 27 Golden Gate Beta) — New Siri active ✓ iPhone (iOS 27.0 Developer Beta 1) — Joined Waitlist since June 8 iPad (iPadOS 27.0 Developer Beta 1) — Joined Waitlist since June 8 Steps already attempted: Multiple restarts on iPhone and iPad Toggled iCloud Siri sync off/on Toggled Siri off/on multiple times iCloud storage sufficient (200GB plan, 53GB used) 4 days seems far beyond normal rollout time. Is this a known issue? Is there anything on the account side that could be blocking activation? Thank you.
Replies
0
Boosts
0
Views
29
Activity
15h
Siri ai
I have been waiting for ios27 siri since 5 pm monday its Friday now im still waiting
Replies
0
Boosts
0
Views
22
Activity
16h
New Siri Wait List on MacOS Golden Gate
I installed the new MacOS Beta 1 on Monday, June 8 and Siri was requested. It is now Thursday, June 11 and I am still on the wait list. The conference is almost over with any interactive sessions. I am concerned that my configuration may be causing a bug. The AppleID I am logged in on the Mac (M4, 24GBs RAM, 512GB storage-130GB free) is not the same as my paid Developer AppleID used to download Xcode, etc. (it is however a Developer ID). This has never been a problem before. Could this be causing an issue? Related question, since I have not gotten the "New Siri" will this actually change the Foundation Models?
Replies
1
Boosts
0
Views
72
Activity
17h
Wait Time for Siri AI waitlist
I submitted my application more than 15 hours ago, and it usually takes a long time to get a spot with this application.
Replies
3
Boosts
0
Views
608
Activity
17h
What is _the_ proper way to intercept tool calls modify them or dynamically approve/reject them?
What is the proper way to intercept tool calls modify them or dynamically approve/reject them?
Replies
4
Boosts
0
Views
96
Activity
20h
Using AssistantEntity with existing AppEntities for iOS17+
Hi, I have an existing app with AppEntities defined, that works on iOS17+. The AppEntities also have EntityPropertyQuery defined, so they work as 'find intents'. I want to use the new @AssistantEntity which is iOS18+ where possible, while supporting the previous versions. What's the best way to do this? For e.g. I have a 'log' AppEntity: @available(iOS 17.0, *) struct CJLogAppEntity: AppEntity { static var defaultQuery = CJLogAppEntityQuery() .... } struct CJLogAppEntityQuery: EntityPropertyQuery { ... } How do I adopt this with @AssistantEntity(schema: .journal.entry) for iOS18, while maintaining compatibility with iOS17? I don't want to include two different versions of the same AppEntity. Would it just with with the correct @available annotations on both entities?
Replies
5
Boosts
1
Views
93
Activity
21h
Using EntityPropertyQuery with SwiftData
I’m using SwiftData in my app and would like to support the standard „Find“ Shortcut. What is the best way to use the EntityPropertyQuery’s entities(matching: mode: sortedBy: limit:) function with SwiftData? I’m currently using a Swift Package called CompoundPredicate to construct my predicates based on the QueryProperties and the SortingOptions. I know that SwiftData started to support compound predicates with macOS 14.4/iOS 17.4 or later. But from what I understand they are not dynamic and are validated at compile time. What is a native way to handle this dynamic predicate case of App Intent fetches?
Replies
1
Boosts
0
Views
51
Activity
22h
Foundation Model Variation within the same iOS different hardware.
We understand that on-device Foundation Models (FMs) can evolve between OS releases. To help us accurately scope our application capabilities and performance expectations for multiplatform development, could you clarify the variation of these new on-device models across different hardware? Specifically: Within the same OS & device family: Do the architecture, parameters, or capabilities of the on-device models vary based on hardware tiers (e.g., iPhone vs. iPhone Pro, or MacBook Air M5 vs. MacBook Pro with M5 Pro)? Across different device form factors: Are there model variations between hardware families running equivalent OS releases (e.g., Mac vs. iPhone)? Knowing if we are targeting a uniform model baseline or a tiered model ecosystem will greatly help us optimise our App Intelligence features or at least set us with proper expectations in scope and capabilities. Thanks.
Replies
2
Boosts
0
Views
55
Activity
1d
关于我使用Swift和Metal制作的神经网络引擎
我今年18岁。没有机器学习背景,没有上过大学,高中都没去上,没有导师。 几天前我盯着一张纸发呆。突然想:为什么计算机神经网络一定要是2D的?可以模拟生物吗?为什么一定要在平面上算?如果多个平面,岂不是翻倍?如果把六张纸想象成一个魔方,六个面各自承载神经元,八条体对角线变成新的通信通道会怎么样? 我真的很喜欢折腾这些,然后我立刻制定了详细计划,使用AI工具辅助写下了第一个 kernel。跑崩了。我又重新想了一下,和qq群友分享了我的目标,又写。又崩。连续几十次。没有 PyTorch,没有 TensorFlow,没有 CUDA。只有Swift和Metal。因为我的电脑显卡是AMD Vega 64,没装任何框架辅助,因为我想明白最底层的运行方式是什么原理。 这就是CubeNN。 ##以下为AI的详细解答,内容与架构改动太多,我在这里一次讲不清楚 它是什么 一个用魔方几何作为计算架构的神经网络引擎。 标准 Transformer: 把数据排成一行,O(n²) 地互相看 CubeNN: 把数据分布在 14 个面上,只在该看的地方看 6 个标准面 → 块稀疏注意力(粗看全局 + 细看局部) 8 个 X 面对角线 → 跨面信息桥(不做 Attention,只负责传递) 每轮:6 面算 → 投影到 8 X 面 → 上采样精炼 → 融合回 6 面 最关键的是 Cube Cascade——一个树+链级联推理: 树阶段: 1 个魔方 spawn 8 个 → 8 个 spawn 64 个 → 73 个并行探索 GPU 上同时跑,选最优路径 链阶段: 最优叶子无限深度精炼 3-5 步收敛,方差提升 ~7% 怎么实现的 纯 Swift + Metal。零依赖。零框架。 // 大致代码就是这些 import Metal import Foundation let device = MTLCreateSystemDefaultDevice()! let library = try! device.makeLibrary(filepath: "cube_nn.metallib") // ...12 个 GPU kernel,12,000 次 dispatch 关键技术决策: 单 Command Buffer:整个树阶段 73 个魔方的全部 kernel dispatch 打包进一个 CB,0 次 CPU-GPU 同步 Pipeline State 缓存:编码从 1022ms 降到 42ms Buffer 偏移:所有 73 个魔方的 14 个面存进一个连续 buffer,kernel 通过 buffer(15) 传偏移量 FP16:N≥64 时半精度提速 21% 性能 ##经过测试,但是因设备差异可能不准确,仅参考 AMD Radeon RX Vega 64 (2017 年显卡, 14nm, 295W): 规模 神经元 魔方数 耗时 N=32 6,144 73 (树) 435ms N=64 24,576 21 (树) 817ms N=128 98,304 1 116ms N=32 全连接 Attention 每层 201M FLOP → CubeNN 块稀疏 370K FLOP (544× 减少) N=128 全连接需要 32GB 显存(物理上不存在)→ CubeNN 用 192KB N=256 全连接需要 2.2T FLOP → CubeNN 52M FLOP (42,300× 减少) 代码体积:161KB。 对比 PyTorch 的 800MB。 我经历了什么 这个项目最困难的不是写 kernel,是在没有任何人告诉我"能不能做"的情况下,靠反复试错找到路。 第一次试图跑 73 个魔方,GPU 直接 hang 了。花了 3 天定位到是 Command Buffer 堆叠过多。 改了 single encoder 方案,又碰上 SIGILL——Metal 不允许 makeBuffer(length: 0),B=0 时创建了零长度 buffer。 想用 threadgroup memory 做 kernel fusion,结果跨 threadgroup 读不到数据,才明白 LDS 是 per-group 的。 N=64 的 FP16 要手动写 float↔half 转换函数,因为 macOS 11 上 Float16 类型被标为 unavailable。 每一次崩溃都教会我一个 Metal 的底层细节。没有人教我,但 Metal 的报错信息就是最好的老师。 为什么发在 Apple 开发者论坛 因为这是为苹果生态而生的项目。CubeNN 从头到尾只用了两个东西:Swift 和 Metal。它不需要移植就能跑在任何 Apple Silicon Mac 上(API兼容)。如果未来能把部分 kernel 映射到 Neural Engine,效率会再翻几倍。 我想问 Apple 的 Metal 工程师和 Core ML 团队: ** 有没有更好的 GPU 任务调度方式?**目前表现仍然欠佳(对于我这个完美主义者来说),可能改得有点乱了 有没有兴趣评估这个架构在 M4 上的表现? 我手里只有 Vega 64。M4 GPU + ANE方法 跑 CubeNN 会是什么效果? 源代码 ├── run.swift # 统一 CLI,参数化 N/B/depth ├── src/ │ ├── cube_nn.metal # FP16 kernel │ └── cube_nn_fp32.metal # FP32 kernel └── benchmarks/ # 实测数据 如果你读到了这里——谢谢你。一个门外汉靠痴狂的,纯粹到几乎是妄想的主意和Metal走到了这里。我懂的不是很多,如果这个架构有任何价值,我想让它变得更好。任何建议、批评、或者指教,都非常欢迎。
Replies
0
Boosts
0
Views
35
Activity
1d