Views
No views yet
| Metric | Stage 1 only (paper-only LoRA) | This checkpoint (mixed 50/50) | Pure-PE adapter (control) |
|---|---|---|---|
| Paper 11k EM | 90.07% | 89.86% ✅ | 69.24% ⬇ |
| Paper 11k AA | 90.55% | 90.32% | 69.24% |
| Paper parse failures | 0 / 11000 | 0 / 11000 | 2,514 / 11,000 |
| Production-PE 200 AA | 61.5% | 84.0% ⭐ | 83.5% |
| Production-PE preflop AA | 58.0% | 92.0% | 90.0% |
| Production-PE postflop AA | 65.0% | 76.0% | 77.0% |
1from 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")
11tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen3-14B")
12
13# Paper-format prompt (PokerBench dataset style)
14instruction = """
15
16You are a specialist in playing 6-handed No Limit Texas Holdem. The following will be a game scenario and you need to make the optimal decision.
17
18Here is a game summary:
19
20The small blind is 0.5 chips and the big blind is 1 chips. Everyone started with 100 chips.
21The player positions involved in this game are UTG, HJ, CO, BTN, SB, BB.
22In this hand, your position is BTN, and your holding is [Ace of Heart and King of Heart].
23Before the flop, there has been no action yet. Assume that all other players that is not mentioned folded.
24
25Now it is your turn to make a move.
26To remind you, the current pot size is 1.5 chips, and your holding is [Ace of Heart and King of Heart].
27
28Decide on an action based on the strength of your hand on this board, your position, and actions before you. Do not explain your answer.
29Your optimal action is:"""
30
31system_prompt = (
32 "You are a specialist in playing 6-handed No Limit Texas Holdem. "
33 "Output ONLY the optimal action with no explanation. "
34 "Valid formats: 'fold', 'check', 'call', 'bet N', 'raise N', 'all-in'."
35)
36messages = [
37 {"role": "system", "content": system_prompt},
38 {"role": "user", "content": instruction},
39]
40prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
41inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
42out = model.generate(**inputs, max_new_tokens=16, temperature=0.1, top_p=0.95, do_sample=True)
43print(tokenizer.decode(out[0, inputs.input_ids.shape[1]:], skip_special_tokens=True))
44# expected: "raise 2.5" or similarRZ412/PokerBench (1 epoch ≈ 4375 steps)assistant_only_loss=Trueis_trainable=True)postflop_10k_test_set and preflop_1k_test_set) and were never seen during training — Stage 2 trained only on the train split.1@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}assistant_only_loss=True for masked SFT)