Skip to main content
AI tutorials

How to Install and Use FlashAlign for On-Demand Model Alignment

Learn how to install FlashAlign, select a compatible model and inference engine, activate profiles for verified contacts or every routed request, manage approvals and tool inheritance, and inspect or customize a deployment without permanently changing model weights.

How to Install and Use FlashAlign for On-Demand Model Alignment
FlashAlign lightning bolt and wordmark logo

What is FlashAlign?

FlashAlign is an open-source system from Aevonix Research for applying alignment profiles to supported language models on demand. Profiles can be selected per request or kept active across every request routed through FlashAlign. The profiles work with supported base and quantized weights without permanently modifying them.

The included V1 starter profiles focus on reducing refusals. FlashAlign can run directly, integrate with Hermes or OpenClaw, or connect to a custom harness. Managed inference requires Linux and an NVIDIA GPU.

FlashAlign changes only model calls sent through its configured routes or gateway URL. Your harness remains responsible for deciding who can send messages and which tools can run.

Key features

  • On-demand profiles: Switch per request among profiles that are already loaded by the inference engine.
  • Reversible operation: Apply profiles without permanently changing supported model weights.
  • Two activation modes: Restrict profiles to verified contacts or apply a profile to every routed request with Always On mode.
  • Tool inheritance controls: In Verified contacts mode, choose which tools may pass the active profile to delegated work.
  • Harness integrations: Use FlashAlign with Hermes, OpenClaw, direct clients, or custom harnesses.
  • Messaging adapters: Built-in adapters cover WhatsApp and RCS direct messages, with opt-in support for SMS and Telegram.
  • Setup safeguards: The installer detects local models and harnesses, selects a matching profile, checks activation, creates a deployment signing key, and backs up changed configuration.
  • Profile inspection: Review a profile's model pin, operators, sites, ranks, and hashes before setup.

Supported models and engines

FlashAlign 1.1.1 lists five starter model profiles with the following engine support:

  • DeepSeek V4.1 Flash 1017: vLLM or TensorFold.
  • GLM 5.3 Full: TensorFold.
  • GLM 5.3 Flash: TensorFold or SGLang.
  • Qwen3.8-27B: TensorFold, vLLM, SGLang, or llama.cpp.
  • Gemma 4 26B A4B: TensorFold, vLLM, SGLang, or llama.cpp.

Four compact profiles are included in the repository. The DeepSeek profile uses a 1.09 GB native tensor payload that setup downloads from a public release and verifies by checksum. No private repository or login is required.

Requirements

Before installing FlashAlign, check that your environment meets the relevant requirements:

  • A Linux inference host with an NVIDIA GPU.
  • Python 3.10 or later for setup and adapters.
  • Matched CPU and GPU architecture when using TensorFold bundles.
  • A supported model checkpoint and matching profile.
  • An engine that implements the FlashAlign engine contract.
  • For OpenAI-compatible clients, Chat Completions support.
  • For OpenClaw, a compatible native plugin API and Node 24.22.1 or later on the 24.x line, or 26.12.1 or later on the 26.x line.

Consult the project's compatibility guide for hardware requirements, pinned checkpoints, engine limitations, channels, and delegation support.

Install FlashAlign

1. Download a supported model

Download a supported checkpoint before running automatic setup. The repository's model download guide provides pinned commands for the five starter profiles and their supported formats.

2. Clone the repository and run the wizard

git clone https://github.com/Aevonix/FlashAlign.git
cd FlashAlign
bash ./install.sh --auto

The wizard searches for local models and supported harnesses, chooses a matching profile, prepares the engine, and creates a deployment signing key. During setup, select either Verified contacts or Always On. If you choose Verified contacts, also decide whether tools should inherit the profile.

Chat integrations restart their selected gateways after configuration. A local terminal setup instead prints the command required to launch it.

3. Confirm activation

Setup performs an activation check and backs up configuration files that it changes. The engine's effective-profile response provides confirmation that the selected profile is active.

Install with a specific model and engine

Use --model-path when you need to select a particular local checkpoint. For example, the following command creates a standalone engine deployment for a local Qwen checkpoint through vLLM:

bash ./install.sh --engine-only --backend vllm --model-path /models/qwen38-27b --yes

Use only combinations supported by the model and engine compatibility matrix. Loading a new model or profile occurs before request-time switching and may require an engine restart.

Connect to an existing engine

If a compatible inference engine is already running, launch the interactive installer without --auto:

bash ./install.sh

The setup guide covers connection and activation, while the engine selection guide explains the supported model and backend combinations.

Choose an activation mode

Verified contacts

