Back to walidsassi.com
Running large language models locally on Apple Silicon

Local LLMs on Apple Silicon, Part 1: From Compatibility to Your First Local Chat

Cloud APIs put a frontier model behind a single HTTPS call. That convenience is hard to beat, and for most production workloads it remains the right choice. But something has shifted over the last couple of years: the gap between “what a hosted model can do” and “what a model running on your laptop can do” has narrowed enough that local inference is no longer a curiosity. For developers, especially those of us building on Apple Silicon, it has become a serious option. ...

May 21, 2026 · 19 min · Walid Sassi
Claude Agents in Claude Code, the new agent view for multi-agent iOS workflows

Claude Agents: Multi-Agent iOS Workflows in Claude Code

A walkthrough of Anthropic’s new Claude Agents (agent view) inside Claude Code on iOS: how to run a Clean Architecture refactor agent and a unit-testing agent in parallel on isolated Git worktrees, with the full lifecycle and synchronisation pitfalls.

May 13, 2026 · 12 min · Walid Sassi
MLX Embedders, Text Embeddings on Apple Silicon with Swift

MLX Embedders in Swift: On-Device Text Embeddings for iOS

In Part 1 of this series, we built a minimal LLM inference pipeline on Apple Silicon using MLX Swift. In Part 2, we quantized a model from scratch and saw how 4-bit precision makes billion-parameter models tractable on a phone. This article introduces MLX Embedders, specifically the MLXEmbedders Swift library, and takes a different angle. Instead of generating text, we are going to encode meaning. A user types: “best hikes near a volcano.” A keyword search returns nothing useful. An embedding-based system returns exactly what they need, because it understands what the words mean, not just what they spell. That capability is what embeddings unlock, and it is the foundation of every serious AI feature in production today: semantic search, recommendation systems, RAG pipelines, and clustering. ...

April 24, 2026 · 19 min · Walid Sassi
Quantization in LLMs for mobile developers

Quantization in LLMs: How to Run AI on Your iPhone Without Burning It

In Part 1 of this series, we set up the MLX ecosystem and ran a language model locally on Apple Silicon. If you haven’t read it yet, it’s worth starting there. This article tackles the question that naturally follows: how do you fit a multi-billion parameter model into a device with 8 GB of RAM? The answer is quantization, and understanding it will change how you think about on-device AI. Introduction: LLMs Are Just Very Large Matrices Before we can explain quantization, we need to be clear about what we’re actually compressing. ...

April 6, 2026 · 10 min · Walid Sassi
MLX Swift, On-Device Large Language Models on Apple Silicon

MLX Swift: Enabling On-Device Large Language Models on Apple Silicon

Abstract The proliferation of large-scale neural language models has, until recently, been contingent upon access to remote computational infrastructure. The architectural characteristics of Apple Silicon, most notably its unified memory subsystem, present a substantive departure from this dependency. This article examines MLX Swift, a native Swift binding to Apple’s MLX machine learning framework, as a mechanism for deploying quantized Large Language Models (LLMs) directly on consumer Apple hardware. We characterize the layered architecture of the MLX ecosystem, contrast its design philosophy with that of Apple’s Foundation Models API, and present a reference implementation demonstrating the complete inference lifecycle: model acquisition, session initialization, and autoregressive text generation. The discussion is grounded in the computational properties of unified memory and their implications for on-device inference efficiency. ...

March 31, 2026 · 13 min · Walid Sassi

Getting Started with Claude Code for Xcode 26: Setup, Pricing & Monitoring Guide

The landscape of iOS development has dramatically shifted in 2025. With Apple’s introduction of Xcode 26 at WWDC 2025, which integrates ChatGPT and supports multiple AI models through API keys, and Anthropic’s release of Claude Code as a powerful command-line tool for agentic coding, developers now have unprecedented AI-powered development capabilities. ...

September 2, 2025 · 6 min · Walid Sassi

Building Interactive Timelines in SwiftUI: From Static Views to Draggable Events

Ever wondered how to build intercative that feel natural and responsive? The kind where users can drag events and see real-timeupdates? SwiftUI’s combination of GeometryReader, alignementGuide, and gesture handling makes this suprisingly elegant. Let’s build from scratch and the understand the magic behind positioning elements on a timeline. The Challenge: Positioning Events in Time magine you need to visualize events that occur over time, think of a video timeline, project milestones, or async operations. The core challenge is: How do you position an element at a specific time on a timeline of unknown width? ...

August 3, 2025 · 6 min · Walid Sassi

Understanding SwiftUI ViewBuilder: The Magic Behind Declarative Syntax

SwiftUI’s declarative syntax often feels like magic. You can write natural-looking code with if statements, multiple view expressions, even loops, and somehow, it all just works. But how? The secret lies in ViewBuilder, one of Swift’s most powerful tools that transforms your declarative code into optimized SwiftUI types. Let’s dive into what makes this possible. The Foundation: Result Builders Before focusing on ViewBuilder itself, it’s important to understand what it’s built on: Swift’s Result Builder system (previously called Function Builders). ...

July 16, 2025 · 4 min · Walid Sassi

Custom Conditional ViewBuilders in SwiftUI: Advanced Patterns and Pitfalls

Remember when we first discovered @ViewBuilder in Part 1? That moment when everything clicked and you thought “wow, I can create my own SwiftUI-style components!” It was pretty exciting, wasn’t it? The declarative syntax, the composability, the way it all just… worked. Well, I hate to be the bearer of bad news, but today we’re going to talk about a pattern that might seem like the next logical step,but is actually a beautiful trap waiting to catch enthusiastic SwiftUI developers. ...

July 5, 2025 · 6 min · Walid Sassi

Understanding `@ViewBuilder` in SwiftUI: Build Custom Views with Declarative Syntax

SwiftUI’s @ViewBuilder is a powerful attribute that enables us to create custom view components with a declarative and flexible syntax, just like native SwiftUI containers (VStack, HStack, etc.). In this article, we’ll explore: What is @ViewBuilder and why it matters How to create a custom view that accepts a @ViewBuilder closure What happens under the hood when SwiftUI processes a @ViewBuilder closure Practical use cases and benefits What is @ViewBuilder? @ViewBuilder is a special attribute that lets you write multiple views inside a closure, and SwiftUI will automatically combine them into a single view result. It acts like a function builder specialized for views. ...

June 28, 2025 · 2 min · Walid Sassi