Code librariesReviewed · leonickson1

Swiftlet

Swiftlet is open-source Swift software that lets Apple app developers and Mac users run large Qwen AI chat models on Apple Silicon Macs and iPhones using little memory, though the models still need 18 to 42 GB of disk space and can respond slowly on smaller devices. Its Swift and Metal library streams Qwen mixture-of-experts weights from storage and includes command-line tools and a local chat-completions server.

Researched 14 Nov 2026

In short.

Swiftlet is open-source Swift software that lets Apple app developers and Mac users run large Qwen AI chat models on Apple Silicon Macs and iPhones by keeping only a small core of each model in memory and reading the rest from storage, which keeps RAM use low but still requires 18 to 42 GB of disk space and gives speeds that depend heavily on the hardware. It supports the Qwen3-Next and Qwen3.5/3.6 mixture-of-experts family through a Swift library, command-line tools and a loopback chat-completions server. The README reports 18–42 GB containers for its three main configurations, with performance ranging from about one token per second on an iPhone 17 to faster generation on Macs. Performance, output quality and correctness are project-reported claims; nothing was executed for this report.

Researched and written by an AI model and checked by a second AI model. How it works

Coverage is limited to README.md at [https://github.com/leonickson1/Swiftlet/blob/main/README.md], captured at revision d47f2eac164d11e5bf2b62efc7cad3c52414ad89, plus LICENSE and THIRD_PARTY_NOTICES.md from that revision. The README is the selected resource file; the other two files provide related notices. Runtime code, scripts, test fixtures, benchmark logs, issue discussions, model cards, download services, app listings and the separate app repository are outside the supplied evidence. Their implementation, current availability and behavior remain unverified. Nothing was executed.

The overview

Identity

Swiftlet is a Swift and Metal inference runtime published in the leonickson1/Swiftlet repository [https://github.com/leonickson1/Swiftlet]. It is described as a library first: SwiftletCore can be embedded in macOS and iOS apps, while accompanying tools handle model installation, chat, generation and local serving.

Its documented model scope is the Qwen3-Next and Qwen3.5/3.6 hybrid mixture-of-experts family. Priv AI is a separate iOS app that embeds the runtime.

Assessment

Swiftlet is worth considering when model memory requirements are the obstacle and ample local storage is available. Its distinguishing feature is keeping only part of the model in RAM while fetching the experts needed for each token from storage.

The trade is less attractive for long-prompt agent workflows or users expecting quick phone responses. The README lists batched prompt processing and phone speed improvements as unfinished work. Documentation alone does not establish reliability or suitability for a particular application.

Users

Swift developers can use SwiftletSession to add streamed chat, conversation caching, sampling controls, cancellation and memory-pressure handling to Apple apps. Mac users comfortable with a terminal can use the command-line tools, while compatible chat interfaces can connect through the local server.

For beginners seeking an iPhone interface, the README points to Priv AI [https://apps.apple.com/us/app/priv-ai/id6765706001]. However, the captured text says its Experimental Models feature was awaiting App Store review. Current availability is unknown, and the documented alternative requires building the separate app from source.

Capabilities

The documented tools support multi-turn chat, one-shot generation with statistics, resumable model downloads and repacking MLX checkpoints into .qpack containers. The loopback server implements OpenAI-compatible chat completions, including stop sequences, finish reasons and cancellation on client disconnection. Compatibility with the full OpenAI API is not established.

For an M5 Mac, the README reports an 18 GB, 4-bit 35B container using 2.6 GB peak RAM at 7–11 tokens per second; a 34 GB, 8-bit 35B container using 7.6 GB at 3.5–4 tokens per second; and a 42 GB, 4-bit 80B container using 4.3 GB at 4.5–5 tokens per second. These are reported measurements, not guaranteed requirements or independently verified results.

Using it

Requirements

The README lists Apple Silicon, macOS 14+ or iOS 17+, and Swift 5.9+. Its main downloadable containers require 18, 34 or 42 GB of storage. Additional working space, a universal minimum RAM requirement and compatibility across individual iPhone models are not specified. The optional container hash check using scripts/verify_container.py requires Python 3.

Running the documented test suite requires Swift Testing. The README names Xcode 16+, Swift.org toolchains and Command Line Tools 26+ as sources of that framework; Command Line Tools 26.x additionally needs explicit compiler and linker search paths. Metal shaders compile at runtime, so the project says a separate Metal build toolchain is unnecessary.

Mechanism

A mixture-of-experts model selects only some of its expert networks for each token. Swiftlet keeps dense components such as attention weights, routers, embeddings and shared experts in memory, then loads selected expert weights from storage. The documented 35B and 80B models activate about 3B parameters per token.

Experts are packed into fixed-stride .qpack blobs so each fetch uses one positioned read, or pread. A bounded cache retains frequently and recently used experts, and Metal performs the forward computation. The README reports that cache size often affects memory use more than throughput, although larger caches can help long-context generation.

The README says 75 percent of layers use Gated DeltaNet with fixed-size recurrent state, avoiding a growing attention cache in those layers. This does not establish constant memory use for the entire model or a maximum supported context length.

Setup

The documented Mac path is to clone the repository, enter its directory and run swift build -c release. For the 4-bit 35B container, the Hugging Face download option is .build/release/swiftlet-repack --from-hf Leonickson/Qwen3.6-35B-A3B-qpack --output ~/models/qwen3.6-35b.qpack. The README recommends the R2 mirror (the --from-url option) as the default, because Hugging Face rate-limits long anonymous downloads; the Hugging Face command above swaps in the README's listed --from-hf alternative. The README's primary download path is the R2 mirror, and it also provides an optional container hash-verification script.

For a phone build, the README directs developers to the separate app repository [https://github.com/leonickson1/localLLM], with Swiftlet cloned beside it under the name swiftlet, then opened through the app's Xcode project. That app's build configuration and dependencies are outside the supplied evidence. None of these instructions was executed.

Example

After obtaining the documented 35B container, the README's multi-turn example is .build/release/swiftlet chat ~/models/qwen3.6-35b.qpack "What is the capital of Spain?" "And what about France?". The chat command applies the model's chat template, disables its reasoning block and retains conversation state so follow-up processing covers only the new turn.

For a compatible chat interface, the documented server command is .build/release/swiftlet-server --model ~/models/qwen3.6-35b.qpack --port 8080. It is described as loopback-only. These examples illustrate intended usage; no generated answers or observed server behavior are available here.

Assessment & evidence

Limitations

Low RAM consumption does not imply fast responses. The README reports about one token per second for the 35B model on an iPhone 17 and about 2.45 tokens per second for the 4-bit 35B on a base M1. Long prompts currently process at roughly generation speed, making large system prompts costly in waiting time.

The README reports repetition artifacts in longer writing with the 4-bit 35B and recommends its larger, slower 8-bit version for writing quality. It also cautions that the models' factual recall resembles smaller models despite their total parameter counts. Neither claim is supported here by a published evaluation dataset or complete result set.

Maximum context length, concurrency capacity, sustained phone performance, compatibility beyond the documented model families and behavior across supported devices are not established.

Reasoning

The practical decision is whether fitting a chosen Qwen model into available memory is worth its storage footprint and response delay. Swiftlet's streaming design directly addresses memory fit; it does not by itself establish better answer quality.

Choose between quantization levels using representative tasks rather than parameter totals alone. The README's claimed writing improvement for the 8-bit 35B is useful motivation for comparison, but its prompts, scoring method and full outputs are absent. Likewise, the reported cache behavior suggests measuring memory and latency together instead of assuming a larger cache always improves speed.

Alternatives

The README identifies TurboFieldfare as a related expert-streaming runtime for Gemma on Macs [https://github.com/drumih/turbo-fieldfare]. It is a comparison candidate when Gemma is the desired model family, but equivalent capabilities or comparative performance are not established by the supplied text.

mlx-lm is identified as Swiftlet's correctness reference [https://github.com/ml-explore/mlx-lm], while colibrì is credited for cache and placement ideas [https://github.com/JustVugg/colibri]. Their current installation requirements, memory use and suitability as replacements were not assessed. Priv AI provides an app interface to Swiftlet rather than an independent runtime alternative.

Evidence

The README supplies the feature descriptions, commands and performance claims. It describes per-layer comparisons with mlx-lm, CPU and Metal parity checks, incremental-decoding checks and container byte verification. Those are claims about the project's validation; implementation files, fixtures and execution results are not supplied.

LICENSE provides the Apache 2.0 terms, and THIRD_PARTY_NOTICES.md identifies dependencies, references and model-weight provenance. Linked issue discussions, model repositories, app listings and external projects are not additional captured evidence. No build, test, download or inference was executed.

Access & freshness

Costs

The Apache 2.0 license grants no-charge, royalty-free rights to the covered work. That does not establish a total operating cost. Hardware, storage, electricity and network-transfer costs depend on the user's setup and are not quantified.

The described inference runs locally, and no hosted inference subscription or per-token price is specified. Priv AI pricing, in-app purchases, paid support and any download-service charges are unknown from the supplied evidence.

Rights

Swiftlet is presented under Apache License 2.0, which permits use, modification and redistribution subject to its conditions. Redistribution requires supplying the license, marking modified files, retaining applicable notices and preserving relevant NOTICE attributions where present. Trademark rights are not granted, and the work is supplied without warranty.

THIRD_PARTY_NOTICES.md identifies Apache-licensed dependencies and design references, MIT-licensed reference implementations, vendored mlx-lm references and a port of mlx-lm's gated-delta Metal kernel. These disclosures qualify the README's broad description of an implementation built from scratch; applicable third-party notices still matter.

Model weights are downloaded separately. The README and notices describe the named Qwen checkpoints as Apache 2.0, but individual checkpoint licenses and community conversion terms are not included. The runtime license alone does not establish rights for every downloadable model.

Freshness

The supplied snapshot was captured on 14 November 2026 at revision d47f2eac164d11e5bf2b62efc7cad3c52414ad89. Its fixed README address is [https://github.com/leonickson1/Swiftlet/blob/d47f2eac164d11e5bf2b62efc7cad3c52414ad89/README.md]. Capture time does not establish a release date or latest maintenance date.

At this revision, batched prefill, phone speed improvements and a 6-bit container tier are roadmap items. The Experimental Models app feature is described as awaiting review. Whether these details changed afterward is unknown.

Actions

Before adopting Swiftlet, confirm device and toolchain compatibility, available storage, the exact checkpoint's terms and current app availability if using Priv AI. Start with a container whose documented footprint fits the device, and optionally run the README's Python 3 verification script (scripts/verify_container.py), whose contents are not part of the captured evidence, to check the download.

For a practical evaluation, compare a short prompt with a representative long prompt on the intended hardware. Measure time to first output, generation speed, peak memory and task-specific answer quality. App developers should also assess cancellation, memory pressure and the chat-completions features their client requires. These are recommended evaluations, not completed tests.

Evidence for this report

LICENSEnotice · checked 2026-11-14
README.mdselected · checked 2026-11-14
THIRD_PARTY_NOTICES.mdnotice · checked 2026-11-14