{"slug": "show-hn-training-a-sudoku-solver-from-scratch-on-jetson-nano", "title": "Show HN: Training a sudoku solver from scratch on Jetson Nano", "summary": "A developer released a from-scratch Sudoku solver built on a Looped MLP-Mixer architecture, trained on the sapientinc/sudoku-extreme dataset and runnable on an NVIDIA Jetson Nano via JetPack Docker. The model reuses a shared MLP-Mixer stack across an outer commit loop with inner mixer iterations and a learned halt head, and ships with download-dataset, train, eval, and resume entry points under an MIT License. Each run writes history.json, checkpoints, and per-puzzle trajectory JSON to runs/<run-id>/, with a local viz server charting train/val loss, cell and puzzle accuracy, halt rate, and accuracy by rating group.", "body_md": "**Looped MLP-Mixer** sudoku solver with an outer commit loop, inner mixer iterations, and a learned halt head, trained from scratch on [sapientinc/sudoku-extreme](https://huggingface.co/datasets/sapientinc/sudoku-extreme).\n\nInstall with `uv sync`, download the dataset (~798 MB), train, and open the local viz server. Minimal path:\n\n```\nuv sync\nuv run download-dataset\nuv run train \\\n  --min-rating 0 --max-rating 0 \\\n  --max-samples 100 --epochs 30 \\\n  --dim 512 --num-blocks 2 \\\n  --inner-iters 5 --train-max-outer-iters 10 \\\n  --eval-max-outer-iters 10 \\\n  --train-batch-size 8 --batches-per-epoch 100\nuv run python -m http.server 8000\n```\n\nOpen [http://localhost:8000/viz/](http://localhost:8000/viz/). Serve from the **repo root**.\n\nShared MLP-Mixer stack reused across an outer commit loop: each outer step applies the previous prediction, runs inner mixer iterations on encoded grid state, and updates detached cell memory. A halt head learns when the grid matches the solution. Training uses parallel puzzle slots with optional augmentations and partial ground-truth reveal.\n\nEntry points: `download-dataset`, `train`, `eval`, `resume`. Eval supports test-time restarts and one-dimensional compute sweeps (inner steps, outer commits, tries). PyTorch profiler hooks are available on `train`.\n\nEach run writes `history.json`, checkpoints, and per-puzzle trajectory JSON under `runs/<run-id>/`. The viz page charts train/val metrics and plays back outer-commit trajectories.\n\nTrain and validation metrics per epoch: loss, cell/puzzle accuracy, halt rate, and accuracy by rating group.\n\nTrajectory player for one puzzle: model input and output at each outer commit until halt or max steps.\n\nDocker setup for training and eval on NVIDIA Jetson (JetPack). Source is bind-mounted; rebuild only when dependencies change.\n\nMIT License.", "url": "https://wpnews.pro/news/show-hn-training-a-sudoku-solver-from-scratch-on-jetson-nano", "canonical_source": "https://github.com/romainzimmer/discrete-reasoning", "published_at": "2026-09-14 12:54:58+00:00", "updated_at": "2026-09-14 13:20:16.687813+00:00", "lang": "en", "topics": ["machine-learning", "neural-networks", "ai-research", "developer-tools"], "entities": ["Looped MLP-Mixer", "NVIDIA Jetson Nano", "JetPack", "sapientinc/sudoku-extreme", "PyTorch", "Hugging Face"], "alternates": {"html": "https://wpnews.pro/news/show-hn-training-a-sudoku-solver-from-scratch-on-jetson-nano", "markdown": "https://wpnews.pro/news/show-hn-training-a-sudoku-solver-from-scratch-on-jetson-nano.md", "text": "https://wpnews.pro/news/show-hn-training-a-sudoku-solver-from-scratch-on-jetson-nano.txt", "jsonld": "https://wpnews.pro/news/show-hn-training-a-sudoku-solver-from-scratch-on-jetson-nano.jsonld"}}