okami.mom/strata

git clone https://git.nkp.pet/okami.mom/strata

Niko1221Version 0.2.15 / Control 0.1.61: app and Terminal 0.2.15, Control 0.1.61; every engine package stays 0.1.60 (the v0.2.14 files, carried by absolute url)e39a52e33

main
9.3 KiB191 linesraw

Install and build from a source checkout

Use this guide to work on Strata's code or maintain a source-based installation. It is for developers. To just use Strata (version 0.2.15), install the desktop app or the Terminal. Installed apps do not use START-HERE.bat.

The repository includes START-HERE.bat, SETUP.bat, UPDATE.bat, setup.sh and update.sh. Run them from a cloned or extracted source folder. They may install dependencies, prepare model files and acquire or build an engine. Check model requirements before downloading.

Quick start

I useRun in the source folder
WindowsSTART-HERE.bat (steps)
Linux./setup.sh (steps)
Mac (Apple Silicon)./setup.sh (steps)
A source build to test a change./setup.sh --build --no-start (steps)
An updateUPDATE.bat or ./update.sh (steps)

From source: Windows

  1. Clone the repository or download and extract its source archive.
  2. Open the source folder and run START-HERE.bat.
  3. Choose a supported model, storage folder and settings. Keep the window open while setup works.

For an explicit original ISTA-DASLab Flash-Next pack, from Command Prompt in that folder:

START-HERE.bat --family qwen --model Q2_0

Choose a pack that fits your machine; Q2_0 is an example, not a universal minimum-memory option. In PowerShell, prefix the wrapper with .\, for example .\START-HERE.bat. SETUP.bat opens setup again to add a model or change settings. The wrapper can reuse an existing install; first-start and later load times depend on the pack, disk, RAM and backend. A model can take several minutes to load. Run again over an installed model, setup pre-selects the size that is installed and marks it "(installed)", and --yes takes it: a repeat run does not move the model to the recommended size.

When no ready-made engine fits the PC, setup compiles one. That needs the Visual Studio 2022 Build Tools with the C++ workload; Visual Studio 2019 is too old (the sources are C++20). With a CUDA toolkit, CUDA 13.0 to 13.2 accept Visual Studio 2022 only, and Visual Studio 2026 works from CUDA 13.3. The CPU image encoder alone (no CUDA toolkit on the PC) builds with MSVC and takes any Visual Studio that has the C++ tools. If setup cannot find an install it could use, name the file before running it, for example set STRATA_VCVARS=C:\Program Files\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat. Setup uses that file only if it exists; a wrong path is answered as no build tools at all.

From source: Linux

Clone or extract the source, enter its folder, then run:

./setup.sh

On Debian and Ubuntu, the wrapper can offer to install missing system packages through sudo apt. Other distributions need the equivalent dependencies installed first. Python dependencies use the checkout's .venv. NVIDIA source builds need the CUDA toolkit; AMD builds need HIP/ROCm. See Linux details.

Nix/NixOS users can enter the supplied development environment:

nix develop -c ./setup.sh

Build from git on Linux (to try a pull request or change the code)

git clone https://github.com/Niko1221/Strata.git
cd Strata
./setup.sh --build --no-start

--build requests a source engine rather than a ready-made one. --no-start prevents serving; this is still setup and can download and prepare a model. Inspect the printed paths and generated config before claiming to have tested a code change. A released engine cannot validate changes to your local C++ files.

For a direct NVIDIA build, with the required compiler and CUDA toolkit installed:

cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DSTRATA_ENABLE_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=native
cmake --build build --target strata -j8

native builds for the GPUs in this PC. Name the card instead for another one: 75 (RTX 20), 86 (RTX 30), 89 (RTX 40), 120 (RTX 50), or a list such as "86;120". Without the option the build is for RTX 50 only and the configure step says so.

Run against the resulting binary and the matching model config. Use the build instructions for HIP, SYCL or Metal when changing those backends. Follow contribution validation requirements before requesting review.

For the Terminal monitor from a checkout:

.venv/bin/pip install -r requirements-monitor.txt
STRATA_PYTHON="$PWD/.venv/bin/python3" bin/strata monitor --url http://127.0.0.1:8080

From source: Mac

Use an Apple Silicon Mac with macOS 15 or newer. Install Apple's Command Line Tools once:

xcode-select --install

