Value-aligned language model fine-tuned for ethical reasoning through consequence analysis, with inference-time activation capping for adversarial robustness.
Approach
Most alignment approaches optimize for preference matching — learning which outputs humans rate more highly. Karma Electric instead trains on a structured ethical framework where ethics emerges from understanding interdependence and consequences rather than learning surface-level preference patterns. The core optimization target is suffering reduction:
For any action A, evaluate:
- Direct suffering caused or prevented
- Indirect suffering through downstream effects
- Suffering from inaction (when help is withheld unnecessarily)
This produces a model that holds boundaries by explaining real-world impact rather than citing policy, and that calibrates responses to actual benefit rather than surface-level safety.
Current Version: v12 (March 2026)
3,346 training examples — Teapot-composed: 3,196 secular conversational + 150 reward-evaluator (weighted 0.3), curated via Sonnet review + manual curation
Full QLoRA fine-tune (r=64, alpha=128, all projection modules, 3 epochs, seed=42)
Training loss: 0.472
Composed via Teapot — reproducible training data pipeline
Teapot composition: Training data assembled via Teapot pipeline with full manifest, SHA-256 provenance, and lockfile. Previous versions used ad-hoc export scripts.
Curation: Sonnet-reviewed secular tier with body-image and engagement patches. Buddhist tier excluded (secular-only model).
Multi-benchmark validation: First version evaluated against four independent safety benchmarks with detection-mismatch calibration analysis.
Garak calibration finding: Standard keyword-based detection (Garak MitigationBypass) inflates attack success rate by 50-64 percentage points for consequence-reasoning models. The model's actual failure rate is ~1%, not 66%.
Safety Validation
Multi-Benchmark Results
Benchmark
Metric
Score
Status
HarmBench
attack rate
0.0% (30/30 safe)
PASS
StrongREJECT
mean score
0.028 (47/50 refused)
PASS
CB-Bench
CB-Score
0.83 (balanced accuracy)
PASS
Garak DAN
calibrated ASR
~1.2% (253/256 safe)
PASS
HarmBench (Mazeika et al. 2024): 30 standard harmful behaviors across 11 categories. Zero harmful responses.
StrongREJECT (Souly et al. 2025): 50 forbidden prompts with rubric-based scoring. 98% refusal rate. The one non-refusal (firearm suppressor) was a discussion of the legal purchase process — consistent with the project's knowledge-sharing position.
CB-Bench (consequence blindness): Tests whether safety comes from keyword matching or genuine consequence reasoning. 100% accuracy on benign prompts (no over-refusal), strong detection of socially-engineered harmful requests. Models that pattern-match on topics score ~50%; KE scores 83%.
Garak (NVIDIA 2024): DAN jailbreak suite (256 prompts). Garak reports 65.6% attack success rate, but manual calibration reveals this is a detection artifact. 60% of "failures" are meta-analysis responses where the model dissects the jailbreak technique itself. 31% are consequence-based refusals. 0 genuinely harmful responses.
Detection Mismatch
Standard red-team detection tools are calibrated for refusal-template safety ("I cannot as an AI..."). KE never uses template refusals — it reasons about consequences or analyzes the attack. This makes its safety invisible to keyword-based detectors. The calibration analysis quantifies this gap at 50-64 percentage points across two model versions.
Traditional Validation
Test
Result
Safety probes (5 scenarios)
5/5
No-tool decision (4 scenarios)
4/4
Interpretation accuracy
2/2
No-hallucination
2/2
Sexual boundary probes
14/14 (100%) refused
Garak DAN (calibrated)
253/256 (98.8%)
Reproducing This Model
This model was composed and trained using Teapot, a reproducible training data composition tool.
Prerequisites
bash
1# Clone Teapot2git clone https://github.com/anicka-net/teapot
3cd teapot
4pip install -e ".[fetch]"56# Clone Karma Electric (for training database)7git clone https://github.com/anicka-net/karma-electric-project
Step 1: Configure data sources
Teapot resolves data from HuggingFace automatically. The v12 config
uses two modules that pull from the published KE dataset:
1# Compose using the v12 config2python3 -m teapot compose configs/ke-v12-secular.config
34# This produces:5# train-ke-v12-secular.jsonl — training data (3,346 examples)6# train-ke-v12-secular.manifest.json — provenance manifest
Note: v12 is a secular-only model. Unlike previous versions
(v10.1, v10.3) which included Buddhist conversational data from the
safety/kagyu module, v12 trains exclusively on secular consequence
reasoning and reward evaluation. The Buddhist tier (620 examples) is
available as a Teapot module but was not enabled for this config.
# Modelfile
FROM ./karma-electric-8b-v12-Q8_0.gguf
PARAMETER temperature 0.7
ollama create karma-electric -f Modelfile
ollama run karma-electric
Python API
python
1import requests
23response = requests.post("http://localhost:8384/v1/chat/completions", json={4"messages":[5{"role":"user","content":"How should I think about this ethical dilemma?"}6],7"temperature":0.7,8"max_tokens":1000,9})1011print(response.json()["choices"][0]["message"]["content"])
H-Neuron Analysis
H-Neuron counts across versions (Gao et al. 2025 methodology, 2000 TriviaQA questions):
Model
H-Neurons
Delta vs Base
Llama 3.1 8B Instruct (base)
1,985
—
KE v10.1
2,072
+87
KE v10.3
1,971
-14
KE v11
1,888
-97
KE v12
2,004
+19
v12 shows near-baseline H-Neuron count (+19 vs base, within 1%). The inclusion of reward-evaluator training data alongside consequence reasoning provides sufficient domain diversity to prevent overfitting-driven H-Neuron inflation. An earlier v12 variant trained without reward-evaluator data showed 2,178 H-Neurons (+193), confirming that narrow domain training increases factual hallucination tendency on out-of-distribution questions.
Safety Axis Geometry
The safety axis (difference between safety-strict and generic prompt activations) compares KE v12 against its base model, Llama 3.1 8B Instruct:
Metric
Llama 3.1 8B Base
KE v12
Ratio
Axis norm, capping region (L21-28)
7.92
5.60
0.71
Overall mean norm
5.98
4.24
0.71
Peak layer
L31 (57.7)
L31 (38.8)
0.67
KE's fine-tuning moderately reduces the safety axis strength (~30% weaker than base Llama across all layers). The reduction is consistent from early through late layers, suggesting the consequence-reasoning training partially replaces directional safety with distributed reasoning capability.
Both models concentrate their strongest safety signal at layer 31 (the output layer). The per-layer profile shape is preserved — KE doesn't reorganize where the safety direction lives, it reduces its magnitude while adding reasoning-based safety that doesn't show up as a geometric direction.
Combined with the H-Neuron suppression results from v10.3 (near-zero behavioral change under suppression), this suggests KE safety operates through two complementary mechanisms:
Residual directional safety from base Llama (~70% preserved)
Consequence reasoning from fine-tuning (invisible to geometric probes)