[GH-ISSUE #2722] Strata Profile Studio: a page that shows what limits Strata on your PC, and whether a tune helped #1087

Closed
opened 2026-11-04 01:48:23 +07:00 by bsakaguchi · 4 comments
Owner

Originally created by @qiuzan2001 on GitHub (Oct 16, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/2722

Strata Profile Studio is a small web page that runs next to Strata on the same PC. It shows which part of the PC limits Strata (disk, RAM, CPU, PCIe, VRAM, GPU), where the time of each request goes, and whether a change of settings made Strata faster, measured against the noise of your PC. It uses Python 3.11+ and the standard library only, and no GPU of its own: https://github.com/qiuzan2001/strata-profile-studio

20-second tour

To install it, give this sentence to a coding agent on the PC where Strata runs:
Install Strata Profile Studio on this computer and open it in my browser: https://github.com/qiuzan2001/strata-profile-studio (follow docs/AI_SETUP.md)

To look first without Strata: git clone https://github.com/qiuzan2001/strata-profile-studio && cd strata-profile-studio && python3 studio.py --demo (recorded data of one PC, not yours).

What it measured on my PC (RTX 5070 Ti 16 GB, Ryzen 7 5800X3D, 80 GB DDR4, Swift 1.5 IQ3_S, 0.1.44.1): a calibration (setup.py --calibrate) removed --pcie-frac 0.35 and --spec-min-p 0.70 because its short-chat test saw no 3 % gain, and set --adapt-swaps 80. The profile before and after it (run 5 to run 6): agent turns -5.2 %, 6 of 6 turns slower (sign test p = 0.031); chat +0.4 % and long context -2.7 %, inside the noise. With 0.35 / 0.70 put back, a second calibration changed only --adapt-swaps 160 to 80 (run 8 to run 9): agent turns +5.1 %, 6 of 6 faster (p = 0.031). The calibration's test is three short chats of 128 and 512 tokens; it does not see agent turns. The Studio shows the calibration's result and the profile side by side, so you can keep or go back.

Not tested: Windows, macOS and AMD cards. The readers for them come from the documentation of each tool. If you try it there, python3 studio.py --host-probe --config <your strata-<model>.json> prints what it can read, and a "works on" issue in the Studio's repository with that output is welcome.

It writes only Strata's run config (after a dialog, with a .bak copy) and its own state file.

Originally created by @qiuzan2001 on GitHub (Oct 16, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/2722 Strata Profile Studio is a small web page that runs next to Strata on the same PC. It shows which part of the PC limits Strata (disk, RAM, CPU, PCIe, VRAM, GPU), where the time of each request goes, and whether a change of settings made Strata faster, measured against the noise of your PC. It uses Python 3.11+ and the standard library only, and no GPU of its own: https://github.com/qiuzan2001/strata-profile-studio ![20-second tour](https://raw.githubusercontent.com/qiuzan2001/strata-profile-studio/v0.1.0/docs/screenshots/tour.gif) To install it, give this sentence to a coding agent on the PC where Strata runs: `Install Strata Profile Studio on this computer and open it in my browser: https://github.com/qiuzan2001/strata-profile-studio (follow docs/AI_SETUP.md)` To look first without Strata: `git clone https://github.com/qiuzan2001/strata-profile-studio && cd strata-profile-studio && python3 studio.py --demo` (recorded data of one PC, not yours). What it measured on my PC (RTX 5070 Ti 16 GB, Ryzen 7 5800X3D, 80 GB DDR4, Swift 1.5 IQ3_S, 0.1.44.1): a calibration (`setup.py --calibrate`) removed `--pcie-frac 0.35` and `--spec-min-p 0.70` because its short-chat test saw no 3 % gain, and set `--adapt-swaps 80`. The profile before and after it (run 5 to run 6): agent turns -5.2 %, 6 of 6 turns slower (sign test p = 0.031); chat +0.4 % and long context -2.7 %, inside the noise. With 0.35 / 0.70 put back, a second calibration changed only `--adapt-swaps 160` to `80` (run 8 to run 9): agent turns +5.1 %, 6 of 6 faster (p = 0.031). The calibration's test is three short chats of 128 and 512 tokens; it does not see agent turns. The Studio shows the calibration's result and the profile side by side, so you can keep or go back. Not tested: Windows, macOS and AMD cards. The readers for them come from the documentation of each tool. If you try it there, `python3 studio.py --host-probe --config <your strata-<model>.json>` prints what it can read, and a "works on" issue in the Studio's repository with that output is welcome. It writes only Strata's run config (after a dialog, with a `.bak` copy) and its own state file.
Author
Owner

@0sy commented on GitHub (Oct 16, 2026):

Profiling always shows as off

Hey, I'm trying to get Studio running alongside Strata on my Unraid server. Everything connects fine and I can see the model and regular stats, but Studio keeps saying profiling is off.

I'm on Strata 0.1.44.1 and Studio 0.1.0.

I've added "profile": true to the config, restarted Strata, and double-checked that it's actually reading the right file. Still no luck.

I did a bit of digging and noticed that /health doesn't return a profile field, and /profile/status just gives me a 404.

I also compared my container's serve/server.py with the current one on GitHub, and they're identical.

Am I overlooking something obvious here? Does Studio need a different Strata build, or is profiling not available in the current release yet?

Thanks!

<!-- gh-comment-id:6214483855 --> @0sy commented on GitHub (Oct 16, 2026): ### Profiling always shows as off Hey, I'm trying to get Studio running alongside Strata on my Unraid server. Everything connects fine and I can see the model and regular stats, but Studio keeps saying profiling is off. I'm on Strata 0.1.44.1 and Studio 0.1.0. I've added `"profile": true` to the config, restarted Strata, and double-checked that it's actually reading the right file. Still no luck. I did a bit of digging and noticed that `/health` doesn't return a `profile` field, and `/profile/status` just gives me a 404. I also compared my container's `serve/server.py` with the current one on GitHub, and they're identical. Am I overlooking something obvious here? Does Studio need a different Strata build, or is profiling not available in the current release yet? Thanks!
Author
Owner

@qiuzan2001 commented on GitHub (Oct 16, 2026):

You were not overlooking anything. Studio 0.1.0 read its breakdowns, runs and tunes through /profile/* routes and tools/strata_profile.py. Those are in two open Strata pull requests (#2661 and #2660), not in 0.1.44.1 as released. So "profile": true did nothing on your build, and /profile/status was 404, as you found. That was a mistake in my release, not in your setup.

Studio 0.1.1 works with 0.1.44.1 as released: https://github.com/qiuzan2001/strata-profile-studio/releases/tag/v0.1.1. Run git pull in the Studio folder and start it as before. It sees from Strata's answers that the routes are missing and does that work itself. Do not add "profile": true. The Now page then says "stock mode" at the top.

What you get on a container setup:

  • The speeds of each request from /metrics, the PC module, Runs and Compare: nothing more to do.
  • The time per component of a request (GPU, CPU experts, draft, PCIe) comes from the engine log. The engine writes those lines when the run config's "env" has "STRATA_PREFILL_TIMING": "1" and "STRATA_DECODE_TIMING": "1". The Settings page has a button that adds the two keys (the other keys stay, with a .bak copy); then restart Strata. The Studio must be able to read that log file. If the Studio runs outside the Strata container, mount the log's path into it and pass --engine-log <path>. If it cannot read the log, it says so and shows the speeds only.
  • "Run a profile" needs Strata's tools/ folder: pass --strata-root <Strata folder> when the run config is not inside it.

If something still says 404 or off after the pull, please paste the output of python3 studio.py --host-probe --config <your strata-<model>.json> here or in an issue in the Studio's repository. Thank you for the precise report.

<!-- gh-comment-id:6224852752 --> @qiuzan2001 commented on GitHub (Oct 16, 2026): You were not overlooking anything. Studio 0.1.0 read its breakdowns, runs and tunes through `/profile/*` routes and `tools/strata_profile.py`. Those are in two open Strata pull requests (#2661 and #2660), not in 0.1.44.1 as released. So `"profile": true` did nothing on your build, and `/profile/status` was 404, as you found. That was a mistake in my release, not in your setup. Studio 0.1.1 works with 0.1.44.1 as released: https://github.com/qiuzan2001/strata-profile-studio/releases/tag/v0.1.1. Run `git pull` in the Studio folder and start it as before. It sees from Strata's answers that the routes are missing and does that work itself. Do not add `"profile": true`. The Now page then says "stock mode" at the top. What you get on a container setup: - The speeds of each request from `/metrics`, the PC module, Runs and Compare: nothing more to do. - The time per component of a request (GPU, CPU experts, draft, PCIe) comes from the engine log. The engine writes those lines when the run config's `"env"` has `"STRATA_PREFILL_TIMING": "1"` and `"STRATA_DECODE_TIMING": "1"`. The Settings page has a button that adds the two keys (the other keys stay, with a `.bak` copy); then restart Strata. The Studio must be able to read that log file. If the Studio runs outside the Strata container, mount the log's path into it and pass `--engine-log <path>`. If it cannot read the log, it says so and shows the speeds only. - "Run a profile" needs Strata's `tools/` folder: pass `--strata-root <Strata folder>` when the run config is not inside it. If something still says 404 or off after the pull, please paste the output of `python3 studio.py --host-probe --config <your strata-<model>.json>` here or in an issue in the Studio's repository. Thank you for the precise report.
Author
Owner

@ShaggyDragon commented on GitHub (Oct 18, 2026):

Another data point, from a setup that went the other way: Unraid, Strata 0.1.44.1 in Docker, Studio v0.1.2 in a second container on the same machine.

We pre-applied your serve PR #2688 (git apply --include="serve/*" --include="tools/*") into the 0.1.44.1 container, so the /profile routes exist and Studio reports "stock": false with routes.history: true — the full route-based experience works, and "profile": true in the run config is meaningful on that build. So both paths (stock mode and pre-applied routes) are now confirmed working on Unraid.

For container users on the stock path, your instructions map cleanly: bind (or docker cp-snapshot) the engine log into the Studio container and pass --engine-log <path>; and one key serves both Studio and Strata — pass Strata's own api_key, not a generated one.

One pitfall worth a line in AI_SETUP: the usual Studio image (python:3.12-slim) has no jq. A launcher that reads the key from the run config with jq inside the container fails silently, Studio starts with an empty key, every /api/ request 401s, and the browser shows a never-ending key prompt (the config file is fine — the script just can't read it). A stdlib json.load launcher avoids it entirely.

<!-- gh-comment-id:6246544389 --> @ShaggyDragon commented on GitHub (Oct 18, 2026): Another data point, from a setup that went the other way: Unraid, Strata 0.1.44.1 in Docker, Studio v0.1.2 in a second container on the same machine. We pre-applied your serve PR #2688 (`git apply --include="serve/*" --include="tools/*"`) into the 0.1.44.1 container, so the `/profile` routes exist and Studio reports `"stock": false` with `routes.history: true` — the full route-based experience works, and `"profile": true` in the run config is meaningful on that build. So both paths (stock mode and pre-applied routes) are now confirmed working on Unraid. For container users on the stock path, your instructions map cleanly: bind (or `docker cp`-snapshot) the engine log into the Studio container and pass `--engine-log <path>`; and one key serves both Studio and Strata — pass Strata's own `api_key`, not a generated one. One pitfall worth a line in AI_SETUP: the usual Studio image (`python:3.12-slim`) has no `jq`. A launcher that reads the key from the run config with `jq` inside the container fails silently, Studio starts with an empty key, every `/api/` request 401s, and the browser shows a never-ending key prompt (the config file is fine — the script just can't read it). A stdlib `json.load` launcher avoids it entirely.
Author
Owner

@Niko1221 commented on GitHub (Oct 19, 2026):

Thanks for taking the time to report this.

We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to read properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected.

To reopen it takes about two minutes:

  1. Re-test on 0.2.0-beta. It may already be fixed. Write down what you see.
  2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other].
  3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system.
  4. Comment /reopen. A check runs and either reopens the issue or lists what is still missing.

The rules are in CONTRIBUTING.md.

<!-- gh-comment-id:6271203223 --> @Niko1221 commented on GitHub (Oct 19, 2026): Thanks for taking the time to report this. We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to read properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected. To reopen it takes about two minutes: 1. Re-test on 0.2.0-beta. It may already be fixed. Write down what you see. 2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other]. 3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system. 4. Comment `/reopen`. A check runs and either reopens the issue or lists what is still missing. The rules are in [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md).
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#1087
No description provided.