Downloads · 30 days
8
7% of all-time downloads
Konvah/chess-tinyllama
chess-tinyllama is a machine learning model from Konvah. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for peft.
This model is a fine-tuned version of TinyLlama/TinyLlama-1.1B-Chat-v1.0 using LoRA for the Aura Chess AI Tournament. It predicts high-quality chess moves in JSON format, given a move history, color, and a list of leg…
Downloads · 30 days
8
7% of all-time downloads
All-time downloads
109
Public
Repo size
9.5 MB
Likes
0
Public
Click a slice to open those files.
.safetensors9 MB · 69%
From the Hugging Face model README
This model is a fine-tuned version of TinyLlama/TinyLlama-1.1B-Chat-v1.0 using LoRA for the Aura Chess AI Tournament. It predicts high-quality chess moves in JSON format, given a move history, color, and a list of legal moves.
The model learns to:
move)reasoning) in ≤10 words[INST] ... [/INST] formatThe model uses structured prompts:
[INST]
You are a chess player.
{"moveHistory": ["e4", "e5", "Nf3"], "possibleMoves": ["Nc3", "Bc4", "d4"], "color": "w"}
[/INST]
🎯 Output Format
Always a single-line JSON:
json
Copy
Edit
{"move": "Bc4", "reasoning": "Develops bishop and targets f7"}
The move must be from possibleMoves
The reasoning is free-form but short
🛠️ Training Details
Base: TinyLlama-1.1B-Chat
LoRA (8-bit): q_proj, k_proj, v_proj, o_proj
Epochs: 3
Dataset: ~70 samples from master-level PGNs
Format: instruction-style using transformers.Trainer
📈 Performance
| Metric | Value |
| ----------- | ----- |
| Final loss | 1.08 |
| Epochs | 3 |
| Batch size | 1 |
| Total steps | 51 |
🚀 Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("Konvah/chess-tinyllama")
tokenizer = AutoTokenizer.from_pretrained("Konvah/chess-tinyllama")
prompt = """[INST]
You are a chess player.
{"moveHistory": ["e4", "e5", "Nf3"], "possibleMoves": ["Nc3", "Bc4", "d4"], "color": "w"}
[/INST]"""
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=50)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
📎 License
Open for research and tournament evaluation. Not intended for production without additional safety testing.
✍️ Author
Ismail Abubakar (@boringcrypto_)
Contact: [email protected]
🏆 Aura Tournament
This model was created for the Aura Chess LLM Tournament to demonstrate reasoning and strategy prediction using open-source LLMs.
---