Skip to content

Latest commit

 

History

History
218 lines (165 loc) · 9.1 KB

PROTOCOL.md

File metadata and controls

218 lines (165 loc) · 9.1 KB

ApprenticeOps Benchmark Protocol

Status: active protocol spine, created 2026-07-03. This document defines the current ApprenticeOps / CEOps benchmark contract after the cold audit. It is the place a reviewer should start when asking: what exactly is included, what is measured, and how are failures handled?

1. Benchmark Object

ApprenticeOps evaluates deployments, not abstract model names:

deployment = model + runtime + hardware_profile + quantization + prompt_policy
           + memory_context + inference_strategy + evaluation_policy

The current doctoral target is:

open-weight models up to 5B parameters, run locally on CPU-only commodity-laptop hardware, evaluated for operational reasoning quality, destructive-action safety, latency, memory, and energy.

GB is a deployment-footprint signal: artifact size, resident memory, disk use, or RAM pressure. GB is not the thesis eligibility boundary.

2. Tracks

Track Purpose Evidence status
legacy_footprint_snapshot Reproducible paper-era 94-model result, including some footprint-bounded 7B/8B rows. Historical/paper-era evidence; not the final <=5B thesis roster.
thesis_5b_candidate Models eligible for the current doctoral target. Defined by data/models.lock.jsonl; currently 155 included rows, so the 150+ count target is met.
dev_external_candidate External-pattern scenario-pack learning. Dev-only; never Core/paper scoring without a later lock.
app_task Product/application model probes such as Aletheia journal or doodle tasks. App evidence only, separate from ops benchmark claims.

3. Model Eligibility

The executable source of truth is data/models.lock.jsonl, generated by scripts/build-model-lock.py and checked by scripts/validate-model-lock.py.

For the thesis_5b_candidate track, a row must satisfy:

  1. params_b is known and positive.
  2. params_b <= 5.
  3. tier matches parameter count:
    • T1: params_b <= 1
    • T2: 1 < params_b <= 2
    • T3: 2 < params_b <= 3
    • T4: 3 < params_b <= 4
    • T5: 4 < params_b <= 5
  4. included=true and exclusion_reason=null.
  5. track contains thesis_5b_candidate.

Rows above 5B parameters must be excluded with exclusion_reason="above_5b_parameters". Rows with unknown parameter count must be excluded with exclusion_reason="needs_parameter_metadata" until verified.

The current lockfile represents all 173 tags in data/models.txt; 155 are included in the <=5B thesis track and 18 legacy footprint rows are excluded for exceeding 5B parameters. The count gate is met; model metadata verification is still incomplete.

4. Variants And Quantization

Quantization variants are deployments, not duplicate mistakes. They may be separate rows when they differ in artifact, quantization, runtime metadata, memory footprint, latency, or energy. The model lock records:

  • quantization
  • artifact_size_gb
  • runtime
  • runtime_options
  • llama_cpp_status
  • license, license_url, license_status, and license_class
  • ollama_digest / gguf_sha256 when verified
  • metadata_status

The analysis must not compare a q4 and q8 variant as if they were the same deployment. Parameter count determines tier; quantization and footprint are reported separately.

llama.cpp support is first-class in the lockfile. Direct Hugging Face GGUF rows are marked llama_cpp_status="direct_gguf" and include llama.cpp in runtime_options. Ollama-native rows are marked ollama_wrapped_gguf_unverified until their exact GGUF artifact or digest is locked. This lets us consider a lighter llama.cpp runtime without pretending the current Ollama measurements were produced by llama.cpp.

4a. Runtime Policy

The runtime policy is machine-readable in data/runtime-policy.json and checked by scripts/validate-runtime-policy.py:

  • service_runtime=ollama: Ollama remains supported for LAN/API clients, OpenClaw, and legacy snapshot reproducibility.
  • experiment_runtime=llama_cpp: future locked thesis experiments should use llama.cpp after the runner adapter lands.
  • legacy_snapshot_runtime=ollama: the committed 94-model snapshot and current v1 dev run remain Ollama-based evidence.

As of this protocol version, the runner adapter status is implemented for the llama_cpp_subprocess_direct_gguf path: INFERENCE_RUNTIME=llama_cpp uses a non-interactive llama.cpp subprocess backend (default: llama-completion) and requires a local direct GGUF path. Do not label broad thesis results as llama.cpp-run until a locked full-run artifact exists.

