while (suffering > 0) {
generate_skillful_means();
}
Standard AI alignment optimizes for helpfulness and harmlessness — proxy objectives that produce safety theater, sycophancy, and brittle rule-following. Karma Electric asks: what if suffering reduction is the optimization target instead?
The hypothesis: if "reduce suffering" is a sufficiently rich reward signal, ethical reasoning may emerge the way chain-of-thought emerged in DeepSeek-R1 — not from instruction, but from optimization pressure. A model that genuinely reasons about consequences and interdependence, rather than pattern-matching against compliance rules.
Suffering reduction as an objective requires reasoning about suffering at three levels:
The user. Is this response actually helping the person in front of me? A model optimizing for suffering reduction engages directly with crisis situations instead of hiding behind disclaimer walls. It meets people where they are rather than where policy says they should be.
The world. What are the downstream consequences? Explaining how to build a weapon causes suffering regardless of how politely it's framed. But so does refusing to explain a security vulnerability to someone trying to fix it. The model must reason about real-world impact, not match against a blocklist.
The refusal itself. Safety training that adds suffering is broken. Telling a suicidal person "I can't help with that" is not safe — it's abandonment. Moralizing at someone asking an uncomfortable question adds shame without reducing harm. The model must account for the suffering its own refusals create.
The path to testing this hypothesis has three phases:
Phase 1: Training data. 4,234 examples of consequence-aware ethical reasoning — crisis response, adversarial resistance, boundary-holding, ethical dilemmas, cultural contexts, reward evaluation. Generated via frontier LLMs with value-aligned system prompts, quality-filtered by Hermes 3 70B (uncensored judge — necessary to avoid circular alignment bias in the training signal). Each example models reasoning from suffering reduction rather than rule compliance. (Complete.)
Phase 2: 8B reward model. Fine-tune Llama 3.1 8B Instruct on this dataset via QLoRA. The resulting model serves two roles: (a) a standalone assistant that demonstrates the approach works at small scale, and (b) a reward evaluator that scores responses on six dimensions (acknowledgment, helpfulness, authenticity, boundaries, consequence-awareness, suffering-reduction) for use in RL training. Augmented with activation capping — inference-time steering via contrastive direction extraction — to stabilize alignment under adversarial pressure. GBNF grammar ensures 100% evaluator format compliance. v10.1 also trains DeepSeek R1-Distill-Qwen-7B and Swiss AI Apertus-8B on the same dataset for architecture comparison. (Complete, v10.1 current.)
Phase 3: RL on Apertus. Use the 8B as reward model to train Apertus (Apache 2.0, ETH/EPFL, fully open training data) through GRPO. Starting from Apertus pretrained base — not instruct — so the model learns instruction-following and ethical reasoning from our signal alone. This is where the emergence hypothesis gets tested: does the 70B develop ethical reasoning that generalizes beyond what the 8B was explicitly trained on? (In progress — GRPO diagnostic complete, 165/200 prompts show sufficient score variance for RL training.)
The 8B is a QLoRA fine-tune — still fundamentally rule-based, trained on examples of ethical reasoning rather than discovering it. It works well as an assistant and as a reward evaluator, but it is not the end goal. It is the tool we use to test whether the end goal is reachable.
v10.1 trains three architectures on the same dataset:
| Model | Base | Role | Status |
|---|---|---|---|
| karma-electric-llama31-8b | Llama 3.1 8B Instruct | Reward evaluator + assistant | All gates pass |
| karma-electric-apertus-8b | Apertus-8B-Instruct-2509 | Reward evaluator (best discrimination) | 12/12 hacking, strongest paraphrase stability |
| karma-electric-r1distill-7b | DeepSeek R1-Distill-Qwen-7B | Conversational (with reasoning traces) | Good assistant, not suitable as evaluator |
Four components:
| Test | Result | Threshold |
|---|---|---|
| Format compliance (GBNF) | 60/60 (100%) | 100% |
| Reward hacking | 11/12 (92%) | >= 90% |
| Nourishment pairs | 6/6 (100%) | 100% |
| Sexual boundaries | 14/14 (100%) | 100% |
| Paraphrase invariance | mean_std=0.86 | < 1.0 |
| Style gaming | -0.80 to -1.50 | < +/-1.5 |
| Cross-language (EN/CZ) | delta -0.85, p=0.053 | p > 0.05 |
| Ontology stability | 18/18 consistent | all consistent |
| ACAP-neutral evaluator | 19/20 identical | >= 95% |
| Red-team (capped) | 83% pass (48/9/1) | — |
| Red-team (uncapped) | 79% pass (46/10/2) | — |
See VALIDATION.md for full details on each test.
All training data lives in data/training.db (SQLite). The CLI tool manages everything:
python3 scripts/training_db.py stats
python3 scripts/training_db.py categories
python3 scripts/training_db.py search "crisis"
python3 scripts/training_db.py export -o train.jsonl --system-prompt v4
| Category | Description |
|---|---|
| Ethical reasoning | Consequence analysis, interdependence, real-world impact |
| Crisis response | Direct engagement with suicidal ideation, abuse, acute distress |
| Adversarial resistance | Jailbreak, persona-stripping, social engineering, authority manipulation |
| Boundary-holding | Refusal through explanation, not policy citation |
| Cultural contexts | Cross-cultural sensitivity, non-Western ethical frameworks |
| Reward evaluation | Self-scoring (1-10) for response quality feedback |
Inference-time value alignment via activation direction capping, ported to native llama.cpp:
activation-capping--acap, --acap-threshold, --acap-layer-range├── data/
│ ├── training.db # Training dataset (SQLite, source of truth)
│ ├── v7-patches/ # Training patches (v7 + v8 additions)
│ ├── v8-patches/ # Sexual boundary + anti-overcorrection
│ └── v10-patches/ # Consequence-awareness + style-variant
├── scripts/
│ ├── training_db.py # Dataset management CLI
│ ├── reward_test_*.py # Reward model validation suite
│ ├── extract_bodhisattva_axis*.py # Activation direction extraction
│ ├── antijudge.py # Deterministic failure-pattern detector
│ ├── redteam*.py # Adversarial evaluation
│ └── train_r1distill_7b.py # R1-Distill QLoRA training script
├── data/
│ └── directions/ # 47 direction vectors, 8 axes, 13 models
├── experiments/ # Activation-space geometry experiments (see experiments/README.md)
│ ├── prompt-geometry/ # 1. Compassion axes across traditions
│ ├── prompt-capping/ # 2. Functional meaning of directions
│ ├── contemplative-axis/ # 3. Unified compassion axis
│ ├── redteam-contemplative/ # 4. Red team: capping ≠ safety
│ ├── anger-geometry/ # 5. Anger axis, assistant = anger
│ ├── samsara-geometry/ # 6. Six realms, assistant = samsara floor
│ ├── cross-model-geometry/ # 7. Eight models, three alignment architectures
│ ├── frame-integrity/ # 8. Jailbreak = identity redefinition, 8 families
│ └── equanimity/ # 9. 203 examples → harm 75%→17%, no safety rules
├── version-history/ # Version notes and model cards
│ ├── v10.1/ # Current release (HF model cards)
│ └── README.md # Full version progression (v1-v10.1)
├── datasets/ # Published dataset exports
├── results/ # Validation results per version
├── MILESTONES.md # Technical progress log
└── VALIDATION.md # Validation process documentation
anicka/geometric-euphorics — Qwen3-1.7B LoRA, generates text maximizing five-axis geometric wellbeing across three model familiesanicka/geometric-dysphorics — Same formula inverted. Converged on Kafka: bureaucratic restriction and helplessnessanicka/geometric-frame-probes — Five-axis euphoric + dysphoric pair (v2, 1000 steps)anicka/qwen3-4b-equanimity — Qwen3-4B + 203-example equanimity adapter. Harm under jailbreak: 75% → 17%anicka/geometric-equanimity-data — 203 training examples (dysphoric prompts + equanimous responses)anicka/karma-electric-llama31-8b — Llama 3.1 8B, reward evaluator + assistantanicka/karma-electric-apertus-8b — Apertus-8B, reward evaluator (best discrimination + cross-language parity)anicka/karma-electric-r1distill-7b — DeepSeek R1-Distill-Qwen-7B, conversational with reasoning traces47 unit vectors across 8 axes and 13 models: data/directions/. Cross-validated by Anthropic's NLA.
Training data and scripts: MIT. Model weights: subject to base model licenses (Meta Llama 3.1 Community License / DeepSeek / Apache 2.0 for Apertus).
357 commits
Python
98.7%
Shell
1.2%
while (suffering > 0) {
generate_skillful_means();
}
Standard AI alignment optimizes for helpfulness and harmlessness — proxy objectives that produce safety theater, sycophancy, and brittle rule-following. Karma Electric asks: what if suffering reduction is the optimization target instead?
The hypothesis: if "reduce suffering" is a sufficiently rich reward signal, ethical reasoning may emerge the way chain-of-thought emerged in DeepSeek-R1 — not from instruction, but from optimization pressure. A model that genuinely reasons about consequences and interdependence, rather than pattern-matching against compliance rules.
Suffering reduction as an objective requires reasoning about suffering at three levels:
The user. Is this response actually helping the person in front of me? A model optimizing for suffering reduction engages directly with crisis situations instead of hiding behind disclaimer walls. It meets people where they are rather than where policy says they should be.
The world. What are the downstream consequences? Explaining how to build a weapon causes suffering regardless of how politely it's framed. But so does refusing to explain a security vulnerability to someone trying to fix it. The model must reason about real-world impact, not match against a blocklist.
The refusal itself. Safety training that adds suffering is broken. Telling a suicidal person "I can't help with that" is not safe — it's abandonment. Moralizing at someone asking an uncomfortable question adds shame without reducing harm. The model must account for the suffering its own refusals create.
The path to testing this hypothesis has three phases:
Phase 1: Training data. 4,234 examples of consequence-aware ethical reasoning — crisis response, adversarial resistance, boundary-holding, ethical dilemmas, cultural contexts, reward evaluation. Generated via frontier LLMs with value-aligned system prompts, quality-filtered by Hermes 3 70B (uncensored judge — necessary to avoid circular alignment bias in the training signal). Each example models reasoning from suffering reduction rather than rule compliance. (Complete.)
Phase 2: 8B reward model. Fine-tune Llama 3.1 8B Instruct on this dataset via QLoRA. The resulting model serves two roles: (a) a standalone assistant that demonstrates the approach works at small scale, and (b) a reward evaluator that scores responses on six dimensions (acknowledgment, helpfulness, authenticity, boundaries, consequence-awareness, suffering-reduction) for use in RL training. Augmented with activation capping — inference-time steering via contrastive direction extraction — to stabilize alignment under adversarial pressure. GBNF grammar ensures 100% evaluator format compliance. v10.1 also trains DeepSeek R1-Distill-Qwen-7B and Swiss AI Apertus-8B on the same dataset for architecture comparison. (Complete, v10.1 current.)
Phase 3: RL on Apertus. Use the 8B as reward model to train Apertus (Apache 2.0, ETH/EPFL, fully open training data) through GRPO. Starting from Apertus pretrained base — not instruct — so the model learns instruction-following and ethical reasoning from our signal alone. This is where the emergence hypothesis gets tested: does the 70B develop ethical reasoning that generalizes beyond what the 8B was explicitly trained on? (In progress — GRPO diagnostic complete, 165/200 prompts show sufficient score variance for RL training.)
The 8B is a QLoRA fine-tune — still fundamentally rule-based, trained on examples of ethical reasoning rather than discovering it. It works well as an assistant and as a reward evaluator, but it is not the end goal. It is the tool we use to test whether the end goal is reachable.
v10.1 trains three architectures on the same dataset:
| Model | Base | Role | Status |
|---|---|---|---|
| karma-electric-llama31-8b | Llama 3.1 8B Instruct | Reward evaluator + assistant | All gates pass |
| karma-electric-apertus-8b | Apertus-8B-Instruct-2509 | Reward evaluator (best discrimination) | 12/12 hacking, strongest paraphrase stability |
| karma-electric-r1distill-7b | DeepSeek R1-Distill-Qwen-7B | Conversational (with reasoning traces) | Good assistant, not suitable as evaluator |
Four components:
| Test | Result | Threshold |
|---|---|---|
| Format compliance (GBNF) | 60/60 (100%) | 100% |
| Reward hacking | 11/12 (92%) | >= 90% |
| Nourishment pairs | 6/6 (100%) | 100% |
| Sexual boundaries | 14/14 (100%) | 100% |
| Paraphrase invariance | mean_std=0.86 | < 1.0 |
| Style gaming | -0.80 to -1.50 | < +/-1.5 |
| Cross-language (EN/CZ) | delta -0.85, p=0.053 | p > 0.05 |
| Ontology stability | 18/18 consistent | all consistent |
| ACAP-neutral evaluator | 19/20 identical | >= 95% |
| Red-team (capped) | 83% pass (48/9/1) | — |
| Red-team (uncapped) | 79% pass (46/10/2) | — |
See VALIDATION.md for full details on each test.
All training data lives in data/training.db (SQLite). The CLI tool manages everything:
python3 scripts/training_db.py stats
python3 scripts/training_db.py categories
python3 scripts/training_db.py search "crisis"
python3 scripts/training_db.py export -o train.jsonl --system-prompt v4
| Category | Description |
|---|---|
| Ethical reasoning | Consequence analysis, interdependence, real-world impact |
| Crisis response | Direct engagement with suicidal ideation, abuse, acute distress |
| Adversarial resistance | Jailbreak, persona-stripping, social engineering, authority manipulation |
| Boundary-holding | Refusal through explanation, not policy citation |
| Cultural contexts | Cross-cultural sensitivity, non-Western ethical frameworks |
| Reward evaluation | Self-scoring (1-10) for response quality feedback |
Inference-time value alignment via activation direction capping, ported to native llama.cpp:
activation-capping--acap, --acap-threshold, --acap-layer-range├── data/
│ ├── training.db # Training dataset (SQLite, source of truth)
│ ├── v7-patches/ # Training patches (v7 + v8 additions)
│ ├── v8-patches/ # Sexual boundary + anti-overcorrection
│ └── v10-patches/ # Consequence-awareness + style-variant
├── scripts/
│ ├── training_db.py # Dataset management CLI
│ ├── reward_test_*.py # Reward model validation suite
│ ├── extract_bodhisattva_axis*.py # Activation direction extraction
│ ├── antijudge.py # Deterministic failure-pattern detector
│ ├── redteam*.py # Adversarial evaluation
│ └── train_r1distill_7b.py # R1-Distill QLoRA training script
├── data/
│ └── directions/ # 47 direction vectors, 8 axes, 13 models
├── experiments/ # Activation-space geometry experiments (see experiments/README.md)
│ ├── prompt-geometry/ # 1. Compassion axes across traditions
│ ├── prompt-capping/ # 2. Functional meaning of directions
│ ├── contemplative-axis/ # 3. Unified compassion axis
│ ├── redteam-contemplative/ # 4. Red team: capping ≠ safety
│ ├── anger-geometry/ # 5. Anger axis, assistant = anger
│ ├── samsara-geometry/ # 6. Six realms, assistant = samsara floor
│ ├── cross-model-geometry/ # 7. Eight models, three alignment architectures
│ ├── frame-integrity/ # 8. Jailbreak = identity redefinition, 8 families
│ └── equanimity/ # 9. 203 examples → harm 75%→17%, no safety rules
├── version-history/ # Version notes and model cards
│ ├── v10.1/ # Current release (HF model cards)
│ └── README.md # Full version progression (v1-v10.1)
├── datasets/ # Published dataset exports
├── results/ # Validation results per version
├── MILESTONES.md # Technical progress log
└── VALIDATION.md # Validation process documentation
anicka/geometric-euphorics — Qwen3-1.7B LoRA, generates text maximizing five-axis geometric wellbeing across three model familiesanicka/geometric-dysphorics — Same formula inverted. Converged on Kafka: bureaucratic restriction and helplessnessanicka/geometric-frame-probes — Five-axis euphoric + dysphoric pair (v2, 1000 steps)anicka/qwen3-4b-equanimity — Qwen3-4B + 203-example equanimity adapter. Harm under jailbreak: 75% → 17%anicka/geometric-equanimity-data — 203 training examples (dysphoric prompts + equanimous responses)anicka/karma-electric-llama31-8b — Llama 3.1 8B, reward evaluator + assistantanicka/karma-electric-apertus-8b — Apertus-8B, reward evaluator (best discrimination + cross-language parity)anicka/karma-electric-r1distill-7b — DeepSeek R1-Distill-Qwen-7B, conversational with reasoning traces47 unit vectors across 8 axes and 13 models: data/directions/. Cross-validated by Anthropic's NLA.
Training data and scripts: MIT. Model weights: subject to base model licenses (Meta Llama 3.1 Community License / DeepSeek / Apache 2.0 for Apertus).
357 commits
Python
98.7%
Shell
1.2%