I Need some clarifications about FoundationModels

Hello

I’m experimenting with Apple’s on‑device language model via the FoundationModels framework in Xcode (using LanguageModelSession in my code). I’d like to confirm a few points:

• Is the language model provided by FoundationModels designed and trained by Apple? Or is it based on an open‑source model?

• Is this on‑device model available on iOS (and iPadOS), or is it limited to macOS?

• When I write code in Xcode, is code completion powered by this same local model? If so, why isn’t the same model available in the left‑hand chat sidebar in Xcode (so that I can use it there instead of relying on ChatGPT)?

• Can I grant this local model access to my personal data (photos, contacts, SMS, emails) so it can answer questions based on that information? If yes, what APIs, permission prompts, and privacy constraints apply?

Thanks

Happy to help answer some of these!

Yes. The Foundation Models framework uses the on-device system foundation model. It's an ~3 billion parameter model designed and trained by Apple.

Is the language model provided by FoundationModels designed and trained by Apple? Or is it based on an open‑source model?

The exact same on-device model is available on iOS, iPadOS, macOS, and VisionOS on all devices that support Apple Intelligence.

Is this on‑device model available on iOS (and iPadOS), or is it limited to macOS?

No. The general on-device model you access via Foundation Models is not a coding model and isn't suitable for most code tasks. Xcode on Mac has a separate built-in coding model to help with code completion.

When I write code in Xcode, is code completion powered by this same local model? If so, why isn’t the same model available in the left‑hand chat sidebar in Xcode (so that I can use it there instead of relying on ChatGPT)?

Yes and no. You can give the on-device model access to that kind of information using Tool calling and the normal Swift Calendar/MailKit/Photos frameworks with normal app entitlements to request permission from your app's user. There is no way to give the on-device model blanket permission to a person's information. Requesting access to information is the same as it would be for any app feature.

Can I grant this local model access to my personal data (photos, contacts, SMS, emails) so it can answer questions based on that information? If yes, what APIs, permission prompts, and privacy constraints apply?

You can read about all the details of Apple's model architectures and training...

Thanks a lot for your answer.

Is there a way to talk directly with the "separate built-in coding model" you are taking about, without Xcode ? (I suppose you are talking about "Predictive Code completion model").

Thanks

I Need some clarifications about FoundationModels
 
 
Q