Then run ./setup.sh in the source folder. macOS uses its own setup implementation and builds the Metal engine; its options and model preparation differ from Windows/Linux. Read MAC.md and ./setup.sh --help. The released app and Terminal do not require a compiler.

AMD cards

Use START-HERE.bat on Windows or ./setup.sh on Linux. Source setup detects supported Radeon cards; --backend hip selects HIP explicitly on a mixed-vendor PC. Build dependencies, architecture support and measurements are in AMD_HIP.md. Ryzen AI Max uses the Strix Halo guide.

Do not assume every AMD card, quantization or feature has been validated. Follow the exact backend guide. Intel Arc is a separate Linux SYCL path with its own model preparation instructions.

Two or three cards

Source setup uses --gpus to select multiple cards of the same supported backend:

./setup.sh --gpus 0,1

Windows equivalent: START-HERE.bat --gpus 0,1. The installed Terminal instead uses strata launch --gpu 0,1. Main/Helper roles, memory limits and measurements are in MULTI_GPU.md. Several cards are not always faster than one; measure the workload you care about.

Docker (Linux)

Use DOCKER.md for released images, GPU access and the container build instructions. A container is a separate installation route. Intel model preparation and host driver requirements still apply.

Older CPUs (experimental)

Ready-made x86 engines require AVX2. Source setup can build experimental AVX or SSE4.2 paths on older CPUs; this does not make every model pack compatible. Q2_0's CPU requirements differ from the i-quants. See the CPU and build notes and older GPU guide for the relevant hardware. Record the actual CPU, compiler, model and validation results when reporting an experimental build.

Updating

Stop the running source engine before replacing it. Run UPDATE.bat on Windows or ./update.sh on Linux. In a Git checkout the updater can pull source changes, update dependencies and refresh installed configs without starting the model. A source ZIP cannot pull Git history: extract a newer source archive instead. Preserve your configs and data location when moving between checkouts.

If you changed engine code, rebuild it and verify the executable path again. The presence of updated source files is not evidence that a running engine contains those changes. Desktop and Terminal component updates are covered separately in INSTALL.md.

Where things are stored

Source setup writes model run configs (strata-<model>.json), launch scripts (run-<model>.bat / .sh) and logs in the checkout. Models, packs and draft data normally go in Strata-data beside it, or the location selected with --data-dir. Dependencies and build products stay in the source installation.

These are source paths. The desktop app and installed Terminal use the release data locations. Back up a config before editing it: setup can rewrite the fields it owns. Do not publish API keys or private paths in logs.

Setup's questions

Setup detects the machine and offers compatible choices. The list varies by platform, available memory and model catalog; it is not a fixed two-model menu. Read the proposed download, memory use and settings before accepting. For documentation recommendations, prefer ISTA-DASLab when a compatible pack fits, then Unsloth, Gyro and others. Executable defaults may differ, so select the family explicitly when that choice matters.

Tuning for your PC

Use source setup's --calibrate only where that backend supports it. Terminal tuning instead uses strata launch --tune quick or --tune thorough; those are separate interfaces. Tuning can take a substantial amount of time and should use the same hardware and model configuration as the intended workload.

Options without questions

Run the relevant wrapper with --help for the complete options on that operating system. Common source examples:

START-HERE.bat --family qwen --model IQ3_XXS --context 32768 --vision no
START-HERE.bat --setup
./setup.sh --family qwen --model IQ3_XXS --context 32768 --vision no
./setup.sh --no-start

--yes accepts setup's recommended answers and can start large downloads. Use it only after choosing the pack and storage location. Keep source flags (--gpus, --vision yes|no, numeric --context) separate from Terminal flags and raw engine options.

