https://github.com/ml-explore/mlx-swift ... LXLMCommon
Код: Выделить всё
import MLXLMCommon
Task {
do {
print("Loading model...")
let model = try await loadModel(id: "mlx-community/Qwen3-4B-4bit") { p in
print("Completed: \(p.fractionCompleted)")
}
let session = ChatSession(model)
print(try await session.respond(to: "What are two things to see in San Francisco?"))
print(try await session.respond(to: "How about a great place to eat?"))
} catch {
print("Error loading model: \(error)")
}
}
Мне кажется, что я упускаю что-то простое. Что это может быть?
Подробнее здесь: https://stackoverflow.com/questions/797 ... yavailable
Мобильная версия