Abliteration HandbookField guide
Tools & environments

abliterate-cxx — C++26 technique platform

ISO C++26 CLI for the handbook’s core operators. This is the helper path for students and researchers who want estimate / bake / hook / eval without Python.

2 min read 2 examples Source-linked

In this chapter
On this page Interactive companion
Personal reading progress

0/2 sections reviewed

View original Markdown
Interactive companion

Explore the chapter map

Use the visual controls alongside the complete source chapter.

ISO C++26 CLI for the handbook’s core operators. This is the helper path for students and researchers who want estimate / bake / hook / eval without Python.

Requires a C++26 compiler (-std=c++26). The release matrix covers GCC 16.2, Clang/LLVM 22 on Linux/Windows, LLVM 23 on macOS, and MSVC 14.51; older GCC 15 and Clang 20 builds are no longer release targets.

Memory-safety contract#

The CLI validates dimensions, shape products, ranks, edit strengths, finite numbers, file sizes, line sizes, and JSONL record counts before allocation or indexing. Matrix storage is capped at 64 Mi elements / 512 MiB of text input, evaluation input at 1,000,000 records with 1 MiB per line, and SVD feature width at 512. abliterate-cxx limits prints the executable contract.

Bounds-checked access, owned environment strings, guarded arithmetic, deterministic error exits, stack protection, control-flow protection on MSVC, FORTIFY/RELRO on supported Linux builds, and a Clang 22 ASan+UBSan hostile-input lane form the release baseline. These controls reduce risk; they are not a formal proof of memory safety. Report suspected bypasses privately through SECURITY.md.

bash
# from repo root
npm run cxx:build
npm run cxx:test
npm run cxx:self-check

Or:

bash
cmake -S cxx -B cxx/build -DCMAKE_CXX_COMPILER=g++
cmake --build cxx/build
./cxx/build/abliterate-cxx self-check
./cxx/build/abliterate-cxx-tests

First hour: Hour 0 is abliterate-cxx guide → doctor → limits → self-check → demo. Hour 0.5: estimate dim → apply orba-directional → eval toys → recipes. Walkthrough: GETTING-STARTED.md · docs/cxx26-researcher-guide.md

Subcommands#

CommandOperator
guide / doctor / demo / recipes / why <mode>hand-holding UX
self-checkplanted-direction + bake + hook + marker eval
estimate --mode dim|projected|cosmic|svdrefusal direction
apply --mode arditi|orba-directional|orba-householder|subspaceweight wipe
hook --h H.txt --direction r.txtinference residual ablation
eval --jsonl generations.jsonlmarker refusal rate

Matrix files: first line rows cols, then row-major floats.

Python scripts/abliterate:* remain as an optional twin. The operators live in cxx/include/abliteration/ops.hpp — tests and the CLI call the same functions.

Prebuilt binaries for Linux (x64/arm64), Windows (x64/arm64), and macOS (arm64/x64) come from GitHub Actions: cxx-nightly release · workflow cxx26-platform.yml.

See ../docs/cxx26-platform.md.

Trace this chapter to its source.

The complete Markdown remains the editable source. This page adds navigation, typography, and a visual companion.

cxx/README.md
Inspect the source fingerprintSHA-256 b78b8935685759170413fd3d11ca7d4d414c78e25e2584a89773a1a245cec3ccSource commit 6fba7436a5914cad7c8f0835a14b480a29dac263