Gemma-3 270M — Chess Coach (Merged FP16)
Author: @codertrish
Base model: unsloth/gemma-3-270m-it
Type: Merged FP16 checkpoint (LoRA deltas baked into base — no adapters needed)
Task: Conversational chess tutoring (rules, beginner principles, simple reasoning)
TL;DR
- This is a plug-and-play Gemma-3 (270M) checkpoint specialized for chess coaching.
- It was fine-tuned via LoRA on a subset of
Thytu/ChessInstruct
, then merged to FP16. - Load directly with
transformers
and chat using the Gemma-3 chat template.
✨ Intended Use
- Direct use: Explain chess rules, beginner opening principles, basic tactics, and high-level strategy in plain text.
- Downstream use: As a small assistant embedded in notebooks, tutorials, or beginner-level chess learning tools.
Out-of-scope: Engine-level move search, advanced calculation, or authoritative evaluations of complex positions. For serious analysis, use a dedicated chess engine (e.g., Stockfish) and verify claims.
🔧 How to Use
The model expects Gemma-3 chat formatting. Use
apply_chat_template
before generation.
Minimal example (Transformers)
from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline
REPO = "codertrish/Finetuned-gemma3-270m-chess-merged"
tok = AutoTokenizer.from_pretrained(REPO)
model = AutoModelForCausalLM.from_pretrained(REPO, torch_dtype="bfloat16", device_map="auto")
pipe = pipeline("text-generation", model=model, tokenizer=tok, return_full_text=False)
def chat(messages, **gen_kwargs):
prompt = tok.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
eot_id = tok.convert_tokens_to_ids("<end_of_turn>")
out = pipe(
prompt,
eos_token_id=eot_id,
max_new_tokens=200,
do_sample=False, # deterministic; set True for sampling
**gen_kwargs,
)[0]["generated_text"]
return out.strip()
messages = [
{"role":"system","content":"You are a helpful chess coach. Answer in plain text, 3 concise bullets."},
{"role":"user","content":"What are the main opening principles?"},
]
print(chat(messages))
- Downloads last month
- 23
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
🙋
Ask for provider support