Projects

29 February 2024 | 15 min read | tags: Chess LLM XAI Attention Training

Training GPT-2 on Stockfish Games

Training GPT-2 on Stockfish Games

I trained a GPT-2 model on Stockfish self-played games in the most naive way, with no search, and it can play decently. The model is trained to output the next move given the FEN string of the board (single state). While I present some gotchas and caveats, the results are quite acceptable for the amount of work and computing invested. I also present a basic attention visualiser parsing the attention of the text tokens into the board.