File size: 1,641 Bytes
50f621b 829e92e 50f621b fd3f098 50f621b fd3f098 50f621b bed8516 50f621b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | # chesshacks_model
NNUE (Efficiently Updatable Neural Network) chess evaluation model
## Model Details
- **Model type**: NNUE Chess Evaluation
- **Architecture**: HalfKP feature representation
- **Uploaded**: 2025-11-15 22:49:16
## Architecture
```
Input: HalfKP features (40,960 dimensions per perspective)
β
Feature Transformer: 40,960 β 256 (separate for white/black)
β
ClippedReLU activation
β
Concatenate: 256 + 256 β 512
β
Hidden Layer 1: 512 β 32 + ClippedReLU
β
Hidden Layer 2: 32 β 32 + ClippedReLU
β
Output Layer: 32 β 1 (centipawn evaluation)
```
## Training Information
- **Epoch**: 45
- **Training Loss**: 2581668.3669
- **Validation Loss**: 2661316.6873
## Usage
```python
import torch
from huggingface_hub import hf_hub_download
import chess
# Download and load model
checkpoint_path = hf_hub_download(repo_id="chesshacks_model", filename="pytorch_model.bin")
checkpoint = torch.load(checkpoint_path, map_location='cpu')
# Load model config
model_config = checkpoint['model_config']
# Create model instance (you'll need the NNUEModel class)
# from model import NNUEModel
# model = NNUEModel(**model_config)
# model.load_state_dict(checkpoint['model_state_dict'])
# model.eval()
# Evaluate a position
# board = chess.Board()
# score = model.evaluate_board(board)
# print(f"Evaluation: {score:.2f} centipawns")
```
## Training Configuration
- **batch_size**: 256
- **learning_rate**: 0.003
- **num_epochs**: 50
- **optimizer**: adam
- **loss_function**: mse
- **hidden_size**: 256
- **hidden2_size**: 32
- **hidden3_size**: 32
---
*Model generated with NNUE training pipeline*
|