Downloads · 30 days
0
banachspace/Qwen-2.5-3B-Instruct-TicTacToe-GRPO
Qwen-2.5-3B-Instruct-TicTacToe-GRPO is a machine learning model from banachspace. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This model was trained to play Tic-Tac-Toe using reinforcement learning through ART (AI Reinforcement Training).
Downloads · 30 days
0
Access
Public
Updated May 11, 2025
Repo size
71.4 MB
Likes
0
Public
Click a slice to open those files.
.safetensors59.9 MB · 79%
From the Hugging Face model README
This model was trained to play Tic-Tac-Toe using reinforcement learning through ART (AI Reinforcement Training).
from transformers import AutoModelForCausalLM, AutoTokenizer
# Load model and tokenizer
model = AutoModelForCausalLM.from_pretrained("banachspace/Qwen-2.5-3B-Instruct-TicTacToe-GRPO")
tokenizer = AutoTokenizer.from_pretrained("banachspace/Qwen-2.5-3B-Instruct-TicTacToe-GRPO")
# Example usage for Tic-Tac-Toe
messages = [
{"role": "system", "content": "You are a tic-tac-toe player. Return your move as an XML object like <move>A1</move>. You are the x symbol."},
{"role": "user", "content": " 1 2 3\nA _ | _ | _\nB _ | _ | _\nC _ | _ | _"}
]
inputs = tokenizer.apply_chat_template(messages, return_tensors="pt")
outputs = model.generate(inputs, max_new_tokens=50)
response = tokenizer.decode(outputs[0][inputs.shape[1]:], skip_special_tokens=True)
print(f"AI move: {response}")
The model was trained using generative reinforcement learning on the task of playing Tic-Tac-Toe optimally.