AI Card Bao AICARDBAO.COM
Home / 开源 / Cortheon
AI TOOL / #12808

Cortheon

The lightweight runtime enables small-scale local models to achieve performance close to that of state-of-the-art models by executing a verified parallel consensus mechanism.

Introduction

Improves frozen local models on official competition math (MathArena/aime_2025, 30/30) to 25/30 (83.3%) on 3-bit GLM-5.3-Flash-TFQ3 (+30.0 pts vs Vanilla 16/30, paired +10 / −1, exact McNemar p = 0.0117*, replicated identically on all 30/30 problems; +20.0 pts over compute-matched Maj@8 at *faster* wall-clock 107.8s vs 110.0s and *fewer* calls 7.67 vs 8.00; pooled 3-model baseline 51/90 → 72/90, +24 / −3, p = 4.92e-05), and on official oracle-free competitive coding (LiveCodeBench v6 Hard, 32 paired AtCoder ABC Hard problems, GLM-5.3-Flash-TFQ3) by +34.4 points (12/32 → 23/32 = 71.9%) — reaching ZERO REGRESSIONS vs Vanilla (+11 / −0, exact McNemar p = 0.00098***) with CodeForge v8's sound brute-force counterexample fuzzer (8.28 calls) and matching 23/32 at 6.19 avg calls (+12 / −1, p = 0.0034**, +5 / −0 over best4_sample, +7 / −0 over CodeForge v6) with CodeForge v7. Smaller BigCodeBench-Hard slices (10–30 tasks) remain positive (+3.3 to +10.0 pts) but statistically underpowered per run (p = 0.625–1.0).

