ollama/x/mlxrunner
Jesse Gross 1abd56b6e6 mlxrunner: record committed MTP drafts before streaming them
The batched MTP accept paths advance the cache by the whole accepted run
before streaming it to the client. If the stream was cancelled partway
(e.g. the caller disconnects), the loop returned before recording the
remaining accepted tokens, leaving the cache offset ahead of
session.outputs. close() then indexed the token log past its end and
panicked with a slice-bounds error.

Record the whole run to session.outputs before streaming any of it, so a
cancelled stream can no longer desync the cache from the token log.

The same bug is present on main, with identical mechanics: the accept
paths there commit the cache to before+accepted and then stream in a loop
that returns on cancellation before recording the rest.
2026-06-09 00:39:19 -07:00
..
batch mlxrunner: decouple models from attention cache storage layout 2026-04-27 20:04:46 -07:00
cache mlxrunner: drive MTP speculation through cache snapshots 2026-06-09 00:39:19 -07:00
mlx llama-server followups (#16353) 2026-06-01 10:44:21 -07:00
model mlx: allow the embedding layer to use the nvfp4 global scale (#16527) 2026-06-04 17:40:01 -07:00
sample mlx: rework the MLX sampler (#16122) 2026-05-13 17:18:27 -07:00
cache.go mlxrunner: capture prefill snapshots across the forward 2026-06-09 00:39:19 -07:00
cache_test.go mlxrunner: capture prefill snapshots across the forward 2026-06-09 00:39:19 -07:00
cache_trie.go mlxrunner: drive MTP speculation through cache snapshots 2026-06-09 00:39:19 -07:00
cache_trie_test.go mlxrunner: share KV cache across conversations with common prefixes 2026-03-18 16:06:33 -07:00
client.go runner: Remove CGO engines, use llama-server exclusively for GGML models (#16031) 2026-05-29 13:35:47 -07:00
imports.go Revert "mlxrunner: add DFlash speculative decoding (#16134)" 2026-05-22 09:32:09 -07:00
mtp.go mlxrunner: record committed MTP drafts before streaming them 2026-06-09 00:39:19 -07:00
pipeline.go mlxrunner: capture prefill snapshots across the forward 2026-06-09 00:39:19 -07:00
runner.go runner: Remove CGO engines, use llama-server exclusively for GGML models (#16031) 2026-05-29 13:35:47 -07:00
server.go mlx: rework the MLX sampler (#16122) 2026-05-13 17:18:27 -07:00
status_memory.go mlx: avoid status timeout during inference (#16086) 2026-05-11 16:03:38 -07:00
status_memory_test.go mlx: avoid status timeout during inference (#16086) 2026-05-11 16:03:38 -07: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