ollama/x/mlxrunner
Jesse Gross 5c73c4e2ee mlxrunner: Simplify KV cache to single-entry prefix matching
The KV cache previously used a tree structure which could
store multiple divergent sequences, which is good for cache
reuse. However, this is typically used in conjunction with
paged attention so each node in the tree can store just a
chunk of the KV cache and they can be stitched together later.
We don't currently do this, so the cache was storing copies of
the full cache for each past sequence.

This redundancy plus the lack of resource limits, caused significant
memory use as a conversation grew. Instead, this changes to store
a single entry for the cache, which can be prefix matched. Although
it is less ideal for multiple users, it largely matches Ollama's
current behavior. It can be improved as additional pieces are fleshed
out.
2026-02-23 09:50:07 -08:00
..
cache mlxrunner: Simplify KV cache to single-entry prefix matching 2026-02-23 09:50:07 -08:00
mlx mlxrunner: Fix memory leaks with pin/sweep lifecycle management 2026-02-23 09:50:07 -08:00
model mlxrunner: Fix memory leaks with pin/sweep lifecycle management 2026-02-23 09:50:07 -08:00
sample mlxrunner fixes (#14247) 2026-02-13 22:30:42 -08:00
cache.go mlxrunner: Simplify KV cache to single-entry prefix matching 2026-02-23 09:50:07 -08:00
client.go mlxrunner fixes (#14247) 2026-02-13 22:30:42 -08:00
imports.go model: add qwen3 support to mlxrunner (#14293) 2026-02-17 13:58:49 -08:00
pipeline.go mlxrunner: Simplify KV cache to single-entry prefix matching 2026-02-23 09:50:07 -08:00
runner.go mlxrunner: Simplify KV cache to single-entry prefix matching 2026-02-23 09:50:07 -08:00
server.go mlxrunner: Simplify KV cache to single-entry prefix matching 2026-02-23 09:50:07 -08:00
server_stub.go Add MLX runner with GLM4-MoE-Lite model support (#14185) 2026-02-10 14:57:57 -08:00
utf8_buffer.go consolidate the tokenizer (#14327) 2026-02-19 15:55:45 -08:00
utf8_buffer_test.go consolidate the tokenizer (#14327) 2026-02-19 15:55:45 -08:00