Zero weight updates. Zero cloud APIs. Works with TensorFold, oMLX, Ollama, llama.cpp (including native reasoning_budget_tokens + loopback proxy bypass — PRs #12 & #13 by @DonnieFi), vLLM, SGLang, mlx-lm, and LM Studio (including automatic reasoning-model headroom, enable_thinking=False routing, scratchpad commit recovery, and non-dict /v1/models capabilities handling — PR #2 by @SelfHostedSI, PR #11 by @ivanfioravanti), with an OS-level sandbox (sandbox-exec on macOS / bwrap on Linux) enabled by default.


Quick Start (60 Seconds)

# 1. Install Cortheon
git clone https://github.com/ashhart/Cortheon.git && cd Cortheon
uv venv .venv && uv pip install --python .venv/bin/python -e .

# 2. Verify your local backend, OS sandbox, and solvers in 2 seconds
.venv/bin/cortheon doctor --url http://127.0.0.1:8080/v1

# 3. Install /cortheon commands & register the native MCP server across your coding harnesses
.venv/bin/cortheon install-commands --harness all
.venv/bin/cortheon install-mcp --harness all --url http://127.0.0.1:8080/v1

# 4. Start the universal proxy + Live Web Cockpit at http://127.0.0.1:18652/ui
.venv/bin/cortheon proxy --upstream http://127.0.0.1:8080/v1 --port 18652 --streams 4 --record-flywheel

Then use /cortheon inside your coding harness

Open OMP, Pi, OpenCode, Claude Code, or Cursor and type:

/cortheon 7 servers sit in a ring (0..6). A token starts at server 1 (already visited) and moves +1 mod 7 w.p. 2/3 or -1 mod 7 w.p. 1/3, except at server 0 it teleports uniformly to one of 0..6. Find the exact rational expected ticks until all 7 servers are visited.

Or run a live side-by-side Vanilla vs Cortheon race on your own model:

.venv/bin/cortheon duel --url http://127.0.0.1:8080/v1 --preset ring
.venv/bin/cortheon showdown --url http://127.0.0.1:8080/v1
  • Full harness configs (OMP, Pi, OpenCode, Claude Code, Cursor, TensorFold Native, tmux cockpit): GETTING_STARTED.md
  • 8 copy-paste challenge prompts with mechanically verified ground truths: CHALLENGE_PROMPTS.md
  • Security & OS sandbox threat model: SECURITY.md

Measured Results (Reproducible, Paired Statistics & Compute-Matched Ablation)

Reproduce from a fresh clone: run python -m bench.fetch_datasets to download official datasets into bench/datasets/, then python -m bench.stats --dir results to recompute every confidence interval and exact McNemar p-value directly from the committed per-problem JSONs in results/. See BENCHMARKS.md for full details.

1. Compute-Matched 6-Arm Ablation on Full Official MathArena/aime_2025 (30/30, GLM-5.3-Flash-TFQ3)

To isolate whether gains come from extra compute (Maj@4 / Maj@8), from Python execution alone (pal_b1), from parallel execution consensus (cortheon_w1), or from Wave-2 falsification (cortheon_full), all 6 arms were run cleanly on all 30 official AIME 2025 problems (0 timeouts, 8/8 streams completed on every Maj@8 problem) with exact per-problem token, call, and latency logging (results/official_aime2025_ablation_glm53.json):

ArmAccuracy k/30 [95% Wilson CI]Avg WallAvg CallsAvg Total TokPaired vs maj4_prosePaired vs maj8_prose
vanilla_b1 *(single prose call)*16/30 (53.3%) [36.1, 69.8]45.4s1.002,781+0.0 pts (p=1.00)−10.0 pts (p=0.453)
maj4_prose *(compute-matched B=4 prose voting)*16/30 (53.3%) [36.1, 69.8]75.2s4.006,504Baseline−10.0 pts (p=0.375)
maj8_prose *(compute-matched B=8 prose voting)*19/30 (63.3%) [45.5, 78.1]110.0s8.0013,314+10.0 pts (p=0.375)Baseline
pal_b1 *(single Python PAL script, effort=low)*8/30 (26.7%) [14.2, 44.5]19.4s1.001,425−26.7 pts (p=0.0215*)−36.7 pts (p=0.0034**)
cortheon_w1 *(B=4 PAL early-abort, no Wave 2)*19/30 (63.3%) [45.5, 78.1]63.4s (0.58× Maj@8)4.076,547 (0.49× Maj@8)+10.0 pts (+5/−2, p=0.453)+0.0 pts (+4/−4, p=1.00)
cortheon_full *(Wave 1 + Wave 2, effort=low)*21/30 (70.0%) [52.1, 83.3]147.9s6.2314,396 (1.08× Maj@8)+16.7 pts (+8/−3, p=0.227)+6.7 pts (+7/−5, p=0.774)
cortheon_full *(v2 default tb=700/950, prior 30/30)*24/30 (80.0%) [62.7, 90.5]175.8s7.2013,700 (1.03× Maj@8)+26.7 pts (+11/−3, p=0.057)+16.7 pts (+7/−2, p=0.180)
reasonforge_v5 *(Fast Pair + Executable TIR Self-Repair)*25/30 (83.3%) [66.4, 92.7]107.8s (1.63× faster than v2!)7.67 (< Maj@8)15,721 (1.18× Maj@8)+30.0 pts (+10/−1, p=0.0117*)+20.0 pts (+8/−2, p=0.109)

What the ablation proves honestly:

  • Plain Maj@4 prose voting added 0.0 points (16/30 → 16/30) at 2.34× tokens. Scaling to Maj@8 (13,314 tok, 110.0s, 8.00 calls) reached 19/30 but still suffered severe correlated wrong-answer collapses (7/8 voted wrong on AIME25_27 and AIME25_29, 6/8 on AIME25_14, 5/8 on AIME25_18).
  • A Python sandbox alone (pal_b1) performed significantly *worse* than Vanilla and Maj@8 (8/30 = 26.7%, p = 0.039 vs Vanilla, p = 0.0034 vs Maj@8) because single-shot model scripts frequently crash or time out on Olympiad problems.
  • Parallel execution consensus (cortheon_w1) matched Maj@8 (19/30) at HALF the tokens (6,547 vs 13,314 = 0.49×) and 1.74× faster wall time (63.4s vs 110.0s), while beating same-token Maj@4 (6,504 tok) by +10.0 points.
  • ReasonForge v5 (Executable TIR Self-Repair + Unanchored 50-digit mpmath/numpy Wave 2/3, results/official_aime2025_reasonforge_v5_glm53.json) hit a new all-time local 3-bit record of 25/30 (83.3%) while cutting average wall time 1.63× vs v2 (175.8s → 107.8s): beating vanilla_b1 and Maj@4 by +30.0 pts (+10/−1, p = 0.0117*), beating cortheon_w1 with zero regressions (+6/−0, p = 0.0313*), beating Maj@8 by +20.0 pts (+8/−2) at *faster* wall time (107.8s vs 110.0s) and *fewer* LLM calls (7.67 vs 8.00), and solving AIME25_10 (81), AIME25_14 (60), and AIME25_25 (907) where v2 failed.
  • Live 30/30 SpecVerify (inkling-2-mini 18.8 GiB drafter → glm-5.3-flash-tfq3 verifier, results/official_aime2025_spec_verify_inkling_glm53.json): Reached 20/30 (66.7%) [48.8, 80.8] — bypassing the big verifier completely on 9/30 (30.0%) problems at 9/9 (100.0%) drafter precision (0 false accepts), cutting big-model calls 42.9% vs Maj@8 (4.57 vs 8.00, 11,879 vs 13,314 big tok) and 26.7% vs cortheon_full (effort=low) (17.5% fewer big tok; paired +2/−3, p=1.00). *(Wall time averaged 253.4s because the BF16 looped drafter ran at ~10 tok/s; quantized 50–100+ tok/s drafters or metered cloud verifiers get the full latency/cost win.)*
Where Verification Works vs. Where It Doesn't (Honest Boundary): Cortheon's gains do not require a benchmark oracle — on AIME 2025 it never sees an answer key and synthesizes its own Python/SymPy/Z3 checkers. However, it *does* require a problem with executable or formal invariants. On a 12-task internal ablation of pure open-ended engineering/security prose advice (GLM-5.3-Flash-TFQ3), Maj@4 self-consistency (11/12) outperformed multi-stage adversarial prose falsification (9/12, vanilla_b1 10/12). We reverted that prose-falsification experiment rather than shipping a regression — use Cortheon where execution can genuinely falsify wrong hypotheses, not for subjective prose generation.

2. Compute-Matched CodeForge v7 & v8 Ablation on Official LiveCodeBench v6 Hard (32/32 Paired ABC Hard, GLM-5.3-Flash-TFQ3)

Every arm ran oracle-free on the exact same 32 official AtCoder ABC Hard problems (abc387_f–abc398_d, ~42 hidden judge tests each, 0 hidden tests ever seen at solve time) with full per-problem token, call, and latency logging (results/official_lcb_v6_hard_ablation_glm53.json, results/official_lcb_v6_hard_codeforge_v8_glm53.json):

ArmAccuracy k/32 [95% Wilson CI]Avg WallAvg CallsAvg Total TokPaired vs vanillaPaired vs codeforge_v7
vanilla *(single call, tb=1500)*12/32 (37.5%) [22.9, 54.8]74.9s1.005,770Baseline−34.4 pts (+12/−1, p=0.0034**)
codeforge_v6 *(prior architecture)*16/32 (50.0%) [33.6, 66.4]272.4s17.0041,936+12.5 pts (+7/−3, p=0.344)−21.9 pts (+7/−0, p=0.0156*)
best4_sample *(compute-matched B=4 public-sample)*18/32 (56.2%) [39.3, 71.8]112.4s3.8111,398+18.8 pts (+10/−4, p=0.180)−15.6 pts (+5/−0, p=0.0625)
codeforge_v7 *(sample-first 4-slot + early-abort + TLE rank)*23/32 (71.9%) [54.6, 84.4]165.3s6.1918,563+34.4 pts (+12/−1, p=0.0034**)Speed / call-efficiency leader
codeforge_v8 *(+ inline TIR repair + sound brute-force fuzzer)*23/32 (71.9%) [54.6, 84.4]244.9s8.2825,158+34.4 pts (+11/−0, p=0.00098***)+0.0 pts (+1/−1, p=1.00)
  • Why CodeForge v7 & v8 flipped the ablation: On this exact 32-problem set, lean best4_sample (18/32, 3.81 calls) originally beat CodeForge v6 (16/32, 17.00 calls). Dedicating all 4 Wave-1 slots to diverse implementations whenever verbatim I/O samples exist, executing via asyncio.wait(FIRST_COMPLETED) with early-abort, and ranking fast O(N log N) runtime tiers ahead of shorter O(N^2) TLE candidates jumped pass rate by +21.9 pts over v6 (+7/−0, p=0.0156*) while cutting calls 2.75× (17.00 → 6.19) and tokens 2.26× (41,936 → 18,563). CodeForge v8 adds inline Wave-1 TIR sample-diff self-repair and a sample-gated sound-oracle brute-force counterexample fuzzer, wiping out v7's lone regression (abc394_f → AC 43/43) for zero regressions vs Vanilla (+11/−0, p = 0.00098***) and rescuing hidden-test bugs live on abc393_e and abc398_d (8.28 avg calls).

3. Official External Benchmarks Across 3 Frozen Local Model Families

Computed directly from results/ via python -m bench.stats --dir results (enable_memory=False, force_mode=None):

<
Visits:1 Updated:2026-12-02 AI tools

Related