Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

  Core ML for
  on-device models (.aimodel format, iOS 27 / macOS 27, currently beta).
  Apple's own model
  repo covers a handful of last-generation architectures, so I've been
  porting the ones it
  doesn't: hybrid SSMs (Qwen3.5, Granite 4.0 Mamba2, LFM2.5), a
  256-expert MoE
  (Qwen3.6-35B-A3B, ~3B active — runs at 30.9 tok/s on an M4 Max),
  vision-language models
  (Qwen3-VL, Gemma 4 VL), and a real-time detector (RF-DETR, 33–39 FPS
  live on the iPhone
  camera).
Some numbers, all greedy-decode output-exact vs the Hugging Face reference, zero custom kernels, on Apple's pipelined GPU engine:

  - Qwen3.5-0.8B: 71.9 tok/s on iPhone 17 Pro, 210 on M4 Max
  - Gemma 4 E2B: 30.3 on iPhone, 77 on Mac (Google's official QAT int4
  re-exported too)
  - LFM2.5-1.2B: 45.4 on iPhone, 276 on Mac
Two things I learned that I'd want to know before starting:

1. The framework is faster than its reputation. I assumed the hand-tuned MLX would win; on a like-for-like benchmark (Qwen3-0.6B, official export, same phone) Core AI's pipelined engine does 181 tok/s vs MLX's 112. I published the harness and raw data separately [1].

2. The beta has real bugs, and the interesting part of the repo might be the knowledge base documenting them: a 100%-reproducible in-graph KV-cache-write crash (filed as FB23024751 + a public repro) with a working escape (pass the write position as a one-hot mask input instead of computing it in-graph), an MoE expert-gather that over-reads memory (why the 35B number is ~4x behind MLX for now — Apple's own MoE path hits the same op), fp16-exact Neural Engine authoring tricks, and a few platform bugs with standalone repros filed upstream.

Everything is BSD-3: conversion code, verify scripts, a Swift runner for architectures the stock runtime can't drive (N-state models), and a chat app with in-app downloads. Weights are on Hugging Face. Happy to answer anything about the porting process — the per-model cards document every gotcha.

[1] https://github.com/john-rocky/apple-silicon-llm-bench



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: