Install any skill in seconds. Free to start, no credit card required.
Get Started Free →xu-xiang/foundation-models-on-device
Apple FoundationModels 框架,用于设备端大语言模型(LLM)—— iOS 26+ 中的文本生成、配合 @Generable 的引导式生成、工具调用以及快照流式传输。
Passed 22 of 22 test cases with the skill, and 13 of 22 without it.
and 10 more in the full report
9 fixed13 passed either way0 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 9 test cases the skill fixed. Same model, same prompt, with and without the skill.
I want to increase the creative randomness of text outputs when calling Apple's local language model session in Swift. What options struct and parameter should I pass to modify the model's creativity level?
| Checked | Without skill | With skill |
|---|---|---|
| Configures the temperature parameter within GenerationOptions. | Missed | Passed |
The instructions your model reads when the skill loads.
使用 FoundationModels 框架将 Apple 的设备端语言模型集成到应用中的模式。涵盖文本生成、使用 @Generable 的结构化输出、自定义工具调用以及快照流式传输 —— 全部在设备端运行,以支持隐私保护和离线使用。
在创建会话(Session)之前,请务必检查模型的可用性:
struct GenerativeView: View {
private var model = SystemLanguageModel.default
var body: some View {
switch model.availability {
case .available:
ContentView()
case .unavailable(.deviceNotEligible):
Text("设备不符合 Apple Intelligence 的使用条件")
case .unavailable(.appleIntelligenceNotEnabled):
Text("请在设置中启用 Apple Intelligence")
case .unavailable(.modelNotReady):
Text("模型正在下载或尚未就绪")
case .unavailable(let other):
Text("模型不可用:\(other)")
}
}
}
test cases passed, vs 13 / 22 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.