Downloads · 30 days
21
18% of all-time downloads
felixmanojh/Qwen3-4B-Lichess-Chess-Puzzle-Tutor-Merged
Qwen3-4B-Lichess-Chess-Puzzle-Tutor-Merged is a text generation model from felixmanojh. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
A merged chess puzzle explanation model — ready to use without adapters!
Downloads · 30 days
21
18% of all-time downloads
All-time downloads
117
Public
Parameters
4B
8.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors8 GB · 100%
From the Hugging Face model README
A merged chess puzzle explanation model — ready to use without adapters!
This is a fully merged version of Qwen3-4B-Lichess-Chess-Puzzle-Tutor, with the LoRA adapter weights fused directly into the base model. No need for PEFT or adapter loading — just load and go!
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "felixmanojh/Qwen3-4B-Lichess-Chess-Puzzle-Tutor-Merged"
# Load model and tokenizer
tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype=torch.float16,
device_map="auto",
trust_remote_code=True
)
# Example puzzle
puzzle = """Explain this chess puzzle:
Position (FEN): r1bqkb1r/pppp1ppp/2n2n2/4p3/2B1P3/5N2/PPPP1PPP/RNBQK2R w KQkq - 4 4
Solution: Nxe5 Nxe5 d4
Themes: fork pin
Rating: 1500"""
# Generate explanation
messages = [{"role": "user", "content": puzzle}]
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=512,
temperature=0.7,
top_p=0.9,
do_sample=True
)
response = tokenizer.decode(outputs[0][inputs['input_ids'].shape[1]:], skip_special_tokens=True)
print(response)
from mlx_lm import load, generate
# Note: This merged model is in HuggingFace format
# For MLX, use the MLX-format version or the original adapter
model, tokenizer = load("felixmanojh/Qwen3-4B-Lichess-Chess-Puzzle-Tutor-Merged")
prompt = """Explain this chess puzzle:
Position (FEN): r1bqkb1r/pppp1ppp/2n2n2/4p3/2B1P3/5N2/PPPP1PPP/RNBQK2R w KQkq - 4 4
Solution: Nxe5 Nxe5 d4
Themes: fork pin
Rating: 1500"""
response = generate(model, tokenizer, prompt=prompt, max_tokens=512)
print(response)
✅ Simpler deployment — No adapter loading, no PEFT dependencies
✅ Faster startup — Single model file, no merging at runtime
✅ Gradio/Spaces friendly — Works with standard transformers
✅ GGUF conversion — Easier conversion for llama.cpp
Puzzles filtered for:
Explanations generated using Claude API with consistent prompting for educational quality, focusing on:
| Feature | Adapter Version | Merged Version (this) |
|---|---|---|
| Format | LoRA adapter only | Full model (base + adapter) |
| Size | ~150MB | ~8GB |
| Loading | Requires base + PEFT | Direct transformers load |
| Use Case | MLX, custom training | Deployment, Spaces, inference |
Try it live: Chess Puzzle Tutor Space
@software{qwen3_chess_tutor_merged_2025,
author = {Felix Manojh},
title = {Qwen3-4B-Lichess-Chess-Puzzle-Tutor-Merged},
year = {2025},
url = {https://huggingface.co/felixmanojh/Qwen3-4B-Lichess-Chess-Puzzle-Tutor-Merged},
note = {Merged model fine-tuned on Lichess puzzle database with Claude-generated explanations}
}
Related Models: