Skip to main content
conformance ✓ spec 1.0 granite The Model Spec of ibm-granite/granite-4.2-3b in TheFormalEra.Spec.Registry. The constants below are transcribed from its published config.json, and the official transformers.GraniteForCausalLM is checked against them.

At a glance

What to watch for

  • Every layer is full causal attention: 40 query heads, 8 KV heads (5 query heads per KV head), head dim 64.
  • The attention scale is the checkpoint’s attention_multiplier, 1/64, not 1/√64.
  • No q/k norms. RMSNorm weights are applied as w, with ε = 1e-5.
  • RoPE over the full head, θ = 10,000,000. The language-model head is separate from the embedding.

Compute-graph nodes

Use these paths in Spec Keys: ibm-granite/granite-4.2-3b@1.0:layers[*].<node> for per-layer nodes, ibm-granite/granite-4.2-3b@1.0:<node> for the others. Nodes listed twice have different constants in different layers (for example, sliding-window and global attention). A kernel annotated with layers[*].<node> is verified against each variant.

Tensors of the main nodes

Conformance

The official transformers.GraniteForCausalLM agrees with this spec, layer by layer in float64, to a maximum relative error of 2.3e-15 (reduced-width profile, 2 weight draws × 2 lengths). On the published checkpoint, the full-size spec evaluated by the Lean oracle agrees with the official implementation to 5.1e-15 on a real prompt (121.8 s).

Published configuration