Daily Tech Briefing
AI 科技速览

每天 5 分钟内学习 AI。获取最新的人工智能新闻,理解其重要性,并学习如何将其应用于您的工作。

AI 快讯
Hacker News · 2026/8/3 16:54:15

Show HN: Run an 80B Qwen in 4.3 GB of RAM on a Mac, and a 35B on an iPhone

AI 中文解读
大模型跑进手机了!开发者用Swift和Metal做了一个叫Swiftlet的工具,让普通人也能在Mac上只占4.3GB内存运行80B参数的Qwen大模型,甚至能在iPhone上流畅跑35B版,这在业界属于首次把这类大模型塞进手机里。 以前跑大模型至少需要几千GB显存,普通人根本碰不到。Swiftlet的诀窍是:这些模型每次思考只激活约30亿参数,于是它只把核心部分常驻内存,其它部分按需从硬盘读取,就像图书馆只把常用书放桌上,其它放书库随取随看。目前35B模型在Mac上每秒能生成7到11个字,在iPhone上约每秒1个字,虽然不快,但对手机来说已经是奇迹。 这项技术让普通人能用手机离线运行大模型,不用联网、数据不出设备,隐私性大幅提升。比如在飞机上或偏远地区也能用AI聊天。不过也别期待太高,开发者坦言,这类模型聊天写作像大模型,但事实记忆只有小模型水平,适合玩一玩。
Swiftlet Run 35B and 80B Qwen models on ordinary Apple devices, including iPhones. Swiftlet is a Swift + Metal runtime for the Qwen3-Next and Qwen3.5/3.6 MoE hybrid model family. It keeps only the small dense core of a model resident in memory and streams the routed Mixture-of-Experts weights from storage on demand. The result: Model Disk Peak RAM Decode speed (M5 Mac) Qwen3.6-35B-A3B, 4-bit 18 GB 2.6 GB 7 to 11 tok/s Qwen3-Next-80B-A3B, 4-bit 42 GB 4.3 GB 4.5 to 5 tok/s The 35B also runs on an iPhone 17 in about 2.5 GB of RAM, at about 1 tok/s today. As far as we know, that is the first time a model of this class has run natively on a phone. Status: working end to end. Both models generate correct, validated output. The current focus is kernel speed (the decode loop is dispatch bound, not IO bound, so there is clear headroom). One expectation to set honestly: only about 3B parameters are active per token, so these models chat and write like large models but recall facts like small ones. Quick start: try it on a Mac git clone https://github.com/leonickson1/Swiftlet.git && cd Swiftlet swift build -c release # Download the 35B container from Hugging Face (resumable): .build/release/swiftlet-repack \ --from-hf Leonickson/Qwen3.6-35B-A3B-qpack \ --output ~/models/qwen3.6-35b.qpack # Or the 80B (42 GB on disk, still only ~4.3 GB of RAM): .build/release/swiftlet-repack \ --from-hf Leonickson/Qwen3-Next-80B-A3B-qpack \ --output ~/models/qwen3-next-80b.qpack # Chat (applies the model chat template, disables the reasoning block, # keeps conversation state so follow-ups prefill only the new turn): .build/release/swiftlet chat ~/models/qwen3.6-35b.qpack \ "Who wrote One Hundred Years of Solitude?" "What language did he write it in?" # One-shot generation with stats: .build/release/swiftlet generate ~/models/qwen3.6-35b.qpack \ --gpu --chat --prompt "Explain expert streaming in one paragraph." # OpenAI-compatible server (loopback only): .build/release/swiftlet-server --model ~/models/qwen3.6-35b.qpack --port 8080 The same command also repacks raw MLX checkpoints (--from-hf mlx-community/... or --source /path/to/checkpoint). Requirements: Apple Silicon, macOS 14+ or iOS 17+, free SSD space for the container (18 GB for the 35B, 42 GB for the 80B). Try it on your phone The 35B runs on iPhone inside Priv AI on the App Store: open Settings, then Experimental Models, and download the model. It streams from storage and chats on-device with no server involved. The Experimental Models feature ships in the newest app version, which is still in App Store review, so it may not appear for a couple of days. If you want the phone experience today, build the app from source: the app is open source at leonickson1/localLLM. Clone this repo next to it as swiftlet, open the Xcode project, and run it on your iPhone. How it works These models activate only about 3B of their parameters per token. Each layer routes every token to 10 of 512 experts (80B) or 8 of 256 (35B). Swiftlet: keeps the dense weights resident: attention, DeltaNet projections, routers, shared experts, embeddings. About 1.3 GB (35B) or 2.5 GB (80B) at 4-bit; repacks the tens of thousands of routed experts into fixed-stride blobs in a .qpack container, so fetching one expert is exactly one pread from SSD, no mmap and no page-cache thrash; caches hot experts in a bounded pool with LFU plus recency eviction. Cache size barely affects speed (measured 43 to 70 percent hit rates at the same throughput), because Apple SSDs absorb the misses; runs the whole forward pass on Metal with runtime-compiled shaders, so no Metal toolchain is needed at build time and the same code ships on iOS. 75 percent of the layers use Gated DeltaNet linear attention with a fixed-size recurrent state, so there is no growing KV cache for those layers at any context length. Four ways to use it Swiftlet is a library first: The Swift package. Add SwiftletCore to any macOS or iOS app and
分享
阅读原文