Local AI workstation — discover, run, chat, benchmark, and generate images from open-weight models. DFlash/DDTree speculative decoding, TurboQuant & TriAttention cache compression strategies, MLX + llama.cpp + vLLM + MTPLX backends.
25
stars
578
commits
Python
primary language
Sep 4, 2026
updated
The local AI model runner for serious tinkerers.
Discover, convert, serve, chat with, benchmark, and generate images and video from open-weight models — all on your own machine.
⚠️ Work in progress. ChaosEngineAI is under active development. Expect rough edges, breaking changes between versions, and features that appear (and occasionally disappear) from one release to the next. Feedback and issue reports are very welcome.
ChaosEngineAI is a desktop control plane for running large language models locally. It pairs a fast Tauri + React shell with a Python backend that drives llama.cpp, Apple MLX, and (optionally) vLLM, so you get a single window for everything from "I want to try this Hugging Face model" to "show me tokens-per-second across three quantizations on this exact prompt."
llama.cpp GGUF and Apple Silicon MLX for LLMs, plus local Stable Diffusion for image generation, plus diffusion DiT video models (Wan 2.1/2.2, LTX-Video 2.0/2.3, HunyuanVideo, CogVideoX, Mochi) via diffusers, mlx-video on Apple Silicon, and stable-diffusion.cpp scaffolding for cross-platform.top_p, top_k, min_p, repeat_penalty, seed, mirostat, reasoning_effort, JSON-schema constrained outputllama-embedding + cosine retrievalWan-AI/Wan2.{1,2}-* reposuseUiScalellama.cpp GGUF, Apple MLX, optional vLLM, plus remote OpenAI-compatible providers as fallbacksllama-embedding + cosine retrievalweb_search, calculator, code_executor, file_reader, plus stdio MCP client (JSON-RPC) so any local MCP server is callable from chat. Tool results render as table / code / markdown / image based on the returned shape.valid / partial / script-error / blank-render / no-html validation, persistent history, plus retry + repair flowstop_p, top_k, min_p, repeat_penalty, seed, mirostat, reasoning_effort, json_schema)
The launchpad. Surfaces backend health, the engine in use, the currently loaded model, hardware (platform, arch, memory), and quick stats from the warm pool. Big colored badges tell you instantly whether the runtime is online and what cache mode it will use on the next launch.

Browse curated model families with capability tags (chat, coding, vision, reasoning, tools, multilingual, video, thinking). Expand a family to see every variant with its format, parameter count, and quant level, then queue downloads. Filter by format and capability across the whole catalog.

The launch modal. Pick a variant, set context length, choose the engine, and tune runtime strategy knobs in one place, pre-populated from your defaults.

Your local library. Sort by name, format, size, context length, or last-modified date. Each entry shows where it lives on disk, its quant scheme, and a one-click Launch that opens the launch modal with the right defaults pre-populated.

Curated catalog of local image models. Discover Stable Diffusion models optimized for ChaosEngineAI, scout new releases from Hugging Face, and install them with one click. Filter by compatibility tags and see metadata at a glance.

Your installed image model library. See which Stable Diffusion models are ready for generation — each card shows size, diffusion pipeline, resolution, and a one-click Generate to jump straight into Image Studio.

Prompt-based image generation with full control. Choose a model, set aspect ratio and quality presets (square, portrait, landscape, wide), write positive and negative prompts, and generate. Recent outputs appear in the right panel with metadata and re-run options.

Live progress while the diffusion pipeline runs — step-by-step denoising visualization, elapsed time, and a running status log.

Completed image with full generation metadata — model, prompt, seed, steps, resolution, and timing. Open, reveal on disk, clone settings, or save directly from the completion modal.

All your generated images in one place. Search by prompt, model, or runtime; filter by frame size and sort order. Each card shows the source model, generation settings, and quick actions to re-run with the same seed or open in Image Studio.

A focused chat surface with multi-thread sessions in the left rail, pinned threads, document and image attachments, inline citations, tool-call cards, collapsible reasoning traces, and inline thread renaming. Threads persist across launches, remember the model/runtime profile that produced them, and can be reloaded directly from the thread toolbar.
Pick 2 → 4 models, configure each slot's thinking mode (off / auto), reasoning effort (low / medium / high), and seed independently, then issue one prompt. Every slot streams its HTML response in parallel with a sandboxed live preview underneath the raw text — so you see what each model actually rendered, not just what it wrote.
Built-in HTML validation runs per slot (valid / partial / script-error / blank-render / no-html) and is fed back from the iframe sandbox so script crashes and blank renders surface immediately. Every run is saved to a persistent history with title + prompt + per-slot manifests; re-open earlier runs, delete, or open / reveal individual slot HTML files on disk. Failed slots support retry and a continue / repair flow that asks the same model to either resume from the partial response or fix its own broken HTML.

Start, stop, and inspect a local OpenAI-compatible HTTP server backed by the loaded model. Shows the bind address, warm-pool entries, request count, active connections, LAN exposure, preferred port, auto-start controls, and a remote-test panel with copyable curl commands for /health, /models, and /chat/completions.

Configure a benchmark run: choose a model, throughput prompt preset or eval dataset, token budget, and decoding parameters, then watch live progress as the runner streams tokens-per-second, time-to-first-token, memory usage, or eval metrics.

Live progress while a run is in flight — token/sec, TTFT, current prompt, and memory pressure all update in real time.

