mirror of
https://github.com/mw00/project-maya.git
synced 2026-12-03 21:08:26 +07:00
[PR #523] [CLOSED] DeepSeek: budget parked conversation RAM by bytes #578
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
mw00/project-maya#578
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?
📋 Pull Request Information
Original PR: https://github.com/mw00/project-maya/pull/523
Author: @handmade0octopus
Created: 10/26/2026
Status: ❌ Closed
Base:
main← Head:pr/ds4-slot-ram-budget📝 Commits (1)
b4bdbc6DeepSeek: budget parked conversation RAM by bytes📊 Changes
4 files changed (+52 additions, -5 deletions)
View changed files
📝
README.md(+1 -0)📝
docs/SETTINGS.md(+1 -0)📝
serve/server.py(+4 -0)📝
src/ds4/ds4_main.cpp(+46 -5)📄 Description
Summary
Add an optional byte budget for DeepSeek conversations parked in RAM:
(
STRATA_DS4_SLOT_RAM_GBis the engine-side name.)The existing
SLOT_CAPlimits the number of RAM conversations, but their states vary widely in size. The new budget additionally limits their actual payload bytes. When either limit is exceeded, the least recently used RAM state spills to the existing slot folder and can later be restored with its token prefix intact.0preserves the existing count-limited behavior; invalid, non-finite, negative, or out-of-range values also fall back to0with a diagnostic.STATnow exposesslot_ram,slot_disk,slot_ram_bytes, andslot_ram_cap, with matching Monitor metric descriptions.Benefits
Agent sessions can interleave many conversations whose parked states range from small to multiple GiB. A byte cap makes steady-state parked RAM use predictable while retaining the existing fast disk-restore path, instead of relying on a conversation count as a proxy for memory. Slot telemetry is emitted only while slots are enabled.
Validation
Windows CUDA / DeepSeek-V4.1-Flash IQ1_M:
.bin/.metacounts and the reported byte/cap counters matched the expected state.0; with slots disabled, the request succeeded and noslot_ram*fields were emitted.Related work / overlap check
This extends the DeepSeek conversation storage added in #356; it does not reimplement slots or change their serialization. Picture-support PRs such as #429/#462 are orthogonal, although this code should be rebased with whichever lands first. The merged GLM RAM-slot work in #236 is a conceptual precedent, not a duplicate: this PR adds a RAM byte budget and LRU spill accounting to the existing DeepSeek RAM+disk slot implementation rather than changing to RAM-only transport.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.