CoolFace
Modelpublic

Alogotron/GameTheory-Formulator-Model

sourceHugging Faceapache-2.0updated 4mo agoView on Hugging Face
0likes17downloads
Model Card

๐ŸŽฏ GameTheory-Formulator-Model

Phase 3 of the Alogotron Game Theory AI Pipeline โ€” A QLoRA adapter that teaches language models to translate real-world scenarios into formal game theory formulations.

Overview

PropertyValue
Base ModelQwen/Qwen2.5-7B-Instruct
MethodQLoRA (4-bit NF4 quantization + LoRA)
TaskReal-world scenario โ†’ Formal game theory formulation
DatasetAlogotron/GameTheory-Formulator (1,215 examples)
TrainingSFT, 1 epoch, ~24 minutes on 2x RTX 3090
Eval Accuracy100.0% valid formulations on held-out set

The Alogotron Game Theory Pipeline

This model is part of a 3-phase training pipeline:

PhaseModelTaskMethod
Phase 1GameTheory-SolverSolve formal GT problemsSFT on 2,913 problems โ†’ 94% accuracy
Phase 2GameTheory-ReasonerEnhanced reasoningGRPO on same dataset
Phase 3GameTheory-Formulator (this model)Real-world โ†’ formal GTSFT on 1,215 formulation problems

What This Model Does

Given a real-world scenario (business competition, political negotiation, security analysis, etc.), this model:

  1. 1.๐Ÿ“‹ Formulation Steps โ€” Walks through the reasoning to identify the game structure
  2. 2.๐ŸŽฎ Formal Game Model โ€” Identifies players, strategies, payoffs, information structure, and solution concept
  3. 3.๐Ÿงฎ Solution โ€” Solves the formulated game (Nash equilibrium, dominant strategies, etc.)
  4. 4.๐ŸŒ Real-World Interpretation โ€” Translates the mathematical solution back to actionable insights

Training Details

QLoRA Configuration

ParameterValue
LoRA rank (r)32
LoRA alpha64
Target modulesqproj, kproj, vproj, oproj, gateproj, upproj, down_proj
Quantization4-bit NF4 with double quantization
Trainable params80.7M / 7.7B (1.05%)

Training Hyperparameters

ParameterValue
Epochs1
Batch size (per device)2
Gradient accumulation4
Effective batch size16
Learning rate5e-5 (cosine schedule)
Optimizerpagedadamw8bit
Max sequence length2048
PackingEnabled
Gradient checkpointingEnabled
Hardware2x NVIDIA RTX 3090 (24GB each)

Training Metrics

MetricValue
Train loss1.0992
Eval loss0.8492
Training time24.3 minutes
Dataset size1215 examples
Train split1093 examples
Eval split122 examples

Evaluation Results

Tested on 20 held-out examples across 6 domains and 3 difficulty levels:

MetricScore
Valid Formulations100.0%
All sections present100.0%
All GT elements identified100.0%
Avg response length1821 chars

By Domain

DomainValid
Business8/8 (100%)
Security5/5 (100%)
Politics2/2 (100%)
Auctions2/2 (100%)
Technology2/2 (100%)
Social1/1 (100%)

By Difficulty

DifficultyValid
Easy5/5 (100%)
Medium9/9 (100%)
Hard6/6 (100%)

Usage

With PEFT + Transformers

python
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
from peft import PeftModel
import torch

# Load base model in 4-bit
bnb_config = BitsAndBytesConfig(
    load_in_4bit=True,
    bnb_4bit_quant_type="nf4",
    bnb_4bit_compute_dtype=torch.bfloat16,
    bnb_4bit_use_double_quant=True,
)

base_model = AutoModelForCausalLM.from_pretrained(
    "Qwen/Qwen2.5-7B-Instruct",
    quantization_config=bnb_config,
    device_map="auto",
)
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-7B-Instruct")

# Load the Formulator adapter
model = PeftModel.from_pretrained(base_model, "Alogotron/GameTheory-Formulator-Model")
model.eval()

