Benchmark decision models on hosted APIs and local GGUF #6

Merged
kleb merged 4 commits from benchmark/decision-models into main 2026-10-31 17:59:06 +01:00
Owner

kBench had no way to compare decision models: models that read a text and answer a typed question (yes/no or multiple choice) with a probability per answer, such as TypeSafe Jev or the OpenAI Decisions API. This adds a Decision suite: pinned data, one runner, matrix cases and a site domain.

  • Data: four public datasets pinned by archive hash and by the hash of the exact sampled requests: BoolQ (yes/no), ANLI round 3, XNLI German and SciFact (three-way choice), 300 seeded items each. python -m decision prepare fetches and checks them without inference; text stays in the gitignored cache.
  • Runner: python -m decision MODEL --backend api|gguf --dataset KEY. Hosted APIs (Jev 1.14/1.13, OpenAI gpt-6-luna) read keys from the environment only and fail on model-version drift. Local models (Laya, Laya multilingual, Liquid d1-omni-600M and d1-3B, Clef Flash) run in an owned llama.cpp server through its /v1/systemone endpoint on the CPU, the Iris Xe or the RTX 4070 Ti.
  • Results: Decision accuracy (unanswered counts as wrong), Brier score for calibration, latency, input tokens/s and RAM. Hosted APIs are a new api engine, called from kEmbed01, so their latency includes the network.
  • The shared llama.cpp server class gains device and mode hooks; embedding and OCR behave as before.

Decider models are not included: llama-server cannot serve them, they need a separate decider-ai backend. No runs are included yet. Three things only a real host run can confirm: Clef's /props context check, Laya's GPU offload log line, and whether the community Laya multilingual GGUF loads. Each fails the run loudly rather than producing numbers. Hosts need llama.cpp b12020 or newer in {runtime}/llama-decision/.

decision-fixture-brier.png

Proven with the full Python (358) and site (42) tests, typecheck and a static build, plus the new page in the dev server with a temporary contract-fixture result (shown above, not committed).

kBench had no way to compare decision models: models that read a text and answer a typed question (yes/no or multiple choice) with a probability per answer, such as TypeSafe Jev or the OpenAI Decisions API. This adds a Decision suite: pinned data, one runner, matrix cases and a site domain. - **Data:** four public datasets pinned by archive hash and by the hash of the exact sampled requests: BoolQ (yes/no), ANLI round 3, XNLI German and SciFact (three-way choice), 300 seeded items each. `python -m decision prepare` fetches and checks them without inference; text stays in the gitignored cache. - **Runner:** `python -m decision MODEL --backend api|gguf --dataset KEY`. Hosted APIs (Jev 1.14/1.13, OpenAI `gpt-6-luna`) read keys from the environment only and fail on model-version drift. Local models (Laya, Laya multilingual, Liquid d1-omni-600M and d1-3B, Clef Flash) run in an owned llama.cpp server through its `/v1/systemone` endpoint on the CPU, the Iris Xe or the RTX 4070 Ti. - **Results:** Decision accuracy (unanswered counts as wrong), Brier score for calibration, latency, input tokens/s and RAM. Hosted APIs are a new `api` engine, called from kEmbed01, so their latency includes the network. - The shared llama.cpp server class gains device and mode hooks; embedding and OCR behave as before. Decider models are not included: llama-server cannot serve them, they need a separate `decider-ai` backend. No runs are included yet. Three things only a real host run can confirm: Clef's `/props` context check, Laya's GPU offload log line, and whether the community Laya multilingual GGUF loads. Each fails the run loudly rather than producing numbers. Hosts need llama.cpp b12020 or newer in `{runtime}/llama-decision/`. ![decision-fixture-brier.png](https://git.kleb.sh/attachments/ad4d4838-4fdb-4a97-8acd-1938b8b85563) Proven with the full Python (358) and site (42) tests, typecheck and a static build, plus the new page in the dev server with a temporary contract-fixture result (shown above, not committed).
python -m decision runs one pinned model on one pinned public dataset sample
(BoolQ, ANLI R3, XNLI German, SciFact; 300 seeded items each) through a hosted
API (TypeSafe Jev, OpenAI Decisions) or an owned llama.cpp /v1/systemone server
on the CPU, Iris Xe or CUDA. The matrix planner schedules decision cases, with
hosted APIs on the kEmbed01 client lane.
Adds the Decision domain with an API engine and a Brier score metric, the
decision evidence contract shared by Python and the site, and the protocol,
result and data-contract documentation.
First-time contributor

kReview review

Verdict: no findings

No verified defects were found in the reviewed changes.

kReview checked only the PR diff, metadata, and supplied repository context at 1548776589. It reports only issues supported by this material.

Estimated cost: ~$0.70 total (1.5M in / 4.2k out); this run ~$0.23 (560.0k in / 1.1k out) / gpt-6.1-terra.

Run time: 1:54 total; this run 0:26.

<!-- codex-forgejo-review --> <!-- codex-forgejo-review-head:15487765897b6679c4a72d8f62dddbcae9b35441 --> <!-- codex-forgejo-review-comparison:v1:50a65e692c1f5bcbf9792073d1f2058766e113a270ba9a25070768a4a780110e --> ## kReview review **Verdict:** no findings No verified defects were found in the reviewed changes. _kReview checked only the PR diff, metadata, and supplied repository context at `1548776589`. It reports only issues supported by this material._ _Estimated cost: ~$0.70 total (1.5M in / 4.2k out); this run ~$0.23 (560.0k in / 1.1k out) / gpt-6.1-terra._ _Run time: 1:54 total; this run 0:26._ <!-- codex-forgejo-review-state:eyJoZWFkU2hhIjoiMTU0ODc3NjU4OTdiNjY3OWM0YTcyZDhmNjJkZGRiY2FlOWIzNTQ0MSIsImNvbXBhcmlzb25LZXkiOiJ2MTo1MGE2NWU2OTJjMWY1YmNiZjk3OTIwNzNkMWYyMDU4NzY2ZTExM2EyNzBiYTlhMjUwNzA3NjhhNGE3ODAxMTBlIiwic3VtbWFyeSI6Ik5vIHZlcmlmaWVkIGRlZmVjdHMgd2VyZSBmb3VuZCBpbiB0aGUgcmV2aWV3ZWQgY2hhbmdlcy4iLCJmaW5kaW5ncyI6W10sImN1bXVsYXRpdmVDb3N0Ijp7InVzZCI6MC43MDQxMDkxLCJpbnB1dFRva2VucyI6MTUxOTgwMiwib3V0cHV0VG9rZW5zIjo0MTc3LCJtb2RlbCI6ImdwdC02LjEtdGVycmEifSwiY3VtdWxhdGl2ZUR1cmF0aW9uTXMiOjExNDU0Mn0= -->
kleb merged commit 43d09a7bee into main 2026-10-31 17:59:06 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kleb/benchmark!6
No description provided.