mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #2502] Metal: a short side request drops the conversation cache (parking is refused, then "invalid checkpoint running-state payload") #1016
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#1016
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @joesinvestments on GitHub (Oct 14, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/2502
What happened
On the Metal engine a single short request from another conversation (an agent's "give this chat a title" call) drops the
main conversation, and its next turn reads the whole prompt again. Same symptom as #1920 on CUDA, but on a Mac the
documented fix (
--conversation-cache-mib) cannot work, for two reasons we found in v0.1.44 (still the same onmain296b59d2):sample_host_memory()insrc/core/conversation_memory.cpphas branchesfor
_WIN32and__linux__only and returns nothing elsewhere, so every Mac start logsmemory guard: the available RAM cannot be read; parking and session save/restore are refused.(
src/core/expert_source.cppalready reads macOS memory withhost_statistics64.) A small PR for this follows.conversation cache: skip parking (conversation snapshot: invalid checkpoint running-state payload).As far as we can read the code:
conversation_checkpoint_save/_restorehaveSTRATA_GPU_METALbranches(
window_checkpoint_save/_restore,conversation_state.cpp~167-194), but the parking path validates with thehost layout every time (
view_validate()~line 85 and the snapshot check ~line 360 callconversation_checkpoint_validate()), whileWindow::checkpoint_save(metal/src/engine/window.cpp~1375-1398)packs the GDN state and history its own way and leaves
block_posempty. So the size check cannot pass on Metal.Also:
docs/MAC.mddoes not mention the conversation cache, andmetal/setup_mac.pydoes not print the--conversation-cache-mibtip thatsetup.pyprints on a PC.Repro (one request at a time, greedy, thinking off): a ~16K-token prompt of real code, two follow-up turns, then a
60-token unrelated request, then a fourth turn of the first conversation. UD-Q4_K_XL streamed from the SSD:
Identical with (a) the release engine, (b) the guard fixed, and (c) the guard fixed plus
--conversation-cache-mib 4096 --conversation-cache-slots 4. IQ3_XXS behaves the same. We have not tried a Metal snapshot ourselves.Strata version, GPU, OS
Strata v0.1.44 (
ed4773eb) built from source with./setup.sh, Metal engine. Mac Studio M5 Max (40-core GPU), 64 GB,macOS 27.0.1,
iogpu.wired_limit_mb=58000. Packs: Unsloth UD-Q4_K_XL and IQ3_XXS (GSQ-RCO), both streaming their expertsfrom the SSD (
STRATA_METAL_STREAM=1).--spec 3with the MTP draft layer,--prefill auto,--max-context 32768.Engine log
Release engine:
Guard fixed,
--conversation-cache-mib 4096 --conversation-cache-slots 4:@Niko1221 commented on GitHub (Oct 19, 2026):
Thanks for taking the time to report this.
We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to read properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected.
To reopen it takes about two minutes:
/reopen. A check runs and either reopens the issue or lists what is still missing.The rules are in CONTRIBUTING.md.