[PR #2631] [CLOSED] Metal: the conversation cache keeps a conversation across a side request (cause 2 of #2502) #4179

Closed
opened 2026-11-07 15:33:49 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/2631
Author: @PiMatyja
Created: 10/15/2026
Status: ❌ Closed

Base: main ← Head: metal-conversation-cache


📝 Commits (1)

  • b96d9b9 Metal: the conversation cache keeps a conversation across a side request (cause 2 of #2502)

📊 Changes

6 files changed (+370 additions, -36 deletions)

View changed files

📝 docs/DETAILS.md (+4 -0)
📝 docs/MAC.md (+1 -0)
📝 include/strata/core/conversation_snapshot.hpp (+16 -0)
📝 metal/src/engine/window.cpp (+72 -27)
📝 src/core/conversation_state.cpp (+266 -8)
📝 src/program/generate.cpp (+11 -1)

📄 Description

Summary

Fixes cause 2 of #2502 (cause 1 is #2503, which this needs).

On a Mac, --conversation-cache-mib never keeps a conversation, so a short side request (a title call) makes the next turn re-read the whole prompt. This makes the cache save and restore the Metal decode window's own K/V and state. No new flag; without --conversation-cache-mib nothing changes. CUDA, HIP and SYCL compile none of it.

Extra Notes

M2 Max, 64 GB, IQ3_XXS resident, with #2338 and #2503, #2502's steps (17K-token prompt, two follow-ups, a title request, turn 4), 3 rounds with and without MTP:

turn 4 reused time to first token
before 0 57-59 s
this PR 17,616 0.7 s

Same answer as a cold read in every run. Session files (SAVE / LOAD) are refused on Metal with a clear message. Builds on CUDA with no new warnings.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/2631 **Author:** [@PiMatyja](https://github.com/PiMatyja) **Created:** 10/15/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `metal-conversation-cache` --- ### 📝 Commits (1) - [`b96d9b9`](https://github.com/Niko1221/Strata/commit/b96d9b95052a638ed67a6da337b43b18f9dec945) Metal: the conversation cache keeps a conversation across a side request (cause 2 of #2502) ### 📊 Changes **6 files changed** (+370 additions, -36 deletions) <details> <summary>View changed files</summary> 📝 `docs/DETAILS.md` (+4 -0) 📝 `docs/MAC.md` (+1 -0) 📝 `include/strata/core/conversation_snapshot.hpp` (+16 -0) 📝 `metal/src/engine/window.cpp` (+72 -27) 📝 `src/core/conversation_state.cpp` (+266 -8) 📝 `src/program/generate.cpp` (+11 -1) </details> ### 📄 Description ## Summary Fixes cause 2 of #2502 (cause 1 is #2503, which this needs). On a Mac, `--conversation-cache-mib` never keeps a conversation, so a short side request (a title call) makes the next turn re-read the whole prompt. This makes the cache save and restore the Metal decode window's own K/V and state. No new flag; without `--conversation-cache-mib` nothing changes. CUDA, HIP and SYCL compile none of it. ## Extra Notes M2 Max, 64 GB, IQ3_XXS resident, with #2338 and #2503, #2502's steps (17K-token prompt, two follow-ups, a title request, turn 4), 3 rounds with and without MTP: | turn 4 | reused | time to first token | | --- | ---: | ---: | | before | 0 | 57-59 s | | this PR | 17,616 | 0.7 s | Same answer as a cold read in every run. Session files (`SAVE` / `LOAD`) are refused on Metal with a clear message. Builds on CUDA with no new warnings. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 15:33:49 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#4179
No description provided.