Skip to content
Preprint

JustFit: Just-in-Time State Management for Local LLM Serving

Sep 2026 · 0 citations · 27 references
Computer Science

TL;DR

JustFit is presented, an MLX runtime that coordinates their overlapping allocations: KVExec executes and checkpoints four-bit KV with bounded workspace, PhaseSwap loads phase-dependent components, and StateTrans preserves history across execution modes.

Abstract

Local agents need memory for model execution and working history. We present JustFit, an MLX runtime that coordinates their overlapping allocations: KVExec executes and checkpoints four-bit KV with bounded workspace, PhaseSwap loads phase-dependent components, and StateTrans preserves history across execution modes. With Qwen3.8-27B MXFP4 on a 24 GiB M4 Pro MacBook, JustFit reaches 327,680 retained positions across two requests, 10.67 times the evaluated baseline's 30,720-position single-request record. One request completes the full 262,144-position native window at median 5.986 tokens/s. Each shape completes 16,384 outputs per request in three fresh processes: B1 uses one cold build and two prefix extensions; B2 uses three ordered prefix extensions (Section 4). Image encoding can proceed while preserving a live 196,608-input text request. A controlled, repetitive 32K+6K workload reaches median 18.284 tokens/s at 15,626 MiB; a separate AIME 2026 evaluation scores 29/30. Coordinating execution and state lifetimes makes longer histories feasible on personal hardware.

View source

Similar papers

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

This work presents Unified Native Inter-turn Session Orchestration Nexus (UNISON), an event-driven near-memory scheduler in which Survival-Penalty Eviction for Agent Return-gap and Tiering in Idle-window DMA Events share one live ranking.

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

Reference-Preserving Speculative Decoding on Consumer Systems: Diagnosis, Repair Scope, and Measured Cost

Speculative decoding changes the numerical history of a quantized runtime as well as its execution cost. When an application requires a fixed ordinary greedy output, the runtime must establish where constraints are needed and whether the qualified design saves time. We connect local state/path diagnosis, phase-scoped r...

Cheng-Zhan Li · 0 citations

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