Final report card: throughput, latency percentiles, generation samples, and the exact run parameters — saved automatically to history.

Every benchmark you've ever run, side-by-side. Pick two runs and the page diffs them across throughput, latency, and quality metrics — perfect for proving that your new quant actually pays its keep.

Apple Silicon only. Point at a Hugging Face checkpoint or local directory and convert it to MLX with optional runtime-specific compression settings. A conversion picker surfaces eligible source models.

Layer-by-layer live progress while the conversion runs — bit budget per block, memory footprint, and a running log tail.
Search, create, edit, tag, and delete reusable prompt templates, including five built-in starter personas. Any template can be applied to Chat with one click so you can switch between coding, summarization, translation, and other system-prompt presets without copy-paste.
Inspect built-in and external plugins across cache strategies, inference engines, tools, model sources, and post-processors. Plugins can be enabled or disabled from the UI, and external plugins are discovered from the app's plugin directory.

A live tail of the backend log stream — load events, server requests, errors, and runtime warnings — with level filtering. The first place to look when something feels off.

Configure model and cache directories, remote-provider fallbacks, Hugging Face tokens for gated models, data-directory migration, integration snippets for external tools, default launch preferences (cache strategy, FP16 layers, fused attention, context tokens, fit-in-memory toggle), and advanced runtime knobs. Every default in this panel is reused as the starting state for the launch modal.
Head to the Releases page for signed builds:
| Platform | File | Notes |
|---|---|---|
| macOS (Apple Silicon) | ChaosEngineAI_*_aarch64.dmg | Signed + notarized |
| Linux | ChaosEngineAI_*_amd64.AppImage | Portable, in-app updates supported |
| Linux (Debian/Ubuntu) | ChaosEngineAI_*_amd64.deb | Install via dpkg, update via apt |
| Windows | ChaosEngineAI_*_x64-setup.exe | Unsigned for now — SmartScreen will warn on first run |
From v0.4.21 onward, every install auto-updates from GitHub Releases on launch. Updates are cryptographically signed.
Prereqs: Rust toolchain, Node 20+, Python 3.11+, and (on macOS) Xcode command-line tools.
# 1. Install JS dependencies
npm install
# 2. Stage the bundled Python runtime + llama.cpp binaries into src-tauri/
npm run stage:runtime
# 3. Launch the desktop app in dev mode (Tauri shell + Vite HMR)
npm run tauri:dev
That's it — the Python backend is spawned by the Tauri shell, the React UI hot-reloads, and you can start exploring.
ChaosEngineAI is three cooperating layers:
┌─────────────────────────────────────────────────────────┐
│ Tauri shell (Rust) │
│ ├─ React + TypeScript UI (src/) │
│ ├─ In-app updater (signed releases from GitHub) │
│ └─ Spawns and supervises the Python backend │
└─────────────────────────────────────────────────────────┘
│ HTTP / IPC
▼
┌─────────────────────────────────────────────────────────┐
│ Python backend (backend_service/) │
│ ├─ Workspace + library + warm pool state │
│ ├─ OpenAI-compatible HTTP server │
│ ├─ Engine adapters + plugin system │
│ └─ DFlash / DDTree speculative decoding │
└─────────────────────────────────────────────────────────┘
│
┌───────────────┼───────────────┐
▼ ▼ ▼
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ llama.cpp │ │ MLX runtime │ │ vLLM │
│ (GGUF) │ │ (Apple Si) │ │ (Linux/CUDA) │
└──────────────┘ └──────────────┘ └──────────────┘
src/ — React 18 + TypeScript UI. Single-window workspace with a sidebar nav covering LLM and image generation screens.src-tauri/ — Tauri 2 Rust shell + bundled runtime.backend_service/ — Python service that owns model lifecycle, the warm pool, the OpenAI-compatible API, the benchmark runner, and speculative decoding (DFlash + DDTree).backend_service/routes/ — FastAPI routes for chat, prompts, compare mode, benchmarks, plugins, images, server controls, and settings.cache_compression/ — Pluggable cache/compression strategy system. Ships with native f16 and optional adapters for TriAttention and TurboQuant.dflash/ — DFlash speculative decoding integration: draft model registry, fuzzy matching for quantized variants, MLX and vLLM backend detection.ChaosEngineAI uses a pluggable cache strategy system. Out of the box, models run with the native f16 KV cache (no compression). Install any of the optional backends below and they automatically appear in the Cache Strategy selector in the launch modal — no configuration required.
| Backend | Install | Bits | Platforms | Description |
|---|---|---|---|---|
| Native f16 | Built-in | — | All | Full-precision KV cache. Maximum quality, no compression. |
| TriAttention | ./.venv/bin/python3 -m pip install triattention vllm | 1-4 | Linux + CUDA only (via vLLM) | Transparent KV cache compression integrated into vLLM's scheduler. Not supported on macOS. |
| TurboQuant | ./.venv/bin/python3 -m pip install turboquant-mlx-full (Apple Silicon) or scripts/build-llama-turbo.sh (CUDA / Metal via llama.cpp fork) | 1-4 (MLX) / turbo2/3/4 (llama.cpp) | Apple Silicon (MLX), CUDA + Metal (llama.cpp fork) | Hadamard / Walsh-Hadamard rotation-based KV cache compression. The MLX path uses turboquant-mlx-full for native MLX caches; the llama.cpp path uses the forked llama-server-turbo binary built by scripts/build-llama-turbo.sh. |
| TeaCache | Built-in (vendored teacache_forward patches under cache_compression/_teacache_patches/) | n/a (rel_l1_thresh) | Diffusion DiT (FLUX, HunyuanVideo, LTX-Video, CogVideoX, Mochi) | Diffusion-side cache that skips redundant forward passes between adjacent timesteps. Default rel_l1_thresh=0.4. |
| FBCache | Built-in (diffusers 0.36+ apply_first_block_cache hook) | n/a (threshold) | Diffusion DiT (FLUX, SD3.5, Wan, HunyuanVideo, LTX-Video, CogVideoX, Mochi) | Model-agnostic first-block cache for DiTs. Default threshold 0.12. |
| TaylorSeer | Built-in (diffusers 0.38+ TaylorSeerCacheConfig) | n/a | Diffusion DiT (FLUX, Wan, HunyuanVideo, LTX-Video, CogVideoX, Mochi) | Taylor-series predictor caches skipped forward passes. Surfaced in Image + Video Studio pickers. |
| MagCache | Built-in (diffusers 0.38+ MagCacheConfig) | n/a | Diffusion DiT (FLUX only without calibration) | Magnitude-aware caching using FLUX_MAG_RATIOS. CLI / API only until calibration UX lands. |
| PyramidAttentionBroadcast (PAB) | Built-in (diffusers 0.38+ PyramidAttentionBroadcastConfig) | n/a | Diffusion DiT | Broadcasts attention across timestep pyramids. Surfaced in Image + Video Studio pickers. |
| FasterCache | Built-in (diffusers 0.38+ FasterCacheConfig) | n/a | Diffusion DiT | Tight cache windowing for big DiTs. CLI / API only — not surfaced in the picker yet. |
Install optional backends into the backend runtime (./.venv/bin/python3 -m pip install ...), then restart ChaosEngineAI. TriAttention is Linux/CUDA only. The TurboQuant MLX path needs turboquant-mlx-full from PyPI; the TurboQuant llama.cpp path needs the forked llama-server-turbo binary built locally via scripts/build-llama-turbo.sh.
Removed in FU-030. ChaosEngine (PCA-based; cryptopoly/ChaosEngine) and RotorQuant (IsoQuant / PlanarQuant rotation) were dropped from the strategy registry. ChaosEngine was eclipsed by KVTC at ICLR 2026 (same PCA approach but 8–32× compression vs 3.7×) and RotorQuant only ever aliased the TurboQuant llama.cpp fork. Persisted user configs that still reference
chaosengineorrotorquantnow coerce silently toturboquantviaCacheStrategyRegistry.resolve_legacy_id.
LLM cache strategies are filtered out of the diffusion picker via the appliesTo domain field — TeaCache only appears on diffusion models, and the LLM-side strategies only appear in chat. The system is designed so new compression methods can be added as single-file adapters in cache_compression/ without touching any other code.
ChaosEngineAI ships with three speculative decoding modes that accelerate generation by 1.8-5x with zero quality loss.
A small draft model proposes a block of tokens; the target model verifies them in a single forward pass. Accepted tokens are committed instantly; rejected tokens fall back to standard autoregressive generation.
Supported model families: Qwen3 (4B, 8B), Qwen3.5 (4B-35B / 122B-A10B), Qwen3-Coder (4B, 8B), LLaMA 3.1 8B, gpt-oss (20B, 120B), Kimi families (K2.5, K2.6), Gemma-4 (31B, 26B-A4B-it), MiniMax-M2.5 / M2.7.
Requirements: Apple Silicon + dflash-mlx, or Linux/CUDA + dflash. Native f16 cache (no compression). A compatible draft checkpoint is auto-resolved from the z-lab collection.
Extends DFlash with tree-structured candidate exploration. Instead of verifying a single draft path, DDTree builds a tree of top-k candidates using a max-probability heap and verifies the entire tree in one forward pass with a tree-structured attention mask. The longest verified path is accepted, yielding higher acceptance rates than linear DFlash.
Configuration: Set the tree budget slider (0-64) in Runtime Controls when DFlash is enabled. Budget 0 = linear DFlash; higher budgets explore more branches at the cost of additional memory for the attention mask.
DDTree falls back to linear DFlash on failure, and DFlash falls back to standard generation.
Native MTP speculative decoding for Apple Silicon, powered by the mtplx package (Apache 2.0). Instead of pairing a separate draft model with the target, MTPLX uses the target model's own trained MTP heads to propose multiple tokens per forward pass — yielding 1.8-2.2× speedup with zero quality loss on supported models.
Supported model families: Qwen3.5, Qwen3.6, DeepSeek V3 / R1, Qwen3-Coder-Next, plus the Youssofal/MTPLX-Optimized variants. The full registry lives in backend_service/inference/_mtp.py (MTP_MODEL_MAP + _MTP_ALIASES).
Install: One-click "Install MTPLX" button in the Setup tab. Because mtplx ships its own forked mlx and can't share the main backend .venv, the installer provisions an isolated environment at ~/.chaosengine/mtplx-venv/.
Routing: When speculative decoding is enabled and the loaded model has MTP heads, the backend's _select_engine auto-routes through MTPLX. If the MTPLX venv is missing or the model is not in the registry, the backend falls back to DFlash, then to standard MLX generation.
ChaosEngineAI includes a full local image and video generation pipeline powered by Hugging Face Diffusers, mlx-video on Apple Silicon, and a stable-diffusion.cpp engine scaffold for cross-platform builds.
| Model | Provider | Speed | Resolution |
|---|---|---|---|
| FLUX.1 Schnell | Black Forest Labs | ~4s | 1024x1024 |
| FLUX.1 Dev | Black Forest Labs | ~7s | 1024x1024 |
| Stable Diffusion 3.5 Medium | Stability AI | ~6s | 1024x1024 |
| SD 3.5 Large Turbo | Stability AI | ~2s | 1024x1024 |
| Model | Provider | Engine | Notes |
|---|---|---|---|
| Wan 2.1 T2V 1.3B / 14B | Alibaba Wan-AI | diffusers (MPS / CUDA) | Text-to-video; 1.3B fits comfortably on a 64 GB Mac |
| Wan 2.2 | Alibaba Wan-AI | diffusers | T2V successor with catalog metadata fixes |
| Lightricks LTX-Video | Lightricks | diffusers | Base LTX-Video; CUDA + MPS paths |
| Lightricks LTX-2 / LTX-2.3 (distilled + dev) | Lightricks | mlx-video (Apple Silicon) | Subprocess engine via prince-canuma/LTX-2* repos |
| HunyuanVideo | Tencent | diffusers | TeaCache rescale coefficients vendored |
| CogVideoX | Zhipu | diffusers | TeaCache supported |
| Mochi | Genmo | diffusers | TeaCache supported |
Discover and download from the Image Discover and Video tabs, generate from prompts in Image Studio or Video Studio with aspect ratio, quality presets, negative prompts, prompt enhancer, and seed control, then browse and reuse outputs in Image Gallery.
Releases are tag-driven. Push vX.Y.Z and the GitHub Actions release workflow builds signed bundles for macOS, Linux, and Windows in parallel, generates the latest.json updater manifest, and stages a draft release.
# locally, if you want to cut a build by hand:
npm run stage:runtime:release
npm run tauri:build
Release artifacts land in src-tauri/target/release/bundle/.
For an unsigned local macOS app + DMG without Apple signing/notarization or Tauri updater signing configured:
npm run release:macos -- --skip-sign --skip-notarize
That writes the local app + DMG to releases/macos/.
chaosengine-cliEvery feature in the desktop app is also reachable from the terminal via scripts/chaosengine-cli — a Python 3 wrapper (stdlib only, zero new dependencies) that talks to the same FastAPI backend the Tauri shell uses. It covers 100% of the 125 backend routes through a generic call <METHOD> <PATH> dispatcher plus 95 ergonomic typed shortcuts.
Subcommand categories: serve, status, load, unload, prompt, bench, mtplx-install, mtplx-status, image-generate, video-generate, session-*, setup-*, diagnostics-*, and more. JSON is written to stdout, errors to stderr — composable with jq or any other pipeline tool.
The backend on port 8876 must be running (either via the Tauri app or ./scripts/chaosengine-cli serve).
# Start the backend (or just leave the Tauri app open)
./scripts/chaosengine-cli serve &
# Load a model with speculative decoding
./scripts/chaosengine-cli load Youssofal/Qwen3.6-27B-MTPLX-Optimized-Speed --spec
# Prompt with streaming + per-token metrics
./scripts/chaosengine-cli prompt "Write a Rust quicksort" --max-tokens 256 --stream --metrics
# Benchmark a model with 3 runs
./scripts/chaosengine-cli bench mlx-community/Qwen3.6-35B-A3B-4bit --spec --runs 3
Optional PATH symlink so you can call it from anywhere:
ln -s /Users/dan/ChaosEngineAI/scripts/chaosengine-cli ~/.local/bin/chaosengine-cli
Headless install (no GUI, no Tauri, no npm, no cargo):
git clone https://github.com/cryptopoly/ChaosEngineAI.git
cd ChaosEngineAI
python3 -m venv .venv
.venv/bin/pip install -e .
./scripts/chaosengine-cli serve
scripts/e2e_test_suite.py drives the CLI through 8 phases (env probe, chat, compare, HTML challenge, image studio, video studio, setup probes, diagnostics + cleanup) and writes JSON + Markdown reports to ~/.chaosengine/test-results/. --smoke completes in ≤60s; the full sweep finishes in ≤5 min on a warm box. The suite is gated as phase 9 of 9 in scripts/pre-build-check.sh. See docs/E2E_TESTING.md for the full phase-by-phase breakdown.
ChaosEngineAI/
├── src/ React UI (App.tsx is the workspace shell)
├── src-tauri/ Tauri Rust shell + bundled runtime
├── scripts/ Build, release + runtime staging scripts
├── backend_service/ Python backend (engine adapters + HTTP server)
├── cache_compression/ Pluggable cache/compression strategy adapters
├── dflash/ DFlash/DDTree speculative decoding integration
├── tests/ Backend integration tests
├── Screenshots/ UI screenshots used by this README
├── docs/ Tour GIF + supporting docs
└── ChaosEngineAI_AppIcon.svg
ChaosEngineAI is currently distributed under the Apache-2.0 license. See LICENSE.
See THIRD_PARTY_NOTICES.md for optional third-party dependency notes.
Built on the shoulders of llama.cpp, Apple MLX, Tauri, and the broader open-weights community.
560 commits
18 commits
Python
56.8%
TypeScript
35.5%
CSS
3.1%
JavaScript
1.7%
Rust
1.4%
Local AI workstation — discover, run, chat, benchmark, and generate images from open-weight models. DFlash/DDTree speculative decoding, TurboQuant & TriAttention cache compression strategies, MLX + llama.cpp + vLLM + MTPLX backends.
25
stars
578
commits
Python
primary language
Sep 4, 2026
updated
The local AI model runner for serious tinkerers.
Discover, convert, serve, chat with, benchmark, and generate images and video from open-weight models — all on your own machine.
⚠️ Work in progress. ChaosEngineAI is under active development. Expect rough edges, breaking changes between versions, and features that appear (and occasionally disappear) from one release to the next. Feedback and issue reports are very welcome.
ChaosEngineAI is a desktop control plane for running large language models locally. It pairs a fast Tauri + React shell with a Python backend that drives llama.cpp, Apple MLX, and (optionally) vLLM, so you get a single window for everything from "I want to try this Hugging Face model" to "show me tokens-per-second across three quantizations on this exact prompt."
llama.cpp GGUF and Apple Silicon MLX for LLMs, plus local Stable Diffusion for image generation, plus diffusion DiT video models (Wan 2.1/2.2, LTX-Video 2.0/2.3, HunyuanVideo, CogVideoX, Mochi) via diffusers, mlx-video on Apple Silicon, and stable-diffusion.cpp scaffolding for cross-platform.top_p, top_k, min_p, repeat_penalty, seed, mirostat, reasoning_effort, JSON-schema constrained outputllama-embedding + cosine retrievalWan-AI/Wan2.{1,2}-* reposuseUiScalellama.cpp GGUF, Apple MLX, optional vLLM, plus remote OpenAI-compatible providers as fallbacksllama-embedding + cosine retrievalweb_search, calculator, code_executor, file_reader, plus stdio MCP client (JSON-RPC) so any local MCP server is callable from chat. Tool results render as table / code / markdown / image based on the returned shape.valid / partial / script-error / blank-render / no-html validation, persistent history, plus retry + repair flowstop_p, top_k, min_p, repeat_penalty, seed, mirostat, reasoning_effort, json_schema)
The launchpad. Surfaces backend health, the engine in use, the currently loaded model, hardware (platform, arch, memory), and quick stats from the warm pool. Big colored badges tell you instantly whether the runtime is online and what cache mode it will use on the next launch.

Browse curated model families with capability tags (chat, coding, vision, reasoning, tools, multilingual, video, thinking). Expand a family to see every variant with its format, parameter count, and quant level, then queue downloads. Filter by format and capability across the whole catalog.

The launch modal. Pick a variant, set context length, choose the engine, and tune runtime strategy knobs in one place, pre-populated from your defaults.

Your local library. Sort by name, format, size, context length, or last-modified date. Each entry shows where it lives on disk, its quant scheme, and a one-click Launch that opens the launch modal with the right defaults pre-populated.

Curated catalog of local image models. Discover Stable Diffusion models optimized for ChaosEngineAI, scout new releases from Hugging Face, and install them with one click. Filter by compatibility tags and see metadata at a glance.

Your installed image model library. See which Stable Diffusion models are ready for generation — each card shows size, diffusion pipeline, resolution, and a one-click Generate to jump straight into Image Studio.

Prompt-based image generation with full control. Choose a model, set aspect ratio and quality presets (square, portrait, landscape, wide), write positive and negative prompts, and generate. Recent outputs appear in the right panel with metadata and re-run options.

Live progress while the diffusion pipeline runs — step-by-step denoising visualization, elapsed time, and a running status log.

Completed image with full generation metadata — model, prompt, seed, steps, resolution, and timing. Open, reveal on disk, clone settings, or save directly from the completion modal.

