### Run Linux setup script Source: https://github.com/vecszn/polystrata/blob/main/bench/results/2026-10-06-llamacpp-0.6.0/prompt-32k.txt Run the setup script to install dependencies and start the server at http://127.0.0.1:8080. Subsequent runs start the model directly. ```bash ./setup.sh ``` -------------------------------- ### Run setup without questions (Windows and Linux) Source: https://github.com/vecszn/polystrata/blob/main/docs/AI_SETUP.md Run the setup script with the --yes flag to accept recommended answers, specify the qwen family and IQ2_XS model, and skip starting the server. Use the appropriate command for your platform. ```bash Windows: START-HERE.bat --yes --family qwen --model IQ2_XS --no-start Linux: ./setup.sh --yes --family qwen --model IQ2_XS --no-start ``` -------------------------------- ### Install GLM family with setup script Source: https://github.com/vecszn/polystrata/blob/main/docs/GLM.md Runs the setup script for the GLM family. It checks the PC, asks about size, context, and RAM, compiles the engine, downloads the model, verifies SHA-256, and starts the web app at http://127.0.0.1:8080. For 3.0BIT, it also downloads the model's draft block (2.8 GB) for each size. ```bash ./setup.sh --family glm ``` -------------------------------- ### Run setup script again to continue installation Source: https://github.com/vecszn/polystrata/blob/main/docs/TROUBLESHOOTING.md If installation stops, run START-HERE.bat (Linux: ./setup.sh) again. It continues where it stopped. ```bash START-HERE.bat ``` ```bash ./setup.sh ``` -------------------------------- ### Install Qwen3.6 family Source: https://github.com/vecszn/polystrata/blob/main/docs/BACKENDS.md Runs the setup script to install the Qwen3.6 family. The first size (UD-Q3_K_M) is taken by default; smaller sizes are used if RAM is insufficient. ```bash ./setup.sh --family qwen36 ``` -------------------------------- ### Run setup.sh with SYCL backend Source: https://github.com/vecszn/polystrata/blob/main/docs/INTEL.md Runs the PolyStrata setup with the SYCL backend. Creates its own Python environment in .venv, so it does not touch Ubuntu's externally managed system Python. Do not run python3 sycl/setup_intel.py yourself; use this command for both first install and later starts. ```bash ./setup.sh --backend sycl [setup.py's options, e.g. --model IQ3_S --context 32768 --port 8085] ``` -------------------------------- ### Setup and run benchmark for UD-IQ4_XS Source: https://github.com/vecszn/polystrata/blob/main/bench/results/2026-10-07-community-rtx-5090-laptop-ud-iq4xs/README.md Runs the setup script with the unsloth family and UD-IQ4_XS model, using a 262144 context and int8 KV cache. The script starts the server and the benchmark posts two prompts to /v1/chat/completions with max_tokens 512. Decode tok/s is read from the log file. ```bash ./setup.sh --setup --family unsloth --model UD-IQ4_XS --yes --no-start --context 262144 --kv int8 # start script: run-unsloth-ud-iq4_xs.sh (config strata-unsloth-ud-iq4_xs.json) # bench: POST /v1/chat/completions, the two prompts above, max_tokens 512; # read decode tok/s from strata-unsloth-ud-iq4_xs.log ("strata serve: prompt ...") ``` -------------------------------- ### START-HERE.bat command-line options for setup and configuration Source: https://github.com/vecszn/polystrata/blob/main/docs/INSTALL.md Lists all command-line options for START-HERE.bat, covering installation, model selection, context, vision, GGUF files, inspection, data directory, port, GPU selection, VRAM reserve, browser, backend, host/API key, calibration, and system check. ```batch START-HERE.bat --setup install another model, or change context / images SETUP.bat the same (double-click it) START-HERE.bat --model IQ2_XS --context 32768 --vision yes --yes no questions START-HERE.bat --gguf-dir D:\models\IQ2_XS use GGUF files you already have START-HERE.bat --inspect D:\models\some.gguf what a GGUF really holds and whether PolyStrata runs it (no download) START-HERE.bat --data-dir E:\PolyStrata-data keep the model files somewhere else START-HERE.bat --port 8081 another port START-HERE.bat --gpu 1 another GPU (setup picks the one with the most VRAM) START-HERE.bat --gpus 0,2 several GPUs sharing the model START-HERE.bat --vram-reserve-mib 2048 leave 2 GB of VRAM free for other programs (remembered) START-HERE.bat --no-browser do not open the chat page when the model is ready (remembered; --browser undoes it) START-HERE.bat --setup --backend hip the AMD engine on a PC that also has an NVIDIA card START-HERE.bat --setup --host 0.0.0.0 --api-key reachable from other devices, with a key START-HERE.bat --calibrate tune the engine for this PC (about 15-30 minutes, longer on a slow card), then start START-HERE.bat --check only check this PC ``` -------------------------------- ### Run setup's own check (Windows and Linux) Source: https://github.com/vecszn/polystrata/blob/main/docs/AI_SETUP.md Use setup's own check to print GPU, driver, RAM, CPU, free disk, and whether the PC can run PolyStrata. It installs nothing except Python and the .venv it needs. Run the appropriate command for your OS. ```bash Windows: START-HERE.bat --check Linux: ./setup.sh --check ``` -------------------------------- ### Install Strata with setup.py Source: https://github.com/vecszn/polystrata/blob/main/bench/results/2026-10-03-rx6900xt-coder/README.md Runs the Strata setup script with specified options for the coder family, IQ1_M model, HIP backend, 65536 context, no vision, and local host. The setup saves the configuration and launcher files, and verifies model integrity. ```powershell .\\.venv\\Scripts\\python.exe setup.py --yes --family coder --model IQ1_M --backend hip --context 65536 --vision no --host 127.0.0.1 --no-start ``` -------------------------------- ### START-HERE.bat command-line options Source: https://github.com/vecszn/polystrata/blob/main/bench/results/2026-10-06-llamacpp-0.6.0/prompt-32k.txt Lists the command-line options for START-HERE.bat to set up, change model/context/images, use existing GGUF files, change data directory, port, GPU, or calibrate the engine. The --setup option installs another model or changes context/images; --gguf-dir uses existing GGUF files; --data-dir relocates model files; --port changes the port; --gpu selects a GPU; --calibrate tunes the engine for the PC. ```batch START-HERE.bat --setup install another model, or change context / images SETUP.bat the same (double-click it) START-HERE.bat --model IQ2_XS --context 32768 --vision yes --yes no questions START-HERE.bat --gguf-dir D:\models\IQ2_XS use GGUF files you already have START-HERE.bat --data-dir E:\Strata-data keep the model files somewhere else START-HERE.bat --port 8081 another port START-HERE.bat --gpu 1 another GPU (numbered as nvidia-smi; setup picks the one with the most VRAM) START-HERE.bat --calibrate tune the engine for this PC (about 5-10 minutes), then start ``` -------------------------------- ### Install Gemma 4 family Source: https://github.com/vecszn/polystrata/blob/main/docs/BACKENDS.md Runs the setup script to install the Gemma 4 family. The first size (UD-Q3_K_M) is taken by default; smaller sizes are used if RAM is insufficient. ```bash ./setup.sh --family gemma4 ``` -------------------------------- ### Install Swift 1.5 with IQ2_XS: START-HERE.bat --setup --family swift Source: https://github.com/vecszn/polystrata/blob/main/bench/results/2026-10-06-llamacpp-0.6.0/prompt-32k.txt Install Swift 1.5 with IQ2_XS, the recommended quantization from its authors. Swift is a fine-tune that thinks shorter, and IQ2_XS balances size and quality. Use this option when setting up Strata with Swift. ```batch START-HERE.bat --setup --family swift --model IQ2_XS ``` -------------------------------- ### strata_install Source: https://github.com/vecszn/polystrata/blob/main/docs/MCP_SERVER.md Runs setup without questions in the background. Without confirm, returns the plan. A second call shows progress. Cancel stops the install. ```APIDOC ## strata_install ### Description Runs setup without questions in the background. Without `confirm: true` it only returns the plan. A second call shows the progress. `cancel: true` stops the install. ### Method MCP Tool ### Endpoint strata_install ### Parameters #### Optional Arguments - **family** (string) - Optional - Model family: qwen, swift, coder, unsloth. - **model** (string) - Optional - Model size: Q2_0, IQ2_XS, IQ3_XXS, IQ3_S, IQ1_M, UD-IQ4_XS, UD-Q4_K_XL. - **context** (integer) - Optional - Context length: 8192 ... 524288. - **vision** (string) - Optional - Vision mode: no, yes, gpu, cpu. - **kv** (string) - Optional - KV cache type: int8, q4_0, k8v4. - **gpu** (number) - Optional - GPU index. - **gpus** (string) - Optional - GPU list: "0,2" or "all". - **backend** (string) - Optional - Backend: auto, cuda, hip. - **low_ram** (boolean) - Optional - Enable low RAM mode. - **port** (string) - Optional - Port to use. - **data_dir** (string) - Optional - Data directory. - **confirm** (boolean) - Optional - Confirm the install. - **cancel** (boolean) - Optional - Cancel the install. ### Response Returns JSON with a one-line `summary` field, sent as both text and MCP structured content. ``` -------------------------------- ### strata_start Source: https://github.com/vecszn/polystrata/blob/main/docs/MCP_SERVER.md Starts an installed model in the background and waits until it answers. If not ready after wait_seconds, returns 'loading'. ```APIDOC ## strata_start ### Description Starts an installed model in the background and waits until it answers. If it is not ready after `wait_seconds` (default 50), it returns "loading". ### Method MCP Tool ### Endpoint strata_start ### Parameters #### Optional Arguments - **model** (string) - Optional - Model id from `strata_status`, e.g. `q2_0`, `coder-iq1_m`. Default: most recently used. - **port** (string) - Optional - Port to use. - **gpu** (string) - Optional - GPU to use. - **wait_seconds** (integer) - Optional - Time to wait for readiness (0-600). Default 50. ### Response Returns JSON with a one-line `summary` field, sent as both text and MCP structured content. ``` -------------------------------- ### Run setup with HIP backend Source: https://github.com/vecszn/polystrata/blob/main/docs/AMD_HIP.md Run the setup script with the HIP backend to install PolyStrata on supported AMD GPUs. The script detects the GPU via the kernel's KFD topology and automatically selects the HIP backend if no NVIDIA GPU is present. ```sh ./setup.sh --backend hip ``` -------------------------------- ### Setup defaults for IQ3_S and Swift IQ3_XXS Source: https://github.com/vecszn/polystrata/blob/main/bench/results/2026-10-01-community-rtx-5090-5950x/README.md Default arguments written by setup 0.1.39 for this PC, used for IQ3_S and Swift IQ3_XXS rows. No --pcie-frac and no env. ```text --expert-cache auto --prefill auto --spec 4 --spec-min-p 0.5 --mtp \rt --max-context 32768 --kv int8 ``` -------------------------------- ### Install Ornith family Source: https://github.com/vecszn/polystrata/blob/main/docs/BACKENDS.md Runs the setup script to install the Ornith family. The first size (APEX-MTP-I-Compact) is taken by default; smaller sizes are used if RAM is insufficient. ```bash ./setup.sh --family ornith ``` -------------------------------- ### Run setup with vision encoder on CPU Source: https://github.com/vecszn/polystrata/blob/main/docs/TROUBLESHOOTING.md Use this command to enable the vision encoder on the CPU when the server was started without it. Image processing will be slower, taking about 3 seconds for 300 image tokens on 8 cores. ```bash --vision cpu ``` -------------------------------- ### AI setup prompt for PolyStrata Source: https://github.com/vecszn/polystrata/blob/main/README.md Paste this text into an AI coding assistant (Claude Code, Cursor, Codex, GitHub Copilot) to have it set up PolyStrata on the current PC. The assistant checks the graphics card, RAM and disk, picks a fitting model, installs and starts it, and tells you how to connect your apps. ```text Set up PolyStrata on this PC for me: https://github.com/VecSzn/PolyStrata - follow docs/AI_SETUP.md in that repository. ``` -------------------------------- ### Start the server with run-coder-iq1_m.sh Source: https://github.com/vecszn/polystrata/blob/main/bench/results/2026-10-06-community-2x-rx-7900-gre/README.md Shell commands to start the server. The first line sources the environment, the second runs the server with the specified config and port. ```shell . "/strata-env.sh" "/.venv/bin/python" "/serve/server.py" --engine strata \ --config "/strata-coder-iq1_m.json" --port 8080 ``` -------------------------------- ### Windows setup command with --gpu1-experts, --gpu2-experts, --gpu3-experts Source: https://github.com/vecszn/polystrata/blob/main/docs/SECOND_GPU.md Run this PowerShell command from the installation folder on Windows. It performs the same setup as the Linux command, configuring 5000 expert slots on each secondary GPU. Add --gpu-placement layer to test layer placement. ```powershell .\START-HERE.bat --setup --gpu1-experts 5000 --gpu2-experts 5000 --gpu3-experts 5000 ``` -------------------------------- ### Serve command for ROCm benchmark (identical args on both stacks) Source: https://github.com/vecszn/polystrata/blob/main/bench/results/2026-10-03-community-rx7900xtx-rocm102-nightly/README.md Command to start the serve server with identical arguments on both ROCm stacks, only ROCM_PATH/LD_LIBRARY_PATH differ. Includes configuration flags for model, expert cache, KV cache, prefill, VRAM reserve, and environment variables. The request example shows a POST to /v1/chat/completions with a simple prompt. ```text # serve (identical args on both stacks; only ROCM_PATH/LD_LIBRARY_PATH differ) serve/server.py --engine strata --config .json --port <8081|8082> --host 127.0.0.1 # cfg args: --pack packs/iq3_s --native --ple-gguf --mtp mtp/rt # --expert-profile expert-profile.bin --expert-cache auto --spec 3 --kv int8 --kv-resident 32768 # --prefill 8192 --vram-reserve-mib 3072 --max-context 65536 # env: STRATA_PREFILL_RING=96 STRATA_GR_V3=1 STRATA_SELECT_WMMA=1 (see confound) # request: POST /v1/chat/completions {"messages":[{"role":"user","content": # "Name the capital of France in one word."}],"max_tokens":200,"temperature":0} ``` -------------------------------- ### Build PolyStrata pack with tools/iq_pack.py Source: https://github.com/vecszn/polystrata/blob/main/docs/UNSLOTH_Q4.md Run from the repository root after building PolyStrata (or installing 0.1.31+) with gguf-py from the pinned llama.cpp; setup installs it and STRATA_GGUF_PY can point to its gguf-py folder. Takes about 30 seconds and writes index.txt, dense.bin (1.4 GB), native_experts.txt, the tokenizer, conversions.json and compat-bf16.json. --compat-bf16 is required: without it the packer refuses and writes nothing; do not add --experts-bin (it would write a 77 GB copy of the experts this mode does not need). ```sh .venv/bin/python tools/iq_pack.py \ --gguf /path/to/Qwen3.8-Flash-Next-UD-Q4_K_XL-00001-of-00004.gguf \ --out packs/ud-q4_k_xl --compat-bf16 ``` -------------------------------- ### Run needle_bench.py with help and example invocation Source: https://github.com/vecszn/polystrata/blob/main/docs/COMMUNITY_BENCHMARKS.md Shows how to get help for the needle benchmark script and run it against a local server with specified context lengths and depths. The --api-key flag is available for authenticated servers but should be kept out of published commands. ```bash python tools/needle_bench.py --help python tools/needle_bench.py --url http://127.0.0.1:8080 --lengths 32k,128k --depths 10,50,90 --out needles.json ``` -------------------------------- ### Setup command for Polystrata benchmark Source: https://github.com/vecszn/polystrata/blob/main/bench/results/2026-09-30-community-rtx-5090/README.md Run this command inside the CUDA container with GPU access, host IPC, and unlimited memlock. It configures the model, context length, KV cache, vision, and other options, then builds the project without starting the server. ```bash bash ./setup.sh --family qwen --model IQ2_XS --context 131072 --kv int8 \ --vision gpu --experimental-speed-projection off --gpu 0 --low-ram off \ --build --yes --no-start --port 18080 --data-dir /workspace/Strata-data ``` -------------------------------- ### Setup Unsloth UD-IQ4_XS model with START-HERE.bat Source: https://github.com/vecszn/polystrata/blob/main/docs/MODELS.md Command to set up the Unsloth UD-IQ4_XS (~4-bit) model, the fourth version in setup's menu. Requires 48 GB RAM and engine 0.1.38 or newer. ```bat START-HERE.bat --setup --family unsloth --model UD-IQ4_XS ``` -------------------------------- ### Use existing GGUF file with setup script Source: https://github.com/vecszn/polystrata/blob/main/docs/GLM.md Runs the setup script with an existing GGUF file, skipping the download. The --gguf-dir option points to the folder containing the file. ```bash ./setup.sh --family glm --gguf-dir /folder/with/the/file ``` -------------------------------- ### CLI options: --gpus, --gpu, --layer-split Source: https://github.com/vecszn/polystrata/blob/main/docs/MULTI_GPU.md Command-line options to choose GPU configuration at setup or at any start. --gpus 0,2 selects specific cards (first is main, remembered), --gpus all uses every compatible card, --gpu 0 uses one card for that start only, and --layer-split auto is the default or specifies the first layer of each later card (e.g., 18 or 16,32). ```plaintext --gpus 0,2 these cards together, as nvidia-smi numbers them; the first is the main one. Remembered. ``` ```plaintext --gpus all every card that can share the model ``` ```plaintext --gpu 0 one card (at a start: for that start only) ``` ```plaintext --layer-split auto (default) or the first layer of each later card, e.g. 18 or 16,32 ``` -------------------------------- ### Start script creation and API endpoints Source: https://github.com/vecszn/polystrata/blob/main/bench/results/2026-10-03-rx6900xt-coder/installation.txt Log output showing the creation of the start script and the API endpoints for OpenAI and Anthropic compatibility. ```text [ok] KV streaming on: the context's KV cache lives in RAM (0.9 GB), more experts fit in VRAM [!] no hipBLASLt tuning table for gfx1030 with hipBLASLt 100500: the prompt's dense matrix products use plain hipBLAS (tools/hip/tune_hipblaslt makes a table: docs/AMD_HIP.md, Tuning table) [ok] start script: run-coder-iq1_m.bat All set. API (OpenAI): http://127.0.0.1:8080/v1 (any API key; model name: anything) API (Anthropic): http://127.0.0.1:8080/v1/messages Next time: just run START-HERE.bat (or run-coder-iq1_m.bat) - it starts right away ``` -------------------------------- ### Run benchmark and monitor scripts Source: https://github.com/vecszn/polystrata/blob/main/bench/results/2026-10-04-community-rtx-4090-laptop/README.md Commands to start the monitor, run the benchmark, stop the monitor, and run the needle benchmark. The benchmark uses the same scripts as the RTX 5090 report, run from the repository root against the installed server. ```bash B=bench/results/2026-09-30-community-rtx-5090 .venv/bin/python $B/monitor.py ~/strata-bench/telemetry.jsonl & .venv/bin/python $B/benchmark.py --root . --pack ../Strata-data/packs/iq3_s \ --url http://127.0.0.1:8080 --out ~/strata-bench kill %1 .venv/bin/python tools/needle_bench.py --url http://127.0.0.1:8080 \ --lengths 32k,128k --depths 10,50,90 --out ~/strata-bench/needles.json ``` -------------------------------- ### Install Docker and add user to docker and render groups Source: https://github.com/vecszn/polystrata/blob/main/docs/INTEL.md Installs Docker and Git, then adds the current user to the docker and render groups. Log out and back in (or reboot) for the groups to take effect; docker ps must work without sudo and the render group lets the container open the GPU. ```bash sudo apt install docker.io git sudo usermod -aG docker,render $USER ``` -------------------------------- ### Start the server Source: https://github.com/vecszn/polystrata/blob/main/docs/GLM.md Starts the PolyStrata server with the specified engine and configuration, listening on port 8095. ```bash python serve/server.py --engine strata --config glm.json --port 8095 ``` -------------------------------- ### Linux setup command with --gpu1-experts, --gpu2-experts, --gpu3-experts Source: https://github.com/vecszn/polystrata/blob/main/docs/SECOND_GPU.md Run this shell command on an existing Linux installation after applying the patch to its source tree. It configures the engine with 5000 expert slots on each of the three secondary GPUs. Add --gpu-placement layer to test layer placement instead of the default stripe. ```sh ./setup.sh --setup --gpu1-experts 5000 --gpu2-experts 5000 --gpu3-experts 5000 ``` -------------------------------- ### Install oneAPI from Intel apt repository Source: https://github.com/vecszn/polystrata/blob/main/docs/INTEL_ARC.md Installs the Intel oneAPI compiler, MKL, and build tools via apt. This is required for the manual Linux build. ```sh wget -qO- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \ | sudo gpg --dearmor -o /usr/share/keyrings/oneapi-archive-keyring.gpg echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" \ | sudo tee /etc/apt/sources.list.d/oneAPI.list sudo apt update sudo apt install intel-oneapi-compiler-dpcpp-cpp intel-oneapi-mkl-devel ninja-build cmake git ``` -------------------------------- ### Launch server and engine commands Source: https://github.com/vecszn/polystrata/blob/main/bench/results/2026-10-02-community-rtx2080ti-11gb/README.md Commands to start the server and the engine it launches, with the API key removed and install path replaced by . The server command uses the Python virtual environment and specifies the engine, config, and port. The engine command includes all relevant flags for model files, expert cache, prefill, MTP, context, KV, vision, and VRAM reserve. ```text .venv/bin/python serve/server.py --engine strata --config strata-iq3_s.json --port 8080 # the engine command it starts (from the config): engine/strata --pack /packs/iq3_s --native /models/IQ3_S/...-00001-of-00002.gguf \ --ple-gguf /models/IQ3_S/...-00002-of-00002.gguf --expert-profile data/expert-profile.bin \ --expert-cache auto --prefill auto --spec 4 --spec-min-p 0.5 --mtp /mtp/rt \ --max-context 262144 --kv int8 --kv-resident 32768 --vision --vram-reserve-mib 700 ``` -------------------------------- ### Setup with vision and custom token limit Source: https://github.com/vecszn/polystrata/blob/main/docs/DETAILS.md Run setup with vision on CPU and set a maximum of 768 image tokens. This is used when you need more detail from images (small text, charts) at the cost of longer encoding time. ```bash START-HERE.bat --setup --vision cpu --vision-tokens 768 ``` -------------------------------- ### List models via CLI Source: https://github.com/vecszn/polystrata/blob/main/docs/BACKENDS.md Lists installed models from the terminal. ```bash python polystrata.py --list-models ``` -------------------------------- ### Start server with build-hip/strata for GSQ-RCO IQ3_XXS model Source: https://github.com/vecszn/polystrata/blob/main/docs/AMD_HIP.md Command to start the server with the HIP build, using mmap for experts and specifying model paths. Includes flags for prefill, speculation, context, and VRAM reservation. Replace paths with actual locations. ```sh build-hip/strata --serve \ --pack packs/iq3xxs \ --native /path/to/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS-00001-of-00002.gguf \ --ple-gguf /path/to/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS-00002-of-00002.gguf \ --mmap-experts --expert-profile data/expert-profile.bin --expert-cache auto \ --prefill 512 --spec 4 --spec-min-p 0.5 --mtp mtp/rt \ --max-context 4096 --kv int8 --pool-workers 15 \ --adapt-every 0 --pcie-frac 0 --vram-reserve-mib 1024 ``` -------------------------------- ### Start Strata server for benchmark Source: https://github.com/vecszn/polystrata/blob/main/bench/results/2026-10-03-windows-groups/README.md Starts the Strata engine server for benchmarking. Run from the repository root, one server at a time, with a local copy of the config updated to point to the executable, model, tokenizer, profile, library, and log paths. ```powershell python serve/server.py --engine strata --config path/to/local-config.json --port 8081 ``` -------------------------------- ### Launch Strata server Source: https://github.com/vecszn/polystrata/blob/main/bench/results/2026-10-04-community-rtx-5090-9700x/README.md Command to start the Strata server with the specified engine, configuration file, and port. ```text .venv\Scripts\python.exe -u serve\server.py --engine strata --config strata-iq3_xxs.json --port 5310 ``` -------------------------------- ### Engine command started by the server Source: https://github.com/vecszn/polystrata/blob/main/bench/results/2026-10-06-community-2x-rx-7900-gre/README.md Shows the engine command that the server starts, including all the model, pack, expert profile, MTP, context, KV, split, and vision options. The environment variables and GPU visibility are noted in the comment. ```shell /engine/strata --serve --pack /packs/coder-iq1_m \ --native /models/coder-IQ1_M/Qwen3.8-Flash-Next-GSQ-RCO-IQ1_M-00001-of-00002.gguf \ --ple-gguf /models/coder-IQ1_M/Qwen3.8-Flash-Next-GSQ-RCO-IQ1_M-00002-of-00002.gguf \ --expert-profile expert-profile-learned-coder.bin --expert-cache auto --prefill auto \ --spec 5 --spec-min-p 0.5 --mtp /mtp/rt --max-context 262144 --kv int8 \ --kv-resident 32768 --vram-reserve-mib 3072 --vram-reserve-later-mib 800 \ --pipeline-windows 2 --vision --layer-split 27 \ --expert-profile-save expert-profile-learned-coder.bin ``` -------------------------------- ### Setup command and engine arguments for IQ3_XXS model Source: https://github.com/vecszn/polystrata/blob/main/bench/results/2026-10-06-community-4x-tesla-p100/README.md Shows the setup.sh command and the resulting engine arguments for the IQ3_XXS model. The setup command requires the folder containing both GGUF shards and specifies GPUs 0-3 with CUDA 12. The engine arguments include the pack, native and PLE GGUF files, expert profile, cache settings, MTP spec, context size, KV cache settings, and remote expert optimization. ```text ./setup.sh --setup --family qwen --model IQ3_XXS --gguf-dir --gpus 0,1,2,3 --cuda 12 --vision no --yes engine args (from strata-iq3_xxs.json): --pack .../packs/iq3_xxs --native ...IQ3_XXS-00001-of-00002.gguf --ple-gguf ...IQ3_XXS-00002-of-00002.gguf --expert-profile data/expert-profile.bin --expert-cache auto --prefill auto --spec 4 --spec-min-p 0.5 --mtp .../mtp/rt --max-context 65536 --kv int8 --kv-resident 32768 --remote-expert-opt ``` -------------------------------- ### Run setup.sh with Qwen IQ3_S model and 131072 context Source: https://github.com/vecszn/polystrata/blob/main/bench/results/2026-10-04-community-rtx-4090-laptop/README.md Installs and configures the pinned Qwen3.8-Flash-Next-GSQ-RCO-GGUF model with INT8 KV cache, 131,072-token context, no vision encoder, and no auto-start. The `--kv-resident` flag is absent, so KV streaming is off for this RAM size; expert cache is auto with 3,865 slots and 7.38 GiB VRAM. ```bash ./setup.sh --yes --family qwen --model IQ3_S --context 131072 --kv int8 --vision no --no-start ``` -------------------------------- ### Switch model via CLI Source: https://github.com/vecszn/polystrata/blob/main/docs/BACKENDS.md Starts a chat with the specified model, switching the server if already running. ```bash python polystrata.py --model qwen3.6 ``` -------------------------------- ### GET /api/models Source: https://github.com/vecszn/polystrata/blob/main/docs/BACKENDS.md Lists every installed model, with the one in use marked as 'current'. ```APIDOC ## GET /api/models ### Description Lists every installed model, with the one in use marked as `current`. ### Method GET ### Endpoint /api/models ### Response #### Success Response (200) - **models** (array) - List of model objects, each with fields like `id`, `display_name`, `backend`, `path`, `quantization`, `params_total`, `params_active`, `context`, `multimodal`, `mtp`, `vram_gb`, `ram_gb`, `status`. The current model is marked with `current: true`. #### Response Example ```json { "models": [ { "id": "qwen3.6-35b-a3b-ud-q3_k_m", "display_name": "Qwen3.6 35B-A3B", "backend": "qwen4exp", "path": "models/qwen3.6-35b-a3b-ud-q3_k_m.gguf", "quantization": "UD-Q3_K_M", "params_total": "35B", "params_active": "A3B", "context": 8192, "multimodal": false, "mtp": false, "vram_gb": 20, "ram_gb": 25, "status": "available", "current": true } ] } ``` ``` -------------------------------- ### Install Coder model: START-HERE.bat --setup --family coder Source: https://github.com/vecszn/polystrata/blob/main/bench/results/2026-10-06-llamacpp-0.6.0/prompt-32k.txt Use this command to install Strata with the Coder model, a pruned variant of Qwen3.8-Flash-Next that requires only 32 GB of RAM. It downloads shard 1 if the original is already installed. The coder's expert profile is shipped with Strata. ```batch START-HERE.bat --setup --family coder ``` -------------------------------- ### Run setup.sh with SYCL backend Source: https://github.com/vecszn/polystrata/blob/main/docs/INTEL_ARC.md Runs the setup script with the SYCL backend and usual options such as --model and --context. Prints an experimental warning and continues with sycl/setup_intel.py, which finds the Arc in sysfs, uses the SYCL engine, and writes the config and run-.sh. On cards under 12 GB or i915 (A-series) it writes the small-card config. ```sh ./setup.sh --backend sycl [setup's usual options, e.g. --model IQ2_XS --context 32768] ``` -------------------------------- ### Setup command for Qwen3.8-Flash-Next IQ2_XS with GPU split Source: https://github.com/vecszn/polystrata/blob/main/bench/results/2026-10-04-community-v100-rtx4070-split/README.md Command to set up the model with the specified GPUs, CUDA version, and data directory. Includes the engine arguments for expert profile, cache, prefill, speculative decoding, context length, KV cache type, and memory mapping options. ```text ./setup.sh --setup --yes --family qwen --model IQ2_XS --gpus 1,0 --cuda 12 --vision no --data-dir /mnt/steam/Strata-data --no-start engine args: --pack .../packs/iq2_xs --native ...-00001-of-00002.gguf --ple-gguf ...-00002-of-00002.gguf --expert-profile data/expert-profile.bin --expert-cache auto --prefill auto --spec 4 --spec-min-p 0.5 --mtp .../mtp/rt --max-context 131072 --kv int8 --mmap-experts --remote-expert-opt ``` -------------------------------- ### Setup Unsloth UD-Q4_K_XL model with START-HERE.bat Source: https://github.com/vecszn/polystrata/blob/main/docs/MODELS.md Command to set up the experimental Unsloth UD-Q4_K_XL model. Requires 48 GB RAM, an NVMe SSD, and an NVIDIA GPU. ```bat START-HERE.bat --setup --family unsloth --model UD-Q4_K_XL ``` -------------------------------- ### Setup command for Coder IQ1_M with low RAM and vision Source: https://github.com/vecszn/polystrata/blob/main/bench/results/2026-10-04-community-v100-16gb-ram/README.md Command to run setup.sh with the coder family, low RAM mode, vision on GPU, and specific engine arguments for the IQ1_M model. Includes flags for expert cache, prefill, MTP, context size, KV int8, resident experts, and VRAM reserve. ```text ./setup.sh --yes --family coder --gpu 1 --cuda 12 --low-ram on --vision gpu --data-dir /mnt/steam/Strata-data --no-start engine args: --pack .../packs/coder-iq1_m --native ...-00001-of-00002.gguf --ple-gguf ...-00002-of-00002.gguf --expert-profile data/expert-profile-coder.bin --expert-cache auto --prefill auto --spec 4 --spec-min-p 0.5 --mtp .../mtp/rt --max-context 131072 --kv int8 --resident-experts --vision --vram-reserve-mib 700 ``` -------------------------------- ### Set up environment and run main benchmark Source: https://github.com/vecszn/polystrata/blob/main/bench/results/2026-10-07-community-arc-b65-v01402/BUILD.md Configures GPU and memory environment variables, then runs the main benchmark script with a specified profile. Requires a bounded supervisor with exclusive GPU ownership and sufficient pinned memory. The script outputs counts, timings, and hashes, not generated text. ```sh export ONEAPI_DEVICE_SELECTOR=level_zero:0 SYCL_CACHE_PERSISTENT=0 export SYCL_PROGRAM_COMPILE_OPTIONS=-cl-fp32-correctly-rounded-divide-sqrt export STRATA_MIRROR_MIB=16384 STRATA_VERIFY_DEVICE_PLAN=1 STRATA_VERIFY_NO_HOST=1 export STRATA_WARM_GRAPHS=0 export STRATA_STAGER_THREADS=4 OMP_NUM_THREADS=4 MKL_NUM_THREADS=4 unset STRATA_DBG_NAN STRATA_VERIFY_EAGER STRATA_QFUSE STRATA_DECODE_TIMING STRATA_PLE_TRACE sudo install -d -m700 -o "$(id -un)" /run/strata-community python "$REPORT/benchmark.py" --source "$STRATA_ROOT" \ --profile "$REPORT/profile-8k-512.json" --ram /run/strata-community \ --out /absolute/path/to/new-main-512 --runs 3 export STRATA_TEST_RAM=/run/strata-community export STRATA_TEST_PROFILE="$REPORT/profile-8k-512.json" export BENCH_OUTPUT=/absolute/path/to/new-public-512 python "$REPORT/public-fixtures.py" matched ``` -------------------------------- ### Use g++-14 for CUDA compilation on Linux Source: https://github.com/vecszn/polystrata/blob/main/docs/TROUBLESHOOTING.md If the engine does not compile due to gcc newer than 14, install g++-14 and run setup with CXX and CUDAHOSTCXX set to g++-14. ```bash CXX=g++-14 CUDAHOSTCXX=g++-14 ./setup.sh ``` -------------------------------- ### Prepare artifacts with iq_pack.py and prepare-mtp.py Source: https://github.com/vecszn/polystrata/blob/main/bench/results/2026-10-07-community-arc-b65-v01402/BUILD.md Sets up environment variables and clones the Strata repository at a specific commit, then runs iq_pack.py to create the pack and prepare-mtp.py for the MTP runtime. Requires benchmark assets and preparation checkout paths. ```sh export BENCH_ASSETS=/absolute/path/to/benchmark-assets export PREPARATION_ROOT=/absolute/path/to/strata-preparation-checkout git clone https://github.com/Niko1221/Strata.git "$PREPARATION_ROOT" git -C "$PREPARATION_ROOT" fetch origin 6f32ec070f23ced9f50e704d854d775da52591ab git -C "$PREPARATION_ROOT" checkout --detach FETCH_HEAD python "$PREPARATION_ROOT/tools/iq_pack.py" \ --gguf "$BENCH_ASSETS/models/IQ2_XS/Qwen3.8-Flash-Next-GSQ-RCO-IQ2_XS-00001-of-00002.gguf" \ --out "$BENCH_ASSETS/pack" python "$REPORT/prepare-mtp.py" --source "$STRATA_ROOT" --assets "$BENCH_ASSETS" export MODEL_DIR="$BENCH_ASSETS/models/IQ2_XS" export PACK_DIR="$BENCH_ASSETS/pack" export MTP_DIR="$BENCH_ASSETS/mtp-rt" export EXPERT_PROFILE="$STRATA_ROOT/data/expert-profile.bin" ``` -------------------------------- ### Docker run commands for Strata benchmark configurations Source: https://github.com/vecszn/polystrata/blob/main/bench/results/2026-10-07-community-rtx-5080-docker-wsl2/environment.txt Two docker run commands launching the Strata container with the same volume and settings, differing only in CONTEXT (131072 vs 65536) and REINSTALL (absent vs 1). The first starts the initial setup; the second re-runs setup to change the recorded context. The port is published on 127.0.0.1 only. ```bash docker run -d --name strata --gpus all --network strata-net \ -p 127.0.0.1:8080:8080 --ulimit memlock=-1 --stop-timeout 60 \ -v strata-data:/data \ -e FAMILY=coder -e MODEL=IQ1_M -e CONTEXT=131072 -e VISION=cpu -e GPU=0 \ strata ``` ```bash # the second configuration, same volume, settings changed for a model already set up docker run -d --name strata --gpus all --network strata-net \ -p 127.0.0.1:8080:8080 --ulimit memlock=-1 --stop-timeout 60 \ -v strata-data:/data \ -e FAMILY=coder -e MODEL=IQ1_M -e CONTEXT=65536 -e VISION=cpu -e GPU=0 -e REINSTALL=1 \ strata ``` -------------------------------- ### Run setup with vision encoder on GPU Source: https://github.com/vecszn/polystrata/blob/main/docs/TROUBLESHOOTING.md Use this command to enable the vision encoder on a GPU when the server was started without it, allowing image processing. The --vision gpu option uses NVIDIA VRAM for faster encoding. ```bash --vision gpu ``` -------------------------------- ### Start the server with the strata engine Source: https://github.com/vecszn/polystrata/blob/main/bench/results/2026-10-05-community-2x-p40/README.md Command to launch the server inside the benchmark's network namespace. Use the dual configuration for two GPUs. ```text # server, inside the benchmark's network namespace (cwd /work); one card: python serve/server.py --engine strata --config strata-iq2_xs.json --port 8080 # both cards: --config strata-iq2_xs-dual.json ``` -------------------------------- ### Strata server startup command for Qwen3.8-Flash-Next Q2_0 Source: https://github.com/vecszn/polystrata/blob/main/bench/results/2026-10-06-community-rx-6800m/README.md Command line to start the Strata server with the specified model, vision encoder, expert profile, MTP, and KV settings. Uses Windows caret line continuations. ```text strata.exe --serve --pack F:\Strata-data\packs\sc117-q2_0 ^ --native F:\Strata-data\models\sc117-q2_0\Qwen3.8-Flash-Next-GSQ-RCO-abliterated-Q2_0-00001-of-00002.gguf ^ --ple-gguf F:\Strata-data\models\sc117-q2_0\Qwen3.8-Flash-Next-GSQ-RCO-abliterated-Q2_0-00002-of-00002.gguf ^ --expert-profile F:\Strata\data\expert-profile.bin --expert-cache auto --prefill auto ^ --spec 4 --spec-min-p 0.5 --mtp F:\Strata-data\mtp\rt ^ --max-context 65536 --kv int8 --kv-resident 32768 --resident-experts --vision ``` -------------------------------- ### Run MCP server and tests Source: https://github.com/vecszn/polystrata/blob/main/docs/MCP_SERVER.md Run the MCP server manually to verify it starts and prints '[strata-mcp] ready (PolyStrata folder ...)' to stderr. Use the unittest command to run the test suite with a fake setup and server; it does not download anything or use the GPU. ```bash python C:\Users\you\PolyStrata\tools\strata_mcp.py ``` ```bash python -m unittest tools/test_strata_mcp.py ``` -------------------------------- ### GET /v1/models, GET /models, GET /health Source: https://github.com/vecszn/polystrata/blob/main/bench/results/2026-10-06-llamacpp-0.6.0/prompt-32k.txt Endpoints to list loaded models and check server health. ```APIDOC ## GET /v1/models, GET /models, GET /health ### Description Endpoints to list loaded models and check server health. `/models` and `/v1/models` list only the loaded model with its context limit and input modalities. `/health` returns server health status. ### Method GET ### Endpoint /v1/models, /models, /health ### Response #### Success Response (200) - **data** (array) - List of model objects (for /models endpoints). - **status** (string) - Health status (for /health). #### Response Example { "data": [{"id": "strata", "context_length": 32768}] } ``` -------------------------------- ### Prepare model assets with iq_pack.py and prepare-mtp.py Source: https://github.com/vecszn/polystrata/blob/main/bench/results/2026-10-05-community-arc-b65/BUILD.md Run the model preparation steps: create the dense/native-expert pack with tools/iq_pack.py and then run prepare-mtp.py to prepare the draft tensors. Requires the pinned GGUF shards placed under $BENCH_ASSETS/models/IQ2_XS/. ```sh export BENCH_ASSETS=/absolute/path/to/benchmark-assets python tools/iq_pack.py \ --gguf "$BENCH_ASSETS/models/IQ2_XS/Qwen3.8-Flash-Next-GSQ-RCO-IQ2_XS-00001-of-00002.gguf" \ --out "$BENCH_ASSETS/pack" python "$REPORT/prepare-mtp.py" --source "$STRATA_ROOT" --assets "$BENCH_ASSETS" ``` -------------------------------- ### Model launch command with IQ3_S pack and MTP draft layer Source: https://github.com/vecszn/polystrata/blob/main/bench/results/2026-10-01-community-2x-titan-rtx/README.md Command-line flags for launching the model with the IQ3_S pack, MTP draft layer, expert cache, and long-context settings. Includes --pack, --ple-gguf, --expert-profile, --expert-cache auto, --prefill auto, --spec 4, --spec-min-p 0.5, --mtp, --max-context 262144, --kv int8, --kv-resident 65536, --ple-io ram, and --layer-split auto. ```bash --pack Strata-data/packs/iq3_s --native ...IQ3_S-00001-of-00002.gguf --ple-gguf ...IQ3_S-00002-of-00002.gguf --expert-profile data/expert-profile.bin --expert-cache auto --prefill auto --spec 4 --spec-min-p 0.5 --mtp Strata-data/mtp/rt --max-context 262144 --kv int8 --kv-resident 65536 --ple-io ram --layer-split auto ``` -------------------------------- ### Disable vision encoder during setup Source: https://github.com/vecszn/polystrata/blob/main/docs/TROUBLESHOOTING.md If only the image encoder is blocked by Smart App Control, run setup with --setup --vision no. ```bash START-HERE.bat --setup --vision no ``` -------------------------------- ### Start PolyStrata on a different port Source: https://github.com/vecszn/polystrata/blob/main/docs/TROUBLESHOOTING.md If port 8080 is already in use, start PolyStrata with --port 8081. ```bash START-HERE.bat --port 8081 ``` -------------------------------- ### GET /status, GET /slots Source: https://github.com/vecszn/polystrata/blob/main/docs/DETAILS.md Returns the current state of the model and batch slots, including busy/idle status and prompt token counts. ```APIDOC ## GET /status, GET /slots ### Description Returns the current state of the model and batch slots, including busy/idle status and prompt token counts. ### Method GET ### Endpoint /status, /slots ```