Sudoku Solver Pro (9x9)

A powerful transformer-based Sudoku solver designed for high-performance inference on Apple Silicon (via Core ML) and PyTorch. This is the Pro version of the SudoGPT architecture, featuring a deeper 6-layer transformer.

Model Details

  • Architecture: 6-layer Transformer Encoder
  • Embedding Dimension: 256
  • Attention Heads: 8
  • Parameters: 4.77 Million
  • Checkpoints: Included PyTorch (.pt) and Compiled Core ML (.mlmodelc)

Performance (Current)

Evaluated at 170,000 training steps:

  • Solve Rate (AI-Only): 10.5%
  • Cell Blank Accuracy: 85.8%
  • Inference Time (MPS): ~1-5ms

Files in this Repository

  • SudoGPT9x9_Pro_Standalone.pt: Standalone TorchScript model. This can be loaded by pyTorch
  • NeuralSudoku9x9.mlmodelc: Compiled Core ML model for direct use in iOS/macOS apps.
  • SudoGPT9x9.mlpackage: Core ML Model Package for Editing in Xcode.

Usage

PyTorch (Standalone)

import torch

# Load model (No original source code required)
model = torch.jit.load("SudoGPT9x9_Pro_Standalone.pt")
model.eval()

# Inference
# input_tensor: [1, 81] int tensor of Sudoku cells (0-9)
with torch.no_grad():
    logits = model(input_tensor)
    predictions = torch.argmax(logits, dim=-1) + 1

Core ML (Swift)

import CoreML

let config = MLModelConfiguration()
let solver = try NeuralSudoku9x9(configuration: config)

Dataset Info

This model was trained on millions of synthetic Sudoku puzzles using geometric transformations of seed boards to ensure high variety and validity.

License

MIT

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support