jleezhang commited on
Commit
50f621b
Β·
verified Β·
1 Parent(s): 76421ca

Upload folder using huggingface_hub

Browse files
Files changed (4) hide show
  1. README.md +73 -2
  2. best_model.pt +1 -1
  3. config.json +2 -3
  4. pytorch_model.bin +1 -1
README.md CHANGED
@@ -1,3 +1,74 @@
1
- chessmodel
2
 
3
- 2025-11-15 16:48:46
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # chesshacks_model
2
 
3
+ NNUE (Efficiently Updatable Neural Network) chess evaluation model
4
+
5
+ ## Model Details
6
+
7
+ - **Model type**: NNUE Chess Evaluation
8
+ - **Architecture**: HalfKP feature representation
9
+ - **Uploaded**: 2025-11-15 17:03:16
10
+
11
+ ## Architecture
12
+
13
+ ```
14
+ Input: HalfKP features (40,960 dimensions per perspective)
15
+ ↓
16
+ Feature Transformer: 40,960 β†’ 256 (separate for white/black)
17
+ ↓
18
+ ClippedReLU activation
19
+ ↓
20
+ Concatenate: 256 + 256 β†’ 512
21
+ ↓
22
+ Hidden Layer 1: 512 β†’ 32 + ClippedReLU
23
+ ↓
24
+ Hidden Layer 2: 32 β†’ 32 + ClippedReLU
25
+ ↓
26
+ Output Layer: 32 β†’ 1 (centipawn evaluation)
27
+ ```
28
+
29
+ ## Training Information
30
+
31
+ - **Epoch**: 1
32
+ - **Training Loss**: 3135323.2188
33
+ - **Validation Loss**: 3236829.0000
34
+
35
+ ## Usage
36
+
37
+ ```python
38
+ import torch
39
+ from huggingface_hub import hf_hub_download
40
+ import chess
41
+
42
+ # Download and load model
43
+ checkpoint_path = hf_hub_download(repo_id="chesshacks_model", filename="pytorch_model.bin")
44
+ checkpoint = torch.load(checkpoint_path, map_location='cpu')
45
+
46
+ # Load model config
47
+ model_config = checkpoint['model_config']
48
+
49
+ # Create model instance (you'll need the NNUEModel class)
50
+ # from model import NNUEModel
51
+ # model = NNUEModel(**model_config)
52
+ # model.load_state_dict(checkpoint['model_state_dict'])
53
+ # model.eval()
54
+
55
+ # Evaluate a position
56
+ # board = chess.Board()
57
+ # score = model.evaluate_board(board)
58
+ # print(f"Evaluation: {score:.2f} centipawns")
59
+ ```
60
+
61
+ ## Training Configuration
62
+
63
+ - **batch_size**: 256
64
+ - **learning_rate**: 0.001
65
+ - **num_epochs**: 2
66
+ - **optimizer**: adam
67
+ - **loss_function**: mse
68
+ - **hidden_size**: 256
69
+ - **hidden2_size**: 32
70
+ - **hidden3_size**: 32
71
+
72
+ ---
73
+
74
+ *Model generated with NNUE training pipeline*
best_model.pt CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:5c725ea63f4d635ebdf7406ecd9fac0f5e09cbb874b3eab3a8cfce79d179a44d
3
  size 126054005
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:819f5299839f0432894e7a1620e4cb2c7baa85013cec1bef0418cc7b7df87ab6
3
  size 126054005
config.json CHANGED
@@ -4,7 +4,7 @@
4
  "hidden_size": 256,
5
  "hidden2_size": 32,
6
  "hidden3_size": 32,
7
- "feature_size": 4096000
8
  },
9
  "training_config": {
10
  "train_data_path": "data/train.jsonl",
@@ -22,7 +22,6 @@
22
  "train_val_split_ratio": 0.9,
23
  "checkpoint_dir": "checkpoints",
24
  "save_every_n_epochs": 10,
25
- "save_best_only": true,
26
  "validate_every_n_epochs": 1,
27
  "device": "cpu",
28
  "optimizer": "adam",
@@ -59,7 +58,7 @@
59
  "resume_from": null,
60
  "hf_repo_id": "jleezhang/chesshacks_model",
61
  "hf_auto_upload": true,
62
- "hf_upload_all_checkpoints": true,
63
  "hf_checkpoints_dir": null,
64
  "hf_model_name": null,
65
  "hf_model_description": null,
 
4
  "hidden_size": 256,
5
  "hidden2_size": 32,
6
  "hidden3_size": 32,
7
+ "feature_size": 40960
8
  },
9
  "training_config": {
10
  "train_data_path": "data/train.jsonl",
 
22
  "train_val_split_ratio": 0.9,
23
  "checkpoint_dir": "checkpoints",
24
  "save_every_n_epochs": 10,
 
25
  "validate_every_n_epochs": 1,
26
  "device": "cpu",
27
  "optimizer": "adam",
 
58
  "resume_from": null,
59
  "hf_repo_id": "jleezhang/chesshacks_model",
60
  "hf_auto_upload": true,
61
+ "hf_upload_all_checkpoints": false,
62
  "hf_checkpoints_dir": null,
63
  "hf_model_name": null,
64
  "hf_model_description": null,
pytorch_model.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:00e23ec8d1d48e8f206511caee1b87a0e220e6a7ff650d6057a02922bc7b9e35
3
  size 42017825
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f3de791f85735ebaf380901683b410362c3e83683c67330dc66a6755860032d5
3
  size 42017825