Skip to content

Instantly share code, notes, and snippets.

View Anemll's full-sized avatar

Anemll Anemll

View GitHub Profile
@Anemll
Anemll / test.swift
Last active June 10, 2025 00:42
Test Apple Foundation Model t/s
import FoundationModels
import Playgrounds
import Foundation
let session = LanguageModelSession()
let start = Date()
let response = try await session.respond(to: "What is Apple Neural Engine and how to use it?")
let responseText = response.content // Replace 'value' with the actual property name from LanguageModelSession.Response<String> that holds the string payload.
print(responseText)
let end = Date()