Qwen3.8-Flash-Next on any consumer hardware: one-click install for Windows / Linux. Strata inference engine, OpenAI/Anthropic API on localhost, optional image input.
C++
README: a video up top, speed and model choice first, simpler troubleshooting (engine 0.1.10)
Niko12211314ebfc7f1b
diff --git a/README.md b/README.mdindex d70d44c7f..e173fedb3 100644--- a/README.md+++ b/README.md@@ -3,54 +3,22 @@<p align="center"><b>Run a 125-billion-parameter AI model on a normal gaming PC</b><br>one NVIDIA card (12-24 GB) + 64 GB of RAM · Windows or Linux · one click to install</p>+<p align="center"><a href="https://github.com/Niko1221/Strata/releases/download/v0.1.10/Pagoda.mp4"><img src="docs/media/pagoda-preview.webp" width="720" alt="A voxel pagoda garden that Strata's model wrote, running in the browser"></a><br>+<sub>A voxel pagoda garden, written by the model running on an RTX 5070 with Strata (IQ3_S, 128K context) ·+<a href="https://github.com/Niko1221/Strata/releases/download/v0.1.10/Pagoda.mp4">full video (49 s)</a></sub></p>+Strata runs **[Qwen3.8-Flash-Next](https://huggingface.co/Qwen/Qwen3.8-Flash-Next)** - a large, smart AI model thatnormally needs a server - on your own PC. It writes its answers at **60-95 tokens per second** (a token is about ¾of a word): faster than you can read.-- **Private:** everything runs on your PC. Nothing is sent anywhere.-- **Works with your apps:** chat apps, coding agents and scripts that speak the OpenAI or Anthropic API just work.-- **Sees pictures** too, if you want (screenshots, photos, scanned pages).- **Free and open source.**-> **Jump to:** [Is my PC enough?](#is-my-pc-enough) · [Install](#install-3-steps) · [How fast?](#how-fast-is-it) ·-> [Which model?](#which-model-should-i-pick) · [Using it](#using-it) · [Problems?](#something-went-wrong) ·-> [How it works](#how-does-it-work) · [All the details](docs/DETAILS.md)+> **Jump to:** [How fast?](#how-fast-is-it) · [Which model?](#which-model-should-i-pick) · [Install](#install) ·+> [Using it](#using-it) · [Problems?](#something-went-wrong) · [How it works](#how-does-it-work) ·+> [All the details](docs/DETAILS.md)----## Is my PC enough?--| You need | |-| --- | --- |-| **Graphics card** | NVIDIA RTX 30, 40 or 50 series with **12 GB of VRAM or more** |-| **Memory (RAM)** | **64 GB** |-| **Free disk space** | ~80 GB (an SSD makes the first start much faster) |-| **System** | Windows 10/11, or Linux |--That's it. The only thing you install yourself is a current **NVIDIA driver**-([nvidia.com/drivers](https://www.nvidia.com/drivers) or the NVIDIA App). Everything else - Python, the engine, the-model - is set up for you.--## Install (3 steps)--**Windows**--1. [Download this project](https://github.com/Niko1221/Strata/archive/refs/heads/main.zip) and unzip it (or `git clone` it).-2. Double-click **`START-HERE.bat`**.-3. Answer 4 questions - or just press Enter each time for the recommended choice:- - **Which model?** The original, or Swift 1.5 (a version that thinks shorter and answers sooner)- - **Which size?** Q2_0, IQ2_XS, IQ3_XXS or IQ3_S - see [which model](#which-model-should-i-pick)- - **How much context?** How much text it can keep in mind at once (it suggests one for your card)- - **Images?** Whether it should also read pictures--Then it downloads everything (the model is ~70 GB, so the first time takes a while - you can stop and it picks up-where it left off) and **starts the model**. Your browser opens the Strata app at `http://127.0.0.1:8080`.--**Next time**, just double-click `START-HERE.bat` again: it starts right away, nothing is downloaded twice. Close its-window to stop the model.--**Linux:** run `./setup.sh` - same questions, same result.-## How fast is it?Measured on an RTX 5070 (12 GB), a Ryzen 5 7600 and 64 GB of RAM:@@ -73,24 +41,58 @@ A card with more VRAM is faster, because more of the model fits on the GPU: an R**The size** (the same model, compressed more or less):-| Size | Download | Speed | Quality | Pick it if... |-| --- | ---: | --- | --- | --- |-| **Q2_0** | 66 GB | fastest | good | you want speed |-| **IQ2_XS** | 68 GB | fast | better | you want a good all-rounder (**recommended**) |-| **IQ3_XXS** | 76 GB | slower | great | you want better answers (uses 43 GB of your 64 GB RAM) |-| **IQ3_S** | 84 GB | slowest | best: matches the full model on the published tests | you want the very best answers (original model only; uses 50 GB of your 64 GB RAM, so close other big programs) |+| Size | Shard 1 (loaded into RAM + VRAM) | Speed | Quality |+| --- | ---: | --- | --- |+| **Q2_0** | 37.6 GB | fastest | good |+| **IQ2_XS** | 39.2 GB | fast | better (**recommended**) |+| **IQ3_XXS** | 47.0 GB | slower | great |+| **IQ3_S** | 54.8 GB | slowest | best: matches the full model on the published tests (original model only) |++**Will it fit?** Shard 1 is the part of the model that gets loaded when it starts: its experts go into your **RAM**,+the rest onto your graphics card (the second shard, a 29 GB lookup table, stays on the SSD). So it fits when your+**RAM is at least shard 1 + about 10 GB** for Windows and your other programs. With 64 GB of RAM every size fits+(IQ3_S with little else open); with 48 GB, Q2_0 and IQ2_XS. A bigger graphics card makes it faster, but it doesn't+lower the RAM needed.**The version:**- **Qwen3.8-Flash-Next** - the original.- **[Swift 1.5](https://huggingface.co/ukisai/Swift-1.5-Qwen3.8-Flash-Next-GSQ-RCO-GGUF)** - a fine-tune by UkisAIthat thinks much shorter before answering, so you get the answer sooner, with about the same quality. Same speed per- token. Its own license applies (see its page).+ token, and about the same RAM as the same size of the original (no IQ3_S). Its own license applies (see its page).Not sure? Take **IQ2_XS**. You can add another one later with `START-HERE.bat --setup`.+## Install++**You need:** an NVIDIA RTX 30, 40 or 50 card with 12 GB of VRAM or more, enough RAM for the size you pick (above),+~80 GB of free disk space (an SSD makes the first start much faster), and Windows 10/11 or Linux. The only thing you+install yourself is a current **NVIDIA driver** ([nvidia.com/drivers](https://www.nvidia.com/drivers) or the NVIDIA+App). Everything else - Python, the engine, the model - is set up for you.++**Windows**++1. [Download this project](https://github.com/Niko1221/Strata/archive/refs/heads/main.zip) and unzip it (or `git clone` it).+2. Double-click **`START-HERE.bat`**.+3. Answer a few questions - or just press Enter each time for the recommended choice:+ - **Which model and size?** The original or Swift 1.5, and Q2_0, IQ2_XS, IQ3_XXS or IQ3_S - see [above](#which-model-should-i-pick)+ - **How much context?** How much text it can keep in mind at once (it suggests one for your card)+ - **Images?** Whether it should also read pictures+ - **Experimental speed projection?** Off unless you say yes - [read what it does](docs/DETAILS.md#experimental-speed-projection-experimental-off-by-default) first++Then it downloads everything (the model is ~70 GB, so the first time takes a while - you can stop and it picks up+where it left off) and **starts the model**. Your browser opens the Strata app at `http://127.0.0.1:8080`.++**Next time**, just double-click `START-HERE.bat` again: it starts right away, nothing is downloaded twice. Close its+window to stop the model.++**Linux:** run `./setup.sh` - same questions, same result.+## Using it+<p align="center"><img src="docs/media/runpagoda.png" width="900" alt="The Strata app's Monitor tab next to a coding agent"><br>+<sub>The Strata app's <b>Monitor</b> (left) while a coding agent writes the pagoda garden from the video (right)</sub></p>+- **In the browser:** `http://127.0.0.1:8080` - the Strata app (it opens by itself when the model starts): **Chat**, alive **Monitor** of the model and your GPU/CPU/RAM, and **About** with the settings and addresses.- **Chat in the terminal:** `.venv\Scripts\python chat.py`@@ -109,17 +111,35 @@ Not sure? Take **IQ2_XS**. You can add another one later with `START-HERE.bat --## Something went wrong?-| What you see | What to do |-| --- | --- |-| `the NVIDIA driver is too old` | Update the driver (NVIDIA App or nvidia.com/drivers), restart the PC, run `START-HERE.bat` again. |-| It stopped during download or setup | Run `START-HERE.bat` again - it continues where it stopped. |-| `port 8080 is already in use` | Strata is already running - look for its window. |-| The first start takes minutes | Normal: it loads 35-43 GB into RAM. The next start is faster. |-| Slow, and the disk light is busy | Not enough free RAM: close other programs (browsers use a lot), or pick Q2_0 / IQ2_XS. |-| "prompt exceeds the context" | The conversation is longer than the context you chose: run `START-HERE.bat --setup` and pick more. |--More in the [full troubleshooting table](docs/DETAILS.md#troubleshooting). Still stuck? Open an issue and attach-`strata-<model>.log` from this folder.+**My PC froze, or got very slow, the first time Strata started.**+That's normal the first time. Strata loads 35-55 GB into your RAM, locks part of it for the graphics card, and works+out how much of the model fits on your GPU. The mouse can freeze for a few minutes. **Wait, and don't close the+window.** The next starts are much faster. Still frozen after 10 minutes? Restart the PC, close other programs+(browsers use a lot of RAM) and try again. If it keeps happening, pick a smaller size (Q2_0 or IQ2_XS).++**It stopped while downloading or installing.**+Run `START-HERE.bat` again. It continues where it stopped.++**It says the NVIDIA driver is too old.**+Update it (NVIDIA App or [nvidia.com/drivers](https://www.nvidia.com/drivers)), restart the PC, and run+`START-HERE.bat` again.++**It says port 8080 is already in use.**+Strata is already running. Look for its window.++**It's very slow and the disk light keeps blinking.**+Your PC is out of free RAM. Close other programs, or pick a smaller size (Q2_0 or IQ2_XS).++**An answer stopped with "the engine stopped unexpectedly".**+Usually not enough RAM (on Linux the system then stops the engine). Just send your message again: Strata starts the+engine by itself. If it keeps happening, close other programs or pick a smaller size.++**It says the prompt exceeds the context.**+The conversation is longer than the context you chose. Start a new chat, or run `START-HERE.bat --setup` and pick more+context.++**Still stuck?** Look in the [full troubleshooting table](docs/DETAILS.md#troubleshooting), or open an issue and+attach `strata-<model>.log` from the Strata folder.## How does it work?diff --git a/docs/DETAILS.md b/docs/DETAILS.mdindex 5d39e4047..9e821ce4b 100644--- a/docs/DETAILS.md+++ b/docs/DETAILS.md@@ -371,14 +371,16 @@ the document, +0.4% on the chat. Details: `bench/results/2026-09-27-esp/`.| Python or the build tools could not be installed | Install what it names (links are printed), then run it again. Everything already done is kept. || `port 8080 is already in use` | Strata is already running (look for its window), or another program uses the port: `START-HERE.bat --port 8081`. || `cudaHostRegister ... out of memory` in the log | Normal on Windows: the engine pins the experts in per-layer slices instead. Only a problem if the load then fails. |-| The first start takes minutes | It is reading 34-43 GB into RAM; the second start is faster while the files are in the OS cache. |+| The first start takes minutes | It is reading 34-55 GB into RAM; the second start is faster while the files are in the OS cache. |+| The PC freezes for a few minutes at the first start | Normal the first time: the engine loads the experts into RAM, pins part of it for the GPU and sizes the expert cache. Wait; don't close the window. Still frozen after 10 minutes: restart the PC, close other programs, try again, or pick a smaller size. |+| `the engine stopped unexpectedly (exit code ...)` | The engine process ended mid-answer - usually out of RAM (Linux ends the biggest program: `sudo dmesg \| grep -i -E 'killed process\|out of memory'`). The next request starts it again by itself. If it repeats: close other programs or pick a smaller size. The server also warns at start when the model's experts leave less than ~6 GB of RAM for everything else. || Slow output, disk light busy | Not enough free RAM: close other programs, or choose Q2_0 / IQ2_XS. || `prompt ... exceeds the context` | The request is longer than the context you chose: run setup again with a bigger `--context`. || Slower than the tables | The monitor plugged into the GPU and other GPU programs take VRAM from the expert cache; RAM running below its rated speed (enable EXPO/XMP in the BIOS) slows the CPU half. || `this server was started without the vision encoder` | The model was set up for text only: run setup again with `--vision gpu`. || A picture is refused or `cannot read the image` | The file is not a picture Pillow can open (JPEG, PNG, WebP, GIF, BMP, TIFF, AVIF work). || Pictures are slow (10-30 s) | The encoder runs on the CPU: run setup again with `--vision gpu` (needs ~1.4 GB of VRAM). |-| A request never finishes (older engines, mostly with pictures) | Run `START-HERE.bat` once to get engine 0.1.2 or newer. It keeps a real margin of VRAM free: the log says `... MiB of VRAM free with everything loaded` and warns when it is close to 0. |+| A request never finishes: "reading the prompt", GPU "100%" at low power | The GPU ran out of VRAM (engines before 0.1.9 could end with ~30 MiB free at large contexts). Run `START-HERE.bat` once to get engine 0.1.9 or newer; the log then says `... MiB of VRAM free with everything loaded` (a few hundred) and names the `--vram-reserve-mib` to add if it is low. || Anything else | The engine log is `strata-<model>.log` in this folder. |---diff --git a/docs/media/pagoda-preview.webp b/docs/media/pagoda-preview.webpnew file mode 100644index 000000000..630ce1d7cBinary files /dev/null and b/docs/media/pagoda-preview.webp differdiff --git a/docs/media/runpagoda.png b/docs/media/runpagoda.pngnew file mode 100644index 000000000..45aa6ebe2Binary files /dev/null and b/docs/media/runpagoda.png differdiff --git a/setup.py b/setup.pyindex b5b6e0101..d737b33d4 100644--- a/setup.py+++ b/setup.py@@ -56,7 +56,7 @@ PREBUILT_ASSET = "strata-windows-x64.zip" if WIN else "strata-linux-x64.zip"# the CUDA libraries the ready-made engine loads (the same CUDA 13.0 it is built with), from NVIDIA's pip packagesCUDA_WHEELS = ["nvidia-cublas==13.0.2.14", "nvidia-cuda-runtime==13.0.96"]MIN_DRIVER = 580 # CUDA 13.0-MIN_ENGINE = (0, 1, 9) # the head loaded before the expert cache is sized (no 128K stalls), v0.1.9+MIN_ENGINE = (0, 1, 10) # INFO arena_mib: the start-up RAM warning (issue #27), v0.1.10PY_PACKAGES = ["numpy", "jinja2", "regex", "pyyaml", "tqdm", "requests", "cmake", "ninja", "pillow", "psutil"]MODELS = {