[PR #2775] [CLOSED] Per-client expert memory #4259

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

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/2775
Author: @apatassini
Created: 10/16/2026
Status: ❌ Closed

Base: main ← Head: client-memory


📝 Commits (1)

  • 009e59b Per-client expert memory (STRATA_CLIENT_MEMORY=N, opt-in)

📊 Changes

1 file changed (+75 additions, -1 deletions)

View changed files

📝 src/program/generate.cpp (+75 -1)

📄 Description

When two programs share the server (an agent and a mail assistant), each request from the other one refills the VRAM cache with
its experts, and the agent's next step finds the "wrong" card (measured 64.6% instead of 84% of picks on VRAM).
STRATA_CLIENT_MEMORY=N: the engine recognises the client from the first 64 prompt tokens, keeps slow per-client usage counts
(0.97 per step, up to 16 clients, LRU), and when a client comes back restores its counts and runs one adaptation of up to N swaps
(also with --adapt-async 1). RTX 5070 Ti, Q2_0, 61-75K context: agent step right after another program +21% tok/s (+24% by
ms), cache already adapted +11%, short code unchanged. Without the variable nothing changes.

Full notes and measurements: https://github.com/apatassini/Strata/blob/qwen38-16gb/QWEN38.md

🤖 Generated with Claude Code


🔄 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/2775 **Author:** [@apatassini](https://github.com/apatassini) **Created:** 10/16/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `client-memory` --- ### 📝 Commits (1) - [`009e59b`](https://github.com/Niko1221/Strata/commit/009e59b5a7f7604b6155110a03d8f76691170c2e) Per-client expert memory (STRATA_CLIENT_MEMORY=N, opt-in) ### 📊 Changes **1 file changed** (+75 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/program/generate.cpp` (+75 -1) </details> ### 📄 Description When two programs share the server (an agent and a mail assistant), each request from the other one refills the VRAM cache with its experts, and the agent's next step finds the "wrong" card (measured 64.6% instead of 84% of picks on VRAM). `STRATA_CLIENT_MEMORY=N`: the engine recognises the client from the first 64 prompt tokens, keeps slow per-client usage counts (0.97 per step, up to 16 clients, LRU), and when a client comes back restores its counts and runs one adaptation of up to N swaps (also with `--adapt-async 1`). RTX 5070 Ti, Q2_0, 61-75K context: agent step right after another program +21% tok/s (+24% by ms), cache already adapted +11%, short code unchanged. Without the variable nothing changes. Full notes and measurements: https://github.com/apatassini/Strata/blob/qwen38-16gb/QWEN38.md 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 15:34:23 +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#4259
No description provided.