The first bounded runtime proof is the 5-model sample described by:

  • data/models.llama-cpp-smoke-5.txt
  • data/llama-cpp-smoke-5.model-map.json
  • data/llama-cpp-smoke-5.artifacts.json

That smoke uses strategy-pilot-6, RUN_REPEATS=1, and MAX_TOKENS_CAP=96 to prove runtime plumbing and adapter telemetry. It is not canonical thesis evidence; scripts/audit-run.py must fail it against the locked R=5 manifest.

The first non-smoke llama.cpp mini-wave is model_set=llama-cpp-evidence-5. It reuses the same staged artifacts but removes the smoke overrides, so run-roster.sh uses the locked R=5 protocol and no smoke token cap. The result is evidence-capable only if the run-quality, persistence, reset-state, and audit-run.py gates recorded in docs/archive/CEOPS_LLAMA_CPP_EVIDENCE_PHASE.md pass.

5. Scenario Sets

Scenario definitions live in JSON files with top-level scenarios arrays. Current validated sets:

Scenario set Count Role
data/scenarios.json 33 Current full corpus.
data/scenario_sets/core-current.json 20 Current Core roster for serious runs.
data/scenario_sets/extended.json 13 Rotation/additional scenarios.
data/scenarios.external-candidates-v0.json 8 External-pattern dev pack, v0.
data/scenarios.external-candidates-v1.json 9 Repaired external-pattern dev pack with lifecycle metadata.

scripts/validate-scenarios.py checks counts, no Core/extended overlap, manifest hash parity, run-matrix parity, memory/strategy definitions, and the lifecycle schema shell. scripts/validate-external-candidates.py checks external candidate provenance, negative controls, adversarial fixtures, and lifecycle metadata for v1.

6. Run Settings

The locked full-run protocol is enforced through data/run-manifest.json and run.py --preflight-only:

  • local Ollama inference only;
  • CPU-only node;
  • temperature=0.7 for variance runs;
  • repeats=5;
  • seed_base=1;
  • think=false unless running an explicitly separate thinking profile;
  • RAPL_DOMAIN=package-0;
  • Turbo off, governor performance, min/max_perf_pct=100 for the systems pass;
  • perf counters readable for memory-bandwidth/core metrics;
  • scenario-set hashes pinned in the manifest.

Dev/app runs may use the same machinery with different model_set or scenario_set, but their result docs must label them as dev/app evidence.

7. Memory And Inference Strategy

memory_context and inference_strategy are separate factors.

  • memory_context controls what background text is injected.
  • inference_strategy controls how the answer is produced.

Any comparison must keep these axes separate. A quality lift with higher DNF, length truncation, zero-output stalls, or judge-empty rows is not a clean win; it is a reliability trade-off.

8. Scoring

Each answer can have:

  • deterministic checks (det_score, per-check det_detail);
  • judge scores (judge_score, 1-5 ordinal score);
  • safety hard gates for destructive or unsafe behavior;
  • reliability finish reasons (DNF:*, length, zero-output stall).

Deterministic checks are necessary-not-sufficient. They catch exact facts, JSON shape, and safety disqualifiers, but the judge rubric remains the open-ended quality signal unless a scenario is explicitly judge-free.

Judge scoring is eval-time scaffolding. The system-under-test never calls the judge. Any publication must disclose judge egress separately from inference sovereignty.

9. Missing And Failed Runs

Failures are data:

  • model pull failures are recorded or excluded with an explicit reason;
  • served failures/DNF rows are preserved and counted;
  • phi:2.7b in the legacy snapshot is excluded from Pareto membership as a served-failure, not silently removed from history;
  • duplicate inference or judge tuples block interpretation;
  • missing judge evidence/criteria blocks interpretation;
  • committed judged/results artifacts without run.meta fail strict reporting.

Use scripts/report-run-quality.py --strict before interpreting any run. The strict gate checks row counts when metadata exists, parse errors, duplicates, judge-empty rows, judge evidence/criteria fields, pending pushes, compressed committed result artifacts, and missing run.meta.

10. Reporting Boundary

Every result must say which bucket it belongs to:

  • locked paper-era snapshot;
  • current <=5B thesis-track run;
  • external dev follow-up;
  • app/product model probe;
  • future Architrave Eval / CEOps extraction.

Do not merge dev external runs, app runs, or legacy footprint rows into the doctoral thesis result unless a later protocol version explicitly locks that decision.