thomas-schweich commited on
Commit
4076e45
·
verified ·
1 Parent(s): e08eda1

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. README.md +66 -0
  2. model.pt +3 -0
README.md ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ library_name: pytorch
4
+ tags:
5
+ - chess
6
+ - transformer
7
+ - causal-lm
8
+ - world-model
9
+ datasets:
10
+ - random-self-play
11
+ model-index:
12
+ - name: pawn-large
13
+ results:
14
+ - task:
15
+ type: next-move-prediction
16
+ metrics:
17
+ - name: Val Loss
18
+ type: loss
19
+ value: 3.091
20
+ - name: Val Accuracy
21
+ type: accuracy
22
+ value: 7.1
23
+ ---
24
+
25
+ # PAWN-LARGE
26
+
27
+ A causal transformer trained on random chess games, designed as a testbed for finetuning and augmentation methods at small scales.
28
+
29
+ ## Model Details
30
+
31
+ | | |
32
+ |---|---|
33
+ | **Parameters** | 68.4M |
34
+ | **Architecture** | Decoder-only transformer (RMSNorm, SwiGLU, RoPE) |
35
+ | **d_model** | 640 |
36
+ | **Layers** | 10 |
37
+ | **Heads** | 8 |
38
+ | **Vocabulary** | 4,278 tokens (4,096 grid + 176 promotions + 5 outcomes + 1 PAD) |
39
+ | **Sequence length** | 256 |
40
+ | **Training steps** | 85K/100K |
41
+ | **Best val loss** | 3.091 (step 85,000) |
42
+ | **Best val accuracy** | 7.1% |
43
+
44
+ ## Usage
45
+
46
+ ```python
47
+ import torch
48
+ from pawn.config import CLMConfig
49
+ from pawn.model import PAWNCLM
50
+
51
+ cfg = CLMConfig.large()
52
+ model = PAWNCLM(cfg)
53
+
54
+ ckpt = torch.load("model.pt", map_location="cpu", weights_only=False)
55
+ model.load_state_dict(ckpt["model_state_dict"])
56
+ model.eval()
57
+ ```
58
+
59
+ ## Training
60
+
61
+ Trained from scratch on random self-play games generated by a Rust chess engine (shakmaty).
62
+ See the [PAWN repository](https://github.com/thomas-schweich/PAWN) for training code, data pipeline, and evaluation suite.
63
+
64
+ ## License
65
+
66
+ Apache 2.0
model.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:891707422c0e63a3bfc91080cdfeae34033f9e3647c3c673b366786061706782
3
+ size 820643835