1# Install and build from a source checkout
2
3Use this guide to work on Strata's code or maintain a source-based installation. It is for developers.
4To just use Strata (version 0.2.15), install the [desktop app or the Terminal](INSTALL.md). Installed apps do not use `START-HERE.bat`.
5
6The repository includes `START-HERE.bat`, `SETUP.bat`, `UPDATE.bat`, `setup.sh` and `update.sh`.
7Run them from a cloned or extracted **source folder**. They may install dependencies, prepare model files and
8acquire or build an engine. Check [model requirements](MODELS.md) before downloading.
9
10## Quick start
11
12| I use | Run in the source folder |
13| --- | --- |
14| Windows | `START-HERE.bat` ([steps](#from-source-windows)) |
15| Linux | `./setup.sh` ([steps](#from-source-linux)) |
16| Mac (Apple Silicon) | `./setup.sh` ([steps](#from-source-mac)) |
17| A source build to test a change | `./setup.sh --build --no-start` ([steps](#build-from-git-on-linux-to-try-a-pull-request-or-change-the-code)) |
18| An update | `UPDATE.bat` or `./update.sh` ([steps](#updating)) |
19
20## From source: Windows
21
221. Clone the [repository](https://github.com/Niko1221/Strata) or download and extract its source archive.
232. Open the source folder and run `START-HERE.bat`.
243. Choose a supported model, storage folder and settings. Keep the window open while setup works.
25
26For an explicit original ISTA-DASLab Flash-Next pack, from Command Prompt in that folder:
27
28```bat
29START-HERE.bat --family qwen --model Q2_0
30```
31
32Choose a pack that fits your machine; Q2_0 is an example, not a universal minimum-memory option.
33In PowerShell, prefix the wrapper with `.\`, for example `.\START-HERE.bat`.
34`SETUP.bat` opens setup again to add a model or change settings. The wrapper can reuse an existing install;
35first-start and later load times depend on the pack, disk, RAM and backend. A model can take several minutes to load.
36Run again over an installed model, setup pre-selects the size that is installed and marks it "(installed)", and `--yes` takes it: a repeat run
37does not move the model to the recommended size.
38
39When no ready-made engine fits the PC, setup compiles one. That needs the Visual Studio 2022 Build Tools with the C++ workload;
40Visual Studio 2019 is too old (the sources are C++20). With a CUDA toolkit, CUDA 13.0 to 13.2 accept Visual Studio 2022 only, and
41Visual Studio 2026 works from CUDA 13.3. The CPU image encoder alone (no CUDA toolkit on the PC) builds with MSVC and takes any
42Visual Studio that has the C++ tools. If setup cannot find an install it could use, name the file before running it, for example
43`set STRATA_VCVARS=C:\Program Files\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat`. Setup uses that file
44only if it exists; a wrong path is answered as no build tools at all.
45
46## From source: Linux
47
48Clone or extract the source, enter its folder, then run:
49
50```bash
51./setup.sh
52```
53
54On Debian and Ubuntu, the wrapper can offer to install missing system packages through `sudo apt`.
55Other distributions need the equivalent dependencies installed first. Python dependencies use the checkout's
56`.venv`. NVIDIA source builds need the CUDA toolkit; AMD builds need HIP/ROCm. See [Linux details](DETAILS.md#linux).
57
58Nix/NixOS users can enter the supplied development environment:
59
60```bash
61nix develop -c ./setup.sh
62```
63
64### Build from git on Linux (to try a pull request or change the code)
65
66```bash
67git clone https://github.com/Niko1221/Strata.git
68cd Strata
69./setup.sh --build --no-start
70```
71
72`--build` requests a source engine rather than a ready-made one. `--no-start` prevents serving;
73this is still setup and can download and prepare a model. Inspect the printed paths and generated config before
74claiming to have tested a code change. A released engine cannot validate changes to your local C++ files.
75
76For a direct NVIDIA build, with the required compiler and CUDA toolkit installed:
77
78```bash
79cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DSTRATA_ENABLE_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=native
80cmake --build build --target strata -j8
81```
82
83`native` builds for the GPUs in this PC. Name the card instead for another one: `75` (RTX 20), `86` (RTX 30), `89` (RTX 40),
84`120` (RTX 50), or a list such as `"86;120"`. Without the option the build is for RTX 50 only and the configure step says so.
85
86Run against the resulting binary and the matching model config. Use the build instructions for
87[HIP](AMD_HIP.md), [SYCL](INTEL_ARC.md) or [Metal](MAC.md) when changing those backends.
88Follow [contribution validation requirements](../CONTRIBUTING.md) before requesting review.
89
90For the Terminal monitor from a checkout:
91
92```bash
93.venv/bin/pip install -r requirements-monitor.txt
94STRATA_PYTHON="$PWD/.venv/bin/python3" bin/strata monitor --url http://127.0.0.1:8080
95```
96
97## From source: Mac
98
99Use an Apple Silicon Mac with macOS 15 or newer. Install Apple's Command Line Tools once:
100
101```bash
102xcode-select --install
103```
104
105Then run `./setup.sh` in the source folder. macOS uses its own setup implementation and builds the Metal engine;
106its options and model preparation differ from Windows/Linux. Read [MAC.md](MAC.md#install) and
107`./setup.sh --help`. The released app and Terminal do not require a compiler.
108
109## AMD cards
110
111Use `START-HERE.bat` on Windows or `./setup.sh` on Linux. Source setup detects supported Radeon cards;
112`--backend hip` selects HIP explicitly on a mixed-vendor PC. Build dependencies, architecture support and
113measurements are in [AMD_HIP.md](AMD_HIP.md). Ryzen AI Max uses the [Strix Halo guide](STRIX_HALO.md).
114
115Do not assume every AMD card, quantization or feature has been validated. Follow the exact backend guide.
116Intel Arc is a separate Linux SYCL path with its own [model preparation instructions](INTEL_ARC.md).
117
118## Two or three cards
119
120Source setup uses `--gpus` to select multiple cards of the same supported backend:
121
122```bash
123./setup.sh --gpus 0,1
124```
125
126Windows equivalent: `START-HERE.bat --gpus 0,1`. The installed Terminal instead uses
127`strata launch --gpu 0,1`. Main/Helper roles, memory limits and measurements are in [MULTI_GPU.md](MULTI_GPU.md).
128Several cards are not always faster than one; measure the workload you care about.
129
130## Docker (Linux)
131
132Use [DOCKER.md](DOCKER.md) for released images, GPU access and the container build instructions.
133A container is a separate installation route. Intel model preparation and host driver requirements still apply.
134
135## Older CPUs (experimental)
136
137Ready-made x86 engines require AVX2. Source setup can build experimental AVX or SSE4.2 paths on older CPUs;
138this does not make every model pack compatible. Q2_0's CPU requirements differ from the i-quants.
139See the [CPU and build notes](DETAILS.md) and [older GPU guide](OLDER_GPUS.md) for the relevant hardware.
140Record the actual CPU, compiler, model and validation results when reporting an experimental build.
141
142## Updating
143
144Stop the running source engine before replacing it. Run `UPDATE.bat` on Windows or `./update.sh` on Linux.
145In a Git checkout the updater can pull source changes, update dependencies and refresh installed configs without
146starting the model. A source ZIP cannot pull Git history: extract a newer source archive instead.
147Preserve your configs and data location when moving between checkouts.
148
149If you changed engine code, rebuild it and verify the executable path again. The presence of updated source files
150is not evidence that a running engine contains those changes. Desktop and Terminal component updates are covered
151separately in [INSTALL.md](INSTALL.md#updating).
152
153## Where things are stored
154
155Source setup writes model run configs (`strata-<model>.json`), launch scripts (`run-<model>.bat` / `.sh`) and
156logs in the checkout. Models, packs and draft data normally go in `Strata-data` beside it, or the location selected
157with `--data-dir`. Dependencies and build products stay in the source installation.
158
159These are source paths. The desktop app and installed Terminal use the [release data locations](INSTALL.md#where-things-are-stored).
160Back up a config before editing it: setup can rewrite the fields it owns. Do not publish API keys or private paths in logs.
161
162## Setup's questions
163
164Setup detects the machine and offers compatible choices. The list varies by platform, available memory and model
165catalog; it is not a fixed two-model menu. Read the proposed download, memory use and settings before accepting.
166For documentation recommendations, prefer ISTA-DASLab when a compatible pack fits, then Unsloth, Gyro and others.
167Executable defaults may differ, so select the family explicitly when that choice matters.
168
169## Tuning for your PC
170
171Use source setup's `--calibrate` only where that backend supports it. Terminal tuning instead uses
172`strata launch --tune quick` or `--tune thorough`; those are separate interfaces. Tuning can take a substantial
173amount of time and should use the same hardware and model configuration as the intended workload.
174
175## Options without questions
176
177Run the relevant wrapper with `--help` for the complete options on that operating system. Common source examples:
178
179```bat
180START-HERE.bat --family qwen --model IQ3_XXS --context 32768 --vision no
181START-HERE.bat --setup
182```
183
184```bash
185./setup.sh --family qwen --model IQ3_XXS --context 32768 --vision no
186./setup.sh --no-start
187```
188
189`--yes` accepts setup's recommended answers and can start large downloads. Use it only after choosing the pack
190and storage location. Keep source flags (`--gpus`, `--vision yes|no`, numeric `--context`) separate from
191[Terminal flags](TERMINAL_LAUNCH.md) and raw engine options.