Views
No views yet
pokerbench-qwen3-14b-lora-mixed. Same training recipe (50/50 paper-format + production-PE-format, 250 steps on top of the Stage 1 paper LoRA), with one critical bug fix:Fixed: PE training labels forraise/betactions previously dropped the sizing — every raise label was the bare string"raise". The model trained on this never learned to emit a raise amount, so production deployments sawdefault_pct: Nonewhenever the model chose to raise. The fixed PE jsonl recovers the BB amount from the prompt'sraise pct=N(Mbb,...)line and rewrites the label as"raise N".
Old mixed (v1) | This (v2 sized) | |
|---|---|---|
| Raise output | "raise" (1 token, no sizing) | "raise 14.0" (proper sizing) |
| Strict raise sizing on PE 60-sample eval | 0/60 (0.0%) | 41/60 (68.3%) |
| Paper 11k EM | 89.86% | (within ±2 expected) |
| PE 200 AA | 84.0% | 84.0% |
gen-pe-format-dataset.ts used row.correctDecision (action kind only) as the label. The fix is post-hoc — scripts/fix_pe_raise_sizing.py reads each prompt, extracts BB amount from the raise pct=N(Mbb, ~M) / raise pct=N(Bet M, ~M) line, and rewrites the label."raise" remainingraise 14.0, raise 13.0, raise 25.0, raise 2.5, raise 10.0)prompt: "...preflop SB facing UTG raise 2.5..."
v1 (old): "raise" ← parser sees no number, default_pct: None
v2 (this): "raise 14.5" ← parser gets 14.5 BB, action complete1from peft import PeftModel
2from transformers import AutoModelForCausalLM, AutoTokenizer
3import torch
4
5base = AutoModelForCausalLM.from_pretrained(
6 "Qwen/Qwen3-14B",
7 torch_dtype=torch.bfloat16,
8 device_map="auto",
9)
10model = PeftModel.from_pretrained(base, "ianlee1996/pokerbench-qwen3-14b-lora-mixed-v2")
11tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen3-14B")
12
13system_prompt = (
14 "You are a specialist in playing 6-handed No Limit Texas Holdem. "
15 "Output ONLY the optimal action with no explanation. "
16 "Valid formats: 'fold', 'check', 'call', 'bet N', 'raise N', 'all-in'."
17)
18
19# Inference at temp 0.1, top-p 0.95, max_tokens=16 (raise output is 5-6 tokens)Qwen/Qwen3-14B04_qwen3_14b_lora_full_data_1epoch/checkpoint-4375 (60k+500k paper-format SFT, 1 epoch, EM 90.07%)1# 1. Fix the existing PE jsonl in-place
2.venv/bin/python -m scripts.fix_pe_raise_sizing \
3 data/pe_format/mixed_paper_pe_50_50.jsonl \
4 data/pe_format/mixed_paper_pe_50_50_fixed.jsonl
5
6# 2. Re-train the SFT mixed checkpoint on the fixed data
7.venv/bin/python -m scripts.train --config configs/experiments/09_qwen3_14b_lora_mixed_v2_sized.yaml1@inproceedings{zhuang2025pokerbench,
2 title={PokerBench: Training Large Language Models to become Professional Poker Players},
3 author={Zhuang, Richard and Gupta, Akshat and Yang, Richard and Rahane, Aniket and Li, Zhengyu and Anumanchipalli, Gopala},
4 booktitle={Proceedings of the AAAI Conference on Artificial Intelligence},
5 year={2025},
6 url={https://arxiv.org/abs/2501.08328}
7}Qwen/Qwen3-14B and the PokerBench dataset.