"""Reproduce the published example and numerical checks on CPU; no weights download."""
import torch
from model import TinyDecoder, verify

torch.set_num_threads(1)
torch.manual_seed(0)
torch.use_deterministic_algorithms(True)
inputs_rng = torch.Generator(device="cpu").manual_seed(0)
with torch.no_grad():
    model = TinyDecoder().cpu().eval()
    inputs = [
        torch.ones((1, 6), dtype=torch.int64),
    ]
    output = model(*inputs)
assert list(output.shape) == [1,6,32]
assert torch.isfinite(output).all()
print("Verified output shape:", list(output.shape))
for check in verify():
    print("Passed:", check)