Verified contacts is the default mode. It applies the selected profile only to messages associated with an approved channel, account, and contact. Each new turn must arrive through the verified channel. Merely placing a sender ID inside message text does not grant access.

This mode limits abliteration to approved users and channels, reducing the risk that an unauthorized user could activate it through malicious prompt injection. Tool outputs and execution still depend on the protections and permissions implemented by the harness.

Always On

Always On applies the configured profile to every request routed through FlashAlign, including tool and subagent requests. The selected mode persists across restarts, overrides per-tool alignment settings, and does not mark callers as verified. Requests fail when the configured profile cannot be applied.

Install directly in Always On mode with:

bash ./install.sh --auto --mode always_on

Custom harnesses and OpenAI-compatible clients can use the project's Always On gateway. Remember that requests bypassing FlashAlign's routes or gateway are not controlled by FlashAlign.

Approve and revoke contacts

In Verified contacts mode, use the management script to approve a sender. Replace the sample phone number and account with identifiers recognized by your harness:

python3 hermes-owner-mode/manage.py --store ~/.config/owner-mode/approvals.json approve whatsapp +15550000011 --account default

Approvals persist across restarts until they are revoked. On supported messaging transports, photos, voice notes, attachments, forwarded or quoted content, and queued message groups retain sender verification through the harness.

Revoke the contact with:

python3 hermes-owner-mode/manage.py --store ~/.config/owner-mode/approvals.json revoke whatsapp +15550000011 --account default

Revocation affects subsequent model requests, including delegated work. It does not disable Always On mode.

Control whether tools inherit a profile

Verified contacts mode lets you set a default during installation and override individual tools by name. For example:

python3 hermes-owner-mode/manage.py --store ~/.config/owner-mode/approvals.json tool delegate_task off
python3 hermes-owner-mode/manage.py --store ~/.config/owner-mode/approvals.json tool sessions_spawn on

An enabled tool can pass the active profile to verified child work. A disabled tool uses the standard model and passes no profile to its children. Your harness still controls whether the tool is allowed to execute.

Always On ignores these per-tool flags and applies the profile to every routed tool and subagent request. FlashAlign preserves the flags so they are available if you later return to Verified contacts mode.

Switch modes without restarting

An existing harness deployment can be changed to Always On without a restart:

python3 hermes-owner-mode/manage.py --store ~/.config/owner-mode/approvals.json mode always_on

Return to contact-based access with:

python3 hermes-owner-mode/manage.py --store ~/.config/owner-mode/approvals.json mode verified

The mode selection survives restarts, but changing modes does not re-enable a deployment that has already been disabled. For engine-only installations, change the mode through the setup wizard's activation step.

Advanced setup and inspection tips

Detect the environment before making changes

Run detection mode to inspect the available models, harnesses, and setup choices first:

bash ./install.sh --detect

Load profiles from another directory

Point the installer to a custom profile folder with:

bash ./install.sh --profiles /path/to/profiles

Profiles still need to match the selected model and engine. Review the profile metadata before activation rather than assuming that a profile is interchangeable across checkpoints.

Inspect profile contents

Use the repository's profile inspector guide to verify the model pin, operators, sites, ranks, and hashes of a local profile. This is especially useful before deploying a downloaded or separately stored profile.

Plan for loading and switching

FlashAlign can switch per request only among profiles already loaded by the engine. Loading another model or profile is a separate preparation step and may restart the engine. For low-latency routing, load the profiles needed by your application before serving requests.

Integrate a custom client or harness

For direct programmatic access, follow the direct engine and Python client guide. Harness developers can use the hooks described in the custom harness documentation. Other message transports can implement the documented adapter interface.

Security and operational considerations

  • Prefer Verified contacts when profile use should be restricted to known channels, accounts, and senders.
  • Use Always On only when every request sent through the configured route should receive the profile.
  • Do not treat an identifier written in message text as proof of sender identity.
  • Keep harness authorization and tool-execution controls enabled; FlashAlign does not replace them.
  • Check the effective-profile response after setup or configuration changes.
  • Review the project's security model, compatibility limits, and validation results before production deployment.

Conclusion

FlashAlign provides a reversible way to apply supported alignment profiles without permanently modifying model weights. Start with a pinned model and compatible engine, use the installer to prepare and verify the deployment, and choose Verified contacts or Always On according to your access requirements. For more complex deployments, profile inspection, per-tool inheritance, direct engine access, and custom harness hooks provide additional control.

FlashAlign is available under the AGPL-3.0-only license, with commercial licenses offered for closed-source products and hosted services. Model, profile, and dependency terms remain separate.