Use apple private cloud model instead of local model

Hello,

I have created this basic swift program:

let session = LanguageModelSession(
    model: .default,
    instructions: "bla bla bla.")

I want to understand what I can put in model parameter (instead of .default). How can I choose between on-device local model (.default I suppose) and apple private cloud model (or any other ?)

Thanks

Answered by DTS Engineer in 862504022

You can create a SystemLanguageModel instance and use it to create a session. The following code example shows how to create a session for the .contentTagging use case:

let model = SystemLanguageModel(useCase: .contentTagging)
let session = LanguageModelSession(model: model, ...)

The Foundation Models framework currently doesn't provide an API to access cloud-based models

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

You can create a SystemLanguageModel instance and use it to create a session. The following code example shows how to create a session for the .contentTagging use case:

let model = SystemLanguageModel(useCase: .contentTagging)
let session = LanguageModelSession(model: model, ...)

The Foundation Models framework currently doesn't provide an API to access cloud-based models

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

Okay so how can I call Apple private cloud api ? Thanks

Accepted Answer

If you meant Apple's Private Cloud Compute (PCC) by "Apple private cloud," it is a system that supports Apple Intelligence. Users may use it indirectly when using Apple Intelligence, but there is currently no API for developers to access PCC.

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

Use apple private cloud model instead of local model
 
 
Q