Downloads · 30 days
0
MSweetbread/qwen2.5-1.5b-chess-qlora
qwen2.5-1.5b-chess-qlora is a machine learning model from MSweetbread. 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 transformers.
This model was made as part of the course: Transformers: Applications in Language and Communication which is part of the Applied Data Science Master at Utrecht University. More specifically, this model was made as par…
Downloads · 30 days
0
Access
Public
Updated Mar 6, 2026
Repo size
28.9 MB
Likes
0
Public
Click a slice to open those files.
.json11.4 MB · 57%
From the Hugging Face model README
This model was made as part of the course: Transformers: Applications in Language and Communication
which is part of the Applied Data Science Master at Utrecht University.
More specifically, this model was made as part of the midterm assignment of this course.
For this assignment, only a free tier of Google Colab was allowed to train your model.
Additionally, the use of a pre-trained chess LLM was not permitted.
A QLoRA fine-tuned version of the Qwen2.5-1.5B LLM for chess move prediction. Given a board state in the Forsyth-Edwards Notation (FEN) notation, the model outputs a move in the Universal Chess Interface (UCI) format.
Two datasets were combined (239,077 total samples):
| Dataset | Samples | Share |
|---|---|---|
| Lichess/chess-position-evaluations (depth ≥ 16) | 218,217 | 91.3% |
| Synthetic Stockfish games (1,000 simulated games) | 20,860 | 8.7% |
Lichess entries were filtered to engine depth ≥ 16 to ensure high-quality
move annotations, at the cost of reduced dataset size.
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-1.5B")
model = PeftModel.from_pretrained(base, "")
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-1.5B")
fen = "rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq e3 0 1"
inputs = tokenizer(fen, return_tensors="pt")
output = model.generate(**inputs, max_new_tokens=8)
print(tokenizer.decode(output[0], skip_special_tokens=True))