All your generated images in one place. Search by prompt, model, or runtime; filter by frame size and sort order. Each card shows the source model, generation settings, and quick actions to re-run with the same seed or open in Image Studio.

A focused chat surface with multi-thread sessions in the left rail, pinned threads, document and image attachments, inline citations, tool-call cards, collapsible reasoning traces, and inline thread renaming. Threads persist across launches, remember the model/runtime profile that produced them, and can be reloaded directly from the thread toolbar.
Pick 2 → 4 models, configure each slot's thinking mode (off / auto), reasoning effort (low / medium / high), and seed independently, then issue one prompt. Every slot streams its HTML response in parallel with a sandboxed live preview underneath the raw text — so you see what each model actually rendered, not just what it wrote.
Built-in HTML validation runs per slot (valid / partial / script-error / blank-render / no-html) and is fed back from the iframe sandbox so script crashes and blank renders surface immediately. Every run is saved to a persistent history with title + prompt + per-slot manifests; re-open earlier runs, delete, or open / reveal individual slot HTML files on disk. Failed slots support retry and a continue / repair flow that asks the same model to either resume from the partial response or fix its own broken HTML.

Start, stop, and inspect a local OpenAI-compatible HTTP server backed by the loaded model. Shows the bind address, warm-pool entries, request count, active connections, LAN exposure, preferred port, auto-start controls, and a remote-test panel with copyable curl commands for /health, /models, and /chat/completions.

