Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,64 @@
|
|
| 1 |
-
---
|
| 2 |
-
license:
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: other
|
| 3 |
+
tags:
|
| 4 |
+
- chess
|
| 5 |
+
- transformer
|
| 6 |
+
- text-generation
|
| 7 |
+
language:
|
| 8 |
+
- en
|
| 9 |
+
pipeline_tag: text-generation
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# GofAlpha/GoA_Chess_Small
|
| 13 |
+
|
| 14 |
+
A decoder-only transformer language model trained on Lichess standard chess games.
|
| 15 |
+
Generates chess moves in standard algebraic notation (SAN).
|
| 16 |
+
|
| 17 |
+
## Model Details
|
| 18 |
+
|
| 19 |
+
| Property | Value |
|
| 20 |
+
|----------|-------|
|
| 21 |
+
| Parameters | 51,544,049 |
|
| 22 |
+
| Hidden size | 512 |
|
| 23 |
+
| Layers | 8 |
|
| 24 |
+
| Attention heads | 8 |
|
| 25 |
+
| Context length | 1024 tokens |
|
| 26 |
+
| Tokenizer | GPT-2 |
|
| 27 |
+
|
| 28 |
+
## Files
|
| 29 |
+
|
| 30 |
+
- `model.safetensors` — Model weights
|
| 31 |
+
- `config.json` — Architecture configuration
|
| 32 |
+
- `generation_config.json` — Default generation parameters
|
| 33 |
+
- `tokenizer.json`, `vocab.json`, `merges.txt` — GPT-2 tokenizer files
|
| 34 |
+
|
| 35 |
+
## Usage
|
| 36 |
+
|
| 37 |
+
```python
|
| 38 |
+
import torch
|
| 39 |
+
from safetensors.torch import load_file
|
| 40 |
+
from transformers import GPT2TokenizerFast
|
| 41 |
+
|
| 42 |
+
# Load tokenizer
|
| 43 |
+
tokenizer = GPT2TokenizerFast.from_pretrained("GofAlpha/GoA_Chess_Small")
|
| 44 |
+
|
| 45 |
+
# Load weights
|
| 46 |
+
state_dict = load_file("model.safetensors")
|
| 47 |
+
|
| 48 |
+
# Encode a chess opening
|
| 49 |
+
prompt = "1. e4 e5 2. Nf3"
|
| 50 |
+
input_ids = tokenizer.encode(prompt, return_tensors="pt")
|
| 51 |
+
```
|
| 52 |
+
|
| 53 |
+
## Generation Parameters
|
| 54 |
+
|
| 55 |
+
| Parameter | Default |
|
| 56 |
+
|-----------|---------|
|
| 57 |
+
| temperature | 0.6 |
|
| 58 |
+
| top_k | 10 |
|
| 59 |
+
| top_p | 0.95 |
|
| 60 |
+
| max_new_tokens | 1024 |
|
| 61 |
+
|
| 62 |
+
## License
|
| 63 |
+
|
| 64 |
+
Copyright (c) G of Alpha LLC. All rights reserved.
|