Downloads · 30 days
12
1% of all-time downloads
GoodStartLabs/gin-rummy-hbc-qwen3.5-2b
gin-rummy-hbc-qwen3.5-2b is a text generation model from GoodStartLabs. Use it when you need the model to write or continue text. The card lists the license as apache-2.0.
Behavioral cloning model for Gin Rummy trained via supervised fine-tuning on expert trajectories.
Downloads · 30 days
12
1% of all-time downloads
All-time downloads
836
Public
Parameters
1.9B
7.5 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors3.8 GB · 99%
From the Hugging Face model README
Behavioral cloning model for Gin Rummy trained via supervised fine-tuning on expert trajectories.
This model was trained on 32,000 stratified expert game states to learn optimal Gin Rummy decision-making. It serves as the initialization for subsequent GRPO (Group Relative Policy Optimization) self-play training.
Dataset: GoodStartLabs/gin-rummy-trajectories-32k
Action distribution (training set):
discard (discard a card): 44.6%draw (draw from stock): 33.1%+discard (pick from discard pile): 14.9%KNOCK-[card] (knock and discard): 4.0%pass (pass on upcard): 3.5%Validation set: Perfectly balanced with exactly 200 samples per action type for unbiased evaluation.
Fine-tuning platform: Together AI (serverless LoRA training)
Hyperparameters:
Training duration: ~2-4 hours per model
Infrastructure:
This model serves as the warm-start initialization for GRPO self-play training:
HBC (Behavioral Cloning) ← This model
GRPO (Group Relative Policy Optimization) ← Next stage
The model predicts the next action given the current game state formatted as a chat conversation:
Input format:
[SYSTEM]
You are an expert Gin Rummy player. Your goal is to minimize deadwood and form melds.
[USER]
History:
1. You: +D6x -C3
2. Opp: draw -CK
Now:
Hand: CK D2 D3 D4 D5 D6 D9 H7 HK HQ S9
Stock: 28 | Deadwood: 45 | Phase: discard_or_knock
YOUR TURN | Can: no
[ASSISTANT]
Output (predicted action):
-H7
Action format:
draw - Draw from stock pile+discard - Pick from discard pile-[CARD] - Discard a card (e.g., -H7 = discard 7 of Hearts)KNOCK-[CARD] - Knock and discard (e.g., KNOCK-C3)pass - Pass on the initial upcardCard notation: Rank (A/2-9/T/J/Q/K) + Suit (C/D/H/S)
H7 = 7 of Hearts, CK = King of Clubs, SA = Ace of Spadesfrom transformers import AutoModelForCausalLM, AutoTokenizer
# Load model and tokenizer
model_name = "GoodStartLabs/gin-rummy-hbc-qwen3.5-2b"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
model_name,
device_map="auto",
torch_dtype="auto",
)
# Format game state as chat
messages = [
{
"role": "system",
"content": "You are an expert Gin Rummy player. Your goal is to minimize deadwood and form melds."
},
{
"role": "user",
"content": '''History:
1. Opp: draw -SQ
2. You: draw(DT) -DT
Now:
Hand: C9 D3 D9 H3 H6 HJ HQ HT S6 S9
Stock: 22 | Deadwood: 18 | Phase: draw
YOUR TURN | Can: no'''
}
]
# Generate prediction
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors="pt").to(model.device)
outputs = model.generate(
**inputs,
max_new_tokens=20,
temperature=0.0, # Greedy decoding for deterministic play
do_sample=False,
)
action = tokenizer.decode(outputs[0][inputs['input_ids'].shape[1]:], skip_special_tokens=True).strip()
print(f"Predicted action: {action}")
Validation accuracy (on balanced 1K validation set):
Win rate vs. baselines:
This model is trained for the game of Gin Rummy and should only be used for:
Not intended for:
If you use this model in your research, please cite:
@misc{gin-rummy-hbc-2b,
author = {Good Start Labs},
title = {Gin Rummy HBC - Qwen3.5 2B},
year = {2026},
publisher = {HuggingFace},
howpublished = {\url{GoodStartLabs/gin-rummy-hbc-qwen3.5-2b}},
}
For questions or issues with this model:
Model trained on Together AI • Base model: Qwen3.5 • Training date: March 2026