Update README.md
Browse files
README.md
CHANGED
|
@@ -36,3 +36,62 @@ The model uses structured prompts:
|
|
| 36 |
You are a chess player.
|
| 37 |
{"moveHistory": ["e4", "e5", "Nf3"], "possibleMoves": ["Nc3", "Bc4", "d4"], "color": "w"}
|
| 38 |
[/INST]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
You are a chess player.
|
| 37 |
{"moveHistory": ["e4", "e5", "Nf3"], "possibleMoves": ["Nc3", "Bc4", "d4"], "color": "w"}
|
| 38 |
[/INST]
|
| 39 |
+
|
| 40 |
+
π― Output Format
|
| 41 |
+
Always a single-line JSON:
|
| 42 |
+
|
| 43 |
+
json
|
| 44 |
+
Copy
|
| 45 |
+
Edit
|
| 46 |
+
{"move": "Bc4", "reasoning": "Develops bishop and targets f7"}
|
| 47 |
+
The move must be from possibleMoves
|
| 48 |
+
|
| 49 |
+
The reasoning is free-form but short
|
| 50 |
+
|
| 51 |
+
π οΈ Training Details
|
| 52 |
+
Base: TinyLlama-1.1B-Chat
|
| 53 |
+
|
| 54 |
+
LoRA (8-bit): q_proj, k_proj, v_proj, o_proj
|
| 55 |
+
|
| 56 |
+
Epochs: 3
|
| 57 |
+
|
| 58 |
+
Dataset: ~70 samples from master-level PGNs
|
| 59 |
+
|
| 60 |
+
Format: instruction-style using transformers.Trainer
|
| 61 |
+
|
| 62 |
+
π Performance
|
| 63 |
+
| Metric | Value |
|
| 64 |
+
| ----------- | ----- |
|
| 65 |
+
| Final loss | 1.08 |
|
| 66 |
+
| Epochs | 3 |
|
| 67 |
+
| Batch size | 1 |
|
| 68 |
+
| Total steps | 51 |
|
| 69 |
+
|
| 70 |
+
π Usage
|
| 71 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 72 |
+
|
| 73 |
+
model = AutoModelForCausalLM.from_pretrained("Konvah/chess-tinyllama")
|
| 74 |
+
tokenizer = AutoTokenizer.from_pretrained("Konvah/chess-tinyllama")
|
| 75 |
+
|
| 76 |
+
prompt = """[INST]
|
| 77 |
+
You are a chess player.
|
| 78 |
+
{"moveHistory": ["e4", "e5", "Nf3"], "possibleMoves": ["Nc3", "Bc4", "d4"], "color": "w"}
|
| 79 |
+
[/INST]"""
|
| 80 |
+
|
| 81 |
+
inputs = tokenizer(prompt, return_tensors="pt")
|
| 82 |
+
outputs = model.generate(**inputs, max_new_tokens=50)
|
| 83 |
+
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
| 84 |
+
|
| 85 |
+
π License
|
| 86 |
+
Open for research and tournament evaluation. Not intended for production without additional safety testing.
|
| 87 |
+
|
| 88 |
+
βοΈ Author
|
| 89 |
+
Ismail Abubakar (@boringcrypto_)
|
| 90 |
+
|
| 91 |
+
Contact: [email protected]
|
| 92 |
+
|
| 93 |
+
π Aura Tournament
|
| 94 |
+
This model was created for the Aura Chess LLM Tournament to demonstrate reasoning and strategy prediction using open-source LLMs.
|
| 95 |
+
|
| 96 |
+
---
|
| 97 |
+
|