AWS Builder Center
FreeToken Treats Local MoE Inference as a Scheduling Problem

FreeToken Treats Local MoE Inference as a Scheduling Problem

FreeToken combines expert caching, measured-bandwidth CPU-GPU co-execution, and elastic memory allocation to serve sparse models on heterogeneous local hardware. Its design offers a useful lesson for inference systems constrained by memory movement.

Open model weights do not automatically make a model practical to run. For a large Mixture-of-Experts model, the arithmetic needed for one token may be sparse, yet the complete set of expert weights can still exceed GPU memory by a wide margin. The serving problem moves from “Can the accelerator compute this?” to “Can the system place the right bytes and work on the right processor before latency becomes unacceptable?”
FreeToken is an open-source serving engine that explores this problem on personal and workstation hardware. Its authors describe the machine as one inference platform spanning GPU compute, CPU compute, device memory, host memory, storage, and the interconnect between them. That framing is more interesting than the headline model sizes because it turns an apparent capacity limit into a scheduling and memory-management problem.
I have not independently reproduced FreeToken’s performance results. All implementation details and measurements attributed to FreeToken below are source-reported by its repository, paper, or release notes.
FreeToken architecture showing expert cache lookup, measured-bandwidth scheduling of misses, GPU and CPU execution branches, and elastic GPU memory

Figure 1: FreeToken’s source-reported scheduling mechanism and elastic memory model. Performance must be validated on the target workload and hardware. Original diagram, CC BY 4.0.

Why MoE serving becomes a data-movement problem

A dense model uses every layer parameter for each token. A Mixture-of-Experts model contains many expert subnetworks, while a router selects only a subset for each token. Sparse activation reduces the computation performed for that token, but it does not make the inactive weights disappear. The serving engine must still store the complete expert pool somewhere.
On a system where all experts fit in GPU memory, routing is mainly a compute-scheduling concern. On a memory-constrained system, routing also determines data movement. An expert selected by the router may already be resident on the GPU, may need to cross the host-to-device link, or may be executed by the CPU where its weights already reside.
A simple offload design transfers every missing expert to the GPU. That can leave the GPU waiting on the interconnect. A CPU-only expert path avoids the transfer but may underuse available GPU capacity. A static split assumes that one balance works for every machine and workload.
FreeToken instead combines caching with a measured decision about each set of misses.

Follow the active working set with an expert cache

FreeToken keeps the CPU-resident expert pool as the source of truth and uses available GPU memory as a cache of complete experts. The project describes a global least-recently-used policy that follows temporal locality in routing. When successive tokens select overlapping experts, cache hits execute on the GPU. A newly selected expert can enter the cache, and the least recently demanded resident expert becomes an eviction candidate.
This is a useful distinction from pinning a fixed set of experts at startup. Static placement reflects an expected workload. Dynamic residency follows the workload the router is actually producing.
Caching alone cannot solve cold starts, sudden changes in the working set, or a cache that is small relative to the model. The remaining misses create the central scheduling decision: should the system move an expert to the GPU, or execute that expert on the CPU?

Balance transfer and CPU work with measured bandwidth

FreeToken’s bandwidth-adaptive policy uses two measured properties of the target machine: host-to-device transfer bandwidth and host-side expert-processing bandwidth. For a layer with missing experts, the runtime divides them into a cache-fill set and a CPU-execution set.
Experts in the fill set move into GPU cache slots, execute on the GPU, and remain available for future tokens. Experts in the CPU set execute against host-resident weights without changing GPU residency. The two branches proceed concurrently, and their partial results are combined to preserve the model’s MoE output.
The paper derives a closed-form split. In simplified terms, the number of experts selected for transfer is proportional to the ratio between measured transfer bandwidth and measured host bandwidth. When host bandwidth barely exceeds the transfer demand, most misses should be moved and computed on the GPU. When the CPU side has meaningful residual bandwidth, some misses can make progress there while cache fills continue.
The mechanism matters more than the specific equation. FreeToken profiles the actual hardware instead of treating “CPU,” “GPU,” and “PCIe” as uniform categories. It then chooses work placement from the measured bottleneck. This avoids a host-side scheduling search at every layer and allows the control data to remain compatible with a captured GPU execution graph, according to the paper.
The cache also continues warming. Even when CPU execution handles many current misses, the policy retains cache-fill work so future routing can benefit from GPU residency. That links the current-token decision to likely future reuse.

