Downloads · 30 days
2
6% of all-time downloads
Sph3inxz/ebm-sudoku-solver
ebm-sudoku-solver is a machine learning model from Sph3inxz. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for pytorch. The card lists the license as mit.
Energy-based Sudoku solver trained with contrastive learning on puzzle/solution pairs.
Downloads · 30 days
2
6% of all-time downloads
All-time downloads
32
Public
Repo size
6.3 MB
Likes
2
Public
Click a slice to open those files.
.pt3.1 MB · 100%
From the Hugging Face model README
Energy-based Sudoku solver trained with contrastive learning on puzzle/solution pairs.
KonaEnergyModel)kona_ebm_best.ptClone the solver code from GitHub and download this checkpoint:
pip install torch typer tqdm numpy huggingface_hub
hf download Sph3inxz/ebm-sudoku-solver kona_ebm_best.pt --local-dir checkpoints
Solve a puzzle:
python -m kona_sudoku.main solve data/my_puzzle.txt `
--checkpoint checkpoints/kona_ebm_best.pt `
--device cuda `
--max-steps 3000 `
--langevin
Recommended solver flags:
--max-steps 3000--langevin--lambda-learned 0.1--lambda-constraints 1.0Trained on train_large.txt with AdamW, contrastive EBM loss (margin=2.0), and MCMC negatives.