← Back to writing

I Fine-Tuned a Model on a Windows PC in My House, Late at Night

AIChessEngineeringSolo Builder

At midnight on a Friday, I kicked off a job to analyze 2,000 chess games on a Windows PC sitting in my house.

Not a cloud GPU. Not a cluster. A box with an RTX 5060 and 8GB of VRAM, running Ubuntu inside WSL2.

That night I had a fine-tuned model. The loss curve looked beautiful. And it was lying to me.

This is the story of that night — and why it matters that the whole thing fit into late nights instead of lost weeks.

---

Why

My kids play competitive chess. Hundreds of games each, online and over the board.

A chess engine can tell you a move was bad. "+2.4" means nothing to a 9-year-old.

I wanted something that could look at my son's games and *narrate* what went wrong — in a coach's voice, the way a human coach talks. Not an evaluation. An explanation.

The architecture I landed on: let the engine do what it's provably good at — finding the mistakes — and let a small fine-tuned model do the narrating. Stockfish finds. The model explains.

I also had a personal goal: I wanted to learn the open-weights training workflow myself, on my own hardware, with my kids' actual games. No abstract tutorial dataset.

The machine

The box: an HP Windows PC, RTX 5060 with 8GB VRAM, WSL2 Ubuntu. I call it viareal-server. The "serverbox."

Tuned for the job in `~/.wslconfig`: `vmIdleTimeout=-1` so the VM never sleeps mid-run, 26GB of memory, 8GB of swap, NAT networking.

Getting a shell (the unglamorous part)

WSL2's sshd on port 2222, systemd enabled so it survives reboots. On the Windows side, a cloudflared quick tunnel: `cloudflared tunnel --url tcp://localhost:2022`. From the other end: `cloudflared access tcp` chained into `ssh -p 2223 ram@127.0.0.1`.

The wrinkle nobody warns you about: quick-tunnel URLs are ephemeral. Every restart, the address changes and the whole handshake gets redone.

The outage

Mid-setup, WSL lost outbound internet entirely. Everything downstream broke.

Here's the honest part: the AI guiding me through the setup — that was me working with an assistant — couldn't diagnose it. I took the symptoms to ChatGPT instead. It found the root cause in minutes: the Windows host had lost its default route. Once Windows got `0.0.0.0/0 → 10.0.0.1` back, WSL recovered immediately.

Then the follow-up question that actually mattered: will this survive a reboot? DHCP said yes — the route gets reacquired automatically. And a scheduled task refreshing the `2022 → WSL:2222` portproxy after sign-in made the SSH forwarding survive restarts and WSL IP changes too.

Two AIs, one night. The first one wrote the playbook; the second one unblocked the networking chapter. I'm not precious about which model does what — I just want the thing working.

The stack

`~/llm-training` on the box: uv, Python 3.11, Unsloth. An nvidia-smi sanity check to confirm the 5060 was visible inside WSL. Weights & Biases for tracking — every run logged, not eyeballed in a terminal.

The data

Stockfish 17.1, depth 18, 150-centipawn threshold.

My son's 98 Chess.com games → 40 mistakes from the first 15 analyzed. My daughter's 100 Lichess games → 48 from 30. Each record: the FEN, the move played, the engine's best move, eval before and after.

Then the ambitious one: a stockpile of 2,000 Lichess games, bulk analysis kicked off around midnight. It died overnight at game 447. Got resumed. (3,692 mistakes banked before it fell over — the corpus kept growing.)

The training set

120 synthetic examples. Twenty chess-coaching Q&As, repeated.

Deliberately tiny. This was a shakedown run, not a production dataset.

The smoke test

Qwen3-0.6B in 4-bit, LoRA rank 8. Twenty steps in about nineteen seconds. Loss: 6.311 → 1.642.

The whole loop — load, quantize, attach LoRA, train — proven on a consumer GPU in less time than it takes to microwave dinner.

The real run

Qwen3-4B in 4-bit, LoRA rank 16. 33,030,144 trainable parameters — 0.81% of the model.

150 steps. 10 epochs. About three minutes.

Loss: 4.089 → 0.03986.

A curve that clean, on 120 repeated examples, in three minutes, is not learning. It's memorization. The model didn't become a chess coach that night — it became a parrot with 33 million adjustable feathers.

And that was fine. The run was never about the artifact. It was about proving the loop: engine → data → train → adapters, end to end, on one 8GB card, in my house, past midnight.

The point

Here's what I keep coming back to.

Every step of that night — the quantization setup, the WSL networking, the game-download-and-parse pipeline across two chess APIs, the LoRA config, even diagnosing whether a loss curve means learning or memorizing — used to be a multi-day affair. Docs, forum threads, GitHub issues, Stack Overflow archaeology. Each one a potential lost weekend.

It wasn't effortless. It was late-night effort, with a real outage in the middle that needed a second AI to unstick. But it *fit* into late nights. The work became schedulable: an evening here, a midnight bulk-analysis kickoff there.

That's the actual story of the LLM era for builders. Not that the machines do the work for you. That the work around the work — the setup, the debugging, the glue — compressed from days into hours. The idea is still yours. The machine is still yours. The taste in what "good" looks like is still yours.

The loop is proven. Next: real games instead of synthetic Q&As, and a model that actually earns the word "coach."

---

*Have you run a training loop on consumer hardware? What broke for you — the stack, the networking, or the data?*

Comments