◉RORK LABJP
●SUBDOMAIN — Rork can now connect your web app to a subdomain only, leaving your root domain and www untouched (12/1)●UPDATES — expo-updates 58.0.23 fixes Android release builds embedding a stale runtime version●FLASH END — Intro pricing for Gemini Flash models ends 12/31, 29 days from now. Time to recheck AI feature costs●HMR — Some report the dev server picking up another server's bundle and then exiting●FIRST VIEW — Map the first screen for a normal launch, a notification, and a link, and back navigation stops surprising you●CARBON — Gemini 4 Carbon and Argon are now at standard rates: $4.00 input, $20.00 output per 1M tokens●SUBDOMAIN — Rork can now connect your web app to a subdomain only, leaving your root domain and www untouched (12/1)●UPDATES — expo-updates 58.0.23 fixes Android release builds embedding a stale runtime version●FLASH END — Intro pricing for Gemini Flash models ends 12/31, 29 days from now. Time to recheck AI feature costs●HMR — Some report the dev server picking up another server's bundle and then exiting●FIRST VIEW — Map the first screen for a normal launch, a notification, and a link, and back navigation stops surprising you●CARBON — Gemini 4 Carbon and Argon are now at standard rates: $4.00 input, $20.00 output per 1M tokens
Articles/AI Models
◉ AI Models/2026-03-28Advanced

Rork × Core ML Custom Model Development × On-Device AI

Notes from training a model in Create ML, shipping it inside a Rork Max app with Core ML, and deciding per request whether inference runs on device or in the cloud — with measured routing, quantization, Vision and Natural Language integration, and OTA model swaps.

rork-max40core-mlmachine-learningon-device-aivision-frameworkapp-development12

✦ Premium Article

The Flight Where Half My AI Features Stopped Working

I tried the auto-tagging feature I'd just shipped while sitting on a plane. The spinner kept turning after I finished typing, and nothing came back before we landed. Obvious in hindsight — the request was going to a cloud API — but staring at that screen is when it hit me that the feature had only ever existed on top of a network connection.

That flight is why I started moving inference on device. Privacy and cost became reasons later. The first motivation was simply that it should work with no signal.

Rork Max works with Apple's Core ML directly: train in Create ML, quantize, ship the model inside the app, and keep inference local. What follows is that whole path, including the places where I got stuck.

Moving everything on device didn't solve everything, though. So we start with where the line actually sits.


On-Device AI Architecture and Core ML's Role

Understanding On-Device AI

On-device AI executes ML inference directly on the device's processors (CPU, GPU, Neural Engine) rather than sending data to cloud APIs. This approach delivers compelling advantages.

Key Benefits

  • Privacy by Default: Data never leaves the device
  • Sub-Second Latency: Millisecond-level inference without network roundtrips
  • Offline Operation: Works without internet connectivity
  • Cost Efficiency: No API costs or infrastructure overhead
  • Battery Optimization: Modern chips (Neural Engine) are power-efficient for inference

Core ML: The Unified Interface

Apple's Core ML is a unified framework that converts models trained in popular frameworks—TensorFlow, PyTorch, Scikit-learn, and others—into a single format (.mlmodel) that runs efficiently on iOS devices.

Core ML Strengths

  • Multi-Framework Support: TensorFlow, PyTorch, ONNX all convert to .mlmodel
  • Automatic Optimization: Intelligently dispatches to CPU, GPU, or Neural Engine
  • Tight Integration: Works seamlessly with Vision, Natural Language, and other frameworks
  • Memory Efficiency: Built-in quantization reduces model footprint significantly

Rork Max provides native support for Core ML, enabling you to integrate models without touching complex Swift code.


✦

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
✦Custom model training in Create ML through Core ML quantization, step by step
✦End-to-end Vision and Natural Language integration inside a Rork Max app
✦An inference router that splits on-device and cloud work — measured at 67% local and 58% lower API spend
Secure payment via Stripe · Cancel anytime
✦

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Rork Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • ✦Copy-paste ready implementation code
  • ✦New advanced guides published daily
  • ✦$5/mo or $10 for lifetime access
View Membership →

Related Articles

◉ AI Models2026-04-10
Improving Quality of Rork AI Native App Generation: SwiftUI Output Pitfalls
When Rork AI's SwiftUI output misses, the thing to fix is usually the instruction, not the code. Here is what happened when I regenerated one screen three ways and counted the round trips, plus the device conditions worth locking down before you send a screenshot.
◉ AI Models2026-11-24
On December 1, Your App's gemini-2.5-flash Calls Get Rerouted Without an Error. How to Compare the Answers Before That Happens
From December 1, calls to gemini-2.5-flash and gemini-2.5-pro are not shut off but automatically routed to successor models. Because nothing errors out, changes in answer shape and cost are easy to miss. Here is how to find the model names in a Rork-built app, compare answers against the successor now, and decide whether to switch yourself or let the routing happen.
◉ AI Models2026-11-19
Your GPT-6 Astra Became 6.2 Overnight: Three Checks Before You Rebuild Anything
Since November 18, Rork projects that had GPT-6 Astra or GPT-6.1 Sol selected now build with the 6.2 versions at the same effort. If the answers suddenly feel different, here are three checks to run before rebuilding a screen, plus a small yardstick request for measuring the change.