Text Generation
Transformers
Safetensors
English
qwen3_5_text
chess
qwen
fine-tuned
sft
conversational
Instructions to use GL3MON/Qwen3.5-2B-chess-finetuned with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use GL3MON/Qwen3.5-2B-chess-finetuned with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="GL3MON/Qwen3.5-2B-chess-finetuned") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("GL3MON/Qwen3.5-2B-chess-finetuned") model = AutoModelForCausalLM.from_pretrained("GL3MON/Qwen3.5-2B-chess-finetuned", device_map="auto") 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use GL3MON/Qwen3.5-2B-chess-finetuned with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "GL3MON/Qwen3.5-2B-chess-finetuned" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "GL3MON/Qwen3.5-2B-chess-finetuned", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/GL3MON/Qwen3.5-2B-chess-finetuned
- SGLang
How to use GL3MON/Qwen3.5-2B-chess-finetuned 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 "GL3MON/Qwen3.5-2B-chess-finetuned" \ --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": "GL3MON/Qwen3.5-2B-chess-finetuned", "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 "GL3MON/Qwen3.5-2B-chess-finetuned" \ --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": "GL3MON/Qwen3.5-2B-chess-finetuned", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use GL3MON/Qwen3.5-2B-chess-finetuned with Docker Model Runner:
docker model run hf.co/GL3MON/Qwen3.5-2B-chess-finetuned
Qwen-3.5-2B Chess Fine-tuned (SFT)
Overview
This is a fine-tuned version of Qwen-3.5-2B on chess move prediction using Supervised Fine-Tuning (SFT). The model was trained on the Thytu/ChessInstruct dataset.
Model Details
- Base Model: Qwen/Qwen3.5-2B
- Fine-tuning Method: Supervised Fine-Tuning (SFT)
- Precision: bfloat16
Training Configuration
- Learning Rate: 1e-5
- Batch Size: 4 (per device)
- Gradient Accumulation Steps: 1
- Epochs: 3
- Optimizer: AdamW with cosine learning rate scheduler
- Warmup Steps: 100
- Weight Decay: 0.01
Training Dynamics
Dataset
The model was trained on Thytu/ChessInstruct, a chess instruction dataset containing:
- Chess positions with move annotations
- Game sequences with context
- Various chess task categories (move prediction, advantage evaluation, etc.)
Task Categories
| Category | Description |
|---|---|
FIND_NEXT_BEST_MOVE |
Predict the next best move |
FIND_ADVANTAGED_PLAYER |
Identify who has advantage |
FIND_FINAL_SCORE |
Predict game result |
MLM_ON_MOVES |
Fill in missing moves |
FIND_LAST_MOVE |
Find the final move |
SORT_FENS |
Sort positions by game order |
Usage
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
model_name = "GL3MON/Qwen3.5-2B-chess-finetuned"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype=torch.bfloat16,
device_map="auto"
)
# Example: Predict chess moves
messages = [
{"role": "system", "content": "You are a chess assistant. Provide the best move in SAN format."},
{"role": "user", "content": "What is the best move for white in the position: rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1?"}
]
input_ids = tokenizer.apply_chat_template(messages, return_tensors="pt").to(model.device)
outputs = model.generate(input_ids, max_new_tokens=50, temperature=0.7, do_sample=True)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)
Evaluation
The model was evaluated on a validation split of the ChessInstruct dataset. The training achieved good convergence with the loss decreasing steadily over 3 epochs.
License
MIT License
Citation
@software{ChessLM2026,
title = {ChessLM - Qwen-3.5-2B Chess Assistant},
author = {GL3MON},
year = {2026},
url = {https://huggingface.co/GL3MON/Qwen3.5-2B-chess-finetuned}
}
References
- Downloads last month
- -
Model tree for GL3MON/Qwen3.5-2B-chess-finetuned
Collection including GL3MON/Qwen3.5-2B-chess-finetuned
Collection
A family of chess-specific language models built by fine-tuning Qwen-3.5-2B • 2 items • Updated

