datafreak commited on
Commit
7a8de87
·
verified ·
1 Parent(s): d24961a

step1147: step 1147, 73408 examples, eval {'val_loss': 2.4097, 'val_wp_mae': 0.2865, 'top_move_acc': 0.06, 'step': 0}

Browse files
README.md ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: convaiinnovations/laya
4
+ tags: [chess, laya, decision-model]
5
+ ---
6
+ # Laya fine-tuned for chess
7
+
8
+ [Laya](https://huggingface.co/convaiinnovations/laya) fine-tuned on DeepMind ChessBench action-values:
9
+ for each legal move, a Laya `score` question predicts the side to move's win chance over 10 levels.
10
+ The engine plays the move with the highest expected win chance (no search).
11
+
12
+ - checkpoint: `step1147` (step 1147, 73,408 training examples)
13
+ - latest eval: `{'val_loss': 2.4097, 'val_wp_mae': 0.2865, 'top_move_acc': 0.06, 'step': 0}`
14
+ - encoding / levels / prompt template: see `chess_meta.json`
15
+ - code: github.com/devroopsaha744/LayaChess
chess_meta.json ADDED
@@ -0,0 +1,143 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tag": "step1147",
3
+ "final": false,
4
+ "step": 1147,
5
+ "consumed": 73408,
6
+ "n_levels": 10,
7
+ "crit": [
8
+ "0-10%",
9
+ "10-20%",
10
+ "20-30%",
11
+ "30-40%",
12
+ "40-50%",
13
+ "50-60%",
14
+ "60-70%",
15
+ "70-80%",
16
+ "80-90%",
17
+ "90-100%"
18
+ ],
19
+ "ins_template": "{side} plays {san} ({piece} {frm}-{to}{extra}). Win chance for {side}?",
20
+ "state_format": "piece lists v2",
21
+ "cfg": {
22
+ "MODEL_ID": "convaiinnovations/laya",
23
+ "N_TRAIN_SHARDS": 1,
24
+ "MAX_TRAIN_RECORDS": 10000000,
25
+ "N_VAL_RECORDS": 4000,
26
+ "N_VAL_POSITIONS": 300,
27
+ "N_LEVELS": 10,
28
+ "LABEL_SIGMA": 0.6,
29
+ "BATCH_SIZE": 32,
30
+ "GRAD_ACCUM": 2,
31
+ "LR_ENCODER": 4e-05,
32
+ "LR_HEAD": 0.0002,
33
+ "WARMUP_STEPS": 150,
34
+ "MIN_LR_FRAC": 0.05,
35
+ "WEIGHT_DECAY": 0.01,
36
+ "NUM_WORKERS": 4,
37
+ "TIME_BUDGET_H": 11.0,
38
+ "CKPT_EVERY_MIN": 45,
39
+ "EVAL_EVERY_STEPS": 2000,
40
+ "LOG_EVERY_STEPS": 50,
41
+ "SAVE_OPTIMIZER": true,
42
+ "RESUME_FROM": null,
43
+ "RESUME_LR_SCALE": 0.5,
44
+ "HF_REPO_NAME": "laya-chess",
45
+ "SEED": 0
46
+ },
47
+ "history": [
48
+ {
49
+ "val_loss": 2.4097,
50
+ "val_wp_mae": 0.2865,
51
+ "top_move_acc": 0.06,
52
+ "step": 0
53
+ },
54
+ {
55
+ "step": 50,
56
+ "loss": 2.1504
57
+ },
58
+ {
59
+ "step": 100,
60
+ "loss": 2.0519
61
+ },
62
+ {
63
+ "step": 150,
64
+ "loss": 1.9668
65
+ },
66
+ {
67
+ "step": 200,
68
+ "loss": 1.8753
69
+ },
70
+ {
71
+ "step": 250,
72
+ "loss": 1.8255
73
+ },
74
+ {
75
+ "step": 300,
76
+ "loss": 1.7603
77
+ },
78
+ {
79
+ "step": 350,
80
+ "loss": 1.7439
81
+ },
82
+ {
83
+ "step": 400,
84
+ "loss": 1.7451
85
+ },
86
+ {
87
+ "step": 450,
88
+ "loss": 1.7204
89
+ },
90
+ {
91
+ "step": 500,
92
+ "loss": 1.7132
93
+ },
94
+ {
95
+ "step": 550,
96
+ "loss": 1.7237
97
+ },
98
+ {
99
+ "step": 600,
100
+ "loss": 1.7013
101
+ },
102
+ {
103
+ "step": 650,
104
+ "loss": 1.6971
105
+ },
106
+ {
107
+ "step": 700,
108
+ "loss": 1.6698
109
+ },
110
+ {
111
+ "step": 750,
112
+ "loss": 1.6473
113
+ },
114
+ {
115
+ "step": 800,
116
+ "loss": 1.6473
117
+ },
118
+ {
119
+ "step": 850,
120
+ "loss": 1.6712
121
+ },
122
+ {
123
+ "step": 900,
124
+ "loss": 1.6612
125
+ },
126
+ {
127
+ "step": 950,
128
+ "loss": 1.642
129
+ },
130
+ {
131
+ "step": 1000,
132
+ "loss": 1.6743
133
+ },
134
+ {
135
+ "step": 1050,
136
+ "loss": 1.6471
137
+ },
138
+ {
139
+ "step": 1100,
140
+ "loss": 1.6392
141
+ }
142
+ ]
143
+ }
encoder/config.json ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "ModernBertForMaskedLM"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": 50281,
8
+ "classifier_activation": "gelu",
9
+ "classifier_bias": false,
10
+ "classifier_dropout": 0.0,
11
+ "classifier_pooling": "mean",
12
+ "cls_token_id": 50281,
13
+ "decoder_bias": true,
14
+ "deterministic_flash_attn": false,
15
+ "dtype": "float32",
16
+ "embedding_dropout": 0.0,
17
+ "eos_token_id": 50282,
18
+ "global_attn_every_n_layers": 3,
19
+ "gradient_checkpointing": false,
20
+ "hidden_activation": "gelu",
21
+ "hidden_size": 1024,
22
+ "initializer_cutoff_factor": 2.0,
23
+ "initializer_range": 0.02,
24
+ "intermediate_size": 2624,
25
+ "layer_norm_eps": 1e-05,
26
+ "layer_types": [
27
+ "full_attention",
28
+ "sliding_attention",
29
+ "sliding_attention",
30
+ "full_attention",
31
+ "sliding_attention",
32
+ "sliding_attention",
33
+ "full_attention",
34
+ "sliding_attention",
35
+ "sliding_attention",
36
+ "full_attention",
37
+ "sliding_attention",
38
+ "sliding_attention",
39
+ "full_attention",
40
+ "sliding_attention",
41
+ "sliding_attention",
42
+ "full_attention",
43
+ "sliding_attention",
44
+ "sliding_attention",
45
+ "full_attention",
46
+ "sliding_attention",
47
+ "sliding_attention",
48
+ "full_attention",
49
+ "sliding_attention",
50
+ "sliding_attention",
51
+ "full_attention",
52
+ "sliding_attention",
53
+ "sliding_attention",
54
+ "full_attention"
55
+ ],
56
+ "local_attention": 128,
57
+ "max_position_embeddings": 8192,
58
+ "mlp_bias": false,
59
+ "mlp_dropout": 0.0,
60
+ "model_type": "modernbert",
61
+ "norm_bias": false,
62
+ "norm_eps": 1e-05,
63
+ "num_attention_heads": 16,
64
+ "num_hidden_layers": 28,
65
+ "pad_token_id": 50283,
66
+ "position_embedding_type": "absolute",
67
+ "repad_logits_with_grad": false,
68
+ "rope_parameters": {
69
+ "full_attention": {
70
+ "rope_theta": 160000.0,
71
+ "rope_type": "default"
72
+ },
73
+ "sliding_attention": {
74
+ "rope_theta": 10000.0,
75
+ "rope_type": "default"
76
+ }
77
+ },
78
+ "sep_token_id": 50282,
79
+ "sparse_pred_ignore_index": -100,
80
+ "sparse_prediction": false,
81
+ "tie_word_embeddings": true,
82
+ "transformers_version": "5.0.0",
83
+ "vocab_size": 50368
84
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9a51fa2150286fa28962e5f07d3786bf6d6e4ad5af5ff83be66d3be2d6e218cf
3
+ size 842609220
rl_agent_config.json ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "encoder": "answerdotai/ModernBERT-large",
3
+ "head_layers": 2,
4
+ "max_len": 512,
5
+ "head_max_len": 192,
6
+ "max_prefixes": 6,
7
+ "act_costs": {
8
+ "escalate": 0.5
9
+ },
10
+ "cost_wrong_act": 3.0,
11
+ "amp_dtype": "bf16",
12
+ "model_name": "rl-agent",
13
+ "temperature": [
14
+ 1.6369030475616455,
15
+ 1.2514300346374512,
16
+ 1.983399510383606
17
+ ],
18
+ "temperature_by_options": {
19
+ "choice:3-5": 1.7601518630981445,
20
+ "choice:6-10": 1.0000158548355103,
21
+ "score:3-5": 1.2514300346374512,
22
+ "noul:2": 1.983399510383606,
23
+ "choice:11+": 0.10058280825614929,
24
+ "choice:2": 1.9063563346862793
25
+ },
26
+ "training": {
27
+ "updates": 7313,
28
+ "epochs_completed": 1,
29
+ "hours": 1.96,
30
+ "world_size": 1,
31
+ "fine_tuned_from_checkpoint": true
32
+ }
33
+ }
tokenizer/tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer/tokenizer_config.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "clean_up_tokenization_spaces": true,
3
+ "cls_token": "[CLS]",
4
+ "mask_token": "[MASK]",
5
+ "model_input_names": [
6
+ "input_ids",
7
+ "attention_mask"
8
+ ],
9
+ "model_max_length": 8192,
10
+ "pad_token": "[PAD]",
11
+ "sep_token": "[SEP]",
12
+ "tokenizer_class": "PreTrainedTokenizerFast",
13
+ "unk_token": "[UNK]"
14
+ }