<model key> is one of the supported models; theformalera-conformance models lists them. Without an implementation argument, the official Hugging Face class is checked.
What the implementation must provide
The implementation is a Python file (path/to/model.py, optionally :Name) or a module path (package.module:attr). It can be written in either of two styles.
- Hugging Face compatible
- Adapter
An The complete file is about 100 lines and has no dependency on
nn.Module subclass that:- is constructible as
cls(config)from atransformersconfiguration; - uses Hugging Face parameter names in
state_dict()(model.layers.0.self_attn.q_proj.weight, …); - returns logits from
forward(input_ids=...): a tensor, a dict with"logits", or an object with.logits.
MODEL_CLASS, or define exactly one class whose name ends in ForCausalLM or ForConditionalGeneration.For layer-by-layer localisation, also accept output_hidden_states=True and return hidden_states: the embedding output first, then one tensor per layer, with the last one taken after the final norm (the Hugging Face convention).qwen3_minimal.py
transformers modeling code: examples/conformance/implementations/qwen3_minimal.py.The implementation is built and run on the CPU, in float64, with every float32 request promoted to float64. Do not hard-code
torch.float32 or bfloat16 casts that cannot be promoted, such as dtype arguments to custom CUDA ops.Options
The exit status is 0 only for VERIFIED.
Reading a failure
This implementation applies RoPE to interleaved pairs (GPT-J style) instead of rotate-half:1e-12, yellow up to 1e-9, and red above. “First divergence: layer 0” means the embedding agrees and layer 0 is the first block that does not, so the bug is inside the decoder layer.
The bundled examples, all against the reduced profile:
The last row shows localisation working in a hybrid model. Layers 0–2 are Gated DeltaNet and agree with the spec; layer 3 is the first full-attention layer, where the gate is used.
A misplaced ε changes the result by only
1e-6, which a torch.allclose test would pass. It is still a different function, and it fails at the default rtol of 1e-9.
