A conformance suite is only as useful as its answer to "says who?". This is that answer.
Every test in this suite falls into one of three categories, and the category determines what a failure means.
The OpenAI API documents the behaviour, or it follows from the definition of the operation. A mismatch is a bug in the engine.
Examples:
stopsequences are not included in the returned textmax_tokensbounds generated tokens and does not count the promptfinish_reasonis"length"on truncation and"stop"on a stop sequencedecode(encode(x)) == x, which follows from what a tokenizer is
Tests in this tier assert directly and a failure is reported as FAIL.
Not written down anywhere, but only one answer is defensible.
Examples:
- Greedy decoding is deterministic across identical requests
- Greedy decoding is unaffected by
top_p, because the distribution is already a point mass - Tokenizing the same string twice gives the same ids
These are asserted as failures too, but if a maintainer pushes back with a coherent argument, the test moves to tier 3 rather than the argument being dismissed. That has not happened yet. It probably will.
Engines genuinely differ and no authority settles it. These are recorded as divergences, not failures. The matrix shows what each engine does; it does not name a winner.
Examples:
- Whether
top_kis applied before or aftertop_p - Whether
repetition_penaltycovers prompt tokens or only generated ones - Whether
logprobsare reported before or after temperature scaling - What
max_tokens=0means: empty output, an error, or one token
Divergences are arguably the most valuable output of the project. A FAIL tells
one team to fix something. A divergence tells the whole ecosystem that a
behaviour needs specifying.
Tier 3 tests do not assert. They take the record_divergence fixture, call the
engine, and record what happened:
def test_zero_max_tokens_behaviour(engine, record_divergence) -> None:
"""Unspecified: record the behaviour, do not judge it."""
try:
result = engine.complete(CompletionRequest(prompt=PROMPT, max_tokens=0))
except EngineError as exc:
record_divergence(f"rejects the request: {exc}")
return
record_divergence(f"returns {result.text!r}")Those rows show note in the matrix, and matrix.json carries the observed
behaviour for each engine.
| Cell | Meaning |
|---|---|
pass |
Behaved as tier 1 or tier 2 requires |
FAIL |
Did not. This is a bug in the engine |
note |
Tier 3. What it did is recorded in matrix.json, with no judgement |
skip |
Feature not supported, or engine unreachable. Not a finding |
ERR |
The engine errored or was unreachable mid-run. An environment problem |
ReferenceEngine runs the model through HuggingFace transformers, on CPU, in
float32, batch size one, with no custom kernels, no quantisation and no fused
attention. It is the slowest correct thing we can build, and it makes none of
the optimisations that cause divergence.
Its authority is bounded:
- Tier 1: the reference implements the documented behaviour. If it does not, that is a bug in the reference, and it gets fixed
- Tier 2: the reference is strong evidence
- Tier 3: the reference is just one more data point, with no special status
Being able to say "the reference is wrong here" is a feature. If you think it is, open an issue.
Floating-point comparisons use a documented tolerance in the test itself, never a global default.
Token-identity comparisons have no tolerance. Either the same tokens came out or they did not.
A published matrix is meaningless without exact versions. Every result records the engine version, the model id, and the quantisation. A result from a different engine version is a different result, not an update.
The test stays. It becomes a regression guard, which is the second-most useful thing a conformance suite does.