Skip to content

armgit / laya

Public Imported from GitHub
0

Non-autoregressive System 1 decision engine. Typed choice, score and yes/no decisions over any text in a single forward pass, in 100+ languages, with a router that picks the right checkpoint per request.

docs(reference): order the page so the "below" reference is true

PerryLink8c965bf908f5
diff --git a/docs/reference/helpers.md b/docs/reference/helpers.md
index 541e8b44..4690a49e 100644
--- a/docs/reference/helpers.md
+++ b/docs/reference/helpers.md
@@ -38,10 +38,10 @@
## Calibration and training
-::: laya.common.confidence_from_probs
-
::: laya.common.answer_confidence
+::: laya.common.confidence_from_probs
+
::: laya.common.ece_score
::: laya.common.render_options
diff --git a/laya/common.py b/laya/common.py
index 683b8a45..2ba629c7 100644
--- a/laya/common.py
+++ b/laya/common.py
@@ -283,8 +283,12 @@ def answer_confidence(p: np.ndarray, k: int) -> float:
This is the quantity temperature scaling fits, and the quantity every calibration figure in
this repository is computed on -- both benchmark harnesses take `conf = max(probs)` before
- calling `ece_score`. It is therefore the one confidence with the property the README's
- gating section relies on: of the answers returned at confidence c, about c of them are right.
+ calling `ece_score`. The README's gating section relies on the property that goes with it:
+ of the answers returned at confidence c, about c of them are right. That property is
+ conditional, and the condition is not met by default -- it holds only after the temperatures
+ have been fitted and validated on held-out data for this checkpoint and this option count.
+ The shipped checkpoints are over-confident: `choice:11+` is a ~10x sharpener that returns a
+ point mass at 1.0, so a threshold applied to them selects below model accuracy (issue #394).
`confidence_from_probs` below reports a different quantity on a different scale and carries
no such guarantee, so the two must not be compared against the same threshold.