Configure a benchmark run: choose a model, throughput prompt preset or eval dataset, token budget, and decoding parameters, then watch live progress as the runner streams tokens-per-second, time-to-first-token, memory usage, or eval metrics.

Live progress while a run is in flight — token/sec, TTFT, current prompt, and memory pressure all update in real time.

Final report card: throughput, latency percentiles, generation samples, and the exact run parameters — saved automatically to history.

Every benchmark you've ever run, side-by-side. Pick two runs and the page diffs them across throughput, latency, and quality metrics — perfect for proving that your new quant actually pays its keep.

Apple Silicon only. Point at a Hugging Face checkpoint or local directory and convert it to MLX with optional runtime-specific compression settings. A conversion picker surfaces eligible source models.

Layer-by-layer live progress while the conversion runs — bit budget per block, memory footprint, and a running log tail.
Search, create, edit, tag, and delete reusable prompt templates, including five built-in starter personas. Any template can be applied to Chat with one click so you can switch between coding, summarization, translation, and other system-prompt presets without copy-paste.
Inspect built-in and external plugins across cache strategies, inference engines, tools, model sources, and post-processors. Plugins can be enabled or disabled from the UI, and external plugins are discovered from the app's plugin directory.

A live tail of the backend log stream — load events, server requests, errors, and runtime warnings — with level filtering. The first place to look when something feels off.

