Text Generation
PEFT
Safetensors
game-theory
grpo
reinforcement-learning
reasoning
qwen2.5
lora
conversational
Eval Results (legacy)
Instructions to use Alogotron/GameTheory-Reasoner with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Alogotron/GameTheory-Reasoner with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("/home/beta1/gt-training/phase1_merged") model = PeftModel.from_pretrained(base_model, "Alogotron/GameTheory-Reasoner") - Notebooks
- Google Colab
- Kaggle
File size: 7,014 Bytes
2a6d34f f8f2ea7 2a6d34f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 | ---
library_name: peft
base_model: Qwen/Qwen2.5-7B-Instruct
tags:
- game-theory
- grpo
- reinforcement-learning
- reasoning
- qwen2.5
- lora
- peft
license: apache-2.0
datasets:
- Alogotron/GameTheory-Bench
metrics:
- accuracy
pipeline_tag: text-generation
model-index:
- name: GameTheory-Reasoner
results:
- task:
type: text-generation
name: Game Theory Problem Solving
dataset:
name: GameTheory-Bench
type: Alogotron/GameTheory-Bench
metrics:
- name: Exact Accuracy
type: accuracy
value: 94.0
verified: true
---
# GameTheory-Reasoner (GRPO Phase 2)
**A game theory reasoning model trained with Group Relative Policy Optimization (GRPO) and verifiable reward functions.**
This is a LoRA adapter trained on top of the [Phase 1 Solver](https://huggingface.co/Alogotron/GameTheory-Solver) (which itself is fine-tuned from [Qwen/Qwen2.5-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-7B-Instruct)). It represents Phase 2 of a two-phase training pipeline designed to build a strong game theory problem solver with enhanced reasoning capabilities.
## Training Pipeline
```
Qwen2.5-7B-Instruct (base)
|
+-- Phase 1: Supervised Fine-Tuning (QLoRA)
| +-- GameTheory-Solver adapter
| +-- Merged into: phase1_merged/
|
+-- Phase 2: GRPO Reinforcement Learning
+-- GameTheory-Reasoner adapter (this model)
Trained on top of phase1_merged
```
## Benchmark Results (GameTheory-Bench, n=50)
### Overall Performance
| Metric | Base (Qwen2.5-7B) | Solver (Phase 1) | **Reasoner (Phase 2)** |
|---|---|---|---|
| **Exact Accuracy** | 82.0% | 94.0% | **94.0%** |
| **Partial Accuracy** | 82.0% | 94.0% | **94.0%** |
| Format Quality | 0.92 | 0.70 | 0.70 |
| **Reasoning Quality** | 0.53 | 0.51 | **0.54** |
| Avg Response Length | 523 words | 169 words | 181 words |
### Performance by Difficulty
| Difficulty | Base | Solver | **Reasoner** |
|---|---|---|---|
| Easy (n=9) | 100.0% | 88.9% | 88.9% |
| Medium (n=23) | 87.0% | 95.7% | 95.7% |
| Hard (n=18) | 66.7% | 94.4% | **94.4%** |
### Performance by Category
| Category | Base | Solver | **Reasoner** |
|---|---|---|---|
| normal_form_2x2 | 100.0% | 80.0% | 80.0% |
| normal_form_3x3 | 80.0% | 60.0% | 60.0% |
| normal_form_3x4 | 100.0% | 100.0% | 100.0% |
| normal_form_4x4 | 100.0% | 100.0% | 100.0% |
| zero_sum | 100.0% | 100.0% | 100.0% |
| sequential_game | 100.0% | 100.0% | 100.0% |
| auction_theory | 80.0% | 100.0% | 100.0% |
| bayesian_game | **0.0%** | **100.0%** | **100.0%** |
| cooperative_game | 100.0% | 100.0% | 100.0% |
| mechanism_design | 60.0% | 100.0% | 100.0% |
### Key Findings
- **+12% accuracy** over base Qwen2.5-7B-Instruct (82% to 94%)
- **Massive gains on hard problems**: 66.7% to 94.4% (+27.7%)
- **Bayesian games**: 0% to 100% (the most dramatic improvement)
- **Mechanism design**: 60% to 100%
- **Reasoning quality improved** by GRPO: 0.51 (Solver) to 0.54 (Reasoner)
- **Concise outputs**: ~65% shorter than base model while being more accurate
## Training Details
### GRPO Configuration
| Parameter | Value |
|---|---|
| Method | Group Relative Policy Optimization (GRPO) |
| Steps | 750 |
| Training Time | ~8 hours on RTX 3090 |
| LoRA Rank (r) | 32 |
| LoRA Alpha | 64 |
| Learning Rate | 5e-6 |
| KL Beta | 0.04 |
| Num Generations | 4 |
| Max Completion Length | 1024 |
### Reward Functions (3 verifiable rewards)
| Reward | Range | Description |
|---|---|---|
| **Accuracy** | 0.85 to 1.0 | Verifies correctness against gold answers using domain-specific comparators |
| **Format** | 0.64 to 0.82 | Checks structured output format (think/answer tags) |
| **Reasoning** | 0.55 to 0.79 | Evaluates reasoning chain quality and mathematical notation |
| **Total** | 2.36 to 2.55 | Combined reward signal |
### Training Dynamics
| Metric | Value |
|---|---|
| Final Loss | ~0.0002 |
| KL Divergence | 0.004 to 0.015 |
## Usage
### Loading the Model
This adapter requires a two-step loading process since it was trained on top of the Phase 1 merged model:
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
# Step 1: Load the Phase 1 merged model as base
base_model = AutoModelForCausalLM.from_pretrained(
"Alogotron/GameTheory-Solver", # or your local phase1_merged path
torch_dtype=torch.bfloat16,
device_map="auto",
)
# Step 2: Apply the GRPO Reasoner adapter
model = PeftModel.from_pretrained(base_model, "Alogotron/GameTheory-Reasoner")
model.eval()
# Load tokenizer
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-7B-Instruct")
```
### Inference
```python
system_prompt = (
"You are a game theory expert. Solve the following problem step by step. "
"Show your reasoning clearly, then provide your final answer."
)
problem = "Consider a 2-player game with the following payoff matrix: " "L: (3,2) (1,4), R: (2,3) (4,1). Find all Nash Equilibria."
messages = [
{"role": "system", "content": system_prompt},
{"role": "user", "content": problem},
]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.no_grad():
output = model.generate(**inputs, max_new_tokens=1024, do_sample=False)
response = tokenizer.decode(output[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True)
print(response)
```
## Related Resources
- **Dataset**: [Alogotron/GameTheory-Bench](https://huggingface.co/datasets/Alogotron/GameTheory-Bench) - 2,913 game theory problems
- **Phase 1 Model**: [Alogotron/GameTheory-Solver](https://huggingface.co/Alogotron/GameTheory-Solver) - SFT fine-tuned solver
- **Demo**: [Game Theory Solver Space](https://huggingface.co/spaces/Alogotron/GameTheory-Solver)
---
## ๐ Related Work
- **"Game Theory Meets Large Language Models: A Systematic Survey"** โ IJCAI 2025 ([arxiv:2502.09053](https://arxiv.org/abs/2502.09053)) โ The definitive survey on game theory ร LLMs, covering RLHF alignment, multi-agent interactions, and strategic reasoning.
- **DeepMind SHOR-PSRO** (April 2026) โ LLM-driven rewriting of game theory algorithms that outperformed hand-designed baselines ([MarkTechPost](https://www.marktechpost.com/2026/04/03/google-deepminds-research-lets-an-llm-rewrite-its-own-game-theory-algorithms-and-it-outperformed-the-experts/)).
- **GT-HarmBench** โ Game-theoretic framing for AI safety benchmarking ([arxiv:2602.12316](https://arxiv.org/abs/2602.12316)).
## ๐ Citation
```bibtex
@model{alogotron_gametheory_reasoner_2026,
author = {Alogotron},
title = {GameTheory-Reasoner: GRPO-Trained Game Theory Reasoning Model},
year = {2026},
publisher = {Hugging Face},
url = {https://huggingface.co/Alogotron/GameTheory-Reasoner},
note = {Phase 2 GRPO adapter with +6\% reasoning quality improvement}
}
```
## License
Apache-2.0
|