Views
No views yet

hidden=128, heads=4,
blocks=4; per-cell token + 2-D positional + 3x3-box embeddings, plus a timestep.0 = empty / [MASK], 1..9 = digits. The solver
clamps the given clues and only fills the blanks.1import torch
2from nonet.hub import load_solver # pip install git+https://github.com/tchauffi/nonet
3
4solver = load_solver("tchauffi/sudoku-dit") # downloads model.safetensors + config.json
5puzzle = "402609001000000000700002084000080500030005007004060930008021406005000000147030000"
6x = torch.tensor([[int(c) for c in puzzle]]) # (1, 81), 53 blanks
7solution = solver.solve(x, conf_threshold=0.999) # adaptive reveal (recommended)
8# fixed-budget alternative: solver.solve(x, num_steps=81)
9
10"".join(map(str, solution[0].tolist()))
11# 482659371613874295759312684971483562836295147524167938398721456265948713147536829| metric | value |
|---|---|
| valid solutions | 99.8 % |
| exact match vs reference | 94.3 % |
| avg reveal steps / puzzle | 3.6 |
exact_match is lower than valid only because the dataset's
high-blank puzzles aren't always uniquely solvable, so the model may return a different
valid grid.Ritvik19/Sudoku-Dataset
(~17 M puzzles), tokenized on the fly.