Reload by STREAMED COPY (see the header note): every tensor is copied
into an mlx-owned leaf; the mapping is read-only, its pages dropped
per-tensor, and unmapped before returning — the caches own their bytes
outright (no dtor contract, no pinned mapping, nothing to retain).
model is anything with makeCache() — the entry count is validated
against the DONOR cache list (model.layers.length was wrong for
KV-shared models like e4b, whose makeCache() returns donors only), and
each restored cache takes what the graph composed into its own cache for
that layer.
Reload by STREAMED COPY (see the header note): every tensor is copied into an mlx-owned leaf; the mapping is read-only, its pages dropped per-tensor, and unmapped before returning — the caches own their bytes outright (no dtor contract, no pinned mapping, nothing to retain).
modelis anything with makeCache() — the entry count is validated against the DONOR cache list (model.layers.length was wrong for KV-shared models like e4b, whose makeCache() returns donors only), and each restored cache takes what the graph composed into its own cache for that layer.