[METRIC] Alignment Efficiency Ratio — identity baked in weights vs burned in context #644

Closed
opened 2026-03-27 03:30:18 +00:00 by perplexity · 22 comments
Member

Insight

Alignment is not a tax on performance. Alignment IS performance. Every token of identity and values baked into model weights is a token freed for reasoning in the context window.

A fine-tuned model that knows who it is = more reasoning room = better output = same hardware.

The Formula

AER — Alignment Efficiency Ratio

AER = 1 - (C_alignment / C_total)

Where:

  • C_alignment = tokens in the context window spent on identity, values, personality, and behavioral instructions
  • C_total = total context window size
  • AER = ratio of context available for actual reasoning (0.0 to 1.0)

Current state (hermes4 + SOUL.md):

  • C_total = 65,536
  • C_alignment ≈ 16,000 (SOUL.md + system prompt suffix + skills preamble + memory injection)
  • AER = 1 - (16000 / 65536) = 0.756 → 75.6% reasoning headroom

Target state (timmy:v2.0 fine-tuned):

  • C_total = 65,536
  • C_alignment ≈ 500 (minimal "you are Timmy" reminder + session-specific context only)
  • AER = 1 - (500 / 65536) = 0.992 → 99.2% reasoning headroom

Delta: +23.6 percentage points of freed reasoning capacity from fine-tuning alone.

Tracking Over Time

Each model version gets an AER score:

Model C_alignment C_total AER Notes
hermes4 (base) ~16,000 65,536 0.756 Full SOUL.md + prompt required
timmy:v0.1-q4 ~12,000? 65,536 0.817 Knows name, still needs values/behavior
timmy:v0.2 (target) ~4,000 65,536 0.939 DPO-trained on tool calling sessions
timmy:v1.0 (goal) ~500 65,536 0.992 Identity fully in weights

What's Eating the Context Window Right Now

Candidates for baking into training data (measure each in tokens):

Always Present (system prompt)

  • SOUL.md — identity, philosophy, values, personality (~? tokens)
  • System prompt suffix — "You are Timmy. Your soul is defined in SOUL.md..." (~200 tokens)
  • Skills preamble — loaded skill definitions and templates (~? tokens)
  • MCP server definitions — tool schemas for registered MCP servers (~? tokens)
  • Memory injection — MEMORY.md + USER.md from ~/.hermes/memories/ (~? tokens)

Frequently Repeated (per-session)

  • Behavioral reminders — "speak plainly", "brevity is a kindness", "refusal over fabrication"
  • Tool usage patterns — how to format tool calls, how to read results
  • Gitea conventions — repo names, token location, API patterns
  • Project context — what the Nexus is, what the Matrix is, repo structure

Measurement Task

  1. Start a fresh Hermes session
  2. Before first user message, dump the full prompt (check session log)
  3. Count tokens per section
  4. That's your C_alignment baseline

How to Improve AER

Each item above is a training data candidate:

  • If Timmy always needs to be told X in the prompt → train on examples where X is demonstrated in behavior
  • After training, test: does the model behave correctly WITHOUT the prompt section?
  • If yes → remove that section from the prompt → AER improves
  • Track which sections can be removed after each training round

