[GH-ISSUE #4948] [Engine] Install system for improved maintainability + live settings changes (plus concurrent conversations on DeepSeek4.1 and more) #2275

Open
opened 2026-11-04 01:58:06 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @qwertie on GitHub (Nov 1, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4948

Talking to Opus5.5 about how Strata worked, I realized the design was far from ideal.

So I had Opus5.5 work on a reorganization and rewrite of the memory manager for the last week, and it's about to finish [edit: done!]. The new version is more flexible, more user friendly, uses memory more efficiently, supports multiple GPUs better, and improves maintainability (accommodates future change better), all while reducing the total number of lines of code. Edit: it now also supports multiple concurrent conversations on DeepSeek v4.1-flash-next including batch-groups for using multiple GPUs efficiently, and it seems to be faster too. The main thing missing is that I didn't port tensor parallelism to the new engine; one of the main benefits of DeepSeek 4.1 is small KV caches, so I optimized for concurrency instead.

It's focused on the engine rather than the UI, but the version of the UI that is served over HTTP has changed a little and Opus probably tweaked the desktop app for compatibility with the new version without enhancing it. We tested the changes across Qwen 3.8 and DeepSeek 4.1 (edit: I'm putting off Qwen 3.6, and porting certain features into the new engine, due to my token budget getting tight, and all 3 old engines are still present in my branch) and we tested on both AMD (Strix Halo) and NVIDIA (3060 and 3080).

Meanwhile, another Opus5.5 is busy merging changes from upstream over the last week. Looks like a tough job!

This version also lets you look at raw context windows, for which I made a PR last week.

I prepared this video to explain what we improved and changed:

Video

I'll make a PR shortly.

Features replaced in new memory manager:

Old feature Replaced by
Low-RAM modes: --resident-budget-gib, --mmap-experts, --resident-experts, the file tier's options the RAM pool plus SSD reads without the file cache
DeepSeek's --ssd-cache, --ssd-policy lru/lfu/lfulru, --vram-experts F the same tiers and the adaptive tier
--vram-elastic, --kv-grow, --kv-resident, and reserving every slot's full context the page pool growing with each conversation
The NVIDIA-only VRAM live-resize command and its VMM code CHANGE_SETTINGS on any card
Helper caches and the peer tier for several GPUs the one experts-on-any-card rule
The old batch-slot machinery: BYIELD, --batch-mtp (which drifts), per-slot reservations the shared step and row sharing
Qwen3.8's RAM conversation cache, and DeepSeek's RAM and disk slots (.meta files) pausing to RAM or SSD
Many STRATA_* / DS4_* environment switches from past tuning the tuned values kept as defaults; the toggles dropped

Built on version: strata 0.2.6 (build 0.1.51; python 3.14.6 at C:\AI-models\Strata.venv\Scripts\python.exe)

Originally created by @qwertie on GitHub (Nov 1, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/4948 Talking to Opus5.5 about how Strata worked, I realized the design was far from ideal. So I had Opus5.5 work on a [reorganization and rewrite of the memory manager](https://github.com/qwertie/Strataq/tree/memory-manager) for the last week, and it's about to finish [edit: done!]. The new version is more flexible, more user friendly, uses memory more efficiently, supports multiple GPUs better, and **improves maintainability (accommodates future change better)**, all while reducing the total number of lines of code. Edit: it now also supports multiple concurrent conversations on DeepSeek v4.1-flash-next including batch-groups for using multiple GPUs efficiently, and it seems to be faster too. The main thing missing is that I didn't port tensor parallelism to the new engine; one of the main benefits of DeepSeek 4.1 is small KV caches, so I optimized for concurrency instead. It's focused on the engine rather than the UI, but the version of the UI that is served over HTTP has changed a little and Opus probably tweaked the desktop app for compatibility with the new version without enhancing it. We tested the changes across Qwen 3.8 and DeepSeek 4.1 (edit: I'm putting off Qwen 3.6, and porting certain features into the new engine, due to my token budget getting tight, and all 3 old engines are still present in my branch) and we tested on both AMD (Strix Halo) and NVIDIA (3060 and 3080). Meanwhile, another Opus5.5 is busy merging changes from upstream over the last week. Looks like a tough job! This version also lets you look at raw context windows, for which I made a [PR last week](https://github.com/Niko1221/Strata/pull/4232). I prepared this video to explain what we improved and changed: [![Video](https://github.com/user-attachments/assets/03fd8347-9d3f-416b-a302-97c7bf82da32)](https://www.youtube.com/watch?v=ZdXB9uhq-w4) I'll make a PR shortly. Features replaced in new memory manager: | Old feature | Replaced by | | --- | --- | | Low-RAM modes: `--resident-budget-gib`, `--mmap-experts`, `--resident-experts`, the file tier's options | the RAM pool plus SSD reads without the file cache | | DeepSeek's `--ssd-cache`, `--ssd-policy lru/lfu/lfulru`, `--vram-experts F` | the same tiers and the adaptive tier | | `--vram-elastic`, `--kv-grow`, `--kv-resident`, and reserving every slot's full context | the page pool growing with each conversation | | The NVIDIA-only `VRAM` live-resize command and its VMM code | `CHANGE_SETTINGS` on any card | | Helper caches and the peer tier for several GPUs | the one experts-on-any-card rule | | The old batch-slot machinery: `BYIELD`, `--batch-mtp` (which drifts), per-slot reservations | the shared step and row sharing | | Qwen3.8's RAM conversation cache, and DeepSeek's RAM and disk slots (`.meta` files) | pausing to RAM or SSD | | Many `STRATA_*` / `DS4_*` environment switches from past tuning | the tuned values kept as defaults; the toggles dropped | Built on version: strata 0.2.6 (build 0.1.51; python 3.14.6 at C:\AI-models\Strata\.venv\Scripts\python.exe)
Author
Owner

@github-actions[bot] commented on GitHub (Nov 1, 2026):

Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:

  • Add the Strata version (Settings > About, or strata --version).

Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment /reopen.

Details: CONTRIBUTING.md

<!-- gh-comment-id:6563250488 --> @github-actions[bot] commented on GitHub (Nov 1, 2026): Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing: - [ ] Add the Strata version (Settings > About, or `strata --version`). Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment `/reopen`. Details: [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md)
Author
Owner

@github-actions[bot] commented on GitHub (Nov 1, 2026):

Thanks, this follows the format now.

<!-- gh-comment-id:6563321883 --> @github-actions[bot] commented on GitHub (Nov 1, 2026): Thanks, this follows the format now.
bsakaguchi changed title from [GH-ISSUE #4948] [Engine] Install system for improved maintainability + live settings changes + memory management to [GH-ISSUE #4948] [Engine] Install system for improved maintainability + live settings changes (plus concurrent conversations on DeepSeek4.1 and more) 2026-11-07 14:37:22 +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#2275
No description provided.