Slotstream: Swift, SSD Expert Streaming, and Breaking the LLM Memory Wall Independent developer Carlos Galarza released slotstream, a Swift binary that streams Mixture-of-Experts model tensors from NVMe SSD into Apple Silicon Metal memory, enabling local inference of Alibaba's 125-billion-parameter Qwen3.8-Flash-Next model on a 48 GB M5 Pro Mac without requiring dual NVIDIA A100 GPUs or a $6,000 workstation. The tool allocates a 33 GB memory pool with 7,280 expert slots, evicting least-recently-used experts to keep only active parameters in RAM. The Catalyst & The Problem: Bypassing the VRAM Monopoly When Alibaba released Qwen3.8-Flash-Next—a 125-billion-parameter Mixture-of-Experts MoE preview of the Qwen4 architecture—it highlighted a persistent dilemma in open-source AI: memory wall constraints. At 4-bit quantization, the model weighs 104 gigabytes on disk. For hardware enthusiasts and local inference advocates, running a model of this magnitude historically required an enterprise rig with dual NVIDIA A100 GPUs or a maxed-out Apple Silicon workstation costing upwards of six thousand dollars. Traditional local runtimes like llama.cpp or PyTorch-backed Python servers rely on memory-mapping mmap or pinning the full weight tensor graph in RAM before execution begins. When a model exceeds physical RAM, operating system page thrashing collapses token generation speed from tens of tokens per second to sub-fractional crawling speeds. Python-based runtimes add secondary layers of memory fragmentation, GIL bottlenecks, and bulky IPC serialization overhead. Carlos Galarza carloslfu , an indie developer focused on executable rationality and low-level software efficiency, saw an architectural opening. Mixture-of-Experts models do not activate all parameters simultaneously for every token. In Qwen3.8-Flash-Next, while 125B total parameters exist across 512 total experts, only a small fraction around 6B parameters are activated during any single forward pass token evaluation. Galarza posed a fundamental engineering question: If 90% of an MoE model sits idle during any given matrix multiplication step, why keep all 104 gigabytes pinned in unified memory? The result is slotstream , a lightweight, standalone Swift binary designed specifically to stream MoE expert tensors on demand from fast NVMe SSD storage into tightly budgeted Apple Silicon Metal memory buffers. Under the Hood: SSD Expert Streaming and Metal Slot Allocation At the core of slotstream is a custom expert cache manager and an asynchronous IO engine built on top of Apple’s Swift language and MLX framework bindings. Rather than relying on OS-managed page faults, slotstream controls tensor lifetimes through an explicit, bounded slot array allocator. 1. Dynamic Expert Slot Pool When slotstream initializes, it scans available system memory and allocates a fixed memory pool. On a 48 GB M5 Pro Mac, it claims approximately 33 GB of memory, organizing this space into 7,280 global expert slots ~20.1 GB dedicated purely to expert weight caches, with the remainder reserved for attention layers, base model weights, and KV prefix caches . Each layer in the transformer stack dynamically routes incoming tokens to top-k experts. When a layer requests expert E i, the slot engine checks if E i already resides in the slot cache. If present, execution proceeds zero-copy in Apple Silicon unified memory. If missing, the engine evicts the Least Recently Used LRU expert slot and issues a direct, unbuffered asynchronous read command to the APFS storage system. Here is a conceptual Swift representation of slotstream's lock-free expert ring buffer and eviction pipeline: js final class ExpertSlotManager { private struct Slot { var expertID: Int32 var lastAccessedStep: UInt64 var metalBuffer: MTLBuffer } private var slotPool: Slot private var activeMapping: Int32: Int // Expert ID to Pool Index private let ssdStreamer: AsyncBlockReader init capacity: Int, device: MTLDevice { self.slotPool = 0..