// // ModelCatalog.swift // Zyquo Local // // Author: Simon-Pierre Boucher // Mail: contact@spboucher.ai // import Foundation /// The curated Featured catalog. GENERATED FROM docs/MODELS.md §3 — the two /// must never drift apart: any Phase 7 verification fix updates both together. /// Sizes are decimal GB, live-verified on the Hub on 2026-07-30. struct CatalogModel: Identifiable, Hashable, Sendable { enum Category: String, CaseIterable, Sendable { case tiny case mid case large case coding case reasoning case general } var repoID: String var params: String var quant: String var sizeGB: Double var minRAMGB: Int var categories: [Category] var blurb: String var id: String { repoID } var sizeBytes: Int64 { Int64(sizeGB * 1_000_000_000) } /// RAM verdict for THIS Mac. var verdict: MemoryAdvisor.Verdict { MemoryAdvisor.verdict(weightsBytes: sizeBytes) } } enum ModelCatalog { /// Starter picks for the empty-state onboarding hero, chosen for this /// Mac's RAM from the featured list (smallest that fit comfortably). static func starterPicks(count: Int = 4) -> [CatalogModel] { let ramGB = Int(MemoryAdvisor.physicalMemoryBytes / 1_073_741_824) var picks: [CatalogModel] = [] // One instant-download tiny, then the best generalists that fit. if let tiny = featured.first(where: { $0.repoID.contains("Qwen3-0.6B") }) { picks.append(tiny) } let comfortable = featured .filter { $0.minRAMGB <= ramGB && $0.verdict == .fits && !picks.contains($0) } .sorted { $0.sizeGB > $1.sizeGB } for model in comfortable where picks.count < count { picks.append(model) } return picks } static let featured: [CatalogModel] = [ // ── Tiny (≤4B) ────────────────────────────────────────────────────── CatalogModel(repoID: "mlx-community/Qwen3-0.6B-4bit", params: "0.6B", quant: "4bit", sizeGB: 0.35, minRAMGB: 8, categories: [.tiny, .general], blurb: "Smallest useful chat model; instant loads."), CatalogModel(repoID: "mlx-community/LFM2.5-1.2B-Instruct-4bit", params: "1.2B", quant: "4bit", sizeGB: 0.66, minRAMGB: 8, categories: [.tiny, .general], blurb: "Liquid AI's 2026 edge model; punchy and very fast."), CatalogModel(repoID: "mlx-community/Llama-3.2-1B-Instruct-4bit", params: "1B", quant: "4bit", sizeGB: 0.71, minRAMGB: 8, categories: [.tiny, .general], blurb: "The classic 1B; most-downloaded tiny LLM."), CatalogModel(repoID: "mlx-community/gemma-3-1b-it-qat-4bit", params: "1B", quant: "QAT-4bit", sizeGB: 0.77, minRAMGB: 8, categories: [.tiny, .general], blurb: "Google QAT checkpoint — best quality-per-byte at 1B."), CatalogModel(repoID: "mlx-community/Qwen3-1.7B-4bit", params: "1.7B", quant: "4bit", sizeGB: 0.98, minRAMGB: 8, categories: [.tiny, .general, .reasoning], blurb: "Hybrid thinking modes in under 1 GB."), CatalogModel(repoID: "mlx-community/SmolLM3-3B-4bit", params: "3B", quant: "4bit", sizeGB: 1.75, minRAMGB: 8, categories: [.tiny, .general], blurb: "HF's fully-open 3B; long context, optional reasoning."), CatalogModel(repoID: "mlx-community/Llama-3.2-3B-Instruct-4bit", params: "3B", quant: "4bit", sizeGB: 1.82, minRAMGB: 8, categories: [.tiny, .general], blurb: "The default “runs anywhere” pick."), CatalogModel(repoID: "mlx-community/Qwen3-4B-Instruct-2507-4bit", params: "4B", quant: "4bit", sizeGB: 2.28, minRAMGB: 8, categories: [.tiny, .general], blurb: "2507 refresh — best ≤4B all-rounder."), CatalogModel(repoID: "mlx-community/gemma-3-4b-it-qat-4bit", params: "4B", quant: "QAT-4bit", sizeGB: 3.03, minRAMGB: 8, categories: [.tiny, .general], blurb: "Vision-capable 4B with QAT quality."), // ── Mid (7–20B) ───────────────────────────────────────────────────── CatalogModel(repoID: "mlx-community/Llama-3.1-8B-Instruct-4bit", params: "8B", quant: "4bit", sizeGB: 4.53, minRAMGB: 16, categories: [.mid, .general], blurb: "The reference 8B; huge prompt/finetune ecosystem."), CatalogModel(repoID: "mlx-community/Qwen3-8B-4bit", params: "8B", quant: "4bit", sizeGB: 4.62, minRAMGB: 16, categories: [.mid, .general, .reasoning], blurb: "Best-selling 8B; thinking mode on demand."), CatalogModel(repoID: "mlx-community/gemma-3-12b-it-qat-4bit", params: "12B", quant: "QAT-4bit", sizeGB: 8.07, minRAMGB: 16, categories: [.mid, .general], blurb: "Sweet spot for 16 GB Macs; strong writing."), CatalogModel(repoID: "mlx-community/Qwen3.5-9B-OptiQ-4bit", params: "9B", quant: "OptiQ-4bit", sizeGB: 8.22, minRAMGB: 16, categories: [.mid, .general], blurb: "2026 Qwen3.5 generation; top mid-size quality."), CatalogModel(repoID: "mlx-community/phi-4-4bit", params: "14.7B", quant: "4bit", sizeGB: 8.26, minRAMGB: 16, categories: [.mid, .general, .reasoning], blurb: "Microsoft dense 14B; excels at math and STEM."), CatalogModel(repoID: "mlx-community/Qwen3-14B-4bit", params: "14B", quant: "4bit", sizeGB: 8.32, minRAMGB: 16, categories: [.mid, .general, .reasoning], blurb: "Stronger sibling of Qwen3-8B; 16 GB flagship."), CatalogModel(repoID: "mlx-community/gpt-oss-20b-MXFP4-Q8", params: "20.9B MoE", quant: "MXFP4-Q8", sizeGB: 12.10, minRAMGB: 16, categories: [.mid, .general, .reasoning], blurb: "OpenAI's open-weights MoE; most-downloaded LLM in the org."), // ── Large (24B+) ──────────────────────────────────────────────────── CatalogModel(repoID: "mlx-community/Mistral-Small-3.2-24B-Instruct-2506-4bit", params: "24B", quant: "4bit", sizeGB: 13.28, minRAMGB: 24, categories: [.large, .general], blurb: "Fast dense 24B, low hallucination, good tool use."), CatalogModel(repoID: "mlx-community/gemma-3-27b-it-qat-4bit", params: "27B", quant: "QAT-4bit", sizeGB: 16.87, minRAMGB: 32, categories: [.large, .general], blurb: "Gemma 3 flagship with QAT; superb chat quality."), CatalogModel(repoID: "mlx-community/GLM-4.7-Flash-4bit", params: "30B MoE", quant: "4bit", sizeGB: 16.87, minRAMGB: 32, categories: [.large, .general, .coding], blurb: "Zhipu's 2026 fast MoE; strong agentic coding."), CatalogModel(repoID: "mlx-community/Qwen3-30B-A3B-Instruct-2507-4bit", params: "30B-A3B MoE", quant: "4bit", sizeGB: 17.20, minRAMGB: 32, categories: [.large, .general], blurb: "3B active params → big-model quality at small-model speed."), CatalogModel(repoID: "mlx-community/Qwen3-32B-4bit", params: "32B", quant: "4bit", sizeGB: 18.45, minRAMGB: 32, categories: [.large, .general, .reasoning], blurb: "Dense 32B with thinking; slower but deeper than the MoE."), CatalogModel(repoID: "mlx-community/Qwen3.6-27B-OptiQ-4bit", params: "27B", quant: "OptiQ-4bit", sizeGB: 20.00, minRAMGB: 32, categories: [.large, .general], blurb: "2026 Qwen3.6 dense; MTP head ≈1.4× faster decode."), CatalogModel(repoID: "mlx-community/Qwen3.6-35B-A3B-OptiQ-4bit", params: "35B-A3B MoE", quant: "OptiQ-4bit", sizeGB: 24.69, minRAMGB: 48, categories: [.large, .general], blurb: "2026 successor to Qwen3-30B-A3B."), CatalogModel(repoID: "mlx-community/Llama-3.3-70B-Instruct-4bit", params: "70B", quant: "4bit", sizeGB: 39.71, minRAMGB: 64, categories: [.large, .general], blurb: "The 70B reference; 64 GB+ Macs only."), // ── Coding ────────────────────────────────────────────────────────── CatalogModel(repoID: "mlx-community/Qwen2.5-Coder-7B-Instruct-4bit", params: "7B", quant: "4bit", sizeGB: 4.30, minRAMGB: 16, categories: [.coding], blurb: "The default small local code model."), CatalogModel(repoID: "mlx-community/Qwen2.5-Coder-14B-Instruct-4bit", params: "14B", quant: "4bit", sizeGB: 8.32, minRAMGB: 16, categories: [.coding], blurb: "Noticeably better completions on 16 GB Macs."), CatalogModel(repoID: "mlx-community/Qwen3-Coder-30B-A3B-Instruct-4bit", params: "30B-A3B MoE", quant: "4bit", sizeGB: 17.20, minRAMGB: 32, categories: [.coding, .large], blurb: "Best local coding model for 32 GB; fast agentic loops."), // ── Reasoning ─────────────────────────────────────────────────────── CatalogModel(repoID: "mlx-community/DeepSeek-R1-0528-Qwen3-8B-4bit", params: "8B", quant: "4bit", sizeGB: 4.62, minRAMGB: 16, categories: [.reasoning], blurb: "R1-0528 distill onto Qwen3-8B; visible chain-of-thought."), CatalogModel(repoID: "mlx-community/DeepSeek-R1-Distill-Qwen-14B-4bit", params: "14B", quant: "4bit", sizeGB: 8.32, minRAMGB: 16, categories: [.reasoning], blurb: "Most-downloaded R1 distill; great math on 16 GB."), CatalogModel(repoID: "mlx-community/Qwen3-30B-A3B-Thinking-2507-4bit", params: "30B-A3B MoE", quant: "4bit", sizeGB: 17.20, minRAMGB: 32, categories: [.reasoning, .large], blurb: "Current best local reasoner under 32 GB."), ] }