Instructions to use Lyte/QuadConnect2.5-0.5B-v0.0.9b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Lyte/QuadConnect2.5-0.5B-v0.0.9b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Lyte/QuadConnect2.5-0.5B-v0.0.9b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Lyte/QuadConnect2.5-0.5B-v0.0.9b") model = AutoModelForCausalLM.from_pretrained("Lyte/QuadConnect2.5-0.5B-v0.0.9b") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - llama-cpp-python
How to use Lyte/QuadConnect2.5-0.5B-v0.0.9b with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Lyte/QuadConnect2.5-0.5B-v0.0.9b", filename="unsloth.Q8_0.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use Lyte/QuadConnect2.5-0.5B-v0.0.9b with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Lyte/QuadConnect2.5-0.5B-v0.0.9b:Q8_0 # Run inference directly in the terminal: llama-cli -hf Lyte/QuadConnect2.5-0.5B-v0.0.9b:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Lyte/QuadConnect2.5-0.5B-v0.0.9b:Q8_0 # Run inference directly in the terminal: llama-cli -hf Lyte/QuadConnect2.5-0.5B-v0.0.9b:Q8_0
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf Lyte/QuadConnect2.5-0.5B-v0.0.9b:Q8_0 # Run inference directly in the terminal: ./llama-cli -hf Lyte/QuadConnect2.5-0.5B-v0.0.9b:Q8_0
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf Lyte/QuadConnect2.5-0.5B-v0.0.9b:Q8_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf Lyte/QuadConnect2.5-0.5B-v0.0.9b:Q8_0
Use Docker
docker model run hf.co/Lyte/QuadConnect2.5-0.5B-v0.0.9b:Q8_0
- LM Studio
- Jan
- vLLM
How to use Lyte/QuadConnect2.5-0.5B-v0.0.9b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Lyte/QuadConnect2.5-0.5B-v0.0.9b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Lyte/QuadConnect2.5-0.5B-v0.0.9b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Lyte/QuadConnect2.5-0.5B-v0.0.9b:Q8_0
- SGLang
How to use Lyte/QuadConnect2.5-0.5B-v0.0.9b with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Lyte/QuadConnect2.5-0.5B-v0.0.9b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Lyte/QuadConnect2.5-0.5B-v0.0.9b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Lyte/QuadConnect2.5-0.5B-v0.0.9b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Lyte/QuadConnect2.5-0.5B-v0.0.9b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use Lyte/QuadConnect2.5-0.5B-v0.0.9b with Ollama:
ollama run hf.co/Lyte/QuadConnect2.5-0.5B-v0.0.9b:Q8_0
- Unsloth Studio new
How to use Lyte/QuadConnect2.5-0.5B-v0.0.9b with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Lyte/QuadConnect2.5-0.5B-v0.0.9b to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Lyte/QuadConnect2.5-0.5B-v0.0.9b to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Lyte/QuadConnect2.5-0.5B-v0.0.9b to start chatting
- Pi new
How to use Lyte/QuadConnect2.5-0.5B-v0.0.9b with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf Lyte/QuadConnect2.5-0.5B-v0.0.9b:Q8_0
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "Lyte/QuadConnect2.5-0.5B-v0.0.9b:Q8_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use Lyte/QuadConnect2.5-0.5B-v0.0.9b with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf Lyte/QuadConnect2.5-0.5B-v0.0.9b:Q8_0
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default Lyte/QuadConnect2.5-0.5B-v0.0.9b:Q8_0
Run Hermes
hermes
- Docker Model Runner
How to use Lyte/QuadConnect2.5-0.5B-v0.0.9b with Docker Model Runner:
docker model run hf.co/Lyte/QuadConnect2.5-0.5B-v0.0.9b:Q8_0
- Lemonade
How to use Lyte/QuadConnect2.5-0.5B-v0.0.9b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Lyte/QuadConnect2.5-0.5B-v0.0.9b:Q8_0
Run and chat with the model
lemonade run user.QuadConnect2.5-0.5B-v0.0.9b-Q8_0
List all available models
lemonade list
Install from WinGet (Windows)
winget install llama.cpp
# Start a local OpenAI-compatible server with a web UI:
llama-server -hf Lyte/QuadConnect2.5-0.5B-v0.0.9b:Q8_0# Run inference directly in the terminal:
llama-cli -hf Lyte/QuadConnect2.5-0.5B-v0.0.9b:Q8_0Use pre-built binary
# Download pre-built binary from:
# https://github.com/ggerganov/llama.cpp/releases# Start a local OpenAI-compatible server with a web UI:
./llama-server -hf Lyte/QuadConnect2.5-0.5B-v0.0.9b:Q8_0# Run inference directly in the terminal:
./llama-cli -hf Lyte/QuadConnect2.5-0.5B-v0.0.9b:Q8_0Build from source code
git clone https://github.com/ggerganov/llama.cpp.git
cd llama.cpp
cmake -B build
cmake --build build -j --target llama-server llama-cli# Start a local OpenAI-compatible server with a web UI:
./build/bin/llama-server -hf Lyte/QuadConnect2.5-0.5B-v0.0.9b:Q8_0# Run inference directly in the terminal:
./build/bin/llama-cli -hf Lyte/QuadConnect2.5-0.5B-v0.0.9b:Q8_0Use Docker
docker model run hf.co/Lyte/QuadConnect2.5-0.5B-v0.0.9b:Q8_0QuadConnect2.5-0.5B-v0.0.9b - A Strategic Connect Four AI
🎮 Overview
QuadConnect2.5-0.5B is a specialized language model trained to master the game of Connect Four. Built on Qwen 2.5 (0.5B parameter base), this model uses GRPO (Group Relative Policy Optimization) to learn the strategic intricacies of Connect Four gameplay.
Status: Early training experiments (v0.0.9b) - Reward functions still evolving
🔍 Model Details
- Developed by: Lyte
- Model type: Small Language Model (SLM)
- Language: English
- Base model: unsloth/qwen2.5-0.5b-instruct-unsloth-bnb-4bit
- Training method: TRL's GRPO
- Training data: Lyte/ConnectFour-T10
🚀 Quick Start
Option 1: Using Transformers
from transformers import pipeline
SYSTEM_PROMPT = """You are a master Connect Four strategist whose goal is to win while preventing your opponent from winning. The game is played on a 6x7 grid (columns a–g, rows 1–6 with 1 at the bottom) where pieces drop to the lowest available spot.
Board:
- Represented as a list of occupied cells in the format: <column><row>(<piece>), e.g., 'a1(O)'.
- For example: 'a1(O), a2(X), b1(O)' indicates that cell a1 has an O, a2 has an X, and b1 has an O.
- An empty board is shown as 'Empty Board'.
- Win by connecting 4 pieces in any direction (horizontal, vertical, or diagonal).
Strategy:
1. Identify taken positions, and empty positions.
2. Find and execute winning moves.
3. If There isn't a winning move, then block your opponent's potential wins.
4. Control the center and set up future moves.
Respond in XML:
<reasoning>
Explain your thought process, focusing on your winning move, how you block your opponent, and your strategic plans.
</reasoning>
<move>
Specify the column letter (a–g) for your next move.
</move>
"""
board = {
"empty": "Game State:\n- You are playing as: X\n- Your previous moves: \n- Opponent's moves: \n- Current board state: Empty Board\n- Next available position per column: \nColumn a: a1, a2, a3, a4, a5, a6 \nColumn b: b1, b2, b3, b4, b5, b6 \nColumn c: c1, c2, c3, c4, c5, c6 \nColumn d: d1, d2, d3, d4, d5, d6 \nColumn e: e1, e2, e3, e4, e5, e6 \nColumn f: f1, f2, f3, f4, f5, f6 \nColumn g: g1, g2, g3, g4, g5, g6\n\nMake your move.",
"one_move": "Game State:\n- You are playing as: X\n- Your previous moves: \n- Opponent's moves: b1\n- Current board state: b1(O)\n- Next available position per column: \nColumn a: a1, a2, a3, a4, a5, a6 \nColumn b: b2, b3, b4, b5, b6 \nColumn c: c1, c2, c3, c4, c5, c6 \nColumn d: d1, d2, d3, d4, d5, d6 \nColumn e: e1, e2, e3, e4, e5, e6 \nColumn f: f1, f2, f3, f4, f5, f6 \nColumn g: g1, g2, g3, g4, g5, g6\n\nMake your move.",
"four_moves": "Game State:\n- You are playing as: X\n- Your previous moves: a1, a2\n- Opponent's moves: d1, a3\n- Current board state: a1(X), d1(O), a2(X), a3(O)\n- Next available position per column: \nColumn a: a4, a5, a6 \nColumn b: b1, b2, b3, b4, b5, b6 \nColumn c: c1, c2, c3, c4, c5, c6 \nColumn d: d2, d3, d4, d5, d6 \nColumn e: e1, e2, e3, e4, e5, e6 \nColumn f: f1, f2, f3, f4, f5, f6 \nColumn g: g1, g2, g3, g4, g5, g6\n\nMake your move.",
}
generator = pipeline("text-generation", model="Lyte/QuadConnect2.5-0.5B-v0.0.9b", device="cuda")
# use 'empty', 'one_move' or 'four_moves' in board['']
output = generator([
{"role": "system", "content": SYSTEM_PROMPT},
{"role": "user", "content": board['empty']}
], max_new_tokens=10245, return_full_text=False)[0]
print(output["generated_text"])
Option 2: Using GGUF
Download the Quantized GGUF (Q8_0) and use it in your favorite GGUF inference engine (e.g., LMStudio).
Option 3: Using Hugging Face Space
Visit the QuadConnect Space to interact with the model directly. You can also duplicate the space or download its code for local use.
📊 Evaluation Results
Model performance was evaluated on the Lyte/ConnectFour-T10 validation split with various temperature settings.
Summary Metrics Comparison
| Metric | v0.0.6b (Temp 0.6) | v0.0.8b (Temp 0.6) | v0.0.9b (Temp 0.6) | v0.0.9b (Temp 0.8) | v0.0.9b (Temp 1.0) |
|---|---|---|---|---|---|
| Total games evaluated | 5082 | 5082 | 5082 | 5082 | 5082 |
| Correct predictions | 518 | 394 | 516 | 713 | 677 |
| Accuracy | 10.19% | 7.75% | 10.15% | 14.03% | 13.32% |
| Most common move | d (41.14%) | d (67.61%) | a (38.72%) | a (31.01%) | a (26.99%) |
| Middle column usage | 75.05% | 99.53% | 29.08% | 35.43% | 39.49% |
Move Distribution by Column
| Column | v0.0.6b (Temp 0.6) | v0.0.8b (Temp 0.6) | v0.0.9b (Temp 0.6) | v0.0.9b (Temp 0.8) | v0.0.9b (Temp 1.0) |
|---|---|---|---|---|---|
| a | 603 (19.02%) | 3 (0.12%) | 1447 (38.72%) | 1547 (31.01%) | 1351 (26.99%) |
| b | 111 (3.50%) | 4 (0.16%) | 644 (17.23%) | 924 (18.52%) | 997 (19.92%) |
| c | 785 (24.76%) | 463 (17.96%) | 648 (17.34%) | 1003 (20.11%) | 985 (19.68%) |
| d | 1304 (41.14%) | 1743 (67.61%) | 101 (2.70%) | 202 (4.05%) | 306 (6.11%) |
| e | 290 (9.15%) | 360 (13.96%) | 338 (9.04%) | 562 (11.27%) | 686 (13.70%) |
| f | 50 (1.58%) | 3 (0.12%) | 310 (8.30%) | 408 (8.18%) | 354 (7.07%) |
| g | 27 (0.85%) | 2 (0.08%) | 249 (6.66%) | 342 (6.86%) | 327 (6.53%) |
🔧 Training Details
Data Preparation
- Started with Leon-LLM/Connect-Four-Datasets-Collection
- Filtered for clean, complete entries
- Further filtered to include only games with 10 or fewer turns
- Split into train and validation sets
- Final dataset: Lyte/ConnectFour-T10
Evaluation Parameters
- Temperature: 0.6, 0.8, 1.0 (compared)
- Top-p: 0.95
- Max tokens: 1024
Framework Versions
- TRL: 0.15.1
- Transformers: 4.49.0
- PyTorch: 2.5.1+cu121
- Datasets: 3.2.0
- Tokenizers: 0.21.0
📚 Citations
For GRPO:
@article{zhihong2024deepseekmath,
title = {{DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models}},
author = {Zhihong Shao and Peiyi Wang and Qihao Zhu and Runxin Xu and Junxiao Song and Mingchuan Zhang and Y. K. Li and Y. Wu and Daya Guo},
year = 2024,
eprint = {arXiv:2402.03300},
}
For TRL:
@misc{vonwerra2022trl,
title = {{TRL: Transformer Reinforcement Learning}},
author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallouédec},
year = 2020,
journal = {GitHub repository},
publisher = {GitHub},
howpublished = {\url{https://github.com/huggingface/trl}}
}
- Downloads last month
- 33

Install from brew
# Start a local OpenAI-compatible server with a web UI: llama-server -hf Lyte/QuadConnect2.5-0.5B-v0.0.9b:Q8_0# Run inference directly in the terminal: llama-cli -hf Lyte/QuadConnect2.5-0.5B-v0.0.9b:Q8_0