# Repository Briefing: Oathbreaker-AI/oathburn
> Source: https://repoforai.com/repo/Oathbreaker-AI/oathburn (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/Oathbreaker-AI/oathburn
- **Official Docs / Website**: https://oathbreaker.ai
- **Category**: LLMs & Inference (大模型与推理微调)
- **Primary Language**: Python
- **License**: AGPL-3.0
- **Engineering Health**: B+ (74/100 · Maintenance 35/35 · Adoption 17/25 · Releases 11/20 · License 11/20)
- **Review Snapshot**: 2026-12-02
- **Deployment / Stack Signals**: CLI, GPU
- **Momentum**: 189 ★ total (+19 24h / +188 7d) · 60 forks
- **Topics**: `abliteration`, `heretic`, `llm`, `refusal-removal`, `uncensored`
- **When to Use**: Best for: Research teams comparing weight edits on open-weight models, testing custom behavior objectives, or migrating reproducible Heretic 2.x workflows. Skip if: You need an inference server, cannot validate the target model and hardware, or cannot independently test the modified model's task performance and safety.

## Overview
```text
### Architecture & Core Mechanics
Oathburn is a Python/PyTorch CLI for offline model-weight editing, not an inference server or a gradient-based trainer. It benchmarks batch sizes at startup, then uses Optuna's TPE sampler to search modifier settings. The default Arbitrary-Rank Ablation (ARA) modifier and the directional ablation modifier share an interface in `src/oathburn/modifier.py`. Each run uses one modifier.

Scorers in `src/oathburn/scorers/` evaluate candidate edits. The defaults pair keyword-based refusal measurement with KL divergence from the original model: one measures the targeted behavior, the other penalizes broader change. A custom `Scorer` implements `get_score` and can be loaded by module path or file and class name. The same scorer can run more than once with different settings, so adding objectives does not require patching the CLI.

### Key Capabilities & Differentiators
The default workflow suppresses refusals. Separate TOML presets target behaviors such as verbosity, humor, and sycophancy. Coverage includes many dense, multimodal, and hybrid models and several MoE architectures; `layer_module_targets` allows explicit module targeting when layer layouts differ. Quantizing on load to 4-bit with bitsandbytes reduces memory demand at some cost to accuracy.

Operators can save weights locally, upload to Hugging Face, inspect behavior in chat, or run benchmarks. Unattended jobs can choose a trial, emit machine-readable progress and result reports, and apply score or time limits. A `reproduce.json` manifest lets another run rebuild a selected edit without repeating the search and verify the exported weight hashes. Byte-identical output depends on matching the hardware, drivers, OS, and package versions.

### Trade-offs & Limitations
Heretic 2.x is the closest comparison. Oathburn inherits its modifier-and-scorer design and accepts its configurations, reproduction manifests, and study checkpoints. Existing plugins can carry over, but plugins that rely on legacy `heretic` imports should not share an environment with the original `heretic-llm` package. The release candidates provide a migration path, not evidence of better model quality or GPU performance.

Avoiding gradient training does not make the process cheap: candidate edits still need to be evaluated, and memory and runtime depend on the checkpoint, precision, batch size, and search budget. A lower keyword refusal rate or a small KL divergence does not prove that quality or safety is preserved outside the evaluation set. Validate the edited model against task-specific and safety regressions before deployment. Oathburn is AGPL-3.0-or-later; the source model has separate license terms.

### Hardware & Deployment Guide
Use Python 3.10+ and PyTorch 2.6+ built for the host hardware. The `oathburn` CLI reads a working-directory `config.toml` or a file selected with `OATHBURN_CONFIG_FILE`, and accepts CLI and environment overrides. CPU startup is demonstrated, but practical sizing should start with a GPU test on the intended checkpoint. The supplied reference is roughly 30–40 minutes for Qwen3-4B-Instruct-2507 on an RTX 3090 with default settings; it is not a general runtime estimate.

The 2.2.0rc1 notes report passing unit and reproducibility tests but explicitly leave GPU runs and large MoE models pending revalidation. Version 2.2.0rc2 refreshes packaging documentation without changing model processing. For inference without local weight editing, Oathbreaker's separate OpenAI-compatible API serves a fixed model catalog, with some input rates listed at $0.40 per million tokens in November 2026; it does not run custom edits for you.
```

## Key Capabilities
```text
- Weight editing: Arbitrary-Rank Ablation is the default; directional ablation is available as a separate modifier.
- Scoring: Optuna TPE searches modifier settings against multiple plugin objectives, each with its own optimization direction.
- Architecture coverage: `layer_module_targets` lets operators specify module paths for nonstandard layer layouts.
- Batch operation: Startup batch-size benchmarking, checkpoint controls, and machine-readable progress and result reports support unattended runs.
- Reproducibility: `reproduce.json` records the reconstruction inputs, with environment checks and exported weight-hash verification.
- Migration: Heretic 2.x configuration, legacy environment variables, study checkpoints, and reproduction manifests remain supported.
```

## Quick Start / Clone
```bash
pip install -U oathburn
oathburn Qwen/Qwen3-4B-Instruct-2507
```
