[PR #945] [CLOSED] setup: the low-RAM and KV-streaming decisions as functions #2928

Closed
opened 2026-11-04 02:04:13 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/945
Author: @pipeob0
Created: 10/5/2026
Status: ❌ Closed

Base: main ← Head: feature/setup-rules


📝 Commits (1)

  • ca11e33 setup: the low-RAM and KV-streaming decisions as functions (low_ram_wanted, kv_streaming_wanted)

📊 Changes

2 files changed (+62 additions, -3 deletions)

View changed files

📝 setup.py (+29 -3)
📝 tools/test_setup_risk.py (+33 -0)

📄 Description

Why

A front-end that wants to tell the user what would change on an installed model needs the same answer setup.py gives when it installs: is this model in the low-RAM mode here, does it stream its KV cache at this context. Step 5 and step 7 decided both inline, so anyone else had to re-derive the RAM math and would drift.

What

  • low_ram_wanted(model, ram, choice) and kv_streaming_wanted(model, ctx, kv, ram, choice) (plus kv_streaming_ram_gb), named next to low_ram_fits; step 5 and step 7 now call them. The streaming branches keep their messages and say they are kv_streaming_wanted.
  • Behaviour unchanged: low_ram_wanted is the old budget is None and (...), since budget is set only for a size that has a RAM budget.

Tests

test_setup_risk.RulesAgreeWithTheWrittenConfig: 54 mocked installs (3 sizes x 2 contexts x 3 --kv x 3 --kv-streaming) and 24 more (2 PCs x 4 --low-ram), each comparing the written config's --kv-resident / --resident-experts / --mmap-experts with the function. python -m unittest tools.test_setup_risk - no GPU, no download.

AI

Written by an agent (pi) running on Strata's own local model (qwen3.8-flash-next-iq3_s), reviewed and tested by hand on an RTX 5060 Ti 16 GB / Ryzen 7 5700X3D / 64 GB PC with engine 0.1.39.


🔄 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/945 **Author:** [@pipeob0](https://github.com/pipeob0) **Created:** 10/5/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feature/setup-rules` --- ### 📝 Commits (1) - [`ca11e33`](https://github.com/Niko1221/Strata/commit/ca11e33533ee611507c5dd4d076f3791adf484d1) setup: the low-RAM and KV-streaming decisions as functions (low_ram_wanted, kv_streaming_wanted) ### 📊 Changes **2 files changed** (+62 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `setup.py` (+29 -3) 📝 `tools/test_setup_risk.py` (+33 -0) </details> ### 📄 Description ### Why A front-end that wants to tell the user *what would change* on an installed model needs the same answer setup.py gives when it installs: is this model in the low-RAM mode here, does it stream its KV cache at this context. Step 5 and step 7 decided both inline, so anyone else had to re-derive the RAM math and would drift. ### What - `low_ram_wanted(model, ram, choice)` and `kv_streaming_wanted(model, ctx, kv, ram, choice)` (plus `kv_streaming_ram_gb`), named next to `low_ram_fits`; step 5 and step 7 now call them. The streaming branches keep their messages and say they are `kv_streaming_wanted`. - Behaviour unchanged: `low_ram_wanted` is the old `budget is None and (...)`, since `budget` is set only for a size that has a RAM budget. ### Tests `test_setup_risk.RulesAgreeWithTheWrittenConfig`: 54 mocked installs (3 sizes x 2 contexts x 3 `--kv` x 3 `--kv-streaming`) and 24 more (2 PCs x 4 `--low-ram`), each comparing the written config's `--kv-resident` / `--resident-experts` / `--mmap-experts` with the function. `python -m unittest tools.test_setup_risk` - no GPU, no download. ### AI Written by an agent (pi) running on Strata's own local model (`qwen3.8-flash-next-iq3_s`), reviewed and tested by hand on an RTX 5060 Ti 16 GB / Ryzen 7 5700X3D / 64 GB PC with engine 0.1.39. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-04 02:04:13 +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#2928
No description provided.