Configure model and cache directories, remote-provider fallbacks, Hugging Face tokens for gated models, data-directory migration, integration snippets for external tools, default launch preferences (cache strategy, FP16 layers, fused attention, context tokens, fit-in-memory toggle), and advanced runtime knobs. Every default in this panel is reused as the starting state for the launch modal.
Head to the Releases page for signed builds:
| Platform | File | Notes |
|---|---|---|
| macOS (Apple Silicon) | ChaosEngineAI_*_aarch64.dmg | Signed + notarized |
| Linux | ChaosEngineAI_*_amd64.AppImage | Portable, in-app updates supported |
| Linux (Debian/Ubuntu) | ChaosEngineAI_*_amd64.deb | Install via dpkg, update via apt |
| Windows | ChaosEngineAI_*_x64-setup.exe | Unsigned for now — SmartScreen will warn on first run |
From v0.4.21 onward, every install auto-updates from GitHub Releases on launch. Updates are cryptographically signed.
Prereqs: Rust toolchain, Node 20+, Python 3.11+, and (on macOS) Xcode command-line tools.
# 1. Install JS dependencies
npm install
# 2. Stage the bundled Python runtime + llama.cpp binaries into src-tauri/
npm run stage:runtime
# 3. Launch the desktop app in dev mode (Tauri shell + Vite HMR)
npm run tauri:dev
That's it — the Python backend is spawned by the Tauri shell, the React UI hot-reloads, and you can start exploring.
ChaosEngineAI is three cooperating layers:
┌─────────────────────────────────────────────────────────┐
│ Tauri shell (Rust) │
│ ├─ React + TypeScript UI (src/) │
│ ├─ In-app updater (signed releases from GitHub) │
│ └─ Spawns and supervises the Python backend │
└─────────────────────────────────────────────────────────┘
│ HTTP / IPC
▼
┌─────────────────────────────────────────────────────────┐
│ Python backend (backend_service/) │
│ ├─ Workspace + library + warm pool state │
│ ├─ OpenAI-compatible HTTP server │
│ ├─ Engine adapters + plugin system │
│ └─ DFlash / DDTree speculative decoding │
└─────────────────────────────────────────────────────────┘
│
┌───────────────┼───────────────┐
▼ ▼ ▼
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ llama.cpp │ │ MLX runtime │ │ vLLM │
│ (GGUF) │ │ (Apple Si) │ │ (Linux/CUDA) │
└──────────────┘ └──────────────┘ └──────────────┘
src/ — React 18 + TypeScript UI. Single-window workspace with a sidebar nav covering LLM and image generation screens.src-tauri/ — Tauri 2 Rust shell + bundled runtime.backend_service/ — Python service that owns model lifecycle, the warm pool, the OpenAI-compatible API, the benchmark runner, and speculative decoding (DFlash + DDTree).backend_service/routes/ — FastAPI routes for chat, prompts, compare mode, benchmarks, plugins, images, server controls, and settings.cache_compression/ — Pluggable cache/compression strategy system. Ships with native f16 and optional adapters for TriAttention and TurboQuant.dflash/ — DFlash speculative decoding integration: draft model registry, fuzzy matching for quantized variants, MLX and vLLM backend detection.ChaosEngineAI uses a pluggable cache strategy system. Out of the box, models run with the native f16 KV cache (no compression). Install any of the optional backends below and they automatically appear in the Cache Strategy selector in the launch modal — no configuration required.
| Backend | Install | Bits | Platforms | Description |
|---|---|---|---|---|
| Native f16 | Built-in | — | All | Full-precision KV cache. Maximum quality, no compression. |
| TriAttention | ./.venv/bin/python3 -m pip install triattention vllm | 1-4 | Linux + CUDA only (via vLLM) | Transparent KV cache compression integrated into vLLM's scheduler. Not supported on macOS. |
| TurboQuant | ./.venv/bin/python3 -m pip install turboquant-mlx-full (Apple Silicon) or scripts/build-llama-turbo.sh (CUDA / Metal via llama.cpp fork) | 1-4 (MLX) / turbo2/3/4 (llama.cpp) | Apple Silicon (MLX), CUDA + Metal (llama.cpp fork) | Hadamard / Walsh-Hadamard rotation-based KV cache compression. The MLX path uses turboquant-mlx-full for native MLX caches; the llama.cpp path uses the forked llama-server-turbo binary built by scripts/build-llama-turbo.sh. |
| TeaCache | Built-in (vendored teacache_forward patches under cache_compression/_teacache_patches/) | n/a (rel_l1_thresh) | Diffusion DiT (FLUX, HunyuanVideo, LTX-Video, CogVideoX, Mochi) | Diffusion-side cache that skips redundant forward passes between adjacent timesteps. Default rel_l1_thresh=0.4. |
| FBCache | Built-in (diffusers 0.36+ apply_first_block_cache hook) | n/a (threshold) | Diffusion DiT (FLUX, SD3.5, Wan, HunyuanVideo, LTX-Video, CogVideoX, Mochi) | Model-agnostic first-block cache for DiTs. Default threshold 0.12. |
| TaylorSeer | Built-in (diffusers 0.38+ TaylorSeerCacheConfig) | n/a | Diffusion DiT (FLUX, Wan, HunyuanVideo, LTX-Video, CogVideoX, Mochi) | Taylor-series predictor caches skipped forward passes. Surfaced in Image + Video Studio pickers. |
| MagCache | Built-in (diffusers 0.38+ MagCacheConfig) | n/a | Diffusion DiT (FLUX only without calibration) | Magnitude-aware caching using FLUX_MAG_RATIOS. CLI / API only until calibration UX lands. |
| PyramidAttentionBroadcast (PAB) | Built-in (diffusers 0.38+ PyramidAttentionBroadcastConfig) | n/a | Diffusion DiT | Broadcasts attention across timestep pyramids. Surfaced in Image + Video Studio pickers. |
| FasterCache | Built-in (diffusers 0.38+ FasterCacheConfig) | n/a | Diffusion DiT | Tight cache windowing for big DiTs. CLI / API only — not surfaced in the picker yet. |
Install optional backends into the backend runtime (./.venv/bin/python3 -m pip install ...), then restart ChaosEngineAI. TriAttention is Linux/CUDA only. The TurboQuant MLX path needs turboquant-mlx-full from PyPI; the TurboQuant llama.cpp path needs the forked llama-server-turbo binary built locally via scripts/build-llama-turbo.sh.
Removed in FU-030. ChaosEngine (PCA-based; cryptopoly/ChaosEngine) and RotorQuant (IsoQuant / PlanarQuant rotation) were dropped from the strategy registry. ChaosEngine was eclipsed by KVTC at ICLR 2026 (same PCA approach but 8–32× compression vs 3.7×) and RotorQuant only ever aliased the TurboQuant llama.cpp fork. Persisted user configs that still reference
chaosengineorrotorquantnow coerce silently toturboquantviaCacheStrategyRegistry.resolve_legacy_id.
LLM cache strategies are filtered out of the diffusion picker via the appliesTo domain field — TeaCache only appears on diffusion models, and the LLM-side strategies only appear in chat. The system is designed so new compression methods can be added as single-file adapters in cache_compression/ without touching any other code.
ChaosEngineAI ships with three speculative decoding modes that accelerate generation by 1.8-5x with zero quality loss.
A small draft model proposes a block of tokens; the target model verifies them in a single forward pass. Accepted tokens are committed instantly; rejected tokens fall back to standard autoregressive generation.
Supported model families: Qwen3 (4B, 8B), Qwen3.5 (4B-35B / 122B-A10B), Qwen3-Coder (4B, 8B), LLaMA 3.1 8B, gpt-oss (20B, 120B), Kimi families (K2.5, K2.6), Gemma-4 (31B, 26B-A4B-it), MiniMax-M2.5 / M2.7.
Requirements: Apple Silicon + dflash-mlx, or Linux/CUDA + dflash. Native f16 cache (no compression). A compatible draft checkpoint is auto-resolved from the z-lab collection.
Extends DFlash with tree-structured candidate exploration. Instead of verifying a single draft path, DDTree builds a tree of top-k candidates using a max-probability heap and verifies the entire tree in one forward pass with a tree-structured attention mask. The longest verified path is accepted, yielding higher acceptance rates than linear DFlash.
Configuration: Set the tree budget slider (0-64) in Runtime Controls when DFlash is enabled. Budget 0 = linear DFlash; higher budgets explore more branches at the cost of additional memory for the attention mask.
DDTree falls back to linear DFlash on failure, and DFlash falls back to standard generation.
Native MTP speculative decoding for Apple Silicon, powered by the mtplx package (Apache 2.0). Instead of pairing a separate draft model with the target, MTPLX uses the target model's own trained MTP heads to propose multiple tokens per forward pass — yielding 1.8-2.2× speedup with zero quality loss on supported models.
Supported model families: Qwen3.5, Qwen3.6, DeepSeek V3 / R1, Qwen3-Coder-Next, plus the Youssofal/MTPLX-Optimized variants. The full registry lives in backend_service/inference/_mtp.py (MTP_MODEL_MAP + _MTP_ALIASES).
Install: One-click "Install MTPLX" button in the Setup tab. Because mtplx ships its own forked mlx and can't share the main backend .venv, the installer provisions an isolated environment at ~/.chaosengine/mtplx-venv/.
Routing: When speculative decoding is enabled and the loaded model has MTP heads, the backend's _select_engine auto-routes through MTPLX. If the MTPLX venv is missing or the model is not in the registry, the backend falls back to DFlash, then to standard MLX generation.
ChaosEngineAI includes a full local image and video generation pipeline powered by Hugging Face Diffusers, mlx-video on Apple Silicon, and a stable-diffusion.cpp engine scaffold for cross-platform builds.
| Model | Provider | Speed | Resolution |
|---|---|---|---|
| FLUX.1 Schnell | Black Forest Labs | ~4s | 1024x1024 |
| FLUX.1 Dev | Black Forest Labs | ~7s | 1024x1024 |
| Stable Diffusion 3.5 Medium | Stability AI | ~6s | 1024x1024 |
| SD 3.5 Large Turbo | Stability AI | ~2s | 1024x1024 |
| Model | Provider | Engine | Notes |
|---|---|---|---|
| Wan 2.1 T2V 1.3B / 14B | Alibaba Wan-AI | diffusers (MPS / CUDA) | Text-to-video; 1.3B fits comfortably on a 64 GB Mac |
| Wan 2.2 | Alibaba Wan-AI | diffusers | T2V successor with catalog metadata fixes |
| Lightricks LTX-Video | Lightricks | diffusers | Base LTX-Video; CUDA + MPS paths |
| Lightricks LTX-2 / LTX-2.3 (distilled + dev) | Lightricks | mlx-video (Apple Silicon) | Subprocess engine via prince-canuma/LTX-2* repos |
| HunyuanVideo | Tencent | diffusers | TeaCache rescale coefficients vendored |
| CogVideoX | Zhipu | diffusers | TeaCache supported |
| Mochi | Genmo | diffusers | TeaCache supported |
Discover and download from the Image Discover and Video tabs, generate from prompts in Image Studio or Video Studio with aspect ratio, quality presets, negative prompts, prompt enhancer, and seed control, then browse and reuse outputs in Image Gallery.
Releases are tag-driven. Push vX.Y.Z and the GitHub Actions release workflow builds signed bundles for macOS, Linux, and Windows in parallel, generates the latest.json updater manifest, and stages a draft release.
# locally, if you want to cut a build by hand:
npm run stage:runtime:release
npm run tauri:build
Release artifacts land in src-tauri/target/release/bundle/.
For an unsigned local macOS app + DMG without Apple signing/notarization or Tauri updater signing configured:
npm run release:macos -- --skip-sign --skip-notarize
That writes the local app + DMG to releases/macos/.
chaosengine-cliEvery feature in the desktop app is also reachable from the terminal via scripts/chaosengine-cli — a Python 3 wrapper (stdlib only, zero new dependencies) that talks to the same FastAPI backend the Tauri shell uses. It covers 100% of the 125 backend routes through a generic call <METHOD> <PATH> dispatcher plus 95 ergonomic typed shortcuts.
Subcommand categories: serve, status, load, unload, prompt, bench, mtplx-install, mtplx-status, image-generate, video-generate, session-*, setup-*, diagnostics-*, and more. JSON is written to stdout, errors to stderr — composable with jq or any other pipeline tool.
The backend on port 8876 must be running (either via the Tauri app or ./scripts/chaosengine-cli serve).
# Start the backend (or just leave the Tauri app open)
./scripts/chaosengine-cli serve &
# Load a model with speculative decoding
./scripts/chaosengine-cli load Youssofal/Qwen3.6-27B-MTPLX-Optimized-Speed --spec
# Prompt with streaming + per-token metrics
./scripts/chaosengine-cli prompt "Write a Rust quicksort" --max-tokens 256 --stream --metrics
# Benchmark a model with 3 runs
./scripts/chaosengine-cli bench mlx-community/Qwen3.6-35B-A3B-4bit --spec --runs 3
Optional PATH symlink so you can call it from anywhere:
ln -s /Users/dan/ChaosEngineAI/scripts/chaosengine-cli ~/.local/bin/chaosengine-cli
Headless install (no GUI, no Tauri, no npm, no cargo):
git clone https://github.com/cryptopoly/ChaosEngineAI.git
cd ChaosEngineAI
python3 -m venv .venv
.venv/bin/pip install -e .
./scripts/chaosengine-cli serve
scripts/e2e_test_suite.py drives the CLI through 8 phases (env probe, chat, compare, HTML challenge, image studio, video studio, setup probes, diagnostics + cleanup) and writes JSON + Markdown reports to ~/.chaosengine/test-results/. --smoke completes in ≤60s; the full sweep finishes in ≤5 min on a warm box. The suite is gated as phase 9 of 9 in scripts/pre-build-check.sh. See docs/E2E_TESTING.md for the full phase-by-phase breakdown.
ChaosEngineAI/
├── src/ React UI (App.tsx is the workspace shell)
├── src-tauri/ Tauri Rust shell + bundled runtime
├── scripts/ Build, release + runtime staging scripts
├── backend_service/ Python backend (engine adapters + HTTP server)
├── cache_compression/ Pluggable cache/compression strategy adapters
├── dflash/ DFlash/DDTree speculative decoding integration
├── tests/ Backend integration tests
├── Screenshots/ UI screenshots used by this README
├── docs/ Tour GIF + supporting docs
└── ChaosEngineAI_AppIcon.svg
ChaosEngineAI is currently distributed under the Apache-2.0 license. See LICENSE.
See THIRD_PARTY_NOTICES.md for optional third-party dependency notes.
Built on the shoulders of llama.cpp, Apple MLX, Tauri, and the broader open-weights community.
560 commits
18 commits
Python
56.8%
TypeScript
35.5%
CSS
3.1%
JavaScript
1.7%
Rust
1.4%