# Create a prompt
messages = [
    {"role": "system", "content": "You are a game theory expert. Given a real-world scenario, formulate it as a formal game theory model. Identify the players, strategies, payoffs, and information structure. Then solve the game and interpret the results."},
    {"role": "user", "content": "Two coffee shops on the same street must decide whether to offer a loyalty program. If both offer it, they split customers evenly but incur costs. If neither offers it, they split evenly with no extra cost. If only one offers it, that shop attracts 70% of customers."}
]

text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors="pt").to(model.device)

with torch.no_grad():
    outputs = model.generate(**inputs, max_new_tokens=1024, temperature=0.3, top_p=0.9)

response = tokenizer.decode(outputs[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True)
print(response)

Example Output

Input Scenario:

Two airline companies, Stellar and Haven, each control roughly half the market. They are independently deciding their pricing for the upcoming quarter...

Model Output:

## Formulation Steps Step 1 - Stellar and Haven are each making pricing decisions that directly affect each other's profits... Step 2 - Players: Stellar and Haven... Step 3 - Strategies: Each firm can either 'Maintain Prices' or 'Cut Prices'... ## Formal Game Model Game Type: Simultaneous Players: Stellar, Haven Strategies: Maintain Prices, Cut Prices Payoffs: Both Maintain: (54, 54), Both Cut: (18, 18)... Solution Concept: Nash Equilibrium ## Solution Both firms will cut prices. Cutting is a dominant strategy for each... ## Real-World Interpretation This is a classic Prisoner's Dilemma. Both companies rationally choose to cut prices, resulting in lower profits than cooperation would yield...

Dataset

Trained on Alogotron/GameTheory-Formulator โ€” 1,215 expert-crafted formulation problems across 6 domains:

  • โ€”Business (290): Pricing, market entry, production, R&D, supply chain
  • โ€”Security (230): Cybersecurity, threat modeling, defense allocation
  • โ€”Politics (195): Elections, negotiations, voting, international relations
  • โ€”Social (190): Social dilemmas, public goods, coordination, trust
  • โ€”Technology (165): Platform competition, standards, adoption, innovation
  • โ€”Auctions (145): First-price, second-price, common value, combinatorial

Related Models & Datasets

ResourceLink
Phase 1: Solver ModelAlogotron/GameTheory-Solver
Phase 2: Reasoner ModelAlogotron/GameTheory-Reasoner
Solver DatasetAlogotron/GameTheory-Bench
Formulator DatasetAlogotron/GameTheory-Formulator

Limitations

  • โ€”Trained on synthetic formulation data; may not handle all real-world edge cases
  • โ€”Formulation quality depends on scenario clarity and completeness
  • โ€”Best suited for classical game theory formulations (simultaneous, sequential, auctions)
  • โ€”Does not cover cooperative game theory or mechanism design (yet)

Citation

bibtex
@misc{alogotron-formulator-2025,
  title={GameTheory-Formulator-Model: Real-World Scenario to Game Theory Formulation},
  author={Alogotron},
  year={2025},
  publisher={HuggingFace},
  url={https://huggingface.co/Alogotron/GameTheory-Formulator-Model}
}

๐Ÿ“š Related Work

  • โ€”"Game Theory Meets Large Language Models: A Systematic Survey" โ€” IJCAI 2025 (arxiv: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).
  • โ€”GT-HarmBench โ€” Game-theoretic framing for AI safety benchmarking (arxiv:2602.12316).

๐Ÿ“„ Citation

bibtex
@model{alogotron_gametheory_formulator_model_2026,
  author    = {Alogotron},
  title     = {GameTheory-Formulator-Model: Real-World Scenario to Formal Game Theory},
  year      = {2026},
  publisher = {Hugging Face},
  url       = {https://huggingface.co/Alogotron/GameTheory-Formulator-Model},
  note      = {Phase 3 formulation adapter achieving 100\% valid formulation rate}
}