Poker Distilbert
DistilBERT fine-tuned to predict the action a poker solver chooses in 6-player No Limit Hold'em. Given a hand written in PokerBench prompt format, it predicts one of five actions: fold, call, check, raise, or bet.
Modellquelle
- Art
- Other
- Dateigröße
- 255 MB
- Basismodell
- distilbert-base-uncased
- Version
- vRevision 81b3c05
- Aktualisiert
- 27. Okt. 2026
- Downloads
- 32
- Quelle
- Hugging Face
Quellenbeschreibung
poker-distilbert
DistilBERT fine-tuned to predict the action a poker solver chooses in 6-player No Limit Hold'em. Given a hand written in PokerBench prompt format, it predicts one of five actions: fold, call, check, raise, or bet.
Code, evaluation scripts, and the full write-up: github.com/jinha1491/poker-multi-agent
Results
PokerBench test split, 11,000 hands:
| Version | Test accuracy | Macro F1 |
|---|---|---|
| Majority class baseline | 25.0% | |
| v1 | 67.28% | 0.652 |
| v2 (current) | 74.39% | 0.712 |
Accuracy by street (v2): preflop 84.8%, flop 73.2%, turn 76.1%, river 71.2%.
On a stratified 300-hand sample of the test set, v2 scored 76.0% against 46.7% for a GPT-4o-mini multi-agent pipeline, with a median latency of 53 ms on CPU against 5.5 s.
Usage
The model only gives reliable predictions on hands in PokerBench's prompt format.
import torch
from transformers import AutoTokenizer, AutoModelForSequenceClassification
repo = "jinha1491/poker-distilbert"
tokenizer = AutoTokenizer.from_pretrained(repo)
model = AutoModelForSequenceClassification.from_pretrained(repo)
labels = ["fold", "call", "check", "raise", "bet"] # class index order
prompt = "..." # one hand in PokerBench's prompt format
inputs = tokenizer(prompt, truncation=True, max_length=256, return_tensors="pt")
with torch.no_grad():
probs = model(**inputs).logits.softmax(dim=-1)[0]
print(labels[probs.argmax()], round(probs.max().item(), 3))
To load the earlier version, pass revision="v1" to both from_pretrained calls.
Training
- Base model:
distilbert-base-uncased - Data: 50,000 hands from a seeded shuffle (seed 42) of the PokerBench training split, 80/20 train/validation split
- Labels: the solver's action with bet sizes removed, giving 5 classes
- 5 epochs, AdamW at 2e-5 with linear warmup, batch size 16, class-weighted cross entropy, 256-token inputs
- Trained on an Apple M-series laptop (MPS)
Versions
v1: trained on the first 50,000 rows of the training split. PokerBench is stored in blocks, so those rows contained no preflop hands, and v1 scored 8.5% on preflop test hands.v2: trained on a shuffled sample with the dataset's real preflop share (11.2%). Same base model and settings. Preflop accuracy went to 84.8%, and overall test accuracy from 67.28% to 74.39%.
Limitations
- Trained on 50,000 of the 563,200 available training hands.
- Bet is the weakest class (F1 0.55). Every missed bet in the test set was predicted as check, so the errors come from the bet or check decision itself.
- PokerBench assigns one label per hand, while solvers often mix between actions in close spots. Some predictions counted as wrong are reasonable plays.
- Inputs that don't follow PokerBench's prompt format are outside what the model was trained on, and its predictions on them shouldn't be trusted.
Quellen
1 Quelle
Quellen
1 QuelleVerifiziert 27. Okt.
Modellartefakte
1 Artefakt
Modellartefakte
1 ArtefaktQuellenauszüge
3 Auszüge
Quellenauszüge
3 Auszüge--- language: en library_name: transformers pipeline_tag: text-classification base_model: distilbert-base-uncased datasets: - RZ412/PokerBench metrics: - accuracy tags: - poker --- # poker-distilbert DistilBERT fine-tuned to predict the action a poker solver chooses in 6-player No Limit Hold'em. Given a hand written in [PokerBench](https://huggingface.co/datasets/RZ412/PokerBench) prompt format, it predicts one of five actions: fold, call, check, raise, or bet. Code, evaluation scripts, and the full write-up: [github.com/jinha1491/poker-multi-agent](https://github.com/jinha1491/poker-multi-agent) ## Results PokerBench test split, 11,000 hands: | Version | Test accuracy | Macro F1 | |---|---|---| | Majority class baseline | 25.0% | | | v1 | 67.28% | 0.652 | | **v2 (current)** | **74.39%** | **0.712** | Accuracy by street (v2): preflop 84.8%, flop 73.2%, turn 76.1%, river 71.2%. On a stratified 300-hand sample of the test set, v2 scored 76.0% against 46.7% for a GPT-4o-mini multi-agent pipeline, with a median latency of 53 ms on CPU against 5.5 s. ## Usage The model only gives reliable predictions on hands in PokerBench's prompt format. ```python import torch from transformers import AutoTokenizer, AutoModelForSequenceClassification repo = "jinha1491/poker-distilbert" tokenizer = AutoTokenizer.from_pretrained(repo) model = AutoModelForSequenceClassification.from_pretrained(repo) labels = ["fold", "call", "check", "raise", "bet"] # class index order prompt = "..." # one hand in PokerBench's prompt format inputs = tokenizer(prompt, truncation=True, max_length=256, return_tensors="pt") with torch.no_grad(): probs = model(**inputs).logits.softmax(dim=-1)[0] print(labels[probs.argmax()], round(probs.max().item(), 3)) ``` To load the earlier version, pass `revision="v1"` to both `from_pretrained` calls. ## Training - Base model: `distilbert-base-uncased` - Data: 50,000 hands from a seeded shuffle (seed 42) of the PokerBench training split, 80/20 train/validation split - Labels: the solver's action with bet sizes removed, giving 5 classes - 5 epochs, AdamW at 2e-5 with linear warmup, batch size 16, class-weighted cross entropy, 256-token inputs - Trained on an Apple M-series laptop (MPS) ## Versions - `v1`: trained on the first 50,000 rows of the training split. PokerBench is stored in blocks, so those rows contained no preflop hands, and v1...
--- library_name: transformers tags: [] --- # Model Card for Model ID <!-- Provide a quick summary of what the model is/does. --> ## Model Details ### Model Description <!-- Provide a longer summary of what this model is. --> This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated. - **Developed by:** [More Information Needed] - **Funded by [optional]:** [More Information Needed] - **Shared by [optional]:** [More Information Needed] - **Model type:** [More Information Needed] - **Language(s) (NLP):** [More Information Needed] - **License:** [More Information Needed] - **Finetuned from model [optional]:** [More Information Needed] ### Model Sources [optional] <!-- Provide the basic links for the model. --> - **Repository:** [More Information Needed] - **Paper [optional]:** [More Information Needed] - **Demo [optional]:** [More Information Needed] ## Uses <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. --> ### Direct Use <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. --> [More Information Needed] ### Downstream Use [optional] <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app --> [More Information Needed] ### Out-of-Scope Use <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. --> [More Information Needed] ## Bias, Risks, and Limitations <!-- This section is meant to convey both technical and sociotechnical limitations. --> [More Information Needed] ### Recommendations <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. --> Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations. ## How to Get Started with the Model Use the code below to get started with the model. [More Information Needed] ## Training Details ### Training Data <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. --> [More...
Source context: 32 downloads · 0 likes · Pipeline text-classification · Library transformers · Repo jinha1491/poker-distilbert
