Skip to main content
An RL environment rewards kernels for Qwen/Qwen3.8-27B@1.0:layers[*].input_norm when they match a PyTorch reference under torch.allclose, on random inputs. Three rollouts each cut a corner, and all three earn the reward.
theformalera verify fails all three rollouts; explain F-0002 shows the counterexample and the suspect store with `* w`

Why the gate holds

  • The reward check compares against a reference written by a person. rollout_0412 matches the reference exactly, because the reference has the same bug. The spec is not a reference implementation: it is the definition, with Qwen3.8’s (1 + w) spelled out.
  • A dropped mask that happens to read padding is invisible to a value comparison. The verifier checks every address the kernel touches against the tensor’s allocation.
  • A tolerance large enough for bf16 kernels is large enough for a partial reduction to hide in. Real-number equivalence has no tolerance.
Speed was not measured here. The point is that the reward check cannot tell these kernels from a correct one. See RL environment to use the verifier as the reward gate.