Skip to content

JustFit: 200K-Token LLM Serving on a 24 GiB Laptop with Just-in-Time State Management

Sep 2026 · 0 citations · 27 references
Computer Science

Abstract

Capable open-weight models make local coding and reasoning attractive, but their context and execution state strain laptop memory. We present JustFit, an MLX-based inference runtime that combines KVExec for compressed KV execution, PhaseSwap for component residency, and StateTrans for state-preserving serving transitions. These mechanisms fuse reconstruction and coordinate just-in-time materialization and release, independently of model-weight quantization. In full-execution capacity tests on a 24 GiB M4 Pro MacBook running Qwen3.8-27B MXFP4, three independent runs complete 196,608 input and 16,384 output tokens, increasing completed single-request context from the mlx-vlm baseline's 30,720 positions to 212,992 (6.93x); a separate two-request run retains 229,376 positions in aggregate. In separate performance tests, a 32K-input, 64-output probe reaches 19.11 tokens/s, and a repeated 32K+6K workload has a median peak process footprint of 16,374 MiB. The integrated runtime answers 29 of 30 AIME 2026 problems correctly, showing how compact state and lifetime-aware execution expand local serving capacity while supporting extended generated reasoning.

View source

Similar papers

#natural language process... Preprint Sep 2026

TomasuLLM: Out-of-Order Speculative Execution for LLM Agents

Long-running tools can dominate coding-agent latency: compilers, test suites, and repository commands take seconds to minutes while the agent idles. This observation stall presents the same tension that drove out-of-order processors -- asequential interface hides work that can be predicted and started early, but a spec...

Jiang-Nan Yu, Ce-Yu Xu, Meng-Ming Li et al. · 0 citations
Preprint Aug 2026

Bounded-State Restoration: Decoupling Local Restore Capacity from External LLM State

Hierarchical KV-cache systems can retain long-context LLM execution state beyond GPU memory, but retention capacity does not determine the local memory required to make that state executable again. We isolate this second resource as the restoration working set (RWS): the peak local staging state whose lifetimes overlap...

Zi-Xuan Li · 0 citations
Preprint Sep 2026

Fresh Memory, Stale Plans: Derivation Currency for Distributed LLM-Agent Memory

A large language model (LLM) agent that inherits a plan through shared memory can hold the latest requirement yet act on a plan derived from an older one: fresh memory, stale plan. Freshness checks miss this failure because they compare local copies with current state (observation currency) rather than the inputs the p...

Evan Chen, Shi-Qiang Wang, Christopher G. Brinton · 0 citations
Preprint Sep 2026

UNISON: A Co-Designed Near-Memory Scheduler of Session KV Residency for LLM Agents

Large language models are increasingly composed into agent loops that plan, call tools, and resume the same task after each action. These loops press a shared memory hierarchy harder than conventional multi-turn chat, because they hold a growing key-value (KV) prefix across tool waits and place many sessions on one SRA...

Fan He, Yan Li, Xiao-Yang Zeng · 0 citations

Related blog posts

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.