mirror of
https://github.com/mw00/project-maya.git
synced 2026-12-03 21:08:26 +07:00
[PR #522] [CLOSED] DeepSeek: expose Engram cache telemetry #577
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#577
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/522
Author: @handmade0octopus
Created: 10/26/2026
Status: ❌ Closed
Base:
main← Head:pr/ds4-engram-telemetry📝 Commits (1)
6b74701DeepSeek: expose Engram cache telemetry📊 Changes
6 files changed (+28 additions, -2 deletions)
View changed files
📝
serve/server.py(+9 -1)📝
serve/test_server.py(+9 -1)📝
src/ds4/ds4_engram_io.hpp(+1 -0)📝
src/ds4/ds4_main.cpp(+7 -0)📝
src/ds4/ds4_model.cu(+1 -0)📝
src/ds4/ds4_model.hpp(+1 -0)📄 Description
Summary
Expose the existing DeepSeek Engram row-cache and lookup counters through the engine's
STAToutput and the Monitor's metric descriptions:eg_cache_rowseg_cache_capeg_cache_row_byteseg_lookup_rowseg_lookup_hitseg_lookup_readseg_cache_row_bytesis the payload width of one cached row, allowing consumers to report actual cached payload asrows × row_bytesand to verify the configured cache capacity. It is not a claim about total process RAM: hash-table, block-bookkeeping, scratch, and model allocations are separate.The three cumulative
eg_lookup_*values are emitted as Prometheus counters; cache occupancy/capacity/row width remain gauges. The text-format test checks the new names, values, and types.No cache policy, model computation, or default setting changes.
Benefits
The existing
DS4_ENGRAM_CACHE_MBsetting can hold tens of millions of rows, but API/dashboard consumers could not verify its actual capacity, occupancy, payload width, or whether lookups were being served by cache hits versus file reads. These fields make large-cache operation measurable and provide the accounting needed to validate hit rate andlookups = hits + readsover real agent workloads.Validation
Windows CUDA / DeepSeek-V4.1-Flash IQ1_M:
STAT, and dashboard mapping checks passed, including exact completed prefill/decode rates.Related work / overlap check
#275/#295 already provide the bounded Engram row cache and asynchronous reads; this PR only exposes their state and counters. It does not propose another cache implementation or a universal 8 GiB default. #364 reports prefill expert-residency/streaming statistics, which are different from Engram cache occupancy and lookup accounting.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.