Treat GPU memory as an elastic budget

Expert weights are not the only major consumer of device memory. The key-value cache grows with active context, while application and display workloads can change the memory available on a personal GPU.
FreeToken’s design divides remaining GPU memory between complete-expert slots and key-value cache pages. The project reports that this division can be rebuilt at a scheduler-safe point without reloading the CPU expert pool or restarting the engine. Because host memory remains authoritative, changing GPU residency affects performance rather than model correctness.
That is an important architecture property. Elasticity is safer when the evictable tier is an acceleration layer and the authoritative state remains intact elsewhere. The same principle appears in storage caches, compiled artifacts, and materialized views: losing the fast copy should reduce speed, not change the answer.
The project also describes avoiding a separate cache warm-up phase. Initial requests encounter the ordinary miss path, and normal execution populates the cache. This trades some cold-request performance for simpler startup semantics.

Recent release details show the tradeoffs

FreeToken’s version 0.2.1 release notes provide an example of how memory placement changes performance. The project reports that  --embed-weights host  made decode 8.7 percent faster on Qwen3.6-35B-A3B with 24 GiB of free VRAM by keeping the input token embedding table in pinned host memory and making its VRAM available to the expert and key-value caches. This is a project-reported result for that stated configuration, not a general expectation.
The same release documents narrower kernel and memory-path improvements, along with unsupported combinations and breaking changes. Those details are useful because they show that heterogeneous inference is not solved by one placement algorithm. Quantization formats, GPU architecture, graph capture, routing behavior, context length, and checkpoint layout all affect the result.

Limitations and questions to test

FreeToken targets a demanding but specific environment: large open-weight MoE models on heterogeneous local hardware. Its reported results should not be transferred directly to a different model, interconnect, processor, batch shape, or concurrency target.
A production evaluation should separate several questions:
  • Does the target workload exhibit enough expert locality for the cache policy?
  • How do cold-cache latency and steady-state latency differ?
  • Does CPU co-execution contend with transfer traffic or other host workloads?
  • How does performance change as context growth shifts memory from experts to the key-value cache?
  • Which model formats and accelerator architectures use optimized paths, and which fall back to slower implementations?
  • What operational behavior occurs under memory pressure, malformed checkpoints, or unsupported combinations?
Local serving also changes the operational boundary. Data locality can be attractive, but the operator still owns patching, model provenance, resource isolation, observability, and failure recovery. A compatible API does not by itself provide a production service-level objective.

Why this matters to AWS builders

The broader lesson applies beyond a desktop. Inference platforms on cloud instances also contain memory and compute tiers with different capacities, costs, and bandwidths. A design that considers only accelerator utilization can miss the real constraint in host memory, an interconnect, model loading, or cache pressure.
FreeToken suggests four questions for architecture reviews:
  1. Which copy of model state is authoritative, and which copies are performance caches?
  1. Can a cache miss become useful computation where the data already resides?
  1. Is work placement based on measured properties of the deployed hardware?
  1. Can memory budgets change without restarting the service or changing correctness?
These questions are relevant when choosing instance shapes, designing model servers, evaluating accelerator offload, or planning edge and hybrid inference. They encourage measurement at the boundaries between components, where nominal device specifications often explain less than end-to-end traffic.
FreeToken’s main contribution is therefore not simply fitting a large model onto a smaller GPU. It is treating routing, residency, transfer, and execution as one control problem. For builders, that is a useful reminder: when computation is sparse but state is large, the quality of the scheduler can define the practical capacity of the machine.

References

Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article