Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

Component: FoundationModels

Functions for Foundation Models from Apple to run a local AI LLM model with Apple Intelligence.

See also Llama functions for cross platform solutions.

Version macOS Windows Linux Server iOS SDK
15.5 / 16.2 ✅ Yes ❌ No ❌ No 🔶 11%, on macOS ✅ Yes

Item Details Server
FoundationModels.Available
Checks whether the model is available.
Mac/iOS
15.5
  ❌ Server
FoundationModels.AvailableStatus
Queries the availability.
Mac/iOS
15.5
  ❌ Server
FoundationModels.BeginSession
Start a new session in blank slate state with instructions.
Mac/iOS
15.5
  ❌ Server
FoundationModels.CloseSession
Closes the current model session.
Mac/iOS
15.5
  ❌ Server
FoundationModels.ContextSize   New in 16.2
The maximum context size (in tokens) supported by the model.
Mac/iOS
16.2
  ✅ Server
FoundationModels.GetMaximumResponseTokens
Queries the maximum number of tokens the model is allowed to produce in its response.
Mac/iOS
15.5
  ❌ Server
FoundationModels.GetTemperature
Queries the temperature.
Mac/iOS
15.5
  ❌ Server
FoundationModels.Initialize
Initializes Foundation Models by loading a system model.
Mac/iOS
15.5
  ❌ Server
FoundationModels.List
Returns the list of model identifiers.
Mac/iOS
15.5
  ❌ Server
FoundationModels.Prewarm
Prewarm the model.
Mac/iOS
15.5
  ❌ Server
FoundationModels.Release
Release memory for a loaded model.
Mac/iOS
15.5
  ❌ Server
FoundationModels.ReleaseAll
Releases all models.
Mac/iOS
15.5
  ❌ Server
FoundationModels.Respond
Produces a response to a prompt.
Mac/iOS
15.5
  ❌ Server
FoundationModels.SetMaximumResponseTokens
Sets the maximum number of tokens the model is allowed to produce in its response.
Mac/iOS
15.5
  ❌ Server
FoundationModels.SetTemperature
Sets the temperature.
Mac/iOS
15.5
  ❌ Server
FoundationModels.SupportedLanguages
Queries the languages that the model supports.
Mac/iOS
15.5
  ❌ Server
FoundationModels.SupportsLocale
Returns a Boolean indicating whether the given locale is supported by the model.
Mac/iOS
15.5
  ❌ Server
FoundationModels.TokenCount   New in 16.2
Returns the token count for the specified instructions.
Mac/iOS
16.2
  ✅ Server
FoundationModels.Transcript
A full history of interactions, including user inputs and model responses.
Mac/iOS
15.5
  ❌ Server

19 functions shown.

Release notes

Blog Entries

Example Databases