Downloads · 30 days
14
33% of all-time downloads
tawer12/qwen3-4b-sudoku-missing16-20-binary-rl
qwen3-4b-sudoku-missing16-20-binary-rl is a text generation model from tawer12. Use it when you need the model to write or continue text. It is set up for peft.
LoRA adapter for Qwen/Qwen3-4B-Instruct-2507, trained to solve Sudoku by emitting linear traces with row updates.
Downloads · 30 days
14
33% of all-time downloads
All-time downloads
42
Public
Repo size
23.2 MB
Likes
0
Public
Click a slice to open those files.
.safetensors11.8 MB · 51%
From the Hugging Face model README
LoRA adapter for Qwen/Qwen3-4B-Instruct-2507, trained to solve Sudoku by emitting linear traces with row updates.
The adapter weights are 11,815,792 bytes (11.82 MB). The tokenizer is included. Loading this adapter also requires the separate base model. The preceding SFT adapter is already incorporated into these updated adapter weights; it does not need to be downloaded separately.
rl_train_missing16_20_k600_linear_row_markdown_binary_rl.trivial_missing1_15_linear_row_markdown_sft adapter.rl_train_missing16_20_k600.jsonl.5e-6; gradient accumulation: 8; seed: 42.q_proj and v_proj.The full saved training configuration is in resolved_linear_binary_rl_config.json. Its relative paths identify the original local training setup. Training data and the base model weights are not bundled.
Install the dependencies in a Python environment. A GPU is recommended for running the 4B base model.
pip install torch 'transformers>=5.4.0' 'peft>=0.18.1' accelerate huggingface_hub
hf download tawer12/qwen3-4b-sudoku-missing16-20-binary-rl --local-dir sudoku-adapter
python sudoku-adapter/inference.py
To supply your own board, pass --puzzle followed by 81 digits in row-major order, using 0 for each empty cell.
The included script downloads the base model, loads this adapter with PeftModel.from_pretrained, and uses the original training prompt. The input board is a markdown table with rows A–I, columns 1–9, and X for empty cells. The expected output uses STATE, FILL, Updated Row, SOLVED, and FINAL_STATE. Prompts are tokenized directly, without applying a chat template, matching training and evaluation.
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
repo_id = "tawer12/qwen3-4b-sudoku-missing16-20-binary-rl"
tokenizer = AutoTokenizer.from_pretrained(repo_id)
base = AutoModelForCausalLM.from_pretrained(
"Qwen/Qwen3-4B-Instruct-2507", dtype="auto", device_map="auto"
)
model = PeftModel.from_pretrained(base, repo_id).eval()
Use linear_row_markdown_trace_instruction.txt to construct the prompt; inference.py shows the complete formatting and generation steps.
This upload documents the saved training run. It does not report a completed held-out evaluation for this checkpoint. Generated solutions should be checked against Sudoku rules and the original clues.