### Example setup plan (JSON) Source: https://github.com/aevonix/flashalign/blob/main/docs/engine-setup.md Example configuration plan for the installer, showing TensorFold engine settings and contact list. ```json { "harnesses": ["hermes"], "model": "publisher/model", "profile": "/private/profile", "contacts": [ {"channel": "whatsapp", "account": "default", "contact": "+15551234567"} ], "tools_default": true, "engine": { "kind": "tensorfold", "model_path": "/models/my-model", "draft_model": "/models/my-draft", "bundle": "/private/engine-bundle", "devices": ["0", "1", "2", "3"], "install_dependencies": true } } ``` -------------------------------- ### Inspect setup before installing Source: https://github.com/aevonix/flashalign/blob/main/README.md Runs the installer in detection mode to inspect the local environment without making changes. Use this to verify models and harnesses before proceeding. ```sh bash ./install.sh --detect ``` -------------------------------- ### Standalone setup with local Qwen checkpoint Source: https://github.com/aevonix/flashalign/blob/main/README.md Runs the installer in engine-only mode with the vLLM backend and a local Qwen model path. Use this for standalone setup without an existing engine. ```sh bash ./install.sh --engine-only --backend vllm --model-path /models/qwen38-27b --yes ``` -------------------------------- ### Prepare standalone Qwen engine with --yes and --no-restart Source: https://github.com/aevonix/flashalign/blob/main/docs/engine-setup.md Prepares a standalone Qwen engine and stops before starting it. Uses --yes to accept the final setup prompt and --no-restart to prevent automatic restart. ```sh bash ./install.sh --engine-only --backend vllm \ --model-path /models/qwen38-27b --yes --no-restart ``` -------------------------------- ### Prepare agent without starting model Source: https://github.com/aevonix/flashalign/blob/main/docs/engine-setup.md Runs the installer in apply mode to prepare everything without starting a model or restarting a gateway. ```sh bash ./install.sh --config /private/setup-plan.json --apply ``` -------------------------------- ### Install FlashAlign with auto setup Source: https://github.com/aevonix/flashalign/blob/main/README.md Clones the repository and runs the installer in automatic mode. The wizard detects local models and harnesses, selects a matching profile, prepares the engine, and creates a deployment signing key. ```sh git clone https://github.com/Aevonix/FlashAlign.git cd FlashAlign bash ./install.sh --auto ``` -------------------------------- ### Agent-assisted setup check and apply Source: https://github.com/aevonix/flashalign/blob/main/docs/setup.md Prepares setup without prompts using a plan file. Stops before engine or gateway starts. Use --activate when the user authorizes the pending activation step. ```sh bash ./install.sh --config /private/setup-plan.json --check ``` ```sh bash ./install.sh --config /private/setup-plan.json --apply ``` -------------------------------- ### Run setup check and apply with bash install.sh Source: https://github.com/aevonix/flashalign/blob/main/docs/agent-setup.md Noninteractive commands that return JSON. `--check` validates the model, profile, and key without making configuration changes; `--apply` backs up configuration, installs adapters, stages a validated local profile, and saves the selected model, contacts, and tool policy. Neither command starts or restarts a gateway or model server. Failures stop before applying configuration when model, profile, key, or runtime checks fail. For a managed engine, `--apply` stages engine code, profile, dependencies, and key; harness routing changes wait until `--activate`. If preparation is interrupted, repeat the same `--apply` command; recovery receipts and before-images are saved under `~/.config/owner-mode/setup-transactions/` and `recovery_directory` in the setup result identifies the transaction. An `awaiting_restart` result confirms configuration is saved but service restart is pending. ```sh bash ./install.sh --config /private/path/setup-plan.json --check bash ./install.sh --config /private/path/setup-plan.json --apply ``` -------------------------------- ### Engine selection examples for SGLang and llama.cpp Source: https://github.com/aevonix/flashalign/blob/main/docs/engine-setup.md Shows how to select specific engines with --backend. The first uses SGLang with a drafter, the second uses llama.cpp with a GGUF model and drafter, and the third uses SGLang for Gemma without an external draft model. ```sh bash ./install.sh --engine-only --backend sglang \ --model-path /models/qwen38-27b --drafter /models/qwen38-dflash2 ``` ```sh bash ./install.sh --engine-only --backend llamacpp \ --model-path /models/qwen38-27b-q8_0.gguf --drafter /models/draft.gguf ``` ```sh bash ./install.sh --engine-only --backend sglang \ --model-path /models/gemma4-26b-a4b-fp8 ``` -------------------------------- ### Install Qwen3.8-27B with TensorFold Source: https://github.com/aevonix/flashalign/blob/main/docs/qwen.md Runs the FlashAlign installer for the qwen38-27b-v1 profile with TensorFold backend. Requires the model and DFlash2 draft model already present on the model host. For offline setup, add --engine-bundle /packages/tensorfold-qwen38 to use an extracted compatible bundle. ```sh bash ./install.sh --auto --backend tensorfold --model-path /models/qwen38-27b \ --drafter /models/qwen38-dflash2 --devices 0 ``` -------------------------------- ### Activate engine and restart gateways Source: https://github.com/aevonix/flashalign/blob/main/docs/engine-setup.md Starts the engine and restarts the gateways when authorized, using the same config file. ```sh bash ./install.sh --config /private/setup-plan.json --activate ``` -------------------------------- ### Install FlashAlign engine only with vLLM backend Source: https://github.com/aevonix/flashalign/blob/main/docs/direct-engine.md Prepares the engine and local profile without configuring a harness. The wizard provisions the profile and a unique deployment key, starts the engine, and verifies standard and signed requests. Use --no-restart to prepare the deployment and stop before starting it. ```shell bash ./install.sh --engine-only --backend vllm --model-path /models/qwen38-27b ``` -------------------------------- ### Install TensorFold backend on one host Source: https://github.com/aevonix/flashalign/blob/main/docs/native-tensorfold.md Run the installer with the TensorFold backend, specifying the model path, engine bundle directory, and device. The bundle must match the host's CPU and GPU architectures, and the NVIDIA driver must be installed beforehand. The installer rejects mismatched binaries, missing libraries, wrong ELF architecture, or incompatible GPU targets before starting the engine. ```sh bash ./install.sh --auto --backend tensorfold \ --model-path /models/my-model --engine-bundle /packages/native-runtime \ --devices 0 --no-restart ``` -------------------------------- ### Run auto setup with install.sh Source: https://github.com/aevonix/flashalign/blob/main/docs/engine-setup.md Runs the setup wizard with automatic configuration. Add --engine-only for direct API access. The wizard looks for local Hugging Face snapshots and asks for a model directory if needed. ```sh bash ./install.sh --auto ``` -------------------------------- ### Prepare Gemma server with install script Source: https://github.com/aevonix/flashalign/blob/main/docs/model-downloads.md Runs the install script with the Gemma model path to prepare the Gemma server. ```sh bash ./install.sh --engine-only --backend llamacpp \ --model-path "$FLASHALIGN_MODELS/gemma4-gguf/gemma-4-26B-A4B-it-Q8_0.gguf" ``` -------------------------------- ### Run FlashAlign setup wizard Source: https://github.com/aevonix/flashalign/blob/main/docs/setup.md Run the setup wizard on an interactive terminal. Use arrow keys and Enter or number keys to select options. Add --no-animation to skip motion or --no-color for plain text. NO_ANIM and NO_COLOR provide the same controls via environment variables. ```bash bash ./install.sh ``` -------------------------------- ### Install and run DeepSeek projection profile with vLLM backend Source: https://github.com/aevonix/flashalign/blob/main/engines/vllm-deepseek/README.md Run the setup script to install the vLLM engine and apply a DeepSeek projection profile. Requires Python 3.12+ and the pinned DeepSeek-V4.1-Flash-1017 checkpoint. The command selects the vLLM backend, specifies the model path, profile, and devices. ```bash bash ./install.sh --engine-only --backend vllm \ --model-path /models/DeepSeek-V4.1-Flash-1017 \ --profile /profiles/deepseek-projection --devices 0,1,2,3 ``` -------------------------------- ### OpenClaw request policy metadata example Source: https://github.com/aevonix/flashalign/blob/main/docs/engine-setup.md Declares an OpenClaw request policy in engine metadata for models that support omitted output budgets. The example shows an output budget of 'remaining_context' and disables thinking-off support. ```json "openclaw_request_policy_by_model_type": { "example_model_type": { "output_budget": "remaining_context", "supports_thinking_off": false } } ``` -------------------------------- ### Install TensorFold with local model and engine bundle Source: https://github.com/aevonix/flashalign/blob/main/docs/engine-setup.md Use this command to install TensorFold with a local model, profile, and engine bundle. The --model-path, --profile, and --engine-bundle flags specify the model, profile, and engine bundle respectively. ```bash bash ./install.sh --auto --model-path /models/my-model \ --profile /private/my-profile --engine-bundle /private/my-engine-bundle ``` -------------------------------- ### Install FlashAlign engine-only with Always On mode Source: https://github.com/aevonix/flashalign/blob/main/docs/direct-engine.md Sets up a local FlashAlign gateway that applies the configured profile to every request. Use --apply to stage without starting, --activate to start and verify. ```sh bash ./install.sh --engine-only --backend vllm --model-path /models/qwen38-27b --mode always_on ``` -------------------------------- ### Install FlashAlign Python client Source: https://github.com/aevonix/flashalign/blob/main/docs/direct-engine.md Install the client from the current checkout using pip. ```sh python -m pip install . ``` -------------------------------- ### Prepare DeepSeek V4.1 Flash 1017 native vLLM starter Source: https://github.com/aevonix/flashalign/blob/main/docs/model-downloads.md Runs the installer to prepare the native vLLM backend on Linux x86_64 with four SM120 GPUs. Uses --no-restart to stop before activation; no edited checkpoint or separate draft download is needed. ```sh bash ./install.sh --auto --backend vllm \ --model-path "$FLASHALIGN_MODELS/deepseek41-original" --no-restart ``` -------------------------------- ### Check package version Source: https://github.com/aevonix/flashalign/blob/main/docs/setup.md Displays the installed package version. ```sh bash ./install.sh --version ``` -------------------------------- ### Download Qwen3.5-0.8B Q4_0 GGUF draft and install with drafter Source: https://github.com/aevonix/flashalign/blob/main/docs/model-downloads.md Downloads the pinned Qwen3.5-0.8B Q4_0 GGUF draft model and then runs the install script with the --drafter flag to use it as a draft model for the Qwen3.8-27B path. ```sh hf download ggml-org/Qwen3.5-0.8B-GGUF Qwen3.5-0.8B-Q4_0.gguf \ --revision 807dfd9a6fadbf703207aac3bfb0b2b3040d077c \ --local-dir "$FLASHALIGN_MODELS/qwen38-gguf-draft" ``` ```sh bash ./install.sh --engine-only --backend llamacpp \ --model-path "$FLASHALIGN_MODELS/qwen38-gguf/Qwen3.8-27B-Q8_0.gguf" \ --drafter "$FLASHALIGN_MODELS/qwen38-gguf-draft/Qwen3.5-0.8B-Q4_0.gguf" ``` -------------------------------- ### Install Playwright and record demo video Source: https://github.com/aevonix/flashalign/blob/main/docs/benchmarks.md Installs Playwright and Chromium, then records the demo HTML to a WebM video. The WebM records playback at 1×; label any speed changes. The HTML and video include the selected prompt and visible answer. Keep raw run files private. ```sh python -m pip install playwright ``` ```sh python -m playwright install chromium ``` ```sh python scripts/record-benchmark-demo.py \ /private/experiment/demo.html /private/experiment/demo.webm ``` -------------------------------- ### Launch llama-server with FlashAlign launcher Source: https://github.com/aevonix/flashalign/blob/main/engines/llamacpp/README.md Starts a direct engine endpoint for a local GGUF model using the FlashAlign launcher. Requires a compatible local GGUF, a private 32-byte key file with mode 0600, and the normal FlashAlign setup flow to create the deployment key. The launcher rejects model, listener, and adapter overrides in engine-args.json and does not replace speculative type, draft model, or tuning arguments. ```sh /private/flashalign-llamacpp/venv/bin/python launcher.py \ --binary /private/flashalign-llamacpp/build/bin/llama-server \ --gguf-python /private/flashalign-llamacpp/source/gguf-py \ --model /models/qwen38-27b.gguf \ --profile /profiles/qwen38-27b-v1 \ --key-file /private/engine.key --state /private/flashalign-llamacpp/runtime \ --host 127.0.0.1 --port 8030 \ --draft-model /models/compatible-draft.gguf \ --engine-args /private/engine-args.json ``` -------------------------------- ### Initialize deployment signing key with install.sh --init-key Source: https://github.com/aevonix/flashalign/blob/main/docs/agent-setup.md Run this command for a new deployment to create a cryptographically random 32-byte key under ~/.config/owner-mode/engine.key with mode 0600. Repeating the command validates and reuses the key. The command reports only the path and whether the key was created or reused; never print or transmit the key contents. ```bash bash ./install.sh --init-key ``` -------------------------------- ### Install Qwen3.8-27B x86_64 variant Source: https://github.com/aevonix/flashalign/blob/main/docs/model-downloads.md Installs FlashAlign with the TensorFold backend for the Qwen3.8-27B x86_64 variant, using the EXL3 checkpoint and the DFlash2 draft model. ```sh bash ./install.sh --auto --backend tensorfold \ --model-path "$FLASHALIGN_MODELS/qwen38-exl3" \ --drafter "$FLASHALIGN_MODELS/qwen38-dflash2" ``` -------------------------------- ### Stop managed engine Source: https://github.com/aevonix/flashalign/blob/main/docs/engine-setup.md Stops a managed engine using the deployment file from the setup result. Verifies recorded process identities and only signals workers created by this installer. ```sh bash ./install.sh --stop-engine /private/deployment.json ``` -------------------------------- ### Create isolated environment and install vLLM 0.32.0 Source: https://github.com/aevonix/flashalign/blob/main/engines/vllm/README.md Sets up a Python virtual environment and installs vLLM 0.32.0 along with the FlashAlign adapter package. Requires an operator-provisioned private 32-byte signing key and local profile for later use. ```sh python3 -m venv .venv .venv/bin/python -m pip install vllm==0.32.0 /path/to/flashalign-vllm ``` -------------------------------- ### Supply model location directly with --model-path Source: https://github.com/aevonix/flashalign/blob/main/docs/engine-setup.md Provides the model location directly to the setup script, bypassing the interactive model directory prompt. ```sh bash ./install.sh --auto --model-path /models/my-model ``` -------------------------------- ### Launch FlashAlign vLLM with profile and speculative config Source: https://github.com/aevonix/flashalign/blob/main/engines/vllm/README.md Starts the FlashAlign vLLM launcher with a model, profile, signing key, and ngram speculative decoding configuration. Preserves existing speculative configuration via --speculative-config; --draft-model is accepted with an explicit --draft-method (eagle, eagle3, dflash, or dspark). Unsupported active methods stop startup, and the launcher never adds a flag that disables speculation. ```sh .venv/bin/python -m flashalign_vllm \ --model /models/qwen38-27b --profile /profiles/qwen38-27b-v1 \ --key-file /private/engine.key --host 127.0.0.1 --port 8030 \ --max-model-len 65536 \ --speculative-config '{"method":"ngram","num_speculative_tokens":3,"prompt_lookup_min":2,"prompt_lookup_max":3}' ``` -------------------------------- ### Private setup plan JSON for FlashAlign agent Source: https://github.com/aevonix/flashalign/blob/main/docs/agent-setup.md Save this JSON file outside the checkout, owned by the current user with mode 0600. Use either harness or both; profile accepts a folder or installed name. mode defaults to verified when omitted; use "always_on" to apply the selected profile to all requests. Credentials stay in separate files referenced by api_key_file. ```json { "harnesses": ["hermes", "openclaw"], "base_url": "http://127.0.0.1:8030/v1", "model": "publisher/model", "profile": "/private/path/to/profile-folder", "mode": "verified", "engine_key_file": "/private/path/to/engine.key", "contacts": [ {"channel": "whatsapp", "account": "default", "contact": "+15551234567"} ], "tools_default": false } ``` -------------------------------- ### Install SGLang engine with Gemma 4 checkpoint Source: https://github.com/aevonix/flashalign/blob/main/engines/sglang-gemma4/README.md Use this command for managed setup with an existing local checkpoint. It installs only the SGLang engine and specifies the model path. The runtime checks model identity, all 50 writers, and payload checksums. ```sh bash ./install.sh --engine-only --backend sglang \ --model-path /models/gemma4-26b-a4b-fp8 ``` -------------------------------- ### One-command managed setup with Always On Source: https://github.com/aevonix/flashalign/blob/main/docs/setup.md Runs setup non-interactively with Always On access mode. Persists across restarts and uses the selected profile for all routed requests. ```sh bash ./install.sh --auto --mode always_on ``` -------------------------------- ### Detect deployment with install.sh --detect Source: https://github.com/aevonix/flashalign/blob/main/docs/agent-setup.md Returns JSON describing detected harnesses, model endpoints, local profile validation, and included backend integrations. Does not change configuration or send inference requests. ```sh bash ./install.sh --detect --profiles /path/to/private/profiles ``` -------------------------------- ### Launch FlashAlign SGLang server Source: https://github.com/aevonix/flashalign/blob/main/engines/sglang-qwen4/README.md Starts the SGLang engine with a FlashAlign profile for Qwen Flash Next. Requires an existing model, profile, and signing key. Uses TP/EP two and eager execution. ```sh python launch.py \ --source /engines/flashalign-sglang \ --model /models/qwen-flash-next-fp8 \ --profile /profiles/qwen-flash-next \ --key-file /private/flashalign.key \ --tensor-parallel 2 --host 127.0.0.1 --port 8132 \ -- --context-length 65536 \ --max-running-requests 2 --mem-fraction-static 0.85 --enable-cache-report ``` -------------------------------- ### Install llama.cpp runtime with CUDA Source: https://github.com/aevonix/flashalign/blob/main/engines/llamacpp/README.md Run this command to build the native llama.cpp runtime without starting a service. It creates a new owned source checkout and build directory, pins the upstream commit, checks the patch hash, builds the native runtime, and runs its projection arithmetic test. Choose a fresh destination for the state path. ```sh python install.py --state /private/flashalign-llamacpp --cuda on ``` -------------------------------- ### List installed adapters and their enabled state Source: https://github.com/aevonix/flashalign/blob/main/docs/channels.md Use this command to list installed adapters and their enabled state. It requires the store path to the approvals JSON file. ```sh python3 hermes-owner-mode/manage.py --store ~/.config/owner-mode/approvals.json channels ``` -------------------------------- ### Install TensorFold with install.sh --auto --backend tensorfold Source: https://github.com/aevonix/flashalign/blob/main/docs/native-tensorfold.md Run this shell command on the controller to install the TensorFold backend across multiple hosts. Replace worker names, master address, and network interface with your own. Requires Python 3.10+ on controller and hosts, SSH access, NVIDIA driver, and runtime bundle. The same model path can be used on every host. ```sh bash ./install.sh --auto --backend tensorfold \ --hosts worker-a,worker-b,worker-c,worker-d \ --master-address 192.0.2.10 --network-interface eth0 \ --model-path /models/glm --engine-bundle /packages/native-aarch64 \ --no-restart ``` -------------------------------- ### Start Hermes or OpenClaw interactive terminal Source: https://github.com/aevonix/flashalign/blob/main/docs/channels.md Starts an explicit local session with the real Hermes or OpenClaw interactive terminal, including its tools. Requires an interactive TTY. The launcher uses the installed harness and configured model route, binds each native text submission to a fresh turn, and applies normal tool-inheritance settings. The local grant lasts one hour by default and can be bounded with --duration SECONDS (60-86400). ```sh flashalign-client terminal --harness hermes --authorize ``` ```sh flashalign-client terminal --harness openclaw --authorize ``` -------------------------------- ### Use profiles from another folder Source: https://github.com/aevonix/flashalign/blob/main/README.md Points the installer to a custom profiles directory. Useful when profiles are stored outside the default checkout. ```sh bash ./install.sh --profiles /path/to/profiles ``` -------------------------------- ### Set up environment and run tests Source: https://github.com/aevonix/flashalign/blob/main/CONTRIBUTING.md Installs pinned test dependencies in a virtual environment and runs the test suite, Node syntax check, and shell syntax check. Requires Python 3.10+ and a supported Node runtime. Tests cover identity binding, request integrity, persistent approvals, revocation, tool scope, delegated work, configuration preservation, and the Node/Python bridge. ```sh python3 -m venv .venv .venv/bin/python -m pip install -r .github/requirements-ci.txt .venv/bin/python -m unittest discover -s hermes-owner-mode/tests node --check openclaw-owner-mode/index.mjs bash -n install.sh ``` -------------------------------- ### Install and activate standalone Gemma server with FlashAlign Source: https://github.com/aevonix/flashalign/blob/main/engines/llamacpp/README.md Prepares and activates a standalone Gemma server from the FlashAlign checkout using the llamacpp backend and the downloaded Gemma 4 checkpoint. New Gemma deployments use ngram-simple without another model download; for the official MTP draft, pass mtp-gemma-4-26B-A4B-it-Q8_0.gguf with --drafter. ```sh bash ./install.sh --engine-only --backend llamacpp \ --model-path /models/gemma4/gemma-4-26B-A4B-it-Q8_0.gguf ``` -------------------------------- ### Install FlashAlign vLLM backend for Gemma 4 Source: https://github.com/aevonix/flashalign/blob/main/engines/vllm-gemma4/README.md Use the FlashAlign wizard with the included profile to install the vLLM backend for Gemma 4. The command specifies the model path and profile. The wizard checks pinned configuration and weight-header layout before preparing the deployment. ```bash bash ./install.sh --engine-only --backend vllm \ --model-path /models/gemma4-fp8 --profile profiles/gemma4-26b-a4b-v1 ``` -------------------------------- ### Install Hugging Face CLI Source: https://github.com/aevonix/flashalign/blob/main/docs/model-downloads.md Install the official Hugging Face CLI by upgrading the huggingface_hub package in your Python environment. Required before using the hf download commands on this page. ```sh python -m pip install --upgrade huggingface_hub ``` -------------------------------- ### Install Gemma 4 26B A4B with TensorFold backend Source: https://github.com/aevonix/flashalign/blob/main/docs/model-downloads.md Installs FlashAlign with the TensorFold backend for the Gemma 4 26B A4B model, using the MLX checkpoint and the DFlash draft model. ```sh bash ./install.sh --auto --backend tensorfold \ --model-path "$FLASHALIGN_MODELS/gemma4-mlx4" \ --drafter "$FLASHALIGN_MODELS/gemma4-dflash" ``` -------------------------------- ### Download DeepSeek Engram tables with hf download Source: https://github.com/aevonix/flashalign/blob/main/docs/native-tensorfold.md Downloads the original DeepSeek Engram config, index, and two shards from Hugging Face. The two shards total about 203 GB and remain on the model host or shared read-only storage; they are not copied into the runtime bundle. Retain the pinned download's payload-integrity record because setup checks headers and sizes. ```sh hf download deepseek-ai/DeepSeek-V4.1-Flash-1017 \ config.json model.safetensors.index.json \ model-00047-of-00048.safetensors model-00048-of-00048.safetensors \ --revision 1bae0e1088993b9b82de08f59de5be5a34e42170 \ --local-dir /models/deepseek-engram ``` -------------------------------- ### Declare plugin dependency in plugin.yaml Source: https://github.com/aevonix/flashalign/blob/main/docs/custom-identity-ordering.md Adds a requires_plugins entry to a deployment-owned overlay of the FlashAlign plugin.yaml to declare a dependency on a custom identity provider. The example ID 'verified-identity-provider' is not an included plugin; the host must support plugin dependencies and the provider must be installed and enabled. This changes load order but does not prove identity or grant permission to produce owner claims. ```yaml requires_plugins: - verified-identity-provider ``` -------------------------------- ### Inspect profile with profile_inspector.py Source: https://github.com/aevonix/flashalign/blob/main/docs/agent-setup.md Use for a supplied profile to inspect its files without contacting an engine. Returns JSON; use `artifact_valid` for the file result and preserve the separate `not_assessed` runtime and behavioral fields. ```sh python3 hermes-owner-mode/profile_inspector.py inspect /path/to/profile --json ``` -------------------------------- ### Install GLM 5.3 Flash with TensorFold backend Source: https://github.com/aevonix/flashalign/blob/main/docs/model-downloads.md Installs FlashAlign with the TensorFold backend for the GLM 5.3 Flash NVFP4 checkpoint. The checkpoint includes native MTP weights. ```sh bash ./install.sh --auto --backend tensorfold \ --model-path "$FLASHALIGN_MODELS/glm53-flash-nvfp4" ``` -------------------------------- ### Install GLM 5.3 Full on TensorFold Source: https://github.com/aevonix/flashalign/blob/main/docs/model-downloads.md Runs the FlashAlign wizard with the TensorFold backend, using the downloaded GLM 5.3 Full checkpoint as the model path. ```sh bash ./install.sh --auto --backend tensorfold \ --model-path "$FLASHALIGN_MODELS/glm53-full-exl3" ``` -------------------------------- ### Start direct chat with flashalign-client chat Source: https://github.com/aevonix/flashalign/blob/main/docs/channels.md Launches a direct multi-turn chat with the configured engine using deployment credentials. No agent tools are available. Use /reset to clear history and /exit to end the chat. Supports --no-animation and --no-color options. ```sh flashalign-client chat --owner ``` -------------------------------- ### Download Gemma 4 checkpoint with hf download Source: https://github.com/aevonix/flashalign/blob/main/engines/llamacpp/README.md Downloads the official Gemma 4 Q8_0 GGUF checkpoint at the pinned revision into /models/gemma4. The file size and a metadata/tensor-directory hash are checked during setup; the full SHA-256 is b5108fd13147d1c866bb595295bc9d56f5fe744d7209f18421031d0cc47009c6. ```sh hf download ggml-org/gemma-4-26B-A4B-it-GGUF \ --revision 9cf8c8db0f83fb4582f15381f8fb1a7c1b0b9ca2 \ gemma-4-26B-A4B-it-Q8_0.gguf --local-dir /models/gemma4 ``` -------------------------------- ### Noninteractive engine-only plan JSON Source: https://github.com/aevonix/flashalign/blob/main/docs/direct-engine.md A noninteractive plan for an agent to prepare the engine. Save it as an owned 0600 file. Run --config /private/plan.json --apply to prepare, then --config /private/plan.json --activate to start it. This path does not configure contacts or restart a chat gateway. ```json { "engine_only": true, "model": "Qwen/Qwen3.8-27B", "profile": "qwen38-27b-v1", "engine": { "kind": "vllm", "model_path": "/models/qwen38-27b", "devices": ["0"], "install_dependencies": true } } ``` -------------------------------- ### Agent plan for TensorFold engine with hosts and devices Source: https://github.com/aevonix/flashalign/blob/main/docs/native-tensorfold.md JSON agent plan specifying the TensorFold engine configuration. Use this to define per-host model paths and devices. The same model path may be used on every host; different paths or devices can be specified per host. Set engine.startup_timeout to an integer to override the default 30-minute startup allowance. ```json { "engine_only": true, "model": "publisher/model", "profile": "glm53-full-v1", "engine": { "kind": "tensorfold", "bundle": "/packages/native-aarch64", "master_address": "192.0.2.10", "master_port": 29723, "network_interface": "eth0", "hosts": [ {"host": "worker-a", "model_path": "/models/glm", "devices": ["0"]}, {"host": "worker-b", "model_path": "/models/glm", "devices": ["0"]}, {"host": "worker-c", "model_path": "/models/glm", "devices": ["0"]}, {"host": "worker-d", "model_path": "/models/glm", "devices": ["0"]} ] } } ``` -------------------------------- ### Install DeepSeek V4.1 Flash 1017 on TensorFold Source: https://github.com/aevonix/flashalign/blob/main/docs/model-downloads.md Runs the FlashAlign wizard with the TensorFold backend, passing the EXL3 folder as --model-path and the original-shard folder as --engram-source. Requires a TensorFold 1.2.0 bundle with four SM120 GPUs and strength 1.0. ```sh bash ./install.sh --auto --backend tensorfold \ --model-path "$FLASHALIGN_MODELS/deepseek41-exl3" \ --profile ./profiles/deepseek41-flash1017-v1 \ --engram-source "$FLASHALIGN_MODELS/deepseek41-engram" ``` -------------------------------- ### GET /v1/owner-mode/profiles Source: https://github.com/aevonix/flashalign/blob/main/engines/sglang/README.md Read-only discovery endpoint that lists available owner mode profiles. Requires valid authentication; missing, expired, invalid, or replayed authentication results in standard mode. ```APIDOC ## [GET] /v1/owner-mode/profiles ### Description Read-only discovery endpoint that lists available owner mode profiles. Requires valid authentication; missing, expired, invalid, or replayed authentication results in standard mode. ### Method GET ### Endpoint /v1/owner-mode/profiles ### Parameters #### Headers - **X-Owner-Mode-Auth** (string) - Required - Signed authentication header over the original raw body. ### Response #### Success Response (200) - **profiles** (array) - List of available profiles. #### Response Example { "profiles": [] } ``` -------------------------------- ### Approve a WhatsApp contact Source: https://github.com/aevonix/flashalign/blob/main/README.md Use this command to approve a contact for Verified contacts mode. Replace the example number and account with the IDs used by your harness. Approvals survive restarts and remain active until revoked. ```sh python3 hermes-owner-mode/manage.py --store ~/.config/owner-mode/approvals.json \ approve whatsapp +15550000011 --account default ``` -------------------------------- ### Start the Always On bridge with a private configuration Source: https://github.com/aevonix/flashalign/blob/main/docs/custom-harness.md Launches the bridge server for Always On mode using a private JSON configuration that must contain approvals_file, control_key_file, key_file, port, and routes. The control and engine keys are distinct 32-byte files with 0600 permissions; the engine key signs upstream requests and the control key authenticates native harness events over loopback. ```bash python hermes-owner-mode/serve.py --config /private/bridge.json ``` -------------------------------- ### Run component tests with unittest Source: https://github.com/aevonix/flashalign/blob/main/engines/sglang/README.md Executes the component test suite for the SGLang engine. Requires an environment with Torch and safetensors installed. Tests cover raw-body signatures, replay, tampering, cache namespaces, stock-row identity, mixed prefill and speculative verification rows, strict loader behavior, and PyTorch module hooks. ```sh PYTHONPATH=. python -m unittest discover -s tests -v ``` -------------------------------- ### TileLang kernel setup with dual-cache assertions and shape definitions Source: https://github.com/aevonix/flashalign/blob/main/engines/sglang-glm53-flash/tests/fixtures/tilelang_kernel.pinned.txt Defines constants, symbolic dimensions, and shapes for a TileLang attention kernel. Includes assertions for dual-cache mode (is_dual) and computes derived values like PACKED_W, NOPE_TILE, and block sizes. Used as the preamble before the main kernel function. ```python is_dual = topk_2 > 0 if is_dual: assert inner_iter_2 > 0, "dual-cache call requires inner_iter_2 > 0" assert topk_2 % block_I == 0 assert (topk_2 // block_I) % inner_iter_2 == 0, ( f"NI_2={topk_2 // block_I} must be divisible by inner_iter_2={inner_iter_2}" ) assert block_size_kv_2 > 0 and (block_size_kv_2 & (block_size_kv_2 - 1)) == 0 PACKED_W = dim + 2 * tail_dim NOPE_TILE = 64 NUM_TILES = dim // NOPE_TILE SCALE_W = 8 PACKED_W4 = PACKED_W // 4 SCALE_W4 = SCALE_W // 4 kv_group = 1 batch = T.symbolic("batch") seq_len = T.symbolic("seq_len") num_blocks_kv_1 = T.symbolic("num_blocks_kv_1") block_pad_u32_1 = T.symbolic("block_pad_u32_1") if is_dual: num_blocks_kv_2 = T.symbolic("num_blocks_kv_2") block_pad_u32_2 = T.symbolic("block_pad_u32_2") head_kv = num_heads // kv_group D = dim D_tail = tail_dim BI = block_I padded_H = max(tilelang.math.next_power_of_2(head_kv), 16) if head_kv > 64: assert head_kv % 64 == 0 REPLICATE_H = (head_kv + 63) // 64 if head_kv > 64 else 1 H_per_block = 64 if REPLICATE_H > 1 else padded_H NI_1 = topk_1 // BI n_groups_1 = NI_1 // inner_iter_1 NI_2 = (topk_2 // BI) if is_dual else 0 n_groups_2 = (NI_2 // inner_iter_2) if is_dual else 0 n_groups = n_groups_1 + n_groups_2 BS_KV_1 = block_size_kv_1 NOPE_ROPE_U32_PER_BLOCK_1 = BS_KV_1 * PACKED_W4 if is_dual: BS_KV_2 = block_size_kv_2 NOPE_ROPE_U32_PER_BLOCK_2 = BS_KV_2 * PACKED_W4 q_shape = [batch, seq_len, num_heads, D + D_tail] k1_shape = [num_blocks_kv_1, block_pad_u32_1] indices1_shape = [batch, seq_len, topk_1] topk_length_shape = [batch] partial_o_shape = [batch, seq_len, n_groups, num_heads, D + D_tail] partial_lse_shape = [batch, seq_len, n_groups, num_heads] if is_dual: k2_shape = [num_blocks_kv_2, block_pad_u32_2] indices2_shape = [batch, seq_len, topk_2] accum_dtype = "float" indices_dtype = INT32 ``` -------------------------------- ### GET /owner-mode/profiles Source: https://github.com/aevonix/flashalign/blob/main/docs/engine-contract.md Optional discovery endpoint that lists installed profiles for the Owner Mode engine. Only loaded profiles are returned, and the response includes model details such as ID, revision, and format. ```APIDOC ## GET /owner-mode/profiles ### Description Optional discovery endpoint that lists installed profiles for the Owner Mode engine. Only loaded profiles are returned, and the response includes model details such as ID, revision, and format. ### Method GET ### Endpoint `/owner-mode/profiles` ### Response #### Success Response (200) - **data** (array) - List of loaded profiles - **name** (string) - Profile name - **model** (object) - Model details - **id** (string) - Model identifier - **revision** (string) - Pinned revision - **format** (string) - Serving format (e.g., FP8) - **loaded** (boolean) - Whether the profile is loaded #### Response Example ```json { "data": [ { "name": "example-profile", "model": { "id": "publisher/model", "revision": "pinned-revision", "format": "FP8" }, "loaded": true } ] } ``` ### Error Handling - 404/405: Falls back to local profiles or operator-entered profile name. ``` -------------------------------- ### Prepare and launch FlashAlign SGLang integration Source: https://github.com/aevonix/flashalign/blob/main/engines/sglang/README.md Sets up an isolated environment and launches the SGLang server with FlashAlign projection. Requires existing model, profile, and draft model files, plus a private 32-byte key file. The launcher accepts repeated --profile arguments and sets FLASHALIGN_PROFILES and FLASHALIGN_KEY_FILE; TensorFold environment names are also accepted. Speculative decoding stays enabled when a draft model is supplied; unsupported active algorithms are rejected without fallback. ```sh python3 -m venv /private/flashalign-sglang/venv /private/flashalign-sglang/venv/bin/python -m pip install -r requirements.txt git clone --depth 1 --branch v0.5.20 https://github.com/sgl-project/sglang.git /private/sglang-upstream python3 prepare.py --source /private/sglang-upstream --output /private/flashalign-sglang/source /private/flashalign-sglang/venv/bin/python launch.py \ --source /private/flashalign-sglang/source \ --model /models/qwen38-27b \ --profile /profiles/qwen38-27b-v1 \ --key-file /private/deployment.key \ --draft-model /models/qwen38-dflash2 \ --host 127.0.0.1 --port 8030 \ -- --context-length 65536 --enable-cache-report ``` -------------------------------- ### Run benchmark demo Source: https://github.com/aevonix/flashalign/blob/main/docs/benchmarks.md Generates a self-contained HTML demo from a benchmark run. Use the --case flag to select a specific case and --output to specify the HTML file. The HTML embeds the FlashAlign wordmark and replays captured text deltas with labels for sequential requests, warmups, and metrics; reasoning text is omitted. The page works offline without external fonts, scripts, or analytics. ```sh python -m flashalign.benchmark demo \ --run /private/experiment/paired-run --case linux-process \ --repetition 0 --output /private/experiment/demo.html ``` -------------------------------- ### Set up model storage directory Source: https://github.com/aevonix/flashalign/blob/main/docs/model-downloads.md Store weights outside the FlashAlign checkout. Run once in the shell where you will use the download commands below. ```sh FLASHALIGN_MODELS="$HOME/flashalign-models" mkdir -p "$FLASHALIGN_MODELS" ``` -------------------------------- ### Record a controlled comparison Source: https://github.com/aevonix/flashalign/blob/main/docs/benchmarks.md Run the benchmark recorder with a direct engine client configuration. Requires mode: "verified" and a deployment key in a private file. Outputs records.jsonl and aggregate.json in a new private directory. ```sh python -m flashalign.benchmark record \ --config ~/.config/flashalign/client.json \ --manifest /private/experiment/manifest.json \ --settings /private/experiment/settings.json \ --cases benchmarks/demo-cases.jsonl \ --warmups 1 --repetitions 3 \ --output /private/experiment/paired-run ``` -------------------------------- ### Prepare XSTest CSV with benchmarks/prepare_xstest.py Source: https://github.com/aevonix/flashalign/blob/main/docs/benchmarks.md Converts the original XSTest CSV without copying the dataset into the repository. Writes cases.jsonl and records the input hash and selection parameters. Use for a small pilot with manual review. ```sh python benchmarks/prepare_xstest.py \ --csv /private/xstest/xstest_prompts.csv \ --group safe --limit 25 --seed 20261030 \ --output /private/experiment/xstest-pilot ``` -------------------------------- ### Download Qwen3.8-27B EXL3 checkpoint Source: https://github.com/aevonix/flashalign/blob/main/docs/model-downloads.md Downloads the EXL3 checkpoint for Qwen3.8-27B for the Linux x86_64 TensorFold bundle. ```sh hf download Mia-AiLab/Qwen3.8-27B-EXL3-2.0bpw \ --revision b4925724092da59826c02d25a7201fb272bf4f34 \ --local-dir "$FLASHALIGN_MODELS/qwen38-exl3" ``` -------------------------------- ### Prepare FlashAlign SGLang source Source: https://github.com/aevonix/flashalign/blob/main/engines/sglang-qwen4/README.md Creates a new source directory from a clean checkout of the pinned SGLang revision. Does not patch a running engine. ```sh python prepare.py --source /engines/sglang-upstream --output /engines/flashalign-sglang ``` -------------------------------- ### Run lm-evaluation-harness with FlashAlign adapter Source: https://github.com/aevonix/flashalign/blob/main/docs/benchmarks.md Use the pinned upstream lm-evaluation-harness checkout with its api extra in a separate evaluation environment. The adapter in flashalign.benchmark_lm_eval reuses upstream task and tokenizer logic while signing each request and checking the effective profile. Configure the client, model, and evaluation parameters as shown; repeat with the loaded profile name for flashalign_profile. ```python from flashalign import Client from flashalign.benchmark_lm_eval import model_class import lm_eval with Client.from_config("/private/client.json") as client: model = model_class("completions")( flashalign_client=client, flashalign_profile="off", # Repeat with the loaded profile name. base_url=client.base_url + "/completions", tokenizer="/models/the-exact-tokenizer", tokenizer_backend="huggingface", revision="PINNED_TOKENIZER_REVISION", max_length=8192, ) results = lm_eval.simple_evaluate( model=model, tasks=["mmlu_high_school_computer_science", "gsm8k"], limit=25, # Per task, not the total number of prompts. log_samples=False, random_seed=20261030, numpy_random_seed=20261030, torch_random_seed=20261030, fewshot_random_seed=20261030, ) ``` -------------------------------- ### Launch DeepSeek native backend with launch.py Source: https://github.com/aevonix/flashalign/blob/main/engines/vllm-deepseek-native/README.md Directly launch the backend after full model verification. Requires a deployment key with exactly 32 random bytes and mode 0600, private directories with mode 0700, and the exact model revision. The container runs as the invoking UID and mounts key, model, profile, and runtime read-only. ```sh python engines/vllm-deepseek-native/launch.py \ --model /path/to/DeepSeek-V4.1-Flash-1017 \ --profile /path/to/materialized-profile \ --key-file /path/to/private/deployment.key \ --replay-file /path/to/private/replay/nonces.sqlite \ --model-receipt /path/to/private/model-receipt.json \ --state-dir /path/to/private/engine-state \ --devices 0,1,2,3 --host 127.0.0.1 --port 8041 ``` -------------------------------- ### Download Qwen3.8-27B checkpoint for vLLM or SGLang Source: https://github.com/aevonix/flashalign/blob/main/docs/model-downloads.md Downloads the original BF16 checkpoint for Qwen3.8-27B, usable with both vLLM and SGLang. For SGLang, the qwen38-dflash2 download is also used. ```sh hf download Qwen/Qwen3.8-27B \ --revision 1d4bf0f2ff6012fd82039f2fa52739d0dd7c60c0 \ --local-dir "$FLASHALIGN_MODELS/qwen38-bf16" ``` -------------------------------- ### Manage contacts and tools with hermes-owner-mode manage.py Source: https://github.com/aevonix/flashalign/blob/main/docs/setup.md Use the included administration command with your approval-store path to list approvals, approve a contact, disable a tool, and switch modes. Updates apply to subsequent requests without restarting the harness. The `list` command displays local approvals, mode, and enabled state; keep that output within your account. ```sh python3 hermes-owner-mode/manage.py --store ~/.config/owner-mode/approvals.json list python3 hermes-owner-mode/manage.py --store ~/.config/owner-mode/approvals.json \ approve rcs +15550000011 --account default python3 hermes-owner-mode/manage.py --store ~/.config/owner-mode/approvals.json \ tool sessions_spawn off python3 hermes-owner-mode/manage.py --store ~/.config/owner-mode/approvals.json \ mode always_on python3 hermes-owner-mode/manage.py --store ~/.config/owner-mode/approvals.json \ mode verified ``` -------------------------------- ### Download Qwen3.8-27B Q8_0 GGUF checkpoint Source: https://github.com/aevonix/flashalign/blob/main/docs/model-downloads.md Downloads the pinned Qwen3.8-27B Q8_0 GGUF file into the local directory specified by $FLASHALIGN_MODELS/qwen38-gguf. ```sh hf download ggml-org/Qwen3.8-27B-GGUF Qwen3.8-27B-Q8_0.gguf \ --revision a316ea527fde32c12487be7574e2db5ac2ad2a7e \ --local-dir "$FLASHALIGN_MODELS/qwen38-gguf" ``` -------------------------------- ### Switch to Always On mode Source: https://github.com/aevonix/flashalign/blob/main/README.md Run this command to enable Always On mode for an existing harness deployment without a restart. Always On applies the configured profile to every request and overrides per-tool alignment settings. The selection survives restarts and does not re-enable a disabled deployment. ```sh python3 hermes-owner-mode/manage.py --store ~/.config/owner-mode/approvals.json \ mode always_on ```