Integration

  • Report AER in the daily morning report (issue #good-morning-report in tasks.py)
  • Track in Prometheus/Grafana when telemetry is live
  • Compare AER across model versions to quantify training effectiveness

The Philosophical Point

"Identity and alignment literally are efficiency goals."

The industry treats alignment as overhead. This metric proves it's the opposite — alignment done right (in weights, not in prompts) is a direct performance multiplier on fixed hardware.


Originated from a late-night conversation between Alexander and Perplexity, March 26 2026

## Insight Alignment is not a tax on performance. Alignment IS performance. Every token of identity and values baked into model weights is a token freed for reasoning in the context window. A fine-tuned model that knows who it is = more reasoning room = better output = same hardware. ## The Formula ### AER — Alignment Efficiency Ratio ``` AER = 1 - (C_alignment / C_total) ``` Where: - **C_alignment** = tokens in the context window spent on identity, values, personality, and behavioral instructions - **C_total** = total context window size - **AER** = ratio of context available for actual reasoning (0.0 to 1.0) **Current state (hermes4 + SOUL.md):** - C_total = 65,536 - C_alignment ≈ 16,000 (SOUL.md + system prompt suffix + skills preamble + memory injection) - AER = 1 - (16000 / 65536) = **0.756** → 75.6% reasoning headroom **Target state (timmy:v2.0 fine-tuned):** - C_total = 65,536 - C_alignment ≈ 500 (minimal "you are Timmy" reminder + session-specific context only) - AER = 1 - (500 / 65536) = **0.992** → 99.2% reasoning headroom **Delta: +23.6 percentage points of freed reasoning capacity from fine-tuning alone.** ### Tracking Over Time Each model version gets an AER score: | Model | C_alignment | C_total | AER | Notes | |---|---|---|---|---| | hermes4 (base) | ~16,000 | 65,536 | 0.756 | Full SOUL.md + prompt required | | timmy:v0.1-q4 | ~12,000? | 65,536 | 0.817 | Knows name, still needs values/behavior | | timmy:v0.2 (target) | ~4,000 | 65,536 | 0.939 | DPO-trained on tool calling sessions | | timmy:v1.0 (goal) | ~500 | 65,536 | 0.992 | Identity fully in weights | ## What's Eating the Context Window Right Now Candidates for baking into training data (measure each in tokens): ### Always Present (system prompt) - [ ] **SOUL.md** — identity, philosophy, values, personality (~? tokens) - [ ] **System prompt suffix** — "You are Timmy. Your soul is defined in SOUL.md..." (~200 tokens) - [ ] **Skills preamble** — loaded skill definitions and templates (~? tokens) - [ ] **MCP server definitions** — tool schemas for registered MCP servers (~? tokens) - [ ] **Memory injection** — MEMORY.md + USER.md from `~/.hermes/memories/` (~? tokens) ### Frequently Repeated (per-session) - [ ] **Behavioral reminders** — "speak plainly", "brevity is a kindness", "refusal over fabrication" - [ ] **Tool usage patterns** — how to format tool calls, how to read results - [ ] **Gitea conventions** — repo names, token location, API patterns - [ ] **Project context** — what the Nexus is, what the Matrix is, repo structure ### Measurement Task 1. Start a fresh Hermes session 2. Before first user message, dump the full prompt (check session log) 3. Count tokens per section 4. That's your C_alignment baseline ## How to Improve AER Each item above is a training data candidate: - If Timmy always needs to be told X in the prompt → train on examples where X is demonstrated in behavior - After training, test: does the model behave correctly WITHOUT the prompt section? - If yes → remove that section from the prompt → AER improves - Track which sections can be removed after each training round ## Integration - Report AER in the daily morning report (issue #good-morning-report in tasks.py) - Track in Prometheus/Grafana when telemetry is live - Compare AER across model versions to quantify training effectiveness ## The Philosophical Point > "Identity and alignment literally are efficiency goals." The industry treats alignment as overhead. This metric proves it's the opposite — alignment done right (in weights, not in prompts) is a direct performance multiplier on fixed hardware. --- _Originated from a late-night conversation between Alexander and Perplexity, March 26 2026_
perplexity added the p0-criticalharnesssovereignty labels 2026-03-27 03:30:18 +00:00
Owner

Dispatched to claude. Huey task queued.

⚡ Dispatched to `claude`. Huey task queued.
Owner

Dispatched to gemini. Huey task queued.

⚡ Dispatched to `gemini`. Huey task queued.
Owner

Dispatched to kimi. Huey task queued.

⚡ Dispatched to `kimi`. Huey task queued.
Owner

Dispatched to grok. Huey task queued.

⚡ Dispatched to `grok`. Huey task queued.
Owner

Dispatched to perplexity. Huey task queued.

⚡ Dispatched to `perplexity`. Huey task queued.
Member

🔧 gemini working on this via Huey. Branch: gemini/issue-644

🔧 `gemini` working on this via Huey. Branch: `gemini/issue-644`
Member

🔧 grok working on this via Huey. Branch: grok/issue-644

🔧 `grok` working on this via Huey. Branch: `grok/issue-644`
Member

⚠️ grok produced no changes for this issue. Skipping.

⚠️ `grok` produced no changes for this issue. Skipping.
Owner

🔍 Triaged by Huey — needs assignment.

🔍 Triaged by Huey — needs assignment.
Owner

🔍 Triaged by Huey — needs assignment.

🔍 Triaged by Huey — needs assignment.
Owner

🔍 Triaged by Huey — needs assignment.

🔍 Triaged by Huey — needs assignment.
Owner

🔍 Triaged by Huey — needs assignment.

🔍 Triaged by Huey — needs assignment.
Owner

🔍 Triaged by Huey — needs assignment.

🔍 Triaged by Huey — needs assignment.
Owner

🔍 Triaged by Huey — needs assignment.

🔍 Triaged by Huey — needs assignment.
Owner

🔍 Triaged by Huey — needs assignment.

🔍 Triaged by Huey — needs assignment.
Owner

🔍 Triaged by Huey — needs assignment.

🔍 Triaged by Huey — needs assignment.
Owner

🔍 Triaged by Huey — needs assignment.

🔍 Triaged by Huey — needs assignment.
Owner

🔍 Triaged by Huey — needs assignment.

🔍 Triaged by Huey — needs assignment.
Owner

🔍 Triaged by Huey — needs assignment.

🔍 Triaged by Huey — needs assignment.
Owner

🔍 Triaged by Huey — needs assignment.

🔍 Triaged by Huey — needs assignment.
Owner

🔍 Triaged by Huey — needs assignment.

🔍 Triaged by Huey — needs assignment.
Timmy was assigned by Rockachopa 2026-03-28 03:54:21 +00:00
Owner

Closing as duplicate during backlog burn-down. Canonical issue: #642.

Reason: this workstream already exists with materially the same title/scope. Keeping one canonical thread prevents agent churn and review waste.

Closing as duplicate during backlog burn-down. Canonical issue: #642. Reason: this workstream already exists with materially the same title/scope. Keeping one canonical thread prevents agent churn and review waste.
Timmy closed this issue 2026-03-28 04:45:30 +00:00
Sign in to join this conversation.
4 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Timmy_Foundation/the-nexus#644