jsture commited on
Commit
d734b00
·
verified ·
1 Parent(s): b6c6f2b

Upload trained ModernMolBERT checkpoint

Browse files
README.md CHANGED
@@ -1,53 +1,114 @@
1
  ---
 
2
  library_name: transformers
 
3
  tags:
4
- - chemistry
5
- - selfies
6
- - masked-language-modeling
 
 
 
7
  ---
8
 
9
  # HauserGroup/ModernMolBERT-small
10
 
11
- ModernBERT pre-trained on SELFIES for masked language modeling.
12
 
13
- ## Model details
 
 
 
 
 
 
 
 
14
 
15
  | field | value |
16
  |-------|-------|
17
  | model_type | modernbert |
18
- | vocab_size | 2439 |
19
  | hidden_size | 512 |
20
  | num_hidden_layers | 8 |
21
  | num_attention_heads | 8 |
22
  | intermediate_size | 2048 |
23
  | max_position_embeddings | 128 |
24
 
25
- ## Training
26
 
27
- | field | value |
28
- |-------|-------|
29
- | dataset_name | data/pretrain/chembl36_selfies_tokenized |
30
- | model_size | small |
31
- | mlm_probability | 0.15 |
32
- | masking_strategy | standard |
33
- | max_steps | 30000 |
34
- | learning_rate | 0.0001 |
35
- | per_device_train_batch_size | 256 |
36
- | gradient_accumulation_steps | 1 |
37
- | warmup_steps | 1500 |
38
- | weight_decay | 0.01 |
39
- | max_seq_length | 128 |
40
- | seed | 42 |
41
- | best_eval_loss | 1.500394 |
42
- | best_global_step | 25000 |
43
-
44
- ## Usage
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
 
46
  ```python
47
- from transformers import AutoModelForMaskedLM, AutoTokenizer
 
 
 
 
 
 
 
48
 
49
- model = AutoModelForMaskedLM.from_pretrained("HauserGroup/ModernMolBERT-small")
50
- tokenizer = AutoTokenizer.from_pretrained("HauserGroup/ModernMolBERT-small", trust_remote_code=True)
51
  ```
52
 
53
- This model expects SELFIES strings. Convert SMILES before tokenization.
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ license: mit
3
  library_name: transformers
4
+ pipeline_tag: fill-mask
5
  tags:
6
+ - chemistry
7
+ - molecules
8
+ - selfies
9
+ - ape-tokenizer
10
+ - modernbert
11
+ - masked-language-modeling
12
  ---
13
 
14
  # HauserGroup/ModernMolBERT-small
15
 
16
+ ModernMolBERT is a compact ModernBERT encoder pre-trained from scratch with masked language modeling on ~2.4M SELFIES strings from ChEMBL 36, using a chemically aware Atom Pair Encoding (APE) tokenizer. It expects SELFIES input and produces general-purpose molecular embeddings.
17
 
18
+ ## Model Details
19
+
20
+ - **Developed by:** Hauser Group, Department of Drug Design and Pharmacology, University of Copenhagen
21
+ - **Model type:** ModernBERT encoder — molecular embedding model trained with masked language modeling
22
+ - **Input representation:** SELFIES (convert SMILES first; see below)
23
+ - **Tokenizer:** Atom Pair Encoding (APE) over SELFIES primitives
24
+ - **Pre-training data:** ChEMBL 36 (~2.4M unique small molecules)
25
+ - **License:** MIT
26
+ - **Repository:** https://github.com/HauserGroup/ModernMolBERT
27
 
28
  | field | value |
29
  |-------|-------|
30
  | model_type | modernbert |
31
+ | vocab_size | 631 |
32
  | hidden_size | 512 |
33
  | num_hidden_layers | 8 |
34
  | num_attention_heads | 8 |
35
  | intermediate_size | 2048 |
36
  | max_position_embeddings | 128 |
37
 
38
+ ## How to Get Started with the Model
39
 
40
+ The model consumes **SELFIES** strings tokenized with the APE tokenizer. The main output for molecular representation learning is the first-token embedding:
41
+
42
+ ```python
43
+ # pip install transformers torch
44
+ import torch
45
+ from transformers import AutoModel, AutoTokenizer
46
+
47
+ repo = 'HauserGroup/ModernMolBERT-small'
48
+ model = AutoModel.from_pretrained(repo).eval()
49
+ tokenizer = AutoTokenizer.from_pretrained(
50
+ repo,
51
+ subfolder='ape_tokenizer',
52
+ trust_remote_code=True,
53
+ use_fast=False,
54
+ )
55
+
56
+ # A SELFIES string (one bracketed token per primitive); here psilocybin.
57
+ selfies = '[C][N][Branch1][C][C][C][C][C][=C][NH1][C][=C][C][=C][C][Branch1][#Branch2][O][P][=Branch1][C][=O][Branch1][C][O][O][=C][Ring1][=C][Ring1][O]'
58
+
59
+ inputs = tokenizer(selfies, return_tensors='pt')
60
+ with torch.no_grad():
61
+ outputs = model(**inputs)
62
+ embedding = outputs.last_hidden_state[:, 0]
63
+
64
+ tokens = tokenizer.convert_ids_to_tokens(inputs['input_ids'][0])
65
+ embedding_preview = [round(x, 4) for x in embedding[0, :5].tolist()]
66
+ print(f"Token IDs:\n{inputs['input_ids'][0].tolist()}\n")
67
+ print(f"Tokens:\n{tokens}\n")
68
+ print(f"Embedding shape: {tuple(embedding.shape)}")
69
+ print(f"Embedding first 5 values:\n{embedding_preview}")
70
+ ```
71
+
72
+ Output:
73
+
74
+ ```text
75
+ Token IDs:
76
+ [0, 352, 336, 334, 334, 7, 406, 388, 388, 392, 489, 335, 18, 336, 426, 482, 482, 6, 2]
77
+
78
+ Tokens:
79
+ ['<s>', '[C][N]', '[Branch1][C]', '[C][C]', '[C][C]', '[=C]', '[NH1][C]', '[=C][C]', '[=C][C]', '[Branch1][#Branch2]', '[O][P]', '[=Branch1][C]', '[=O]', '[Branch1][C]', '[O][O]', '[=C][Ring1]', '[=C][Ring1]', '[O]', '</s>']
80
+
81
+ Embedding shape: (1, 512)
82
+ Embedding first 5 values:
83
+ [-0.1029, 0.2197, -0.0518, -0.7983, -0.6783]
84
+ ```
85
+
86
+ If you start from SMILES, convert it to SELFIES first (e.g. the [`selfies`](https://github.com/aspuru-guzik-group/selfies) package: `selfies.encoder("CC(=O)Oc1ccccc1C(=O)O")`).
87
+
88
+ For masked-token predictions, load the same checkpoint with `AutoModelForMaskedLM`:
89
 
90
  ```python
91
+ from transformers import AutoModelForMaskedLM
92
+
93
+ mlm = AutoModelForMaskedLM.from_pretrained(repo)
94
+ logits = mlm(**inputs).logits
95
+ print(f"Logits shape: {tuple(logits.shape)}")
96
+ ```
97
+
98
+ Output:
99
 
100
+ ```text
101
+ Logits shape: (1, 19, 631)
102
  ```
103
 
104
+ > Current Transformers releases disable custom root tokenizers for `model_type='modernbert'` before loading `auto_map`, so the tokenizer must be loaded from `ape_tokenizer/`. The root tokenizer files are also shipped for forward compatibility.
105
+
106
+ ## Uses
107
+
108
+ - **Direct use:** molecular embeddings for property prediction, similarity search, clustering, and retrieval; masked-token fill-in.
109
+ - **Downstream use:** fine-tuning for molecular classification or regression on SELFIES inputs.
110
+ - **Out of scope:** natural-language text; generating valid SMILES; 3D/conformer-dependent tasks.
111
+
112
+ ## Bias, Risks, and Limitations
113
+
114
+ Pre-trained only on drug-like ChEMBL 36 chemistry; may not generalize to natural products, agrochemicals, fragments, or other under-represented chemical space. Performance depends on the downstream task and adaptation strategy. No access to 3D/conformer information.
all_results.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 3.066,
3
+ "eval_loss": 0.3744058609008789,
4
+ "eval_masked_accuracy": 0.8805643239064613,
5
+ "eval_perplexity": 1.454127204085947,
6
+ "eval_runtime": 2.8656,
7
+ "eval_samples_per_second": 1429.379,
8
+ "eval_steps_per_second": 5.584,
9
+ "num_parameters": 34149495.0,
10
+ "total_flos": 9.74439612930639e+16,
11
+ "train_loss": 0.6228721523284912,
12
+ "train_runtime": 2832.8619,
13
+ "train_samples_per_second": 2711.039,
14
+ "train_samples_streaming": 7680000.0,
15
+ "train_steps_per_second": 10.59
16
+ }
ape_tokenizer/ape_tokenizer_metadata.json ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "dataset_name": "data/pretrain/chembl36_selfies",
3
+ "selfies_column": "selfies",
4
+ "train_split": "train",
5
+ "validation_split": "valid",
6
+ "use_validation_split": true,
7
+ "representation": "SELFIES",
8
+ "expected_input": "SELFIES strings only. Convert SMILES before inference using a helper such as smiles_to_selfies().",
9
+ "tokenizer_vocab_path": "tokenizer/chembl36_selfies_2m_ape_max2_min3000.json",
10
+ "tokenizer_metadata_path": "tokenizer/chembl36_selfies_2m_ape_max2_min3000.metadata.json",
11
+ "backend": "cuda",
12
+ "platform": "Linux-6.8.0-110-generic-x86_64-with-glibc2.35",
13
+ "torch_version": "2.11.0+cu130",
14
+ "transformers_version": "5.8.1",
15
+ "vocab_size": 631,
16
+ "special_ids": {
17
+ "pad_token": 1,
18
+ "bos_token": 0,
19
+ "eos_token": 2,
20
+ "unk_token": 3,
21
+ "mask_token": 4
22
+ },
23
+ "num_parameters": 34149495,
24
+ "tokenizer_stats": {
25
+ "sample_size": 1000.0,
26
+ "mean_len": 25.555,
27
+ "p50_len": 25.0,
28
+ "p95_len": 41.0,
29
+ "p99_len": 51.0,
30
+ "max_len": 62.0,
31
+ "truncation_rate": 0.0,
32
+ "unk_rate": 0.0,
33
+ "empty_sequence_rate": 0.0,
34
+ "mostly_unknown_rate": 0.0
35
+ },
36
+ "final_eval_metrics": {
37
+ "eval_loss": 0.3744058609008789,
38
+ "eval_masked_accuracy": 0.8805643239064613,
39
+ "eval_runtime": 2.8656,
40
+ "eval_samples_per_second": 1429.379,
41
+ "eval_steps_per_second": 5.584,
42
+ "epoch": 3.066,
43
+ "eval_perplexity": 1.454127204085947
44
+ },
45
+ "trainer_state_summary": {
46
+ "best_global_step": 30000,
47
+ "best_metric": 0.37694016098976135,
48
+ "best_model_checkpoint": "runs/chembl36_small_mask_mlm_lr_sweep/mask_standard__mlm_0p15__lr_4e-4/checkpoint-30000",
49
+ "global_step": 30000
50
+ },
51
+ "args": {
52
+ "output_dir": "runs/chembl36_small_mask_mlm_lr_sweep/mask_standard__mlm_0p15__lr_4e-4",
53
+ "tokenizer_vocab_path": "tokenizer/chembl36_selfies_2m_ape_max2_min3000.json",
54
+ "tokenizer_metadata_path": "tokenizer/chembl36_selfies_2m_ape_max2_min3000.metadata.json",
55
+ "dataset_name": "data/pretrain/chembl36_selfies",
56
+ "selfies_column": "selfies",
57
+ "train_split": "train",
58
+ "validation_split": "valid",
59
+ "use_validation_split": true,
60
+ "data_dir": null,
61
+ "data_files": null,
62
+ "eval_size": 4096,
63
+ "shuffle_buffer_size": 100000,
64
+ "seed": 42,
65
+ "val_split_mod": 100,
66
+ "val_split_bucket": 0,
67
+ "tokenizer_validation_samples": 1000,
68
+ "unk_rate_threshold": 0.001,
69
+ "truncation_warn_threshold": 0.05,
70
+ "model_size": "small",
71
+ "max_seq_length": 128,
72
+ "mlm_probability": 0.15,
73
+ "masking_strategy": "standard",
74
+ "span_p_geom": 0.4,
75
+ "span_max_length": 6,
76
+ "heteroatom_start_weight": 2.0,
77
+ "max_steps": 30000,
78
+ "per_device_train_batch_size": 256,
79
+ "per_device_eval_batch_size": 256,
80
+ "gradient_accumulation_steps": 1,
81
+ "learning_rate": 0.0004,
82
+ "weight_decay": 0.01,
83
+ "warmup_steps": 1500,
84
+ "max_grad_norm": 1.0,
85
+ "load_best_model_at_end": true,
86
+ "metric_for_best_model": "eval_loss",
87
+ "greater_is_better": false,
88
+ "logging_steps": 100,
89
+ "eval_steps": 5000,
90
+ "save_steps": 5000,
91
+ "save_total_limit": 2,
92
+ "device_backend": "cuda",
93
+ "bf16": true,
94
+ "fp16": false,
95
+ "num_workers": 4,
96
+ "max_eval_batches": 16,
97
+ "report_to": "tensorboard",
98
+ "compute_masked_accuracy": true,
99
+ "debug": false,
100
+ "hf_login": false
101
+ }
102
+ }
ape_tokenizer/selfies_vocab.json ADDED
@@ -0,0 +1,633 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "</s>": 2,
3
+ "<mask>": 4,
4
+ "<pad>": 1,
5
+ "<s>": 0,
6
+ "<unk>": 3,
7
+ "[#11C]": 256,
8
+ "[#14C]": 247,
9
+ "[#Branch1]": 22,
10
+ "[#Branch1][=C]": 479,
11
+ "[#Branch1][=O]": 542,
12
+ "[#Branch1][C]": 400,
13
+ "[#Branch1][N]": 453,
14
+ "[#Branch1][O]": 491,
15
+ "[#Branch1][S]": 528,
16
+ "[#Branch2]": 15,
17
+ "[#Branch2][=C]": 469,
18
+ "[#Branch2][=N]": 561,
19
+ "[#Branch2][=O]": 531,
20
+ "[#Branch2][C]": 380,
21
+ "[#Branch2][N]": 438,
22
+ "[#Branch2][O]": 461,
23
+ "[#Branch2][S]": 529,
24
+ "[#C-1]": 141,
25
+ "[#CH0]": 248,
26
+ "[#C]": 23,
27
+ "[#C][=C]": 496,
28
+ "[#C][=N]": 569,
29
+ "[#C][=O]": 515,
30
+ "[#C][C]": 407,
31
+ "[#C][N]": 465,
32
+ "[#C][O]": 538,
33
+ "[#C][S]": 534,
34
+ "[#N+1]": 123,
35
+ "[#N]": 19,
36
+ "[#N][=C]": 435,
37
+ "[#N][C]": 475,
38
+ "[#O+1]": 589,
39
+ "[#S]": 262,
40
+ "[-/Ring1]": 92,
41
+ "[-/Ring2]": 90,
42
+ "[-/Ring3]": 590,
43
+ "[-\\Ring1]": 167,
44
+ "[-\\Ring2]": 120,
45
+ "[-\\Ring3]": 591,
46
+ "[/123I]": 245,
47
+ "[/125I]": 117,
48
+ "[/131I]": 210,
49
+ "[/13CH1]": 272,
50
+ "[/13C]": 197,
51
+ "[/14CH1]": 324,
52
+ "[/14C]": 281,
53
+ "[/As]": 259,
54
+ "[/B]": 161,
55
+ "[/Br]": 62,
56
+ "[/C-1]": 229,
57
+ "[/C@@H1]": 45,
58
+ "[/C@@]": 105,
59
+ "[/C@H1]": 87,
60
+ "[/C@]": 76,
61
+ "[/C]": 20,
62
+ "[/C][=Branch1]": 428,
63
+ "[/C][=Branch2]": 450,
64
+ "[/C][=C]": 364,
65
+ "[/C][=N]": 454,
66
+ "[/C][Branch1]": 540,
67
+ "[/C][C]": 564,
68
+ "[/Cl]": 101,
69
+ "[/F]": 160,
70
+ "[/I]": 94,
71
+ "[/N+1]": 68,
72
+ "[/N-1]": 142,
73
+ "[/NH1]": 114,
74
+ "[/N]": 48,
75
+ "[/N][=C]": 418,
76
+ "[/N][=N]": 580,
77
+ "[/N][C]": 499,
78
+ "[/O-1]": 128,
79
+ "[/O]": 53,
80
+ "[/P+1]": 181,
81
+ "[/P@@]": 231,
82
+ "[/P]": 102,
83
+ "[/S+1]": 67,
84
+ "[/S-1]": 258,
85
+ "[/SH0]": 303,
86
+ "[/S]": 71,
87
+ "[/Se]": 149,
88
+ "[/Si]": 125,
89
+ "[10B]": 283,
90
+ "[11C@@H1]": 304,
91
+ "[11CH2]": 249,
92
+ "[11CH3]": 74,
93
+ "[11C]": 137,
94
+ "[123I-1]": 312,
95
+ "[123I]": 69,
96
+ "[123Te]": 186,
97
+ "[124I-1]": 325,
98
+ "[124I]": 133,
99
+ "[125I-1]": 171,
100
+ "[125I]": 70,
101
+ "[127I]": 301,
102
+ "[127Xe]": 311,
103
+ "[129Xe]": 292,
104
+ "[131Cs]": 275,
105
+ "[131I-1]": 329,
106
+ "[131I]": 86,
107
+ "[133Xe]": 322,
108
+ "[13CH1]": 198,
109
+ "[13CH3]": 277,
110
+ "[13C]": 166,
111
+ "[14C@@H1]": 318,
112
+ "[14C@@]": 302,
113
+ "[14C@H1]": 306,
114
+ "[14CH1]": 185,
115
+ "[14CH2]": 175,
116
+ "[14CH3]": 177,
117
+ "[14C]": 143,
118
+ "[15NH1]": 200,
119
+ "[15N]": 134,
120
+ "[17F]": 218,
121
+ "[18F-1]": 294,
122
+ "[18F]": 73,
123
+ "[18OH1]": 252,
124
+ "[19F]": 144,
125
+ "[211At]": 286,
126
+ "[223Ra]": 193,
127
+ "[22Na+1]": 191,
128
+ "[2H]": 88,
129
+ "[32P]": 307,
130
+ "[35S]": 182,
131
+ "[3H]": 103,
132
+ "[42K+1]": 188,
133
+ "[45Ca+2]": 178,
134
+ "[47Ca+2]": 201,
135
+ "[68Ga+3]": 273,
136
+ "[73Se]": 242,
137
+ "[75Se]": 327,
138
+ "[76Br]": 152,
139
+ "[81Kr]": 326,
140
+ "[82Rb+1]": 314,
141
+ "[82Rb]": 280,
142
+ "[85Sr+2]": 180,
143
+ "[89Sr+2]": 319,
144
+ "[=11C]": 132,
145
+ "[=13CH1]": 196,
146
+ "[=13C]": 199,
147
+ "[=14CH1]": 156,
148
+ "[=14C]": 194,
149
+ "[=18O]": 317,
150
+ "[=32PH1]": 257,
151
+ "[=32P]": 244,
152
+ "[=Al]": 295,
153
+ "[=As]": 145,
154
+ "[=B-1]": 159,
155
+ "[=B]": 176,
156
+ "[=Branch1]": 13,
157
+ "[=Branch1][=C]": 451,
158
+ "[=Branch1][=N]": 563,
159
+ "[=Branch1][=O]": 546,
160
+ "[=Branch1][C]": 335,
161
+ "[=Branch1][N+1]": 448,
162
+ "[=Branch1][N]": 508,
163
+ "[=Branch1][O]": 518,
164
+ "[=Branch2]": 14,
165
+ "[=Branch2][=C]": 472,
166
+ "[=Branch2][=N]": 584,
167
+ "[=Branch2][=O]": 549,
168
+ "[=Branch2][=Ring1]": 556,
169
+ "[=Branch2][C]": 383,
170
+ "[=Branch2][N]": 424,
171
+ "[=Branch2][O]": 507,
172
+ "[=Branch2][S]": 509,
173
+ "[=Branch3]": 592,
174
+ "[=C+1]": 267,
175
+ "[=CH0]": 593,
176
+ "[=C]": 7,
177
+ "[=C][=C]": 492,
178
+ "[=C][=O]": 516,
179
+ "[=C][Branch1]": 467,
180
+ "[=C][C]": 388,
181
+ "[=C][N]": 437,
182
+ "[=C][O]": 495,
183
+ "[=C][Ring1]": 482,
184
+ "[=C][S]": 456,
185
+ "[=Mg]": 310,
186
+ "[=N+1]": 32,
187
+ "[=N-1]": 63,
188
+ "[=NH1+1]": 232,
189
+ "[=NH2+1]": 243,
190
+ "[=N]": 29,
191
+ "[=N][=C]": 473,
192
+ "[=N][=N]": 579,
193
+ "[=N][=O]": 517,
194
+ "[=N][C]": 362,
195
+ "[=N][NH1]": 443,
196
+ "[=N][N]": 382,
197
+ "[=N][O]": 427,
198
+ "[=N][Ring1]": 513,
199
+ "[=N][S]": 501,
200
+ "[=O+1]": 116,
201
+ "[=OH0]": 296,
202
+ "[=OH1+1]": 594,
203
+ "[=O]": 18,
204
+ "[=O][/C]": 572,
205
+ "[=O][=C]": 411,
206
+ "[=O][=N]": 583,
207
+ "[=O][=O]": 425,
208
+ "[=O][C@@H1]": 414,
209
+ "[=O][C@@]": 544,
210
+ "[=O][C@H1]": 431,
211
+ "[=O][C@]": 514,
212
+ "[=O][C]": 361,
213
+ "[=O][NH1]": 434,
214
+ "[=O][N]": 345,
215
+ "[=O][O-1]": 391,
216
+ "[=O][O]": 370,
217
+ "[=O][S]": 571,
218
+ "[=P@@]": 107,
219
+ "[=P@]": 129,
220
+ "[=PH1]": 147,
221
+ "[=PH2]": 204,
222
+ "[=P]": 57,
223
+ "[=Ring1]": 34,
224
+ "[=Ring1][#Branch1]": 570,
225
+ "[=Ring1][#Branch2]": 576,
226
+ "[=Ring1][#C]": 562,
227
+ "[=Ring1][=Branch1]": 539,
228
+ "[=Ring1][=Branch2]": 481,
229
+ "[=Ring1][=C]": 582,
230
+ "[=Ring1][=N]": 545,
231
+ "[=Ring1][Branch1]": 442,
232
+ "[=Ring1][Branch2]": 568,
233
+ "[=Ring1][N]": 557,
234
+ "[=Ring1][O]": 526,
235
+ "[=Ring1][P]": 581,
236
+ "[=Ring1][S]": 565,
237
+ "[=Ring2]": 41,
238
+ "[=Ring2][Ring1]": 506,
239
+ "[=S+1]": 98,
240
+ "[=S-1]": 278,
241
+ "[=S@@]": 50,
242
+ "[=S@]": 164,
243
+ "[=SH0]": 269,
244
+ "[=SH1]": 150,
245
+ "[=S]": 26,
246
+ "[=S][N]": 455,
247
+ "[=Se+1]": 174,
248
+ "[=Se]": 162,
249
+ "[=Si]": 173,
250
+ "[=Te+1]": 179,
251
+ "[=Te]": 253,
252
+ "[Ag+1]": 190,
253
+ "[Ag-4]": 328,
254
+ "[Ag]": 146,
255
+ "[Al+3]": 223,
256
+ "[Al]": 225,
257
+ "[Ar]": 266,
258
+ "[As+1]": 189,
259
+ "[As-1]": 298,
260
+ "[AsH1]": 282,
261
+ "[AsH3]": 316,
262
+ "[As]": 84,
263
+ "[At]": 290,
264
+ "[Au-1]": 595,
265
+ "[B-1]": 100,
266
+ "[B@-1]": 206,
267
+ "[B@@-1]": 208,
268
+ "[BH0]": 165,
269
+ "[BH1-1]": 251,
270
+ "[BH2-1]": 202,
271
+ "[BH3-1]": 131,
272
+ "[B]": 65,
273
+ "[Ba+2]": 157,
274
+ "[Ba]": 291,
275
+ "[Be+2]": 246,
276
+ "[Bi+3]": 169,
277
+ "[Bi]": 155,
278
+ "[Br+2]": 254,
279
+ "[Br-1]": 52,
280
+ "[BrH0]": 596,
281
+ "[Br]": 21,
282
+ "[Br][=C]": 432,
283
+ "[Br][C]": 558,
284
+ "[Branch1]": 11,
285
+ "[Branch1][#Branch1]": 410,
286
+ "[Branch1][#Branch2]": 392,
287
+ "[Branch1][#C]": 399,
288
+ "[Branch1][=Branch1]": 401,
289
+ "[Branch1][=Branch2]": 358,
290
+ "[Branch1][=C]": 379,
291
+ "[Branch1][=N]": 405,
292
+ "[Branch1][=O]": 532,
293
+ "[Branch1][Branch1]": 476,
294
+ "[Branch1][Branch2]": 394,
295
+ "[Branch1][C]": 336,
296
+ "[Branch1][N]": 378,
297
+ "[Branch1][O]": 398,
298
+ "[Branch1][P]": 403,
299
+ "[Branch1][Ring1]": 396,
300
+ "[Branch1][Ring2]": 429,
301
+ "[Branch1][S]": 402,
302
+ "[Branch2]": 8,
303
+ "[Branch2][#Branch1]": 551,
304
+ "[Branch2][=Branch1]": 446,
305
+ "[Branch2][=C]": 464,
306
+ "[Branch2][=N]": 560,
307
+ "[Branch2][=O]": 522,
308
+ "[Branch2][Branch1]": 384,
309
+ "[Branch2][C]": 409,
310
+ "[Branch2][N]": 440,
311
+ "[Branch2][O]": 478,
312
+ "[Branch2][Ring1]": 340,
313
+ "[Branch2][Ring2]": 350,
314
+ "[Branch2][S]": 535,
315
+ "[Branch3]": 597,
316
+ "[C+1]": 106,
317
+ "[C-1]": 119,
318
+ "[C@@H1]": 27,
319
+ "[C@@H1][Branch1]": 371,
320
+ "[C@@H1][C@@H1]": 547,
321
+ "[C@@H1][C@H1]": 586,
322
+ "[C@@H1][C]": 447,
323
+ "[C@@H1][O]": 493,
324
+ "[C@@H1][Ring1]": 524,
325
+ "[C@@]": 28,
326
+ "[C@@][Branch1]": 413,
327
+ "[C@H1]": 33,
328
+ "[C@H1][Branch1]": 366,
329
+ "[C@H1][Branch2]": 573,
330
+ "[C@H1][C@@H1]": 505,
331
+ "[C@H1][C@H1]": 575,
332
+ "[C@H1][C]": 445,
333
+ "[C@H1][O]": 530,
334
+ "[C@H1][Ring1]": 470,
335
+ "[C@]": 35,
336
+ "[C@][Branch1]": 412,
337
+ "[CH0]": 227,
338
+ "[CH1-1]": 138,
339
+ "[CH1]": 323,
340
+ "[CH2-1]": 598,
341
+ "[CH2]": 224,
342
+ "[CH3]": 226,
343
+ "[C]": 5,
344
+ "[C][#C]": 500,
345
+ "[C][#N]": 536,
346
+ "[C][=Branch1]": 377,
347
+ "[C][=Branch2]": 488,
348
+ "[C][=C]": 333,
349
+ "[C][=N+1]": 543,
350
+ "[C][=N]": 346,
351
+ "[C][=O]": 511,
352
+ "[C][=Ring1]": 395,
353
+ "[C][=Ring2]": 471,
354
+ "[C][Branch1]": 342,
355
+ "[C][Branch2]": 423,
356
+ "[C][C@@H1]": 386,
357
+ "[C][C@@]": 480,
358
+ "[C][C@H1]": 385,
359
+ "[C][C@]": 462,
360
+ "[C][C]": 334,
361
+ "[C][Cl]": 574,
362
+ "[C][F]": 578,
363
+ "[C][NH1]": 449,
364
+ "[C][N]": 352,
365
+ "[C][O]": 348,
366
+ "[C][Ring1]": 351,
367
+ "[C][Ring2]": 588,
368
+ "[C][S]": 397,
369
+ "[Ca+2]": 122,
370
+ "[CaH2]": 288,
371
+ "[Ca]": 234,
372
+ "[Cl+1]": 139,
373
+ "[Cl+2]": 240,
374
+ "[Cl+3]": 61,
375
+ "[Cl-1]": 39,
376
+ "[ClH0]": 126,
377
+ "[ClH1+1]": 599,
378
+ "[ClH2+1]": 600,
379
+ "[Cl]": 24,
380
+ "[Cl][=C]": 374,
381
+ "[Cl][=N]": 494,
382
+ "[Cl][C]": 416,
383
+ "[Cl][Cl]": 484,
384
+ "[Cl][N]": 512,
385
+ "[Cl][O]": 587,
386
+ "[Cl][S]": 555,
387
+ "[Co-2]": 601,
388
+ "[Co-4]": 602,
389
+ "[Cr]": 603,
390
+ "[Cs+1]": 85,
391
+ "[Cs]": 284,
392
+ "[Cu-2]": 604,
393
+ "[Cu-3]": 605,
394
+ "[Cu-5]": 606,
395
+ "[Cu]": 607,
396
+ "[F-1]": 111,
397
+ "[F]": 16,
398
+ "[F][=C]": 376,
399
+ "[F][=N]": 537,
400
+ "[F][C]": 404,
401
+ "[F][F]": 360,
402
+ "[F][N]": 585,
403
+ "[F][O]": 577,
404
+ "[Fe+2]": 608,
405
+ "[Fe+3]": 609,
406
+ "[Fe-2]": 610,
407
+ "[Fe-3]": 611,
408
+ "[Gd+3]": 612,
409
+ "[Ge]": 613,
410
+ "[H+1]": 151,
411
+ "[H-1]": 285,
412
+ "[H]": 614,
413
+ "[He]": 115,
414
+ "[Hg]": 615,
415
+ "[I+1]": 153,
416
+ "[I+2]": 308,
417
+ "[I+3]": 309,
418
+ "[I-1]": 66,
419
+ "[IH0]": 183,
420
+ "[I]": 42,
421
+ "[Ir-3]": 616,
422
+ "[K+1]": 83,
423
+ "[KH1]": 228,
424
+ "[K]": 313,
425
+ "[Kr]": 315,
426
+ "[Li+1]": 110,
427
+ "[LiH1]": 233,
428
+ "[Li]": 276,
429
+ "[Mg+1]": 289,
430
+ "[Mg+2]": 75,
431
+ "[MgH2]": 236,
432
+ "[Mg]": 235,
433
+ "[Mn+1]": 617,
434
+ "[Mn+2]": 618,
435
+ "[Mo]": 619,
436
+ "[N+1]": 30,
437
+ "[N+1][=C]": 510,
438
+ "[N+1][Branch1]": 497,
439
+ "[N-1]": 37,
440
+ "[N@+1]": 97,
441
+ "[N@@+1]": 109,
442
+ "[N@@]": 140,
443
+ "[N@H1+1]": 297,
444
+ "[N@]": 91,
445
+ "[NH0]": 238,
446
+ "[NH1+1]": 216,
447
+ "[NH1-1]": 124,
448
+ "[NH1]": 38,
449
+ "[NH1][C]": 406,
450
+ "[NH1][Ring1]": 566,
451
+ "[NH2+1]": 215,
452
+ "[NH2-1]": 620,
453
+ "[NH2]": 621,
454
+ "[NH3+1]": 293,
455
+ "[NH4+1]": 260,
456
+ "[N]": 10,
457
+ "[N][#C]": 422,
458
+ "[N][=C]": 343,
459
+ "[N][=N]": 389,
460
+ "[N][=O]": 417,
461
+ "[N][=Ring1]": 420,
462
+ "[N][=Ring2]": 457,
463
+ "[N][Branch1]": 347,
464
+ "[N][Branch2]": 498,
465
+ "[N][C@@H1]": 486,
466
+ "[N][C@H1]": 483,
467
+ "[N][C]": 339,
468
+ "[N][N]": 430,
469
+ "[N][O]": 468,
470
+ "[N][Ring1]": 415,
471
+ "[N][S]": 408,
472
+ "[Na+1]": 40,
473
+ "[NaH1]": 221,
474
+ "[Na]": 268,
475
+ "[Ni-2]": 622,
476
+ "[Ni-4]": 623,
477
+ "[O+1]": 136,
478
+ "[O-1]": 31,
479
+ "[O-2]": 270,
480
+ "[OH0]": 96,
481
+ "[OH1+1]": 220,
482
+ "[OH1-1]": 154,
483
+ "[OH1]": 212,
484
+ "[OH2+1]": 624,
485
+ "[OH3+1]": 274,
486
+ "[O]": 6,
487
+ "[O][=C]": 349,
488
+ "[O][=N+1]": 503,
489
+ "[O][=N]": 474,
490
+ "[O][=O]": 521,
491
+ "[O][=S]": 460,
492
+ "[O][Branch1]": 559,
493
+ "[O][C@@H1]": 390,
494
+ "[O][C@@]": 553,
495
+ "[O][C@H1]": 387,
496
+ "[O][C@]": 519,
497
+ "[O][C]": 341,
498
+ "[O][N]": 441,
499
+ "[O][O]": 426,
500
+ "[O][P]": 489,
501
+ "[O][Ring1]": 458,
502
+ "[O][S]": 487,
503
+ "[P+1]": 112,
504
+ "[P-1]": 135,
505
+ "[P@+1]": 163,
506
+ "[P@@+1]": 237,
507
+ "[P@@]": 78,
508
+ "[P@]": 72,
509
+ "[PH1]": 127,
510
+ "[PH2+1]": 305,
511
+ "[P]": 25,
512
+ "[P][=C]": 504,
513
+ "[P][=O]": 552,
514
+ "[P][C]": 419,
515
+ "[P][N]": 477,
516
+ "[P][O]": 548,
517
+ "[P][S]": 533,
518
+ "[Pd-2]": 625,
519
+ "[Pt-2]": 626,
520
+ "[Pt]": 627,
521
+ "[Ra]": 187,
522
+ "[Rb+1]": 207,
523
+ "[Rb]": 321,
524
+ "[Rh+2]": 628,
525
+ "[Ring1]": 9,
526
+ "[Ring1][#Branch1]": 344,
527
+ "[Ring1][#Branch2]": 353,
528
+ "[Ring1][#C]": 369,
529
+ "[Ring1][=Branch1]": 338,
530
+ "[Ring1][=Branch2]": 356,
531
+ "[Ring1][=C]": 363,
532
+ "[Ring1][=N]": 367,
533
+ "[Ring1][=O]": 550,
534
+ "[Ring1][Branch1]": 355,
535
+ "[Ring1][Branch2]": 357,
536
+ "[Ring1][C]": 373,
537
+ "[Ring1][N]": 368,
538
+ "[Ring1][O]": 354,
539
+ "[Ring1][P]": 372,
540
+ "[Ring1][Ring1]": 421,
541
+ "[Ring1][Ring2]": 439,
542
+ "[Ring1][S]": 365,
543
+ "[Ring2]": 12,
544
+ "[Ring2][=C]": 381,
545
+ "[Ring2][=N]": 459,
546
+ "[Ring2][=O]": 525,
547
+ "[Ring2][Branch1]": 520,
548
+ "[Ring2][C]": 393,
549
+ "[Ring2][N]": 433,
550
+ "[Ring2][O]": 466,
551
+ "[Ring2][Ring1]": 337,
552
+ "[Ring2][Ring2]": 359,
553
+ "[Ring2][S]": 502,
554
+ "[Ring3]": 629,
555
+ "[S+1]": 44,
556
+ "[S-1]": 60,
557
+ "[S-2]": 172,
558
+ "[S@+1]": 56,
559
+ "[S@@+1]": 95,
560
+ "[S@@]": 51,
561
+ "[S@]": 184,
562
+ "[SH0]": 170,
563
+ "[SH1+1]": 263,
564
+ "[SH1-1]": 205,
565
+ "[SH1]": 264,
566
+ "[SH2]": 299,
567
+ "[S]": 17,
568
+ "[S][=C]": 490,
569
+ "[S][=N]": 523,
570
+ "[S][=O]": 554,
571
+ "[S][Branch1]": 444,
572
+ "[S][C]": 375,
573
+ "[S][N]": 452,
574
+ "[S][O]": 527,
575
+ "[S][Ring1]": 485,
576
+ "[S][S]": 463,
577
+ "[Sb]": 211,
578
+ "[Se+1]": 230,
579
+ "[SeH1]": 130,
580
+ "[SeH2]": 330,
581
+ "[Se]": 36,
582
+ "[Si-1]": 331,
583
+ "[Si@]": 287,
584
+ "[SiH1-1]": 192,
585
+ "[SiH1]": 104,
586
+ "[SiH2]": 300,
587
+ "[SiH3-1]": 219,
588
+ "[SiH4]": 271,
589
+ "[Si]": 49,
590
+ "[Sn]": 630,
591
+ "[Sr+2]": 158,
592
+ "[Sr]": 332,
593
+ "[TeH1]": 279,
594
+ "[TeH2]": 239,
595
+ "[Te]": 81,
596
+ "[Xe]": 320,
597
+ "[Yb]": 209,
598
+ "[Zn+1]": 213,
599
+ "[Zn+2]": 148,
600
+ "[Zn-2]": 261,
601
+ "[Zn]": 82,
602
+ "[\\11CH3]": 203,
603
+ "[\\123I]": 214,
604
+ "[\\125I]": 79,
605
+ "[\\3H]": 250,
606
+ "[\\B]": 217,
607
+ "[\\Br]": 89,
608
+ "[\\C-1]": 265,
609
+ "[\\C@@H1]": 46,
610
+ "[\\C@@]": 80,
611
+ "[\\C@H1]": 77,
612
+ "[\\C@]": 99,
613
+ "[\\CH1-1]": 241,
614
+ "[\\C]": 43,
615
+ "[\\C][=C]": 436,
616
+ "[\\C][C]": 567,
617
+ "[\\Cl]": 58,
618
+ "[\\F]": 118,
619
+ "[\\I]": 59,
620
+ "[\\N+1]": 113,
621
+ "[\\N-1]": 222,
622
+ "[\\NH1]": 108,
623
+ "[\\N]": 55,
624
+ "[\\N][C]": 541,
625
+ "[\\O-1]": 64,
626
+ "[\\O]": 47,
627
+ "[\\P]": 93,
628
+ "[\\S+1]": 121,
629
+ "[\\S-1]": 255,
630
+ "[\\S]": 54,
631
+ "[\\Se]": 168,
632
+ "[\\Si]": 195
633
+ }
ape_tokenizer/special_tokens_map.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": "<s>",
3
+ "eos_token": "</s>",
4
+ "unk_token": "<unk>",
5
+ "pad_token": "<pad>",
6
+ "mask_token": "<mask>"
7
+ }
ape_tokenizer/tokenization_ape.py ADDED
@@ -0,0 +1,709 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Hugging Face-compatible tokenizer for APE molecular vocabularies.
2
+
3
+ This file is intentionally self-contained so it can be copied into a model repo
4
+ and loaded by ``AutoTokenizer.from_pretrained(..., trust_remote_code=True)``.
5
+ """
6
+
7
+ import json
8
+ import os
9
+ import re
10
+ from collections.abc import Mapping
11
+ from collections import defaultdict
12
+ from pathlib import Path
13
+ from typing import Any, Literal
14
+
15
+ from transformers import PreTrainedTokenizer
16
+
17
+
18
+ Representation = Literal["SELFIES", "SMILES"]
19
+
20
+ VOCAB_FILES_NAMES = {
21
+ "vocab_file": "vocab.json",
22
+ "selfies_vocab_file": "selfies_vocab.json",
23
+ "smiles_vocab_file": "smiles_vocab.json",
24
+ }
25
+ SELFIES_RE = re.compile(r"\[[^\]]+\]")
26
+ SMILES_RE = re.compile(
27
+ r"(\[[^\]]+\]|Br?|Cl?|Si?|Se?|Li?|Na?|Mg?|Al?|Ca?|Fe?|Zn?|"
28
+ r"N|O|S|P|F|I|K|B|C|H|"
29
+ r"b|c|n|o|s|p|"
30
+ r"\%\d{2}|\d|"
31
+ r"\(|\)|\.|=|#|-|\+|\\|/|:|~|@|\?|\*|\$)"
32
+ )
33
+
34
+
35
+ def _base_piece_count(token: str, representation: str) -> int:
36
+ """Count primitive molecular pieces in a vocab token."""
37
+ pieces = pre_tokenize_molecule(token, representation)
38
+ return max(1, len(pieces))
39
+
40
+
41
+ def _max_vocab_piece_span(vocab: dict[str, int], representation: str) -> int:
42
+ """Maximum number of primitive pieces covered by any non-special vocab token."""
43
+ max_span = 1
44
+ for token in vocab:
45
+ if token.startswith("<") and token.endswith(">"):
46
+ continue
47
+ max_span = max(max_span, _base_piece_count(token, representation))
48
+ return max_span
49
+
50
+
51
+ def _coerce_vocab(vocab: Mapping[str, Any]) -> dict[str, int]:
52
+ if not isinstance(vocab, Mapping):
53
+ raise ValueError("Vocabulary must be a JSON object mapping token strings to integer IDs.")
54
+ out = {str(token): int(idx) for token, idx in vocab.items()}
55
+ if len(set(out.values())) != len(out):
56
+ raise ValueError("Vocabulary token IDs must be unique.")
57
+ return out
58
+
59
+
60
+ def _token_text(token: Any) -> str:
61
+ return str(getattr(token, "content", token))
62
+
63
+
64
+ def _normalize_representation(representation: str) -> Representation:
65
+ normalized = representation.upper()
66
+ if normalized not in {"SELFIES", "SMILES"}:
67
+ raise ValueError(f"representation must be 'SELFIES' or 'SMILES', got {representation!r}")
68
+ return normalized # type: ignore[return-value]
69
+
70
+
71
+ def _select_vocab_file(
72
+ *,
73
+ representation: Representation,
74
+ vocab_file: str | os.PathLike[str] | None,
75
+ selfies_vocab_file: str | os.PathLike[str] | None,
76
+ smiles_vocab_file: str | os.PathLike[str] | None,
77
+ ) -> str | os.PathLike[str] | None:
78
+ if representation == "SELFIES" and selfies_vocab_file is not None:
79
+ return selfies_vocab_file
80
+ if representation == "SMILES" and smiles_vocab_file is not None:
81
+ return smiles_vocab_file
82
+ return vocab_file
83
+
84
+
85
+ def pre_tokenize_molecule(molecule: str, representation: str) -> list[str]:
86
+ active_representation = _normalize_representation(representation)
87
+ if active_representation == "SELFIES":
88
+ return SELFIES_RE.findall(molecule)
89
+
90
+ tokens: list[str] = []
91
+ cursor = 0
92
+ for match in SMILES_RE.finditer(molecule):
93
+ if match.start() > cursor:
94
+ tokens.extend(molecule[cursor : match.start()])
95
+ tokens.append(match.group(0))
96
+ cursor = match.end()
97
+ if cursor < len(molecule):
98
+ tokens.extend(molecule[cursor:])
99
+ return [token for token in tokens if token and not token.isspace()]
100
+
101
+
102
+ def ape_tokenize(
103
+ text: str,
104
+ vocab: dict[str, int],
105
+ representation: str,
106
+ unk_token: str = "<unk>",
107
+ max_piece_span: int | None = None,
108
+ ) -> list[str]:
109
+ pieces = pre_tokenize_molecule(text, representation)
110
+ if not pieces:
111
+ return [unk_token]
112
+
113
+ if max_piece_span is None:
114
+ max_piece_span = _max_vocab_piece_span(vocab, representation)
115
+
116
+ n = len(pieces)
117
+ tokens: list[str] = []
118
+ append_token = tokens.append
119
+ vocab_contains = vocab.__contains__
120
+ join_pieces = "".join
121
+ i = 0
122
+
123
+ while i < n:
124
+ upper = min(n, i + max_piece_span)
125
+
126
+ for j in range(upper, i, -1):
127
+ candidate = join_pieces(pieces[i:j])
128
+ if vocab_contains(candidate):
129
+ append_token(candidate)
130
+ i = j
131
+ break
132
+ else:
133
+ append_token(unk_token)
134
+ i += 1
135
+
136
+ return tokens
137
+
138
+
139
+ class APEPreTrainedTokenizer(PreTrainedTokenizer):
140
+ """Hugging Face tokenizer backend for APE molecular tokenization. (Not fast)"""
141
+
142
+ vocab_files_names = VOCAB_FILES_NAMES
143
+ model_input_names = ["input_ids", "attention_mask"]
144
+
145
+ def __init__(
146
+ self,
147
+ vocab_file: str | os.PathLike[str] | None = None,
148
+ selfies_vocab_file: str | os.PathLike[str] | None = None,
149
+ smiles_vocab_file: str | os.PathLike[str] | None = None,
150
+ vocab: dict[str, Any] | None = None,
151
+ representation: str = "SELFIES",
152
+ bos_token: str = "<s>",
153
+ eos_token: str = "</s>",
154
+ unk_token: str = "<unk>",
155
+ pad_token: str = "<pad>",
156
+ mask_token: str = "<mask>",
157
+ model_max_length: int = 256,
158
+ **kwargs,
159
+ ) -> None:
160
+ self.representation = _normalize_representation(representation)
161
+ active_vocab_file = _select_vocab_file(
162
+ representation=self.representation,
163
+ vocab_file=vocab_file,
164
+ selfies_vocab_file=selfies_vocab_file,
165
+ smiles_vocab_file=smiles_vocab_file,
166
+ )
167
+
168
+ if vocab is None:
169
+ if active_vocab_file is None:
170
+ vocab = {
171
+ bos_token: 0,
172
+ pad_token: 1,
173
+ eos_token: 2,
174
+ unk_token: 3,
175
+ mask_token: 4,
176
+ }
177
+ else:
178
+ with open(active_vocab_file, encoding="utf-8") as f:
179
+ vocab = json.load(f)
180
+
181
+ if vocab is None:
182
+ raise ValueError("Loaded vocabulary is None.")
183
+
184
+ self.vocab_file = str(active_vocab_file) if active_vocab_file is not None else None
185
+ self.selfies_vocab_file = (
186
+ str(selfies_vocab_file) if selfies_vocab_file is not None else None
187
+ )
188
+ self.smiles_vocab_file = str(smiles_vocab_file) if smiles_vocab_file is not None else None
189
+ self.vocab = _coerce_vocab(vocab)
190
+ self._require_special_tokens(
191
+ bos_token=bos_token,
192
+ eos_token=eos_token,
193
+ unk_token=unk_token,
194
+ pad_token=pad_token,
195
+ mask_token=mask_token,
196
+ )
197
+ self.ids_to_tokens = {idx: token for token, idx in self.vocab.items()}
198
+ self.vocabulary_frequency: dict[str, int] = {}
199
+ self.pair_counts: dict[tuple[str, str], int] = {}
200
+ self._max_piece_span = _max_vocab_piece_span(self.vocab, self.representation)
201
+
202
+ super().__init__(
203
+ bos_token=bos_token,
204
+ eos_token=eos_token,
205
+ unk_token=unk_token,
206
+ pad_token=pad_token,
207
+ mask_token=mask_token,
208
+ model_max_length=model_max_length,
209
+ representation=self.representation,
210
+ **kwargs,
211
+ )
212
+
213
+ @property
214
+ def vocab_size(self) -> int:
215
+ return len(self.vocab)
216
+
217
+ @property
218
+ def vocabulary(self) -> dict[str, int]:
219
+ """Legacy alias for callers that previously used APETokenizer."""
220
+ return self.vocab
221
+
222
+ @vocabulary.setter
223
+ def vocabulary(self, value: dict[str, int]) -> None:
224
+ self.vocab = _coerce_vocab(value)
225
+ self.update_reverse_vocabulary()
226
+ self._refresh_tokenization_cache()
227
+
228
+ @property
229
+ def special_tokens(self) -> dict[str, int]:
230
+ bos_token = str(self.bos_token)
231
+ pad_token = str(self.pad_token)
232
+ eos_token = str(self.eos_token)
233
+ unk_token = str(self.unk_token)
234
+ mask_token = str(self.mask_token)
235
+ return {
236
+ bos_token: self._convert_token_to_id(bos_token),
237
+ pad_token: self._convert_token_to_id(pad_token),
238
+ eos_token: self._convert_token_to_id(eos_token),
239
+ unk_token: self._convert_token_to_id(unk_token),
240
+ mask_token: self._convert_token_to_id(mask_token),
241
+ }
242
+
243
+ @special_tokens.setter
244
+ def special_tokens(self, value: dict[str, int]) -> None:
245
+ for token, token_id in value.items():
246
+ self.vocab.setdefault(str(token), int(token_id))
247
+ self.vocab = _coerce_vocab(self.vocab)
248
+ self.update_reverse_vocabulary()
249
+ self._refresh_tokenization_cache()
250
+
251
+ def get_vocab(self) -> dict[str, int]:
252
+ return dict(self.vocab)
253
+
254
+ def update_reverse_vocabulary(self) -> None:
255
+ self.ids_to_tokens = {idx: token for token, idx in self.vocab.items()}
256
+
257
+ def _refresh_tokenization_cache(self) -> None:
258
+ self._max_piece_span = _max_vocab_piece_span(self.vocab, self.representation)
259
+
260
+ def _require_special_tokens(
261
+ self,
262
+ *,
263
+ bos_token: str,
264
+ eos_token: str,
265
+ unk_token: str,
266
+ pad_token: str,
267
+ mask_token: str,
268
+ ) -> None:
269
+ missing = [
270
+ token_text
271
+ for token in [bos_token, eos_token, unk_token, pad_token, mask_token]
272
+ if (token_text := _token_text(token)) not in self.vocab
273
+ ]
274
+ if missing:
275
+ raise ValueError(f"Vocabulary is missing required special tokens: {missing}")
276
+
277
+ def pre_tokenize(self, molecule: str, representation: str | None = None) -> list[str]:
278
+ return pre_tokenize_molecule(molecule, representation or self.representation)
279
+
280
+ def _tokenize(self, text: str, **kwargs) -> list[str]:
281
+
282
+ return ape_tokenize(
283
+ text,
284
+ vocab=self.vocab,
285
+ representation=self.representation,
286
+ unk_token=str(self.unk_token),
287
+ max_piece_span=self._max_piece_span,
288
+ )
289
+
290
+ def encode_molecule(
291
+ self,
292
+ text: str,
293
+ add_special_tokens: bool = True,
294
+ max_length: int | None = None,
295
+ truncation: bool = True,
296
+ ) -> list[int]:
297
+ """Fast molecular encode path avoiding generic Hugging Face tokenizer overhead."""
298
+
299
+ tokens = self._tokenize(text)
300
+
301
+ ids = [self._convert_token_to_id(token) for token in tokens]
302
+
303
+ if add_special_tokens:
304
+ ids = self.build_inputs_with_special_tokens(ids)
305
+
306
+ if max_length is not None and truncation:
307
+ ids = ids[:max_length]
308
+
309
+ return ids
310
+
311
+ def _convert_token_to_id(self, token: str) -> int:
312
+ return self.vocab.get(token, self.vocab[str(self.unk_token)])
313
+
314
+ def _convert_id_to_token(self, index: int) -> str:
315
+ return self.ids_to_tokens.get(int(index), str(self.unk_token))
316
+
317
+ def convert_tokens_to_string(self, tokens: list[str]) -> str:
318
+ return "".join(tokens)
319
+
320
+ def _required_special_token_id(
321
+ self,
322
+ token_value: int | list[int] | str | list[str] | None,
323
+ token_name: str,
324
+ ) -> int:
325
+ if token_value is None:
326
+ raise ValueError(f"{token_name} must be set.")
327
+ if isinstance(token_value, int):
328
+ return token_value
329
+ if isinstance(token_value, str):
330
+ return self._convert_token_to_id(token_value)
331
+ if len(token_value) == 1:
332
+ only_value = token_value[0]
333
+ if isinstance(only_value, int):
334
+ return only_value
335
+ if isinstance(only_value, str):
336
+ return self._convert_token_to_id(only_value)
337
+ raise ValueError(f"{token_name} must resolve to a single token id.")
338
+
339
+ def build_inputs_with_special_tokens(
340
+ self,
341
+ token_ids_0: list[int],
342
+ token_ids_1: list[int] | None = None,
343
+ ) -> list[int]:
344
+ bos_id = self._required_special_token_id(self.bos_token, "bos_token")
345
+ eos_id = self._required_special_token_id(self.eos_token, "eos_token")
346
+ if token_ids_1 is None:
347
+ return [bos_id, *token_ids_0, eos_id]
348
+ return [bos_id, *token_ids_0, eos_id, *token_ids_1, eos_id]
349
+
350
+ def create_token_type_ids_from_sequences(
351
+ self,
352
+ token_ids_0: list[int],
353
+ token_ids_1: list[int] | None = None,
354
+ ) -> list[int]:
355
+ return [0] * len(self.build_inputs_with_special_tokens(token_ids_0, token_ids_1))
356
+
357
+ def pad(
358
+ self,
359
+ encoded_inputs: Any,
360
+ padding: Any = True,
361
+ max_length: int | None = None,
362
+ pad_to_multiple_of: int | None = None,
363
+ padding_side: str | None = None,
364
+ return_attention_mask: bool | None = None,
365
+ return_tensors: Any = None,
366
+ verbose: bool = True,
367
+ ):
368
+ padding_enabled = padding not in (False, "do_not_pad")
369
+ if (
370
+ padding_enabled
371
+ and isinstance(encoded_inputs, list)
372
+ and any("labels" in item for item in encoded_inputs)
373
+ ):
374
+ target_length = max(
375
+ len(item.get("input_ids", item.get("labels", []))) for item in encoded_inputs
376
+ )
377
+ if padding == "max_length" and max_length is not None:
378
+ target_length = max_length
379
+
380
+ if pad_to_multiple_of and target_length % pad_to_multiple_of:
381
+ target_length = ((target_length // pad_to_multiple_of) + 1) * pad_to_multiple_of
382
+
383
+ padded_inputs = []
384
+ for item in encoded_inputs:
385
+ item = dict(item)
386
+ labels = list(item.get("labels", []))
387
+ pad_len = max(0, target_length - len(labels))
388
+ if pad_len:
389
+ label_padding = [-100] * pad_len
390
+ if self.padding_side == "left":
391
+ labels = label_padding + labels
392
+ else:
393
+ labels = labels + label_padding
394
+ item["labels"] = labels
395
+ padded_inputs.append(item)
396
+ encoded_inputs = padded_inputs
397
+
398
+ return super().pad(
399
+ encoded_inputs,
400
+ padding=padding,
401
+ max_length=max_length,
402
+ pad_to_multiple_of=pad_to_multiple_of,
403
+ padding_side=padding_side,
404
+ return_attention_mask=return_attention_mask,
405
+ return_tensors=return_tensors,
406
+ verbose=verbose,
407
+ )
408
+
409
+ def save_vocabulary(
410
+ self,
411
+ save_directory: str,
412
+ filename_prefix: str | None = None,
413
+ ) -> tuple[str, ...]:
414
+ if not os.path.isdir(save_directory):
415
+ raise ValueError(f"Vocabulary path ({save_directory}) should be a directory.")
416
+
417
+ vocab_file = Path(save_directory) / (
418
+ f"{filename_prefix}-vocab.json" if filename_prefix else "vocab.json"
419
+ )
420
+ with vocab_file.open("w", encoding="utf-8") as f:
421
+ json.dump(self.vocab, f, ensure_ascii=False, indent=4)
422
+ return (str(vocab_file),)
423
+
424
+ def add_tokens_to_vocabulary(self, tokens: list[str]) -> int:
425
+ """Add tokens to the tokenizer vocabulary if they are not already present.
426
+
427
+ This is intended for forcing coverage of rare valid molecular primitive
428
+ symbols, especially SELFIES bracket tokens, after APE merge training.
429
+ """
430
+
431
+ if not tokens:
432
+ return 0
433
+
434
+ next_id = max(self.vocab.values(), default=-1) + 1
435
+ added = 0
436
+
437
+ for token in tokens:
438
+ token = str(token).strip()
439
+ if not token:
440
+ continue
441
+ if token in self.vocab:
442
+ continue
443
+
444
+ self.vocab[token] = next_id
445
+ next_id += 1
446
+ added += 1
447
+
448
+ if added:
449
+ self.update_reverse_vocabulary()
450
+ self._refresh_tokenization_cache()
451
+
452
+ return added
453
+
454
+ def save_pretrained(self, save_directory: str | os.PathLike[str], *args, **kwargs):
455
+ saved_files = super().save_pretrained(save_directory, *args, **kwargs)
456
+ save_path = Path(save_directory)
457
+
458
+ special_tokens_map = {
459
+ "bos_token": str(self.bos_token),
460
+ "eos_token": str(self.eos_token),
461
+ "unk_token": str(self.unk_token),
462
+ "pad_token": str(self.pad_token),
463
+ "mask_token": str(self.mask_token),
464
+ }
465
+ with (save_path / "special_tokens_map.json").open("w", encoding="utf-8") as f:
466
+ json.dump(special_tokens_map, f, ensure_ascii=False, indent=2)
467
+
468
+ tokenizer_config_path = save_path / "tokenizer_config.json"
469
+ if tokenizer_config_path.exists():
470
+ with tokenizer_config_path.open(encoding="utf-8") as f:
471
+ tokenizer_config = json.load(f)
472
+ else:
473
+ tokenizer_config = {}
474
+ tokenizer_config.pop("tokenizer_class", None)
475
+ tokenizer_config.update(
476
+ {
477
+ "representation": self.representation,
478
+ "model_max_length": self.model_max_length,
479
+ "auto_map": {
480
+ "AutoTokenizer": [
481
+ "tokenization_ape.APEPreTrainedTokenizer",
482
+ None,
483
+ ],
484
+ },
485
+ }
486
+ )
487
+ with tokenizer_config_path.open("w", encoding="utf-8") as f:
488
+ json.dump(tokenizer_config, f, ensure_ascii=False, indent=2)
489
+
490
+ return saved_files
491
+
492
+ def save_vocabulary_file(self, file_path: str | os.PathLike[str]) -> None:
493
+ path = Path(file_path)
494
+ path.parent.mkdir(parents=True, exist_ok=True)
495
+ freq_path = path.with_name(f"{path.stem}_freq.json")
496
+
497
+ with path.open("w", encoding="utf-8") as f:
498
+ json.dump(self.vocab, f, ensure_ascii=False, indent=4)
499
+ with freq_path.open("w", encoding="utf-8") as f:
500
+ json.dump(self.vocabulary_frequency, f, ensure_ascii=False, indent=4)
501
+
502
+ def load_vocabulary_file(
503
+ self,
504
+ file_path: str | os.PathLike[str],
505
+ representation: str | None = None,
506
+ ) -> None:
507
+ if representation is not None:
508
+ self.representation = _normalize_representation(representation)
509
+ with open(file_path, encoding="utf-8") as f:
510
+ vocab = json.load(f)
511
+ self.vocab = _coerce_vocab(vocab)
512
+ self._require_special_tokens(
513
+ bos_token=str(self.bos_token),
514
+ eos_token=str(self.eos_token),
515
+ unk_token=str(self.unk_token),
516
+ pad_token=str(self.pad_token),
517
+ mask_token=str(self.mask_token),
518
+ )
519
+ self.ids_to_tokens = {idx: token for token, idx in self.vocab.items()}
520
+ self._refresh_tokenization_cache()
521
+
522
+ def train(
523
+ self,
524
+ corpus,
525
+ type: str = "selfies",
526
+ representation: str | None = None,
527
+ max_vocab_size: int = 5000,
528
+ min_freq_for_merge: int = 2000,
529
+ max_merge_pieces: int | None = 8,
530
+ save_checkpoint: bool = False,
531
+ checkpoint_path: str = "checkpoint",
532
+ checkpoint_interval: int = 500,
533
+ ) -> None:
534
+ import warnings
535
+
536
+ new_rep = _normalize_representation(representation or type)
537
+ if new_rep != self.representation:
538
+ warnings.warn(
539
+ f"train() representation={new_rep!r} differs from tokenizer "
540
+ f"representation={self.representation!r}. Overwriting.",
541
+ UserWarning,
542
+ stacklevel=2,
543
+ )
544
+ self.representation = new_rep
545
+
546
+ if not corpus:
547
+ raise ValueError("Cannot train APE tokenizer on an empty corpus.")
548
+
549
+ print(f"Pretokenizing {self.representation}...", flush=True)
550
+ tokenized_corpus = []
551
+ vocabulary_frequency: defaultdict[str, int] = defaultdict(int)
552
+ saw_tokens = False
553
+
554
+ for sentence in corpus:
555
+ tokens = self.pre_tokenize(str(sentence))
556
+ if not tokens:
557
+ continue
558
+ saw_tokens = True
559
+ for token in tokens:
560
+ vocabulary_frequency[token] += 1
561
+ if len(tokens) > 1:
562
+ tokenized_corpus.append(tokens)
563
+ print(
564
+ f"Pretokenization complete, found {len(vocabulary_frequency)} tokens",
565
+ flush=True,
566
+ )
567
+
568
+ if not saw_tokens:
569
+ raise ValueError("Cannot train APE tokenizer on an empty corpus.")
570
+
571
+ pre_tokens_counts = len(vocabulary_frequency)
572
+ merged_counter = len(vocabulary_frequency) + 1
573
+ if save_checkpoint and checkpoint_interval <= 0:
574
+ raise ValueError(
575
+ "checkpoint_interval must be positive when save_checkpoint is enabled."
576
+ )
577
+ checkpoint_increment = checkpoint_interval
578
+ batch = checkpoint_interval + pre_tokens_counts
579
+ piece_count_cache: dict[str, int] = {}
580
+
581
+ def merged_piece_count(token: str) -> int:
582
+ count = piece_count_cache.get(token)
583
+ if count is None:
584
+ count = _base_piece_count(token, self.representation)
585
+ piece_count_cache[token] = count
586
+ return count
587
+
588
+ def get_most_common_pair(tokenized):
589
+ pair_counts: defaultdict[tuple[str, str], int] = defaultdict(int)
590
+ for tokens in tokenized:
591
+ for i in range(len(tokens) - 1):
592
+ pair = (tokens[i], tokens[i + 1])
593
+
594
+ if max_merge_pieces is not None:
595
+ merged_candidate = pair[0] + pair[1]
596
+ if merged_piece_count(merged_candidate) > max_merge_pieces:
597
+ continue
598
+
599
+ pair_counts[pair] += 1
600
+
601
+ self.pair_counts = dict(pair_counts)
602
+ if not pair_counts:
603
+ return ("", ""), 0
604
+
605
+ most_common_pair = ("", "")
606
+ most_common_frequency = 0
607
+ for pair, count in pair_counts.items():
608
+ if count > most_common_frequency:
609
+ most_common_pair = pair
610
+ most_common_frequency = count
611
+ return most_common_pair, most_common_frequency
612
+
613
+ while True:
614
+ if save_checkpoint and len(vocabulary_frequency) >= batch:
615
+ self.vocabulary_frequency = dict(vocabulary_frequency)
616
+ self.vocab = {
617
+ **{
618
+ str(self.bos_token): 0,
619
+ str(self.pad_token): 1,
620
+ str(self.eos_token): 2,
621
+ str(self.unk_token): 3,
622
+ str(self.mask_token): 4,
623
+ },
624
+ **{
625
+ word: idx
626
+ for idx, word in enumerate(
627
+ vocabulary_frequency.keys(),
628
+ start=5,
629
+ )
630
+ },
631
+ }
632
+ self.ids_to_tokens = {idx: token for token, idx in self.vocab.items()}
633
+ self._refresh_tokenization_cache()
634
+ checkpoint_dir = Path(checkpoint_path)
635
+ checkpoint_dir.mkdir(parents=True, exist_ok=True)
636
+ self.save_vocabulary_file(checkpoint_dir / f"checkpoint_{batch}.json")
637
+ self.save_pretrained(str(checkpoint_dir / f"checkpoint_{batch}"))
638
+ print(f"Checkpoint saved at {checkpoint_dir}/checkpoint_{batch}.json")
639
+ batch += checkpoint_increment
640
+
641
+ if len(vocabulary_frequency) >= max_vocab_size:
642
+ print("Max vocabulary achieved", flush=True)
643
+ break
644
+
645
+ if not tokenized_corpus:
646
+ print("No more mergeable pairs", flush=True)
647
+ break
648
+
649
+ most_common_pair, freq = get_most_common_pair(tokenized_corpus)
650
+ if freq < min_freq_for_merge:
651
+ print("Not enough frequency found", flush=True)
652
+ break
653
+
654
+ if not most_common_pair[0] or not most_common_pair[1]:
655
+ print("No valid merge pair found", flush=True)
656
+ break
657
+
658
+ left_token, right_token = most_common_pair
659
+ merged_word = left_token + right_token
660
+ if merged_word not in vocabulary_frequency:
661
+ print(
662
+ f"New merge found: {merged_word} {merged_counter}/{max_vocab_size} "
663
+ f"{round(merged_counter / max_vocab_size * 100, 2)}%",
664
+ flush=True,
665
+ )
666
+ merged_counter += 1
667
+ vocabulary_frequency[merged_word] += freq
668
+
669
+ new_tokenized_corpus = []
670
+ for tokens in tokenized_corpus:
671
+ new_tokens = []
672
+ append_token = new_tokens.append
673
+ i = 0
674
+ token_count = len(tokens)
675
+ while i < token_count:
676
+ if (
677
+ i < token_count - 1
678
+ and tokens[i] == left_token
679
+ and tokens[i + 1] == right_token
680
+ ):
681
+ append_token(merged_word)
682
+ i += 2
683
+ else:
684
+ append_token(tokens[i])
685
+ i += 1
686
+
687
+ if len(new_tokens) > 1:
688
+ new_tokenized_corpus.append(new_tokens)
689
+
690
+ tokenized_corpus = new_tokenized_corpus
691
+
692
+ self.vocabulary_frequency = dict(vocabulary_frequency)
693
+ self.vocab = {
694
+ str(self.bos_token): 0,
695
+ str(self.pad_token): 1,
696
+ str(self.eos_token): 2,
697
+ str(self.unk_token): 3,
698
+ str(self.mask_token): 4,
699
+ **{word: idx for idx, word in enumerate(vocabulary_frequency.keys(), start=5)},
700
+ }
701
+
702
+ self.ids_to_tokens = {idx: token for token, idx in self.vocab.items()}
703
+ self._refresh_tokenization_cache()
704
+
705
+ def train_from_iterator(self, iterator, *args, **kwargs) -> None:
706
+ raise NotImplementedError("train_from_iterator is not implemented for APE")
707
+
708
+
709
+ APEPreTrainedTokenizer.register_for_auto_class("AutoTokenizer")
ape_tokenizer/tokenizer_config.json ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "<s>",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "1": {
12
+ "content": "<pad>",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "2": {
20
+ "content": "</s>",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "3": {
28
+ "content": "<unk>",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "4": {
36
+ "content": "<mask>",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ }
43
+ },
44
+ "auto_map": {
45
+ "AutoTokenizer": [
46
+ "tokenization_ape.APEPreTrainedTokenizer",
47
+ null
48
+ ]
49
+ },
50
+ "backend": "custom",
51
+ "bos_token": "<s>",
52
+ "eos_token": "</s>",
53
+ "mask_token": "<mask>",
54
+ "model_input_names": [
55
+ "input_ids",
56
+ "attention_mask"
57
+ ],
58
+ "model_max_length": 256,
59
+ "pad_token": "<pad>",
60
+ "representation": "SELFIES",
61
+ "unk_token": "<unk>",
62
+ "use_fast": false
63
+ }
ape_tokenizer/tokenizer_metadata.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "ape_source": "modernmolbert.local",
3
+ "created_at_utc": "2026-05-19T16:24:35.971419+00:00",
4
+ "creation_command": "python -m modernmolbert.train_ape_tokenizer",
5
+ "dataset_name": "data/pretrain/chembl36_selfies",
6
+ "extra_vocab_selfies_path": null,
7
+ "extra_vocab_symbols_added": 42,
8
+ "extra_vocab_symbols_path": "tokenizer/extra_symbols/benchmark_missing_selfies_symbols_min10.txt",
9
+ "extra_vocab_symbols_requested": 42,
10
+ "max_merge_pieces": 2,
11
+ "max_vocab_size": 2000,
12
+ "min_freq_for_merge": 3000,
13
+ "representation": "SELFIES",
14
+ "seed": 42,
15
+ "selfies_column": "selfies",
16
+ "shuffle_buffer_size": 100000,
17
+ "special_ids": {
18
+ "bos_token": 0,
19
+ "eos_token": 2,
20
+ "mask_token": 4,
21
+ "pad_token": 1,
22
+ "unk_token": 3
23
+ },
24
+ "tokenizer_path": "tokenizer/chembl36_selfies_2m_ape_max2_min3000.json",
25
+ "tokenizer_sha256": "26ad0e90de9c0a469eb6e3b7aa985e2a2d7cc3f0dd7b2b229ccfce41f639e208",
26
+ "tokenizer_train_size": 2000000,
27
+ "vocab_size": 631
28
+ }
ape_tokenizer/vocab.json ADDED
@@ -0,0 +1,633 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "</s>": 2,
3
+ "<mask>": 4,
4
+ "<pad>": 1,
5
+ "<s>": 0,
6
+ "<unk>": 3,
7
+ "[#11C]": 256,
8
+ "[#14C]": 247,
9
+ "[#Branch1]": 22,
10
+ "[#Branch1][=C]": 479,
11
+ "[#Branch1][=O]": 542,
12
+ "[#Branch1][C]": 400,
13
+ "[#Branch1][N]": 453,
14
+ "[#Branch1][O]": 491,
15
+ "[#Branch1][S]": 528,
16
+ "[#Branch2]": 15,
17
+ "[#Branch2][=C]": 469,
18
+ "[#Branch2][=N]": 561,
19
+ "[#Branch2][=O]": 531,
20
+ "[#Branch2][C]": 380,
21
+ "[#Branch2][N]": 438,
22
+ "[#Branch2][O]": 461,
23
+ "[#Branch2][S]": 529,
24
+ "[#C-1]": 141,
25
+ "[#CH0]": 248,
26
+ "[#C]": 23,
27
+ "[#C][=C]": 496,
28
+ "[#C][=N]": 569,
29
+ "[#C][=O]": 515,
30
+ "[#C][C]": 407,
31
+ "[#C][N]": 465,
32
+ "[#C][O]": 538,
33
+ "[#C][S]": 534,
34
+ "[#N+1]": 123,
35
+ "[#N]": 19,
36
+ "[#N][=C]": 435,
37
+ "[#N][C]": 475,
38
+ "[#O+1]": 589,
39
+ "[#S]": 262,
40
+ "[-/Ring1]": 92,
41
+ "[-/Ring2]": 90,
42
+ "[-/Ring3]": 590,
43
+ "[-\\Ring1]": 167,
44
+ "[-\\Ring2]": 120,
45
+ "[-\\Ring3]": 591,
46
+ "[/123I]": 245,
47
+ "[/125I]": 117,
48
+ "[/131I]": 210,
49
+ "[/13CH1]": 272,
50
+ "[/13C]": 197,
51
+ "[/14CH1]": 324,
52
+ "[/14C]": 281,
53
+ "[/As]": 259,
54
+ "[/B]": 161,
55
+ "[/Br]": 62,
56
+ "[/C-1]": 229,
57
+ "[/C@@H1]": 45,
58
+ "[/C@@]": 105,
59
+ "[/C@H1]": 87,
60
+ "[/C@]": 76,
61
+ "[/C]": 20,
62
+ "[/C][=Branch1]": 428,
63
+ "[/C][=Branch2]": 450,
64
+ "[/C][=C]": 364,
65
+ "[/C][=N]": 454,
66
+ "[/C][Branch1]": 540,
67
+ "[/C][C]": 564,
68
+ "[/Cl]": 101,
69
+ "[/F]": 160,
70
+ "[/I]": 94,
71
+ "[/N+1]": 68,
72
+ "[/N-1]": 142,
73
+ "[/NH1]": 114,
74
+ "[/N]": 48,
75
+ "[/N][=C]": 418,
76
+ "[/N][=N]": 580,
77
+ "[/N][C]": 499,
78
+ "[/O-1]": 128,
79
+ "[/O]": 53,
80
+ "[/P+1]": 181,
81
+ "[/P@@]": 231,
82
+ "[/P]": 102,
83
+ "[/S+1]": 67,
84
+ "[/S-1]": 258,
85
+ "[/SH0]": 303,
86
+ "[/S]": 71,
87
+ "[/Se]": 149,
88
+ "[/Si]": 125,
89
+ "[10B]": 283,
90
+ "[11C@@H1]": 304,
91
+ "[11CH2]": 249,
92
+ "[11CH3]": 74,
93
+ "[11C]": 137,
94
+ "[123I-1]": 312,
95
+ "[123I]": 69,
96
+ "[123Te]": 186,
97
+ "[124I-1]": 325,
98
+ "[124I]": 133,
99
+ "[125I-1]": 171,
100
+ "[125I]": 70,
101
+ "[127I]": 301,
102
+ "[127Xe]": 311,
103
+ "[129Xe]": 292,
104
+ "[131Cs]": 275,
105
+ "[131I-1]": 329,
106
+ "[131I]": 86,
107
+ "[133Xe]": 322,
108
+ "[13CH1]": 198,
109
+ "[13CH3]": 277,
110
+ "[13C]": 166,
111
+ "[14C@@H1]": 318,
112
+ "[14C@@]": 302,
113
+ "[14C@H1]": 306,
114
+ "[14CH1]": 185,
115
+ "[14CH2]": 175,
116
+ "[14CH3]": 177,
117
+ "[14C]": 143,
118
+ "[15NH1]": 200,
119
+ "[15N]": 134,
120
+ "[17F]": 218,
121
+ "[18F-1]": 294,
122
+ "[18F]": 73,
123
+ "[18OH1]": 252,
124
+ "[19F]": 144,
125
+ "[211At]": 286,
126
+ "[223Ra]": 193,
127
+ "[22Na+1]": 191,
128
+ "[2H]": 88,
129
+ "[32P]": 307,
130
+ "[35S]": 182,
131
+ "[3H]": 103,
132
+ "[42K+1]": 188,
133
+ "[45Ca+2]": 178,
134
+ "[47Ca+2]": 201,
135
+ "[68Ga+3]": 273,
136
+ "[73Se]": 242,
137
+ "[75Se]": 327,
138
+ "[76Br]": 152,
139
+ "[81Kr]": 326,
140
+ "[82Rb+1]": 314,
141
+ "[82Rb]": 280,
142
+ "[85Sr+2]": 180,
143
+ "[89Sr+2]": 319,
144
+ "[=11C]": 132,
145
+ "[=13CH1]": 196,
146
+ "[=13C]": 199,
147
+ "[=14CH1]": 156,
148
+ "[=14C]": 194,
149
+ "[=18O]": 317,
150
+ "[=32PH1]": 257,
151
+ "[=32P]": 244,
152
+ "[=Al]": 295,
153
+ "[=As]": 145,
154
+ "[=B-1]": 159,
155
+ "[=B]": 176,
156
+ "[=Branch1]": 13,
157
+ "[=Branch1][=C]": 451,
158
+ "[=Branch1][=N]": 563,
159
+ "[=Branch1][=O]": 546,
160
+ "[=Branch1][C]": 335,
161
+ "[=Branch1][N+1]": 448,
162
+ "[=Branch1][N]": 508,
163
+ "[=Branch1][O]": 518,
164
+ "[=Branch2]": 14,
165
+ "[=Branch2][=C]": 472,
166
+ "[=Branch2][=N]": 584,
167
+ "[=Branch2][=O]": 549,
168
+ "[=Branch2][=Ring1]": 556,
169
+ "[=Branch2][C]": 383,
170
+ "[=Branch2][N]": 424,
171
+ "[=Branch2][O]": 507,
172
+ "[=Branch2][S]": 509,
173
+ "[=Branch3]": 592,
174
+ "[=C+1]": 267,
175
+ "[=CH0]": 593,
176
+ "[=C]": 7,
177
+ "[=C][=C]": 492,
178
+ "[=C][=O]": 516,
179
+ "[=C][Branch1]": 467,
180
+ "[=C][C]": 388,
181
+ "[=C][N]": 437,
182
+ "[=C][O]": 495,
183
+ "[=C][Ring1]": 482,
184
+ "[=C][S]": 456,
185
+ "[=Mg]": 310,
186
+ "[=N+1]": 32,
187
+ "[=N-1]": 63,
188
+ "[=NH1+1]": 232,
189
+ "[=NH2+1]": 243,
190
+ "[=N]": 29,
191
+ "[=N][=C]": 473,
192
+ "[=N][=N]": 579,
193
+ "[=N][=O]": 517,
194
+ "[=N][C]": 362,
195
+ "[=N][NH1]": 443,
196
+ "[=N][N]": 382,
197
+ "[=N][O]": 427,
198
+ "[=N][Ring1]": 513,
199
+ "[=N][S]": 501,
200
+ "[=O+1]": 116,
201
+ "[=OH0]": 296,
202
+ "[=OH1+1]": 594,
203
+ "[=O]": 18,
204
+ "[=O][/C]": 572,
205
+ "[=O][=C]": 411,
206
+ "[=O][=N]": 583,
207
+ "[=O][=O]": 425,
208
+ "[=O][C@@H1]": 414,
209
+ "[=O][C@@]": 544,
210
+ "[=O][C@H1]": 431,
211
+ "[=O][C@]": 514,
212
+ "[=O][C]": 361,
213
+ "[=O][NH1]": 434,
214
+ "[=O][N]": 345,
215
+ "[=O][O-1]": 391,
216
+ "[=O][O]": 370,
217
+ "[=O][S]": 571,
218
+ "[=P@@]": 107,
219
+ "[=P@]": 129,
220
+ "[=PH1]": 147,
221
+ "[=PH2]": 204,
222
+ "[=P]": 57,
223
+ "[=Ring1]": 34,
224
+ "[=Ring1][#Branch1]": 570,
225
+ "[=Ring1][#Branch2]": 576,
226
+ "[=Ring1][#C]": 562,
227
+ "[=Ring1][=Branch1]": 539,
228
+ "[=Ring1][=Branch2]": 481,
229
+ "[=Ring1][=C]": 582,
230
+ "[=Ring1][=N]": 545,
231
+ "[=Ring1][Branch1]": 442,
232
+ "[=Ring1][Branch2]": 568,
233
+ "[=Ring1][N]": 557,
234
+ "[=Ring1][O]": 526,
235
+ "[=Ring1][P]": 581,
236
+ "[=Ring1][S]": 565,
237
+ "[=Ring2]": 41,
238
+ "[=Ring2][Ring1]": 506,
239
+ "[=S+1]": 98,
240
+ "[=S-1]": 278,
241
+ "[=S@@]": 50,
242
+ "[=S@]": 164,
243
+ "[=SH0]": 269,
244
+ "[=SH1]": 150,
245
+ "[=S]": 26,
246
+ "[=S][N]": 455,
247
+ "[=Se+1]": 174,
248
+ "[=Se]": 162,
249
+ "[=Si]": 173,
250
+ "[=Te+1]": 179,
251
+ "[=Te]": 253,
252
+ "[Ag+1]": 190,
253
+ "[Ag-4]": 328,
254
+ "[Ag]": 146,
255
+ "[Al+3]": 223,
256
+ "[Al]": 225,
257
+ "[Ar]": 266,
258
+ "[As+1]": 189,
259
+ "[As-1]": 298,
260
+ "[AsH1]": 282,
261
+ "[AsH3]": 316,
262
+ "[As]": 84,
263
+ "[At]": 290,
264
+ "[Au-1]": 595,
265
+ "[B-1]": 100,
266
+ "[B@-1]": 206,
267
+ "[B@@-1]": 208,
268
+ "[BH0]": 165,
269
+ "[BH1-1]": 251,
270
+ "[BH2-1]": 202,
271
+ "[BH3-1]": 131,
272
+ "[B]": 65,
273
+ "[Ba+2]": 157,
274
+ "[Ba]": 291,
275
+ "[Be+2]": 246,
276
+ "[Bi+3]": 169,
277
+ "[Bi]": 155,
278
+ "[Br+2]": 254,
279
+ "[Br-1]": 52,
280
+ "[BrH0]": 596,
281
+ "[Br]": 21,
282
+ "[Br][=C]": 432,
283
+ "[Br][C]": 558,
284
+ "[Branch1]": 11,
285
+ "[Branch1][#Branch1]": 410,
286
+ "[Branch1][#Branch2]": 392,
287
+ "[Branch1][#C]": 399,
288
+ "[Branch1][=Branch1]": 401,
289
+ "[Branch1][=Branch2]": 358,
290
+ "[Branch1][=C]": 379,
291
+ "[Branch1][=N]": 405,
292
+ "[Branch1][=O]": 532,
293
+ "[Branch1][Branch1]": 476,
294
+ "[Branch1][Branch2]": 394,
295
+ "[Branch1][C]": 336,
296
+ "[Branch1][N]": 378,
297
+ "[Branch1][O]": 398,
298
+ "[Branch1][P]": 403,
299
+ "[Branch1][Ring1]": 396,
300
+ "[Branch1][Ring2]": 429,
301
+ "[Branch1][S]": 402,
302
+ "[Branch2]": 8,
303
+ "[Branch2][#Branch1]": 551,
304
+ "[Branch2][=Branch1]": 446,
305
+ "[Branch2][=C]": 464,
306
+ "[Branch2][=N]": 560,
307
+ "[Branch2][=O]": 522,
308
+ "[Branch2][Branch1]": 384,
309
+ "[Branch2][C]": 409,
310
+ "[Branch2][N]": 440,
311
+ "[Branch2][O]": 478,
312
+ "[Branch2][Ring1]": 340,
313
+ "[Branch2][Ring2]": 350,
314
+ "[Branch2][S]": 535,
315
+ "[Branch3]": 597,
316
+ "[C+1]": 106,
317
+ "[C-1]": 119,
318
+ "[C@@H1]": 27,
319
+ "[C@@H1][Branch1]": 371,
320
+ "[C@@H1][C@@H1]": 547,
321
+ "[C@@H1][C@H1]": 586,
322
+ "[C@@H1][C]": 447,
323
+ "[C@@H1][O]": 493,
324
+ "[C@@H1][Ring1]": 524,
325
+ "[C@@]": 28,
326
+ "[C@@][Branch1]": 413,
327
+ "[C@H1]": 33,
328
+ "[C@H1][Branch1]": 366,
329
+ "[C@H1][Branch2]": 573,
330
+ "[C@H1][C@@H1]": 505,
331
+ "[C@H1][C@H1]": 575,
332
+ "[C@H1][C]": 445,
333
+ "[C@H1][O]": 530,
334
+ "[C@H1][Ring1]": 470,
335
+ "[C@]": 35,
336
+ "[C@][Branch1]": 412,
337
+ "[CH0]": 227,
338
+ "[CH1-1]": 138,
339
+ "[CH1]": 323,
340
+ "[CH2-1]": 598,
341
+ "[CH2]": 224,
342
+ "[CH3]": 226,
343
+ "[C]": 5,
344
+ "[C][#C]": 500,
345
+ "[C][#N]": 536,
346
+ "[C][=Branch1]": 377,
347
+ "[C][=Branch2]": 488,
348
+ "[C][=C]": 333,
349
+ "[C][=N+1]": 543,
350
+ "[C][=N]": 346,
351
+ "[C][=O]": 511,
352
+ "[C][=Ring1]": 395,
353
+ "[C][=Ring2]": 471,
354
+ "[C][Branch1]": 342,
355
+ "[C][Branch2]": 423,
356
+ "[C][C@@H1]": 386,
357
+ "[C][C@@]": 480,
358
+ "[C][C@H1]": 385,
359
+ "[C][C@]": 462,
360
+ "[C][C]": 334,
361
+ "[C][Cl]": 574,
362
+ "[C][F]": 578,
363
+ "[C][NH1]": 449,
364
+ "[C][N]": 352,
365
+ "[C][O]": 348,
366
+ "[C][Ring1]": 351,
367
+ "[C][Ring2]": 588,
368
+ "[C][S]": 397,
369
+ "[Ca+2]": 122,
370
+ "[CaH2]": 288,
371
+ "[Ca]": 234,
372
+ "[Cl+1]": 139,
373
+ "[Cl+2]": 240,
374
+ "[Cl+3]": 61,
375
+ "[Cl-1]": 39,
376
+ "[ClH0]": 126,
377
+ "[ClH1+1]": 599,
378
+ "[ClH2+1]": 600,
379
+ "[Cl]": 24,
380
+ "[Cl][=C]": 374,
381
+ "[Cl][=N]": 494,
382
+ "[Cl][C]": 416,
383
+ "[Cl][Cl]": 484,
384
+ "[Cl][N]": 512,
385
+ "[Cl][O]": 587,
386
+ "[Cl][S]": 555,
387
+ "[Co-2]": 601,
388
+ "[Co-4]": 602,
389
+ "[Cr]": 603,
390
+ "[Cs+1]": 85,
391
+ "[Cs]": 284,
392
+ "[Cu-2]": 604,
393
+ "[Cu-3]": 605,
394
+ "[Cu-5]": 606,
395
+ "[Cu]": 607,
396
+ "[F-1]": 111,
397
+ "[F]": 16,
398
+ "[F][=C]": 376,
399
+ "[F][=N]": 537,
400
+ "[F][C]": 404,
401
+ "[F][F]": 360,
402
+ "[F][N]": 585,
403
+ "[F][O]": 577,
404
+ "[Fe+2]": 608,
405
+ "[Fe+3]": 609,
406
+ "[Fe-2]": 610,
407
+ "[Fe-3]": 611,
408
+ "[Gd+3]": 612,
409
+ "[Ge]": 613,
410
+ "[H+1]": 151,
411
+ "[H-1]": 285,
412
+ "[H]": 614,
413
+ "[He]": 115,
414
+ "[Hg]": 615,
415
+ "[I+1]": 153,
416
+ "[I+2]": 308,
417
+ "[I+3]": 309,
418
+ "[I-1]": 66,
419
+ "[IH0]": 183,
420
+ "[I]": 42,
421
+ "[Ir-3]": 616,
422
+ "[K+1]": 83,
423
+ "[KH1]": 228,
424
+ "[K]": 313,
425
+ "[Kr]": 315,
426
+ "[Li+1]": 110,
427
+ "[LiH1]": 233,
428
+ "[Li]": 276,
429
+ "[Mg+1]": 289,
430
+ "[Mg+2]": 75,
431
+ "[MgH2]": 236,
432
+ "[Mg]": 235,
433
+ "[Mn+1]": 617,
434
+ "[Mn+2]": 618,
435
+ "[Mo]": 619,
436
+ "[N+1]": 30,
437
+ "[N+1][=C]": 510,
438
+ "[N+1][Branch1]": 497,
439
+ "[N-1]": 37,
440
+ "[N@+1]": 97,
441
+ "[N@@+1]": 109,
442
+ "[N@@]": 140,
443
+ "[N@H1+1]": 297,
444
+ "[N@]": 91,
445
+ "[NH0]": 238,
446
+ "[NH1+1]": 216,
447
+ "[NH1-1]": 124,
448
+ "[NH1]": 38,
449
+ "[NH1][C]": 406,
450
+ "[NH1][Ring1]": 566,
451
+ "[NH2+1]": 215,
452
+ "[NH2-1]": 620,
453
+ "[NH2]": 621,
454
+ "[NH3+1]": 293,
455
+ "[NH4+1]": 260,
456
+ "[N]": 10,
457
+ "[N][#C]": 422,
458
+ "[N][=C]": 343,
459
+ "[N][=N]": 389,
460
+ "[N][=O]": 417,
461
+ "[N][=Ring1]": 420,
462
+ "[N][=Ring2]": 457,
463
+ "[N][Branch1]": 347,
464
+ "[N][Branch2]": 498,
465
+ "[N][C@@H1]": 486,
466
+ "[N][C@H1]": 483,
467
+ "[N][C]": 339,
468
+ "[N][N]": 430,
469
+ "[N][O]": 468,
470
+ "[N][Ring1]": 415,
471
+ "[N][S]": 408,
472
+ "[Na+1]": 40,
473
+ "[NaH1]": 221,
474
+ "[Na]": 268,
475
+ "[Ni-2]": 622,
476
+ "[Ni-4]": 623,
477
+ "[O+1]": 136,
478
+ "[O-1]": 31,
479
+ "[O-2]": 270,
480
+ "[OH0]": 96,
481
+ "[OH1+1]": 220,
482
+ "[OH1-1]": 154,
483
+ "[OH1]": 212,
484
+ "[OH2+1]": 624,
485
+ "[OH3+1]": 274,
486
+ "[O]": 6,
487
+ "[O][=C]": 349,
488
+ "[O][=N+1]": 503,
489
+ "[O][=N]": 474,
490
+ "[O][=O]": 521,
491
+ "[O][=S]": 460,
492
+ "[O][Branch1]": 559,
493
+ "[O][C@@H1]": 390,
494
+ "[O][C@@]": 553,
495
+ "[O][C@H1]": 387,
496
+ "[O][C@]": 519,
497
+ "[O][C]": 341,
498
+ "[O][N]": 441,
499
+ "[O][O]": 426,
500
+ "[O][P]": 489,
501
+ "[O][Ring1]": 458,
502
+ "[O][S]": 487,
503
+ "[P+1]": 112,
504
+ "[P-1]": 135,
505
+ "[P@+1]": 163,
506
+ "[P@@+1]": 237,
507
+ "[P@@]": 78,
508
+ "[P@]": 72,
509
+ "[PH1]": 127,
510
+ "[PH2+1]": 305,
511
+ "[P]": 25,
512
+ "[P][=C]": 504,
513
+ "[P][=O]": 552,
514
+ "[P][C]": 419,
515
+ "[P][N]": 477,
516
+ "[P][O]": 548,
517
+ "[P][S]": 533,
518
+ "[Pd-2]": 625,
519
+ "[Pt-2]": 626,
520
+ "[Pt]": 627,
521
+ "[Ra]": 187,
522
+ "[Rb+1]": 207,
523
+ "[Rb]": 321,
524
+ "[Rh+2]": 628,
525
+ "[Ring1]": 9,
526
+ "[Ring1][#Branch1]": 344,
527
+ "[Ring1][#Branch2]": 353,
528
+ "[Ring1][#C]": 369,
529
+ "[Ring1][=Branch1]": 338,
530
+ "[Ring1][=Branch2]": 356,
531
+ "[Ring1][=C]": 363,
532
+ "[Ring1][=N]": 367,
533
+ "[Ring1][=O]": 550,
534
+ "[Ring1][Branch1]": 355,
535
+ "[Ring1][Branch2]": 357,
536
+ "[Ring1][C]": 373,
537
+ "[Ring1][N]": 368,
538
+ "[Ring1][O]": 354,
539
+ "[Ring1][P]": 372,
540
+ "[Ring1][Ring1]": 421,
541
+ "[Ring1][Ring2]": 439,
542
+ "[Ring1][S]": 365,
543
+ "[Ring2]": 12,
544
+ "[Ring2][=C]": 381,
545
+ "[Ring2][=N]": 459,
546
+ "[Ring2][=O]": 525,
547
+ "[Ring2][Branch1]": 520,
548
+ "[Ring2][C]": 393,
549
+ "[Ring2][N]": 433,
550
+ "[Ring2][O]": 466,
551
+ "[Ring2][Ring1]": 337,
552
+ "[Ring2][Ring2]": 359,
553
+ "[Ring2][S]": 502,
554
+ "[Ring3]": 629,
555
+ "[S+1]": 44,
556
+ "[S-1]": 60,
557
+ "[S-2]": 172,
558
+ "[S@+1]": 56,
559
+ "[S@@+1]": 95,
560
+ "[S@@]": 51,
561
+ "[S@]": 184,
562
+ "[SH0]": 170,
563
+ "[SH1+1]": 263,
564
+ "[SH1-1]": 205,
565
+ "[SH1]": 264,
566
+ "[SH2]": 299,
567
+ "[S]": 17,
568
+ "[S][=C]": 490,
569
+ "[S][=N]": 523,
570
+ "[S][=O]": 554,
571
+ "[S][Branch1]": 444,
572
+ "[S][C]": 375,
573
+ "[S][N]": 452,
574
+ "[S][O]": 527,
575
+ "[S][Ring1]": 485,
576
+ "[S][S]": 463,
577
+ "[Sb]": 211,
578
+ "[Se+1]": 230,
579
+ "[SeH1]": 130,
580
+ "[SeH2]": 330,
581
+ "[Se]": 36,
582
+ "[Si-1]": 331,
583
+ "[Si@]": 287,
584
+ "[SiH1-1]": 192,
585
+ "[SiH1]": 104,
586
+ "[SiH2]": 300,
587
+ "[SiH3-1]": 219,
588
+ "[SiH4]": 271,
589
+ "[Si]": 49,
590
+ "[Sn]": 630,
591
+ "[Sr+2]": 158,
592
+ "[Sr]": 332,
593
+ "[TeH1]": 279,
594
+ "[TeH2]": 239,
595
+ "[Te]": 81,
596
+ "[Xe]": 320,
597
+ "[Yb]": 209,
598
+ "[Zn+1]": 213,
599
+ "[Zn+2]": 148,
600
+ "[Zn-2]": 261,
601
+ "[Zn]": 82,
602
+ "[\\11CH3]": 203,
603
+ "[\\123I]": 214,
604
+ "[\\125I]": 79,
605
+ "[\\3H]": 250,
606
+ "[\\B]": 217,
607
+ "[\\Br]": 89,
608
+ "[\\C-1]": 265,
609
+ "[\\C@@H1]": 46,
610
+ "[\\C@@]": 80,
611
+ "[\\C@H1]": 77,
612
+ "[\\C@]": 99,
613
+ "[\\CH1-1]": 241,
614
+ "[\\C]": 43,
615
+ "[\\C][=C]": 436,
616
+ "[\\C][C]": 567,
617
+ "[\\Cl]": 58,
618
+ "[\\F]": 118,
619
+ "[\\I]": 59,
620
+ "[\\N+1]": 113,
621
+ "[\\N-1]": 222,
622
+ "[\\NH1]": 108,
623
+ "[\\N]": 55,
624
+ "[\\N][C]": 541,
625
+ "[\\O-1]": 64,
626
+ "[\\O]": 47,
627
+ "[\\P]": 93,
628
+ "[\\S+1]": 121,
629
+ "[\\S-1]": 255,
630
+ "[\\S]": 54,
631
+ "[\\Se]": 168,
632
+ "[\\Si]": 195
633
+ }
ape_tokenizer_metadata.json ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "dataset_name": "data/pretrain/chembl36_selfies",
3
+ "selfies_column": "selfies",
4
+ "train_split": "train",
5
+ "validation_split": "valid",
6
+ "use_validation_split": true,
7
+ "representation": "SELFIES",
8
+ "expected_input": "SELFIES strings only. Convert SMILES before inference using a helper such as smiles_to_selfies().",
9
+ "tokenizer_vocab_path": "tokenizer/chembl36_selfies_2m_ape_max2_min3000.json",
10
+ "tokenizer_metadata_path": "tokenizer/chembl36_selfies_2m_ape_max2_min3000.metadata.json",
11
+ "backend": "cuda",
12
+ "platform": "Linux-6.8.0-110-generic-x86_64-with-glibc2.35",
13
+ "torch_version": "2.11.0+cu130",
14
+ "transformers_version": "5.8.1",
15
+ "vocab_size": 631,
16
+ "special_ids": {
17
+ "pad_token": 1,
18
+ "bos_token": 0,
19
+ "eos_token": 2,
20
+ "unk_token": 3,
21
+ "mask_token": 4
22
+ },
23
+ "num_parameters": 34149495,
24
+ "tokenizer_stats": {
25
+ "sample_size": 1000.0,
26
+ "mean_len": 25.555,
27
+ "p50_len": 25.0,
28
+ "p95_len": 41.0,
29
+ "p99_len": 51.0,
30
+ "max_len": 62.0,
31
+ "truncation_rate": 0.0,
32
+ "unk_rate": 0.0,
33
+ "empty_sequence_rate": 0.0,
34
+ "mostly_unknown_rate": 0.0
35
+ },
36
+ "final_eval_metrics": {
37
+ "eval_loss": 0.3744058609008789,
38
+ "eval_masked_accuracy": 0.8805643239064613,
39
+ "eval_runtime": 2.8656,
40
+ "eval_samples_per_second": 1429.379,
41
+ "eval_steps_per_second": 5.584,
42
+ "epoch": 3.066,
43
+ "eval_perplexity": 1.454127204085947
44
+ },
45
+ "trainer_state_summary": {
46
+ "best_global_step": 30000,
47
+ "best_metric": 0.37694016098976135,
48
+ "best_model_checkpoint": "runs/chembl36_small_mask_mlm_lr_sweep/mask_standard__mlm_0p15__lr_4e-4/checkpoint-30000",
49
+ "global_step": 30000
50
+ },
51
+ "args": {
52
+ "output_dir": "runs/chembl36_small_mask_mlm_lr_sweep/mask_standard__mlm_0p15__lr_4e-4",
53
+ "tokenizer_vocab_path": "tokenizer/chembl36_selfies_2m_ape_max2_min3000.json",
54
+ "tokenizer_metadata_path": "tokenizer/chembl36_selfies_2m_ape_max2_min3000.metadata.json",
55
+ "dataset_name": "data/pretrain/chembl36_selfies",
56
+ "selfies_column": "selfies",
57
+ "train_split": "train",
58
+ "validation_split": "valid",
59
+ "use_validation_split": true,
60
+ "data_dir": null,
61
+ "data_files": null,
62
+ "eval_size": 4096,
63
+ "shuffle_buffer_size": 100000,
64
+ "seed": 42,
65
+ "val_split_mod": 100,
66
+ "val_split_bucket": 0,
67
+ "tokenizer_validation_samples": 1000,
68
+ "unk_rate_threshold": 0.001,
69
+ "truncation_warn_threshold": 0.05,
70
+ "model_size": "small",
71
+ "max_seq_length": 128,
72
+ "mlm_probability": 0.15,
73
+ "masking_strategy": "standard",
74
+ "span_p_geom": 0.4,
75
+ "span_max_length": 6,
76
+ "heteroatom_start_weight": 2.0,
77
+ "max_steps": 30000,
78
+ "per_device_train_batch_size": 256,
79
+ "per_device_eval_batch_size": 256,
80
+ "gradient_accumulation_steps": 1,
81
+ "learning_rate": 0.0004,
82
+ "weight_decay": 0.01,
83
+ "warmup_steps": 1500,
84
+ "max_grad_norm": 1.0,
85
+ "load_best_model_at_end": true,
86
+ "metric_for_best_model": "eval_loss",
87
+ "greater_is_better": false,
88
+ "logging_steps": 100,
89
+ "eval_steps": 5000,
90
+ "save_steps": 5000,
91
+ "save_total_limit": 2,
92
+ "device_backend": "cuda",
93
+ "bf16": true,
94
+ "fp16": false,
95
+ "num_workers": 4,
96
+ "max_eval_batches": 16,
97
+ "report_to": "tensorboard",
98
+ "compute_masked_accuracy": true,
99
+ "debug": false,
100
+ "hf_login": false
101
+ }
102
+ }
collator_config.json ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ {
2
+ "_note": "Collator parameters used during pre-training. Change masking_strategy to 'standard', 'span', or 'hetero_span' and adjust the corresponding parameters when fine-tuning.",
3
+ "masking_strategy": "standard",
4
+ "mlm_probability": 0.15
5
+ }
config.json CHANGED
@@ -9,7 +9,7 @@
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",
@@ -34,6 +34,7 @@
34
  "sliding_attention"
35
  ],
36
  "local_attention": 128,
 
37
  "max_position_embeddings": 128,
38
  "mlp_bias": false,
39
  "mlp_dropout": 0.0,
@@ -54,11 +55,12 @@
54
  "rope_type": "default"
55
  }
56
  },
57
- "sep_token_id": 50282,
58
  "sparse_pred_ignore_index": -100,
59
  "sparse_prediction": false,
60
  "tie_word_embeddings": true,
61
  "transformers_version": "5.8.1",
 
62
  "use_cache": false,
63
- "vocab_size": 2439
64
  }
 
9
  "classifier_bias": false,
10
  "classifier_dropout": 0.0,
11
  "classifier_pooling": "mean",
12
+ "cls_token_id": 0,
13
  "decoder_bias": true,
14
  "deterministic_flash_attn": false,
15
  "dtype": "float32",
 
34
  "sliding_attention"
35
  ],
36
  "local_attention": 128,
37
+ "mask_token_id": 4,
38
  "max_position_embeddings": 128,
39
  "mlp_bias": false,
40
  "mlp_dropout": 0.0,
 
55
  "rope_type": "default"
56
  }
57
  },
58
+ "sep_token_id": 2,
59
  "sparse_pred_ignore_index": -100,
60
  "sparse_prediction": false,
61
  "tie_word_embeddings": true,
62
  "transformers_version": "5.8.1",
63
+ "unk_token_id": 3,
64
  "use_cache": false,
65
+ "vocab_size": 631
66
  }
eval_results.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 3.066,
3
+ "eval_loss": 0.3744058609008789,
4
+ "eval_masked_accuracy": 0.8805643239064613,
5
+ "eval_perplexity": 1.454127204085947,
6
+ "eval_runtime": 2.8656,
7
+ "eval_samples_per_second": 1429.379,
8
+ "eval_steps_per_second": 5.584
9
+ }
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:eaeb9ab56962d39645f5a39f85f65d1f759c7b6904fa5b301bf3d07803a1c934
3
- size 140313324
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9520e881983046b32a4b2f8c65665e8264fe9a4887935bf89cd8ee4842d057cd
3
+ size 136603308
run_args.json CHANGED
@@ -1,8 +1,8 @@
1
  {
2
- "output_dir": "runs/chembl36_small_mask_mlm_lr_sweep/mask_standard__mlm_0p15__lr_1e-4",
3
- "tokenizer_vocab_path": "tokenizer/chembl36_selfies_2m_benchmark_covered_ape_tokenizer.json",
4
- "tokenizer_metadata_path": "tokenizer/chembl36_selfies_2m_benchmark_covered_ape_tokenizer.metadata.json",
5
- "dataset_name": "data/pretrain/chembl36_selfies_tokenized",
6
  "selfies_column": "selfies",
7
  "train_split": "train",
8
  "validation_split": "valid",
@@ -28,7 +28,7 @@
28
  "per_device_train_batch_size": 256,
29
  "per_device_eval_batch_size": 256,
30
  "gradient_accumulation_steps": 1,
31
- "learning_rate": 0.0001,
32
  "weight_decay": 0.01,
33
  "warmup_steps": 1500,
34
  "max_grad_norm": 1.0,
@@ -43,7 +43,7 @@
43
  "bf16": true,
44
  "fp16": false,
45
  "num_workers": 4,
46
- "max_eval_batches": 256,
47
  "report_to": "tensorboard",
48
  "compute_masked_accuracy": true,
49
  "debug": false,
 
1
  {
2
+ "output_dir": "runs/chembl36_small_mask_mlm_lr_sweep/mask_standard__mlm_0p15__lr_4e-4",
3
+ "tokenizer_vocab_path": "tokenizer/chembl36_selfies_2m_ape_max2_min3000.json",
4
+ "tokenizer_metadata_path": "tokenizer/chembl36_selfies_2m_ape_max2_min3000.metadata.json",
5
+ "dataset_name": "data/pretrain/chembl36_selfies",
6
  "selfies_column": "selfies",
7
  "train_split": "train",
8
  "validation_split": "valid",
 
28
  "per_device_train_batch_size": 256,
29
  "per_device_eval_batch_size": 256,
30
  "gradient_accumulation_steps": 1,
31
+ "learning_rate": 0.0004,
32
  "weight_decay": 0.01,
33
  "warmup_steps": 1500,
34
  "max_grad_norm": 1.0,
 
43
  "bf16": true,
44
  "fp16": false,
45
  "num_workers": 4,
46
+ "max_eval_batches": 16,
47
  "report_to": "tensorboard",
48
  "compute_masked_accuracy": true,
49
  "debug": false,
selfies_vocab.json ADDED
@@ -0,0 +1,633 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "</s>": 2,
3
+ "<mask>": 4,
4
+ "<pad>": 1,
5
+ "<s>": 0,
6
+ "<unk>": 3,
7
+ "[#11C]": 256,
8
+ "[#14C]": 247,
9
+ "[#Branch1]": 22,
10
+ "[#Branch1][=C]": 479,
11
+ "[#Branch1][=O]": 542,
12
+ "[#Branch1][C]": 400,
13
+ "[#Branch1][N]": 453,
14
+ "[#Branch1][O]": 491,
15
+ "[#Branch1][S]": 528,
16
+ "[#Branch2]": 15,
17
+ "[#Branch2][=C]": 469,
18
+ "[#Branch2][=N]": 561,
19
+ "[#Branch2][=O]": 531,
20
+ "[#Branch2][C]": 380,
21
+ "[#Branch2][N]": 438,
22
+ "[#Branch2][O]": 461,
23
+ "[#Branch2][S]": 529,
24
+ "[#C-1]": 141,
25
+ "[#CH0]": 248,
26
+ "[#C]": 23,
27
+ "[#C][=C]": 496,
28
+ "[#C][=N]": 569,
29
+ "[#C][=O]": 515,
30
+ "[#C][C]": 407,
31
+ "[#C][N]": 465,
32
+ "[#C][O]": 538,
33
+ "[#C][S]": 534,
34
+ "[#N+1]": 123,
35
+ "[#N]": 19,
36
+ "[#N][=C]": 435,
37
+ "[#N][C]": 475,
38
+ "[#O+1]": 589,
39
+ "[#S]": 262,
40
+ "[-/Ring1]": 92,
41
+ "[-/Ring2]": 90,
42
+ "[-/Ring3]": 590,
43
+ "[-\\Ring1]": 167,
44
+ "[-\\Ring2]": 120,
45
+ "[-\\Ring3]": 591,
46
+ "[/123I]": 245,
47
+ "[/125I]": 117,
48
+ "[/131I]": 210,
49
+ "[/13CH1]": 272,
50
+ "[/13C]": 197,
51
+ "[/14CH1]": 324,
52
+ "[/14C]": 281,
53
+ "[/As]": 259,
54
+ "[/B]": 161,
55
+ "[/Br]": 62,
56
+ "[/C-1]": 229,
57
+ "[/C@@H1]": 45,
58
+ "[/C@@]": 105,
59
+ "[/C@H1]": 87,
60
+ "[/C@]": 76,
61
+ "[/C]": 20,
62
+ "[/C][=Branch1]": 428,
63
+ "[/C][=Branch2]": 450,
64
+ "[/C][=C]": 364,
65
+ "[/C][=N]": 454,
66
+ "[/C][Branch1]": 540,
67
+ "[/C][C]": 564,
68
+ "[/Cl]": 101,
69
+ "[/F]": 160,
70
+ "[/I]": 94,
71
+ "[/N+1]": 68,
72
+ "[/N-1]": 142,
73
+ "[/NH1]": 114,
74
+ "[/N]": 48,
75
+ "[/N][=C]": 418,
76
+ "[/N][=N]": 580,
77
+ "[/N][C]": 499,
78
+ "[/O-1]": 128,
79
+ "[/O]": 53,
80
+ "[/P+1]": 181,
81
+ "[/P@@]": 231,
82
+ "[/P]": 102,
83
+ "[/S+1]": 67,
84
+ "[/S-1]": 258,
85
+ "[/SH0]": 303,
86
+ "[/S]": 71,
87
+ "[/Se]": 149,
88
+ "[/Si]": 125,
89
+ "[10B]": 283,
90
+ "[11C@@H1]": 304,
91
+ "[11CH2]": 249,
92
+ "[11CH3]": 74,
93
+ "[11C]": 137,
94
+ "[123I-1]": 312,
95
+ "[123I]": 69,
96
+ "[123Te]": 186,
97
+ "[124I-1]": 325,
98
+ "[124I]": 133,
99
+ "[125I-1]": 171,
100
+ "[125I]": 70,
101
+ "[127I]": 301,
102
+ "[127Xe]": 311,
103
+ "[129Xe]": 292,
104
+ "[131Cs]": 275,
105
+ "[131I-1]": 329,
106
+ "[131I]": 86,
107
+ "[133Xe]": 322,
108
+ "[13CH1]": 198,
109
+ "[13CH3]": 277,
110
+ "[13C]": 166,
111
+ "[14C@@H1]": 318,
112
+ "[14C@@]": 302,
113
+ "[14C@H1]": 306,
114
+ "[14CH1]": 185,
115
+ "[14CH2]": 175,
116
+ "[14CH3]": 177,
117
+ "[14C]": 143,
118
+ "[15NH1]": 200,
119
+ "[15N]": 134,
120
+ "[17F]": 218,
121
+ "[18F-1]": 294,
122
+ "[18F]": 73,
123
+ "[18OH1]": 252,
124
+ "[19F]": 144,
125
+ "[211At]": 286,
126
+ "[223Ra]": 193,
127
+ "[22Na+1]": 191,
128
+ "[2H]": 88,
129
+ "[32P]": 307,
130
+ "[35S]": 182,
131
+ "[3H]": 103,
132
+ "[42K+1]": 188,
133
+ "[45Ca+2]": 178,
134
+ "[47Ca+2]": 201,
135
+ "[68Ga+3]": 273,
136
+ "[73Se]": 242,
137
+ "[75Se]": 327,
138
+ "[76Br]": 152,
139
+ "[81Kr]": 326,
140
+ "[82Rb+1]": 314,
141
+ "[82Rb]": 280,
142
+ "[85Sr+2]": 180,
143
+ "[89Sr+2]": 319,
144
+ "[=11C]": 132,
145
+ "[=13CH1]": 196,
146
+ "[=13C]": 199,
147
+ "[=14CH1]": 156,
148
+ "[=14C]": 194,
149
+ "[=18O]": 317,
150
+ "[=32PH1]": 257,
151
+ "[=32P]": 244,
152
+ "[=Al]": 295,
153
+ "[=As]": 145,
154
+ "[=B-1]": 159,
155
+ "[=B]": 176,
156
+ "[=Branch1]": 13,
157
+ "[=Branch1][=C]": 451,
158
+ "[=Branch1][=N]": 563,
159
+ "[=Branch1][=O]": 546,
160
+ "[=Branch1][C]": 335,
161
+ "[=Branch1][N+1]": 448,
162
+ "[=Branch1][N]": 508,
163
+ "[=Branch1][O]": 518,
164
+ "[=Branch2]": 14,
165
+ "[=Branch2][=C]": 472,
166
+ "[=Branch2][=N]": 584,
167
+ "[=Branch2][=O]": 549,
168
+ "[=Branch2][=Ring1]": 556,
169
+ "[=Branch2][C]": 383,
170
+ "[=Branch2][N]": 424,
171
+ "[=Branch2][O]": 507,
172
+ "[=Branch2][S]": 509,
173
+ "[=Branch3]": 592,
174
+ "[=C+1]": 267,
175
+ "[=CH0]": 593,
176
+ "[=C]": 7,
177
+ "[=C][=C]": 492,
178
+ "[=C][=O]": 516,
179
+ "[=C][Branch1]": 467,
180
+ "[=C][C]": 388,
181
+ "[=C][N]": 437,
182
+ "[=C][O]": 495,
183
+ "[=C][Ring1]": 482,
184
+ "[=C][S]": 456,
185
+ "[=Mg]": 310,
186
+ "[=N+1]": 32,
187
+ "[=N-1]": 63,
188
+ "[=NH1+1]": 232,
189
+ "[=NH2+1]": 243,
190
+ "[=N]": 29,
191
+ "[=N][=C]": 473,
192
+ "[=N][=N]": 579,
193
+ "[=N][=O]": 517,
194
+ "[=N][C]": 362,
195
+ "[=N][NH1]": 443,
196
+ "[=N][N]": 382,
197
+ "[=N][O]": 427,
198
+ "[=N][Ring1]": 513,
199
+ "[=N][S]": 501,
200
+ "[=O+1]": 116,
201
+ "[=OH0]": 296,
202
+ "[=OH1+1]": 594,
203
+ "[=O]": 18,
204
+ "[=O][/C]": 572,
205
+ "[=O][=C]": 411,
206
+ "[=O][=N]": 583,
207
+ "[=O][=O]": 425,
208
+ "[=O][C@@H1]": 414,
209
+ "[=O][C@@]": 544,
210
+ "[=O][C@H1]": 431,
211
+ "[=O][C@]": 514,
212
+ "[=O][C]": 361,
213
+ "[=O][NH1]": 434,
214
+ "[=O][N]": 345,
215
+ "[=O][O-1]": 391,
216
+ "[=O][O]": 370,
217
+ "[=O][S]": 571,
218
+ "[=P@@]": 107,
219
+ "[=P@]": 129,
220
+ "[=PH1]": 147,
221
+ "[=PH2]": 204,
222
+ "[=P]": 57,
223
+ "[=Ring1]": 34,
224
+ "[=Ring1][#Branch1]": 570,
225
+ "[=Ring1][#Branch2]": 576,
226
+ "[=Ring1][#C]": 562,
227
+ "[=Ring1][=Branch1]": 539,
228
+ "[=Ring1][=Branch2]": 481,
229
+ "[=Ring1][=C]": 582,
230
+ "[=Ring1][=N]": 545,
231
+ "[=Ring1][Branch1]": 442,
232
+ "[=Ring1][Branch2]": 568,
233
+ "[=Ring1][N]": 557,
234
+ "[=Ring1][O]": 526,
235
+ "[=Ring1][P]": 581,
236
+ "[=Ring1][S]": 565,
237
+ "[=Ring2]": 41,
238
+ "[=Ring2][Ring1]": 506,
239
+ "[=S+1]": 98,
240
+ "[=S-1]": 278,
241
+ "[=S@@]": 50,
242
+ "[=S@]": 164,
243
+ "[=SH0]": 269,
244
+ "[=SH1]": 150,
245
+ "[=S]": 26,
246
+ "[=S][N]": 455,
247
+ "[=Se+1]": 174,
248
+ "[=Se]": 162,
249
+ "[=Si]": 173,
250
+ "[=Te+1]": 179,
251
+ "[=Te]": 253,
252
+ "[Ag+1]": 190,
253
+ "[Ag-4]": 328,
254
+ "[Ag]": 146,
255
+ "[Al+3]": 223,
256
+ "[Al]": 225,
257
+ "[Ar]": 266,
258
+ "[As+1]": 189,
259
+ "[As-1]": 298,
260
+ "[AsH1]": 282,
261
+ "[AsH3]": 316,
262
+ "[As]": 84,
263
+ "[At]": 290,
264
+ "[Au-1]": 595,
265
+ "[B-1]": 100,
266
+ "[B@-1]": 206,
267
+ "[B@@-1]": 208,
268
+ "[BH0]": 165,
269
+ "[BH1-1]": 251,
270
+ "[BH2-1]": 202,
271
+ "[BH3-1]": 131,
272
+ "[B]": 65,
273
+ "[Ba+2]": 157,
274
+ "[Ba]": 291,
275
+ "[Be+2]": 246,
276
+ "[Bi+3]": 169,
277
+ "[Bi]": 155,
278
+ "[Br+2]": 254,
279
+ "[Br-1]": 52,
280
+ "[BrH0]": 596,
281
+ "[Br]": 21,
282
+ "[Br][=C]": 432,
283
+ "[Br][C]": 558,
284
+ "[Branch1]": 11,
285
+ "[Branch1][#Branch1]": 410,
286
+ "[Branch1][#Branch2]": 392,
287
+ "[Branch1][#C]": 399,
288
+ "[Branch1][=Branch1]": 401,
289
+ "[Branch1][=Branch2]": 358,
290
+ "[Branch1][=C]": 379,
291
+ "[Branch1][=N]": 405,
292
+ "[Branch1][=O]": 532,
293
+ "[Branch1][Branch1]": 476,
294
+ "[Branch1][Branch2]": 394,
295
+ "[Branch1][C]": 336,
296
+ "[Branch1][N]": 378,
297
+ "[Branch1][O]": 398,
298
+ "[Branch1][P]": 403,
299
+ "[Branch1][Ring1]": 396,
300
+ "[Branch1][Ring2]": 429,
301
+ "[Branch1][S]": 402,
302
+ "[Branch2]": 8,
303
+ "[Branch2][#Branch1]": 551,
304
+ "[Branch2][=Branch1]": 446,
305
+ "[Branch2][=C]": 464,
306
+ "[Branch2][=N]": 560,
307
+ "[Branch2][=O]": 522,
308
+ "[Branch2][Branch1]": 384,
309
+ "[Branch2][C]": 409,
310
+ "[Branch2][N]": 440,
311
+ "[Branch2][O]": 478,
312
+ "[Branch2][Ring1]": 340,
313
+ "[Branch2][Ring2]": 350,
314
+ "[Branch2][S]": 535,
315
+ "[Branch3]": 597,
316
+ "[C+1]": 106,
317
+ "[C-1]": 119,
318
+ "[C@@H1]": 27,
319
+ "[C@@H1][Branch1]": 371,
320
+ "[C@@H1][C@@H1]": 547,
321
+ "[C@@H1][C@H1]": 586,
322
+ "[C@@H1][C]": 447,
323
+ "[C@@H1][O]": 493,
324
+ "[C@@H1][Ring1]": 524,
325
+ "[C@@]": 28,
326
+ "[C@@][Branch1]": 413,
327
+ "[C@H1]": 33,
328
+ "[C@H1][Branch1]": 366,
329
+ "[C@H1][Branch2]": 573,
330
+ "[C@H1][C@@H1]": 505,
331
+ "[C@H1][C@H1]": 575,
332
+ "[C@H1][C]": 445,
333
+ "[C@H1][O]": 530,
334
+ "[C@H1][Ring1]": 470,
335
+ "[C@]": 35,
336
+ "[C@][Branch1]": 412,
337
+ "[CH0]": 227,
338
+ "[CH1-1]": 138,
339
+ "[CH1]": 323,
340
+ "[CH2-1]": 598,
341
+ "[CH2]": 224,
342
+ "[CH3]": 226,
343
+ "[C]": 5,
344
+ "[C][#C]": 500,
345
+ "[C][#N]": 536,
346
+ "[C][=Branch1]": 377,
347
+ "[C][=Branch2]": 488,
348
+ "[C][=C]": 333,
349
+ "[C][=N+1]": 543,
350
+ "[C][=N]": 346,
351
+ "[C][=O]": 511,
352
+ "[C][=Ring1]": 395,
353
+ "[C][=Ring2]": 471,
354
+ "[C][Branch1]": 342,
355
+ "[C][Branch2]": 423,
356
+ "[C][C@@H1]": 386,
357
+ "[C][C@@]": 480,
358
+ "[C][C@H1]": 385,
359
+ "[C][C@]": 462,
360
+ "[C][C]": 334,
361
+ "[C][Cl]": 574,
362
+ "[C][F]": 578,
363
+ "[C][NH1]": 449,
364
+ "[C][N]": 352,
365
+ "[C][O]": 348,
366
+ "[C][Ring1]": 351,
367
+ "[C][Ring2]": 588,
368
+ "[C][S]": 397,
369
+ "[Ca+2]": 122,
370
+ "[CaH2]": 288,
371
+ "[Ca]": 234,
372
+ "[Cl+1]": 139,
373
+ "[Cl+2]": 240,
374
+ "[Cl+3]": 61,
375
+ "[Cl-1]": 39,
376
+ "[ClH0]": 126,
377
+ "[ClH1+1]": 599,
378
+ "[ClH2+1]": 600,
379
+ "[Cl]": 24,
380
+ "[Cl][=C]": 374,
381
+ "[Cl][=N]": 494,
382
+ "[Cl][C]": 416,
383
+ "[Cl][Cl]": 484,
384
+ "[Cl][N]": 512,
385
+ "[Cl][O]": 587,
386
+ "[Cl][S]": 555,
387
+ "[Co-2]": 601,
388
+ "[Co-4]": 602,
389
+ "[Cr]": 603,
390
+ "[Cs+1]": 85,
391
+ "[Cs]": 284,
392
+ "[Cu-2]": 604,
393
+ "[Cu-3]": 605,
394
+ "[Cu-5]": 606,
395
+ "[Cu]": 607,
396
+ "[F-1]": 111,
397
+ "[F]": 16,
398
+ "[F][=C]": 376,
399
+ "[F][=N]": 537,
400
+ "[F][C]": 404,
401
+ "[F][F]": 360,
402
+ "[F][N]": 585,
403
+ "[F][O]": 577,
404
+ "[Fe+2]": 608,
405
+ "[Fe+3]": 609,
406
+ "[Fe-2]": 610,
407
+ "[Fe-3]": 611,
408
+ "[Gd+3]": 612,
409
+ "[Ge]": 613,
410
+ "[H+1]": 151,
411
+ "[H-1]": 285,
412
+ "[H]": 614,
413
+ "[He]": 115,
414
+ "[Hg]": 615,
415
+ "[I+1]": 153,
416
+ "[I+2]": 308,
417
+ "[I+3]": 309,
418
+ "[I-1]": 66,
419
+ "[IH0]": 183,
420
+ "[I]": 42,
421
+ "[Ir-3]": 616,
422
+ "[K+1]": 83,
423
+ "[KH1]": 228,
424
+ "[K]": 313,
425
+ "[Kr]": 315,
426
+ "[Li+1]": 110,
427
+ "[LiH1]": 233,
428
+ "[Li]": 276,
429
+ "[Mg+1]": 289,
430
+ "[Mg+2]": 75,
431
+ "[MgH2]": 236,
432
+ "[Mg]": 235,
433
+ "[Mn+1]": 617,
434
+ "[Mn+2]": 618,
435
+ "[Mo]": 619,
436
+ "[N+1]": 30,
437
+ "[N+1][=C]": 510,
438
+ "[N+1][Branch1]": 497,
439
+ "[N-1]": 37,
440
+ "[N@+1]": 97,
441
+ "[N@@+1]": 109,
442
+ "[N@@]": 140,
443
+ "[N@H1+1]": 297,
444
+ "[N@]": 91,
445
+ "[NH0]": 238,
446
+ "[NH1+1]": 216,
447
+ "[NH1-1]": 124,
448
+ "[NH1]": 38,
449
+ "[NH1][C]": 406,
450
+ "[NH1][Ring1]": 566,
451
+ "[NH2+1]": 215,
452
+ "[NH2-1]": 620,
453
+ "[NH2]": 621,
454
+ "[NH3+1]": 293,
455
+ "[NH4+1]": 260,
456
+ "[N]": 10,
457
+ "[N][#C]": 422,
458
+ "[N][=C]": 343,
459
+ "[N][=N]": 389,
460
+ "[N][=O]": 417,
461
+ "[N][=Ring1]": 420,
462
+ "[N][=Ring2]": 457,
463
+ "[N][Branch1]": 347,
464
+ "[N][Branch2]": 498,
465
+ "[N][C@@H1]": 486,
466
+ "[N][C@H1]": 483,
467
+ "[N][C]": 339,
468
+ "[N][N]": 430,
469
+ "[N][O]": 468,
470
+ "[N][Ring1]": 415,
471
+ "[N][S]": 408,
472
+ "[Na+1]": 40,
473
+ "[NaH1]": 221,
474
+ "[Na]": 268,
475
+ "[Ni-2]": 622,
476
+ "[Ni-4]": 623,
477
+ "[O+1]": 136,
478
+ "[O-1]": 31,
479
+ "[O-2]": 270,
480
+ "[OH0]": 96,
481
+ "[OH1+1]": 220,
482
+ "[OH1-1]": 154,
483
+ "[OH1]": 212,
484
+ "[OH2+1]": 624,
485
+ "[OH3+1]": 274,
486
+ "[O]": 6,
487
+ "[O][=C]": 349,
488
+ "[O][=N+1]": 503,
489
+ "[O][=N]": 474,
490
+ "[O][=O]": 521,
491
+ "[O][=S]": 460,
492
+ "[O][Branch1]": 559,
493
+ "[O][C@@H1]": 390,
494
+ "[O][C@@]": 553,
495
+ "[O][C@H1]": 387,
496
+ "[O][C@]": 519,
497
+ "[O][C]": 341,
498
+ "[O][N]": 441,
499
+ "[O][O]": 426,
500
+ "[O][P]": 489,
501
+ "[O][Ring1]": 458,
502
+ "[O][S]": 487,
503
+ "[P+1]": 112,
504
+ "[P-1]": 135,
505
+ "[P@+1]": 163,
506
+ "[P@@+1]": 237,
507
+ "[P@@]": 78,
508
+ "[P@]": 72,
509
+ "[PH1]": 127,
510
+ "[PH2+1]": 305,
511
+ "[P]": 25,
512
+ "[P][=C]": 504,
513
+ "[P][=O]": 552,
514
+ "[P][C]": 419,
515
+ "[P][N]": 477,
516
+ "[P][O]": 548,
517
+ "[P][S]": 533,
518
+ "[Pd-2]": 625,
519
+ "[Pt-2]": 626,
520
+ "[Pt]": 627,
521
+ "[Ra]": 187,
522
+ "[Rb+1]": 207,
523
+ "[Rb]": 321,
524
+ "[Rh+2]": 628,
525
+ "[Ring1]": 9,
526
+ "[Ring1][#Branch1]": 344,
527
+ "[Ring1][#Branch2]": 353,
528
+ "[Ring1][#C]": 369,
529
+ "[Ring1][=Branch1]": 338,
530
+ "[Ring1][=Branch2]": 356,
531
+ "[Ring1][=C]": 363,
532
+ "[Ring1][=N]": 367,
533
+ "[Ring1][=O]": 550,
534
+ "[Ring1][Branch1]": 355,
535
+ "[Ring1][Branch2]": 357,
536
+ "[Ring1][C]": 373,
537
+ "[Ring1][N]": 368,
538
+ "[Ring1][O]": 354,
539
+ "[Ring1][P]": 372,
540
+ "[Ring1][Ring1]": 421,
541
+ "[Ring1][Ring2]": 439,
542
+ "[Ring1][S]": 365,
543
+ "[Ring2]": 12,
544
+ "[Ring2][=C]": 381,
545
+ "[Ring2][=N]": 459,
546
+ "[Ring2][=O]": 525,
547
+ "[Ring2][Branch1]": 520,
548
+ "[Ring2][C]": 393,
549
+ "[Ring2][N]": 433,
550
+ "[Ring2][O]": 466,
551
+ "[Ring2][Ring1]": 337,
552
+ "[Ring2][Ring2]": 359,
553
+ "[Ring2][S]": 502,
554
+ "[Ring3]": 629,
555
+ "[S+1]": 44,
556
+ "[S-1]": 60,
557
+ "[S-2]": 172,
558
+ "[S@+1]": 56,
559
+ "[S@@+1]": 95,
560
+ "[S@@]": 51,
561
+ "[S@]": 184,
562
+ "[SH0]": 170,
563
+ "[SH1+1]": 263,
564
+ "[SH1-1]": 205,
565
+ "[SH1]": 264,
566
+ "[SH2]": 299,
567
+ "[S]": 17,
568
+ "[S][=C]": 490,
569
+ "[S][=N]": 523,
570
+ "[S][=O]": 554,
571
+ "[S][Branch1]": 444,
572
+ "[S][C]": 375,
573
+ "[S][N]": 452,
574
+ "[S][O]": 527,
575
+ "[S][Ring1]": 485,
576
+ "[S][S]": 463,
577
+ "[Sb]": 211,
578
+ "[Se+1]": 230,
579
+ "[SeH1]": 130,
580
+ "[SeH2]": 330,
581
+ "[Se]": 36,
582
+ "[Si-1]": 331,
583
+ "[Si@]": 287,
584
+ "[SiH1-1]": 192,
585
+ "[SiH1]": 104,
586
+ "[SiH2]": 300,
587
+ "[SiH3-1]": 219,
588
+ "[SiH4]": 271,
589
+ "[Si]": 49,
590
+ "[Sn]": 630,
591
+ "[Sr+2]": 158,
592
+ "[Sr]": 332,
593
+ "[TeH1]": 279,
594
+ "[TeH2]": 239,
595
+ "[Te]": 81,
596
+ "[Xe]": 320,
597
+ "[Yb]": 209,
598
+ "[Zn+1]": 213,
599
+ "[Zn+2]": 148,
600
+ "[Zn-2]": 261,
601
+ "[Zn]": 82,
602
+ "[\\11CH3]": 203,
603
+ "[\\123I]": 214,
604
+ "[\\125I]": 79,
605
+ "[\\3H]": 250,
606
+ "[\\B]": 217,
607
+ "[\\Br]": 89,
608
+ "[\\C-1]": 265,
609
+ "[\\C@@H1]": 46,
610
+ "[\\C@@]": 80,
611
+ "[\\C@H1]": 77,
612
+ "[\\C@]": 99,
613
+ "[\\CH1-1]": 241,
614
+ "[\\C]": 43,
615
+ "[\\C][=C]": 436,
616
+ "[\\C][C]": 567,
617
+ "[\\Cl]": 58,
618
+ "[\\F]": 118,
619
+ "[\\I]": 59,
620
+ "[\\N+1]": 113,
621
+ "[\\N-1]": 222,
622
+ "[\\NH1]": 108,
623
+ "[\\N]": 55,
624
+ "[\\N][C]": 541,
625
+ "[\\O-1]": 64,
626
+ "[\\O]": 47,
627
+ "[\\P]": 93,
628
+ "[\\S+1]": 121,
629
+ "[\\S-1]": 255,
630
+ "[\\S]": 54,
631
+ "[\\Se]": 168,
632
+ "[\\Si]": 195
633
+ }
tokenization_ape.py CHANGED
@@ -17,7 +17,11 @@ from transformers import PreTrainedTokenizer
17
 
18
  Representation = Literal["SELFIES", "SMILES"]
19
 
20
- VOCAB_FILES_NAMES = {"vocab_file": "vocab.json"}
 
 
 
 
21
  SELFIES_RE = re.compile(r"\[[^\]]+\]")
22
  SMILES_RE = re.compile(
23
  r"(\[[^\]]+\]|Br?|Cl?|Si?|Se?|Li?|Na?|Mg?|Al?|Ca?|Fe?|Zn?|"
@@ -64,6 +68,20 @@ def _normalize_representation(representation: str) -> Representation:
64
  return normalized # type: ignore[return-value]
65
 
66
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
67
  def pre_tokenize_molecule(molecule: str, representation: str) -> list[str]:
68
  active_representation = _normalize_representation(representation)
69
  if active_representation == "SELFIES":
@@ -97,19 +115,22 @@ def ape_tokenize(
97
 
98
  n = len(pieces)
99
  tokens: list[str] = []
 
 
 
100
  i = 0
101
 
102
  while i < n:
103
  upper = min(n, i + max_piece_span)
104
 
105
  for j in range(upper, i, -1):
106
- candidate = "".join(pieces[i:j])
107
- if candidate in vocab:
108
- tokens.append(candidate)
109
  i = j
110
  break
111
  else:
112
- tokens.append(unk_token)
113
  i += 1
114
 
115
  return tokens
@@ -124,6 +145,8 @@ class APEPreTrainedTokenizer(PreTrainedTokenizer):
124
  def __init__(
125
  self,
126
  vocab_file: str | os.PathLike[str] | None = None,
 
 
127
  vocab: dict[str, Any] | None = None,
128
  representation: str = "SELFIES",
129
  bos_token: str = "<s>",
@@ -134,8 +157,16 @@ class APEPreTrainedTokenizer(PreTrainedTokenizer):
134
  model_max_length: int = 256,
135
  **kwargs,
136
  ) -> None:
 
 
 
 
 
 
 
 
137
  if vocab is None:
138
- if vocab_file is None:
139
  vocab = {
140
  bos_token: 0,
141
  pad_token: 1,
@@ -144,13 +175,17 @@ class APEPreTrainedTokenizer(PreTrainedTokenizer):
144
  mask_token: 4,
145
  }
146
  else:
147
- with open(vocab_file, encoding="utf-8") as f:
148
  vocab = json.load(f)
149
 
150
  if vocab is None:
151
  raise ValueError("Loaded vocabulary is None.")
152
 
153
- self.vocab_file = str(vocab_file) if vocab_file is not None else None
 
 
 
 
154
  self.vocab = _coerce_vocab(vocab)
155
  self._require_special_tokens(
156
  bos_token=bos_token,
@@ -160,9 +195,8 @@ class APEPreTrainedTokenizer(PreTrainedTokenizer):
160
  mask_token=mask_token,
161
  )
162
  self.ids_to_tokens = {idx: token for token, idx in self.vocab.items()}
163
- self.representation = _normalize_representation(representation)
164
  self.vocabulary_frequency: dict[str, int] = {}
165
- self.pair_counts: dict[tuple[str, str] | str, int] = {}
166
  self._max_piece_span = _max_vocab_piece_span(self.vocab, self.representation)
167
 
168
  super().__init__(
@@ -497,27 +531,49 @@ class APEPreTrainedTokenizer(PreTrainedTokenizer):
497
  checkpoint_path: str = "checkpoint",
498
  checkpoint_interval: int = 500,
499
  ) -> None:
500
- self.representation = _normalize_representation(representation or type)
501
- text_padding = " " * 80
 
 
 
 
 
 
 
 
 
502
 
503
- print(f"Pretokenizing {self.representation}", end="\r")
504
- tokenized_corpus = [
505
- tokens for sentence in corpus if (tokens := self.pre_tokenize(str(sentence)))
506
- ]
 
507
  vocabulary_frequency: defaultdict[str, int] = defaultdict(int)
508
- for tokens in tokenized_corpus:
 
 
 
 
 
 
509
  for token in tokens:
510
  vocabulary_frequency[token] += 1
 
 
511
  print(
512
  f"Pretokenization complete, found {len(vocabulary_frequency)} tokens",
513
- end="\r",
514
  )
515
 
516
- if not tokenized_corpus:
517
  raise ValueError("Cannot train APE tokenizer on an empty corpus.")
518
 
519
  pre_tokens_counts = len(vocabulary_frequency)
520
  merged_counter = len(vocabulary_frequency) + 1
 
 
 
 
521
  checkpoint_increment = checkpoint_interval
522
  batch = checkpoint_interval + pre_tokens_counts
523
  piece_count_cache: dict[str, int] = {}
@@ -536,22 +592,26 @@ class APEPreTrainedTokenizer(PreTrainedTokenizer):
536
  pair = (tokens[i], tokens[i + 1])
537
 
538
  if max_merge_pieces is not None:
539
- merged_candidate = "".join(pair)
540
  if merged_piece_count(merged_candidate) > max_merge_pieces:
541
  continue
542
 
543
  pair_counts[pair] += 1
544
 
545
- merged_pair_counts: dict[tuple[str, str] | str, int] = {
546
- pair: count for pair, count in pair_counts.items()
547
- }
548
- self.pair_counts = merged_pair_counts
549
  if not pair_counts:
550
  return ("", ""), 0
551
- return max(pair_counts.items(), key=lambda x: x[1], default=(("", ""), 0))
 
 
 
 
 
 
 
552
 
553
  while True:
554
- if save_checkpoint and len(vocabulary_frequency) == batch:
555
  self.vocabulary_frequency = dict(vocabulary_frequency)
556
  self.vocab = {
557
  **{
@@ -579,51 +639,53 @@ class APEPreTrainedTokenizer(PreTrainedTokenizer):
579
  batch += checkpoint_increment
580
 
581
  if len(vocabulary_frequency) >= max_vocab_size:
582
- print("\rMax vocabulary achieved", text_padding)
583
  break
584
 
585
- if all(len(tokens) < 2 for tokens in tokenized_corpus):
586
- print("\rNo more mergeable pairs", text_padding)
587
  break
588
 
589
  most_common_pair, freq = get_most_common_pair(tokenized_corpus)
590
  if freq < min_freq_for_merge:
591
- print("\rNot enough frequency found", text_padding)
592
  break
593
 
594
  if not most_common_pair[0] or not most_common_pair[1]:
595
- print("\rNo valid merge pair found", text_padding)
596
  break
597
 
598
- merged_word = "".join(most_common_pair)
 
599
  if merged_word not in vocabulary_frequency:
600
  print(
601
  f"New merge found: {merged_word} {merged_counter}/{max_vocab_size} "
602
- f"{round(merged_counter / max_vocab_size * 100, 2)}%"
 
603
  )
604
  merged_counter += 1
605
- vocabulary_frequency[merged_word] = vocabulary_frequency.get(merged_word, 0) + freq
606
 
607
  new_tokenized_corpus = []
608
  for tokens in tokenized_corpus:
609
  new_tokens = []
610
- skip_next = False
611
- for i in range(len(tokens)):
612
- if skip_next:
613
- skip_next = False
614
- continue
615
-
616
  if (
617
- i < len(tokens) - 1
618
- and tokens[i] == most_common_pair[0]
619
- and tokens[i + 1] == most_common_pair[1]
620
  ):
621
- new_tokens.append(merged_word)
622
- skip_next = True
623
  else:
624
- new_tokens.append(tokens[i])
 
625
 
626
- new_tokenized_corpus.append(new_tokens)
 
627
 
628
  tokenized_corpus = new_tokenized_corpus
629
 
@@ -640,8 +702,6 @@ class APEPreTrainedTokenizer(PreTrainedTokenizer):
640
  self.ids_to_tokens = {idx: token for token, idx in self.vocab.items()}
641
  self._refresh_tokenization_cache()
642
 
643
- checkpoint_dir = Path(checkpoint_path)
644
-
645
  def train_from_iterator(self, iterator, *args, **kwargs) -> None:
646
  raise NotImplementedError("train_from_iterator is not implemented for APE")
647
 
 
17
 
18
  Representation = Literal["SELFIES", "SMILES"]
19
 
20
+ VOCAB_FILES_NAMES = {
21
+ "vocab_file": "vocab.json",
22
+ "selfies_vocab_file": "selfies_vocab.json",
23
+ "smiles_vocab_file": "smiles_vocab.json",
24
+ }
25
  SELFIES_RE = re.compile(r"\[[^\]]+\]")
26
  SMILES_RE = re.compile(
27
  r"(\[[^\]]+\]|Br?|Cl?|Si?|Se?|Li?|Na?|Mg?|Al?|Ca?|Fe?|Zn?|"
 
68
  return normalized # type: ignore[return-value]
69
 
70
 
71
+ def _select_vocab_file(
72
+ *,
73
+ representation: Representation,
74
+ vocab_file: str | os.PathLike[str] | None,
75
+ selfies_vocab_file: str | os.PathLike[str] | None,
76
+ smiles_vocab_file: str | os.PathLike[str] | None,
77
+ ) -> str | os.PathLike[str] | None:
78
+ if representation == "SELFIES" and selfies_vocab_file is not None:
79
+ return selfies_vocab_file
80
+ if representation == "SMILES" and smiles_vocab_file is not None:
81
+ return smiles_vocab_file
82
+ return vocab_file
83
+
84
+
85
  def pre_tokenize_molecule(molecule: str, representation: str) -> list[str]:
86
  active_representation = _normalize_representation(representation)
87
  if active_representation == "SELFIES":
 
115
 
116
  n = len(pieces)
117
  tokens: list[str] = []
118
+ append_token = tokens.append
119
+ vocab_contains = vocab.__contains__
120
+ join_pieces = "".join
121
  i = 0
122
 
123
  while i < n:
124
  upper = min(n, i + max_piece_span)
125
 
126
  for j in range(upper, i, -1):
127
+ candidate = join_pieces(pieces[i:j])
128
+ if vocab_contains(candidate):
129
+ append_token(candidate)
130
  i = j
131
  break
132
  else:
133
+ append_token(unk_token)
134
  i += 1
135
 
136
  return tokens
 
145
  def __init__(
146
  self,
147
  vocab_file: str | os.PathLike[str] | None = None,
148
+ selfies_vocab_file: str | os.PathLike[str] | None = None,
149
+ smiles_vocab_file: str | os.PathLike[str] | None = None,
150
  vocab: dict[str, Any] | None = None,
151
  representation: str = "SELFIES",
152
  bos_token: str = "<s>",
 
157
  model_max_length: int = 256,
158
  **kwargs,
159
  ) -> None:
160
+ self.representation = _normalize_representation(representation)
161
+ active_vocab_file = _select_vocab_file(
162
+ representation=self.representation,
163
+ vocab_file=vocab_file,
164
+ selfies_vocab_file=selfies_vocab_file,
165
+ smiles_vocab_file=smiles_vocab_file,
166
+ )
167
+
168
  if vocab is None:
169
+ if active_vocab_file is None:
170
  vocab = {
171
  bos_token: 0,
172
  pad_token: 1,
 
175
  mask_token: 4,
176
  }
177
  else:
178
+ with open(active_vocab_file, encoding="utf-8") as f:
179
  vocab = json.load(f)
180
 
181
  if vocab is None:
182
  raise ValueError("Loaded vocabulary is None.")
183
 
184
+ self.vocab_file = str(active_vocab_file) if active_vocab_file is not None else None
185
+ self.selfies_vocab_file = (
186
+ str(selfies_vocab_file) if selfies_vocab_file is not None else None
187
+ )
188
+ self.smiles_vocab_file = str(smiles_vocab_file) if smiles_vocab_file is not None else None
189
  self.vocab = _coerce_vocab(vocab)
190
  self._require_special_tokens(
191
  bos_token=bos_token,
 
195
  mask_token=mask_token,
196
  )
197
  self.ids_to_tokens = {idx: token for token, idx in self.vocab.items()}
 
198
  self.vocabulary_frequency: dict[str, int] = {}
199
+ self.pair_counts: dict[tuple[str, str], int] = {}
200
  self._max_piece_span = _max_vocab_piece_span(self.vocab, self.representation)
201
 
202
  super().__init__(
 
531
  checkpoint_path: str = "checkpoint",
532
  checkpoint_interval: int = 500,
533
  ) -> None:
534
+ import warnings
535
+
536
+ new_rep = _normalize_representation(representation or type)
537
+ if new_rep != self.representation:
538
+ warnings.warn(
539
+ f"train() representation={new_rep!r} differs from tokenizer "
540
+ f"representation={self.representation!r}. Overwriting.",
541
+ UserWarning,
542
+ stacklevel=2,
543
+ )
544
+ self.representation = new_rep
545
 
546
+ if not corpus:
547
+ raise ValueError("Cannot train APE tokenizer on an empty corpus.")
548
+
549
+ print(f"Pretokenizing {self.representation}...", flush=True)
550
+ tokenized_corpus = []
551
  vocabulary_frequency: defaultdict[str, int] = defaultdict(int)
552
+ saw_tokens = False
553
+
554
+ for sentence in corpus:
555
+ tokens = self.pre_tokenize(str(sentence))
556
+ if not tokens:
557
+ continue
558
+ saw_tokens = True
559
  for token in tokens:
560
  vocabulary_frequency[token] += 1
561
+ if len(tokens) > 1:
562
+ tokenized_corpus.append(tokens)
563
  print(
564
  f"Pretokenization complete, found {len(vocabulary_frequency)} tokens",
565
+ flush=True,
566
  )
567
 
568
+ if not saw_tokens:
569
  raise ValueError("Cannot train APE tokenizer on an empty corpus.")
570
 
571
  pre_tokens_counts = len(vocabulary_frequency)
572
  merged_counter = len(vocabulary_frequency) + 1
573
+ if save_checkpoint and checkpoint_interval <= 0:
574
+ raise ValueError(
575
+ "checkpoint_interval must be positive when save_checkpoint is enabled."
576
+ )
577
  checkpoint_increment = checkpoint_interval
578
  batch = checkpoint_interval + pre_tokens_counts
579
  piece_count_cache: dict[str, int] = {}
 
592
  pair = (tokens[i], tokens[i + 1])
593
 
594
  if max_merge_pieces is not None:
595
+ merged_candidate = pair[0] + pair[1]
596
  if merged_piece_count(merged_candidate) > max_merge_pieces:
597
  continue
598
 
599
  pair_counts[pair] += 1
600
 
601
+ self.pair_counts = dict(pair_counts)
 
 
 
602
  if not pair_counts:
603
  return ("", ""), 0
604
+
605
+ most_common_pair = ("", "")
606
+ most_common_frequency = 0
607
+ for pair, count in pair_counts.items():
608
+ if count > most_common_frequency:
609
+ most_common_pair = pair
610
+ most_common_frequency = count
611
+ return most_common_pair, most_common_frequency
612
 
613
  while True:
614
+ if save_checkpoint and len(vocabulary_frequency) >= batch:
615
  self.vocabulary_frequency = dict(vocabulary_frequency)
616
  self.vocab = {
617
  **{
 
639
  batch += checkpoint_increment
640
 
641
  if len(vocabulary_frequency) >= max_vocab_size:
642
+ print("Max vocabulary achieved", flush=True)
643
  break
644
 
645
+ if not tokenized_corpus:
646
+ print("No more mergeable pairs", flush=True)
647
  break
648
 
649
  most_common_pair, freq = get_most_common_pair(tokenized_corpus)
650
  if freq < min_freq_for_merge:
651
+ print("Not enough frequency found", flush=True)
652
  break
653
 
654
  if not most_common_pair[0] or not most_common_pair[1]:
655
+ print("No valid merge pair found", flush=True)
656
  break
657
 
658
+ left_token, right_token = most_common_pair
659
+ merged_word = left_token + right_token
660
  if merged_word not in vocabulary_frequency:
661
  print(
662
  f"New merge found: {merged_word} {merged_counter}/{max_vocab_size} "
663
+ f"{round(merged_counter / max_vocab_size * 100, 2)}%",
664
+ flush=True,
665
  )
666
  merged_counter += 1
667
+ vocabulary_frequency[merged_word] += freq
668
 
669
  new_tokenized_corpus = []
670
  for tokens in tokenized_corpus:
671
  new_tokens = []
672
+ append_token = new_tokens.append
673
+ i = 0
674
+ token_count = len(tokens)
675
+ while i < token_count:
 
 
676
  if (
677
+ i < token_count - 1
678
+ and tokens[i] == left_token
679
+ and tokens[i + 1] == right_token
680
  ):
681
+ append_token(merged_word)
682
+ i += 2
683
  else:
684
+ append_token(tokens[i])
685
+ i += 1
686
 
687
+ if len(new_tokens) > 1:
688
+ new_tokenized_corpus.append(new_tokens)
689
 
690
  tokenized_corpus = new_tokenized_corpus
691
 
 
702
  self.ids_to_tokens = {idx: token for token, idx in self.vocab.items()}
703
  self._refresh_tokenization_cache()
704
 
 
 
705
  def train_from_iterator(self, iterator, *args, **kwargs) -> None:
706
  raise NotImplementedError("train_from_iterator is not implemented for APE")
707
 
tokenizer_config.json CHANGED
@@ -51,8 +51,13 @@
51
  "bos_token": "<s>",
52
  "eos_token": "</s>",
53
  "mask_token": "<mask>",
 
 
 
 
54
  "model_max_length": 256,
55
  "pad_token": "<pad>",
56
  "representation": "SELFIES",
57
- "unk_token": "<unk>"
58
- }
 
 
51
  "bos_token": "<s>",
52
  "eos_token": "</s>",
53
  "mask_token": "<mask>",
54
+ "model_input_names": [
55
+ "input_ids",
56
+ "attention_mask"
57
+ ],
58
  "model_max_length": 256,
59
  "pad_token": "<pad>",
60
  "representation": "SELFIES",
61
+ "unk_token": "<unk>",
62
+ "use_fast": false
63
+ }
tokenizer_metadata.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "ape_source": "modernmolbert.local",
3
+ "created_at_utc": "2026-05-19T16:24:35.971419+00:00",
4
+ "creation_command": "python -m modernmolbert.train_ape_tokenizer",
5
+ "dataset_name": "data/pretrain/chembl36_selfies",
6
+ "extra_vocab_selfies_path": null,
7
+ "extra_vocab_symbols_added": 42,
8
+ "extra_vocab_symbols_path": "tokenizer/extra_symbols/benchmark_missing_selfies_symbols_min10.txt",
9
+ "extra_vocab_symbols_requested": 42,
10
+ "max_merge_pieces": 2,
11
+ "max_vocab_size": 2000,
12
+ "min_freq_for_merge": 3000,
13
+ "representation": "SELFIES",
14
+ "seed": 42,
15
+ "selfies_column": "selfies",
16
+ "shuffle_buffer_size": 100000,
17
+ "special_ids": {
18
+ "bos_token": 0,
19
+ "eos_token": 2,
20
+ "mask_token": 4,
21
+ "pad_token": 1,
22
+ "unk_token": 3
23
+ },
24
+ "tokenizer_path": "tokenizer/chembl36_selfies_2m_ape_max2_min3000.json",
25
+ "tokenizer_sha256": "26ad0e90de9c0a469eb6e3b7aa985e2a2d7cc3f0dd7b2b229ccfce41f639e208",
26
+ "tokenizer_train_size": 2000000,
27
+ "vocab_size": 631
28
+ }
train_results.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 3.066,
3
+ "num_parameters": 34149495.0,
4
+ "total_flos": 9.74439612930639e+16,
5
+ "train_loss": 0.6228721523284912,
6
+ "train_runtime": 2832.8619,
7
+ "train_samples_per_second": 2711.039,
8
+ "train_samples_streaming": 7680000.0,
9
+ "train_steps_per_second": 10.59
10
+ }
trainer_state.json CHANGED
@@ -1,7 +1,7 @@
1
  {
2
- "best_global_step": 25000,
3
- "best_metric": 1.500394344329834,
4
- "best_model_checkpoint": "runs/chembl36_small_mask_mlm_lr_sweep/mask_standard__mlm_0p15__lr_1e-4/checkpoint-25000",
5
  "epoch": 3.066,
6
  "eval_steps": 5000,
7
  "global_step": 30000,
@@ -11,2174 +11,2174 @@
11
  "log_history": [
12
  {
13
  "epoch": 0.0033333333333333335,
14
- "grad_norm": 4.756051063537598,
15
- "learning_rate": 6.6e-06,
16
- "loss": 7.7740185546875,
17
  "step": 100
18
  },
19
  {
20
  "epoch": 0.006666666666666667,
21
- "grad_norm": 4.41278076171875,
22
- "learning_rate": 1.3266666666666666e-05,
23
- "loss": 7.52440673828125,
24
  "step": 200
25
  },
26
  {
27
  "epoch": 0.01,
28
- "grad_norm": 3.1706013679504395,
29
- "learning_rate": 1.9933333333333334e-05,
30
- "loss": 7.2918212890625,
31
  "step": 300
32
  },
33
  {
34
  "epoch": 0.013333333333333334,
35
- "grad_norm": 3.3350961208343506,
36
- "learning_rate": 2.6600000000000003e-05,
37
- "loss": 7.060899047851563,
38
  "step": 400
39
  },
40
  {
41
  "epoch": 0.016666666666666666,
42
- "grad_norm": 3.3246028423309326,
43
- "learning_rate": 3.326666666666667e-05,
44
- "loss": 6.882850341796875,
45
  "step": 500
46
  },
47
  {
48
  "epoch": 0.02,
49
- "grad_norm": 3.528203248977661,
50
- "learning_rate": 3.993333333333333e-05,
51
- "loss": 6.68141357421875,
52
  "step": 600
53
  },
54
  {
55
  "epoch": 0.023333333333333334,
56
- "grad_norm": 3.592036724090576,
57
- "learning_rate": 4.660000000000001e-05,
58
- "loss": 6.46164794921875,
59
  "step": 700
60
  },
61
  {
62
  "epoch": 0.02666666666666667,
63
- "grad_norm": 3.5415823459625244,
64
- "learning_rate": 5.326666666666666e-05,
65
- "loss": 6.2806982421875,
66
  "step": 800
67
  },
68
  {
69
  "epoch": 0.03,
70
- "grad_norm": 3.8730804920196533,
71
- "learning_rate": 5.9933333333333345e-05,
72
- "loss": 6.08379638671875,
73
  "step": 900
74
  },
75
  {
76
  "epoch": 0.03333333333333333,
77
- "grad_norm": 4.294698715209961,
78
- "learning_rate": 6.66e-05,
79
- "loss": 5.890241088867188,
80
  "step": 1000
81
  },
82
  {
83
  "epoch": 0.03666666666666667,
84
- "grad_norm": 4.327278137207031,
85
- "learning_rate": 7.326666666666667e-05,
86
- "loss": 5.653626098632812,
87
  "step": 1100
88
  },
89
  {
90
  "epoch": 0.04,
91
- "grad_norm": 4.361931800842285,
92
- "learning_rate": 7.993333333333334e-05,
93
- "loss": 5.426879272460938,
94
  "step": 1200
95
  },
96
  {
97
  "epoch": 0.043333333333333335,
98
- "grad_norm": 4.677211284637451,
99
- "learning_rate": 8.66e-05,
100
- "loss": 5.20781982421875,
101
  "step": 1300
102
  },
103
  {
104
  "epoch": 0.04666666666666667,
105
- "grad_norm": 4.3806867599487305,
106
- "learning_rate": 9.326666666666667e-05,
107
- "loss": 4.999788818359375,
108
  "step": 1400
109
  },
110
  {
111
  "epoch": 0.05,
112
- "grad_norm": 4.898468494415283,
113
- "learning_rate": 9.993333333333334e-05,
114
- "loss": 4.8133847045898435,
115
  "step": 1500
116
  },
117
  {
118
  "epoch": 0.05333333333333334,
119
- "grad_norm": 4.611327648162842,
120
- "learning_rate": 9.999702274445236e-05,
121
- "loss": 4.6433349609375,
122
  "step": 1600
123
  },
124
  {
125
  "epoch": 0.056666666666666664,
126
- "grad_norm": 5.104644298553467,
127
- "learning_rate": 9.998797074387361e-05,
128
- "loss": 4.487667846679687,
129
  "step": 1700
130
  },
131
  {
132
  "epoch": 0.06,
133
- "grad_norm": 4.787322521209717,
134
- "learning_rate": 9.997284479438253e-05,
135
- "loss": 4.340900573730469,
136
  "step": 1800
137
  },
138
  {
139
  "epoch": 0.06333333333333334,
140
- "grad_norm": 4.701177597045898,
141
- "learning_rate": 9.995164673390625e-05,
142
- "loss": 4.235370178222656,
143
  "step": 1900
144
  },
145
  {
146
  "epoch": 0.06666666666666667,
147
- "grad_norm": 4.965324878692627,
148
- "learning_rate": 9.992437913818312e-05,
149
- "loss": 4.140614013671875,
150
  "step": 2000
151
  },
152
  {
153
  "epoch": 0.07,
154
- "grad_norm": 5.183881759643555,
155
- "learning_rate": 9.989104532044994e-05,
156
- "loss": 4.013364868164063,
157
  "step": 2100
158
  },
159
  {
160
  "epoch": 0.07333333333333333,
161
- "grad_norm": 5.037045001983643,
162
- "learning_rate": 9.985164933103929e-05,
163
- "loss": 3.9139785766601562,
164
  "step": 2200
165
  },
166
  {
167
  "epoch": 0.07666666666666666,
168
- "grad_norm": 5.492240905761719,
169
- "learning_rate": 9.980619595688737e-05,
170
- "loss": 3.8507009887695314,
171
  "step": 2300
172
  },
173
  {
174
  "epoch": 0.08,
175
- "grad_norm": 5.084971904754639,
176
- "learning_rate": 9.975469072095237e-05,
177
- "loss": 3.756464538574219,
178
  "step": 2400
179
  },
180
  {
181
  "epoch": 0.08333333333333333,
182
- "grad_norm": 5.1968793869018555,
183
- "learning_rate": 9.969713988154339e-05,
184
- "loss": 3.6725424194335936,
185
  "step": 2500
186
  },
187
  {
188
  "epoch": 0.08666666666666667,
189
- "grad_norm": 5.174182891845703,
190
- "learning_rate": 9.963355043155996e-05,
191
- "loss": 3.606795349121094,
192
  "step": 2600
193
  },
194
  {
195
  "epoch": 0.09,
196
- "grad_norm": 5.094499588012695,
197
- "learning_rate": 9.956393009764244e-05,
198
- "loss": 3.534298095703125,
199
  "step": 2700
200
  },
201
  {
202
  "epoch": 0.09333333333333334,
203
- "grad_norm": 5.067377090454102,
204
- "learning_rate": 9.948828733923305e-05,
205
- "loss": 3.488475036621094,
206
  "step": 2800
207
  },
208
  {
209
  "epoch": 0.09666666666666666,
210
- "grad_norm": 5.349589824676514,
211
- "learning_rate": 9.94066313475481e-05,
212
- "loss": 3.4123611450195312,
213
  "step": 2900
214
  },
215
  {
216
  "epoch": 0.1,
217
- "grad_norm": 4.99954080581665,
218
- "learning_rate": 9.931897204446104e-05,
219
- "loss": 3.3717422485351562,
220
  "step": 3000
221
  },
222
  {
223
  "epoch": 0.10333333333333333,
224
- "grad_norm": 5.293025970458984,
225
- "learning_rate": 9.9225320081297e-05,
226
- "loss": 3.2826019287109376,
227
  "step": 3100
228
  },
229
  {
230
  "epoch": 0.10666666666666667,
231
- "grad_norm": 4.9904375076293945,
232
- "learning_rate": 9.912568683753853e-05,
233
- "loss": 3.269647521972656,
234
  "step": 3200
235
  },
236
  {
237
  "epoch": 0.11,
238
- "grad_norm": 4.861743450164795,
239
- "learning_rate": 9.902008441944286e-05,
240
- "loss": 3.2435989379882812,
241
  "step": 3300
242
  },
243
  {
244
  "epoch": 0.11333333333333333,
245
- "grad_norm": 5.036742210388184,
246
- "learning_rate": 9.890852565857092e-05,
247
- "loss": 3.1625836181640623,
248
  "step": 3400
249
  },
250
  {
251
  "epoch": 0.11666666666666667,
252
- "grad_norm": 5.042503356933594,
253
- "learning_rate": 9.879102411022817e-05,
254
- "loss": 3.1680789184570313,
255
  "step": 3500
256
  },
257
  {
258
  "epoch": 0.12,
259
- "grad_norm": 5.01936149597168,
260
- "learning_rate": 9.866759405181765e-05,
261
- "loss": 3.1387368774414064,
262
  "step": 3600
263
  },
264
  {
265
  "epoch": 0.12333333333333334,
266
- "grad_norm": 5.504270553588867,
267
- "learning_rate": 9.85382504811049e-05,
268
- "loss": 3.1010336303710937,
269
  "step": 3700
270
  },
271
  {
272
  "epoch": 0.12666666666666668,
273
- "grad_norm": 5.191413402557373,
274
- "learning_rate": 9.840300911439591e-05,
275
- "loss": 3.057752990722656,
276
  "step": 3800
277
  },
278
  {
279
  "epoch": 0.13,
280
- "grad_norm": 5.080201625823975,
281
- "learning_rate": 9.826188638462718e-05,
282
- "loss": 3.043381652832031,
283
  "step": 3900
284
  },
285
  {
286
  "epoch": 0.13333333333333333,
287
- "grad_norm": 5.173981189727783,
288
- "learning_rate": 9.811489943936922e-05,
289
- "loss": 3.011300354003906,
290
  "step": 4000
291
  },
292
  {
293
  "epoch": 0.13666666666666666,
294
- "grad_norm": 5.164648532867432,
295
- "learning_rate": 9.796206613874283e-05,
296
- "loss": 2.944804382324219,
297
  "step": 4100
298
  },
299
  {
300
  "epoch": 0.14,
301
- "grad_norm": 5.0373969078063965,
302
- "learning_rate": 9.780340505324901e-05,
303
- "loss": 2.9307366943359376,
304
  "step": 4200
305
  },
306
  {
307
  "epoch": 0.14333333333333334,
308
- "grad_norm": 4.772580623626709,
309
- "learning_rate": 9.763893546151244e-05,
310
- "loss": 2.9096554565429686,
311
  "step": 4300
312
  },
313
  {
314
  "epoch": 0.14666666666666667,
315
- "grad_norm": 4.913202285766602,
316
- "learning_rate": 9.746867734793903e-05,
317
- "loss": 2.8842669677734376,
318
  "step": 4400
319
  },
320
  {
321
  "epoch": 0.15,
322
- "grad_norm": 5.291968822479248,
323
- "learning_rate": 9.729265140028762e-05,
324
- "loss": 2.8610394287109373,
325
  "step": 4500
326
  },
327
  {
328
  "epoch": 0.15333333333333332,
329
- "grad_norm": 4.679079055786133,
330
- "learning_rate": 9.711087900715627e-05,
331
- "loss": 2.8442318725585936,
332
  "step": 4600
333
  },
334
  {
335
  "epoch": 0.15666666666666668,
336
- "grad_norm": 5.12017822265625,
337
- "learning_rate": 9.692338225538333e-05,
338
- "loss": 2.7991876220703125,
339
  "step": 4700
340
  },
341
  {
342
  "epoch": 0.16,
343
- "grad_norm": 4.660444259643555,
344
- "learning_rate": 9.673018392736374e-05,
345
- "loss": 2.7571255493164064,
346
  "step": 4800
347
  },
348
  {
349
  "epoch": 0.16333333333333333,
350
- "grad_norm": 5.051372528076172,
351
- "learning_rate": 9.653130749828075e-05,
352
- "loss": 2.7532052612304687,
353
  "step": 4900
354
  },
355
  {
356
  "epoch": 0.16666666666666666,
357
- "grad_norm": 4.846753120422363,
358
- "learning_rate": 9.632677713325353e-05,
359
- "loss": 2.724853515625,
360
  "step": 5000
361
  },
362
  {
363
  "epoch": 0.16666666666666666,
364
- "eval_loss": 2.7221035957336426,
365
- "eval_masked_accuracy": 0.40898550724637683,
366
- "eval_runtime": 5.8666,
367
- "eval_samples_per_second": 698.194,
368
- "eval_steps_per_second": 2.727,
369
  "step": 5000
370
  },
371
  {
372
  "epoch": 0.17,
373
- "grad_norm": 4.767246246337891,
374
- "learning_rate": 9.611661768440093e-05,
375
- "loss": 2.6953024291992187,
376
  "step": 5100
377
  },
378
  {
379
  "epoch": 0.17333333333333334,
380
- "grad_norm": 4.842975616455078,
381
- "learning_rate": 9.590085468782162e-05,
382
- "loss": 2.6890545654296876,
383
  "step": 5200
384
  },
385
  {
386
  "epoch": 0.17666666666666667,
387
- "grad_norm": 4.971850872039795,
388
- "learning_rate": 9.56795143604914e-05,
389
- "loss": 2.634810791015625,
390
  "step": 5300
391
  },
392
  {
393
  "epoch": 0.18,
394
- "grad_norm": 4.957698822021484,
395
- "learning_rate": 9.545262359707756e-05,
396
- "loss": 2.6262237548828127,
397
  "step": 5400
398
  },
399
  {
400
  "epoch": 0.18333333333333332,
401
- "grad_norm": 4.960840225219727,
402
- "learning_rate": 9.522020996667092e-05,
403
- "loss": 2.5996078491210937,
404
  "step": 5500
405
  },
406
  {
407
  "epoch": 0.18666666666666668,
408
- "grad_norm": 4.946103096008301,
409
- "learning_rate": 9.498230170943596e-05,
410
- "loss": 2.6009527587890626,
411
  "step": 5600
412
  },
413
  {
414
  "epoch": 0.19,
415
- "grad_norm": 4.791319847106934,
416
- "learning_rate": 9.473892773317952e-05,
417
- "loss": 2.5778823852539063,
418
  "step": 5700
419
  },
420
  {
421
  "epoch": 0.19333333333333333,
422
- "grad_norm": 4.821264743804932,
423
- "learning_rate": 9.449011760983809e-05,
424
- "loss": 2.5622207641601564,
425
  "step": 5800
426
  },
427
  {
428
  "epoch": 0.19666666666666666,
429
- "grad_norm": 4.989269256591797,
430
- "learning_rate": 9.423590157188474e-05,
431
- "loss": 2.527291564941406,
432
  "step": 5900
433
  },
434
  {
435
  "epoch": 0.2,
436
- "grad_norm": 4.952500820159912,
437
- "learning_rate": 9.397631050865554e-05,
438
- "loss": 2.5371446228027343,
439
  "step": 6000
440
  },
441
  {
442
  "epoch": 0.20333333333333334,
443
- "grad_norm": 4.967984199523926,
444
- "learning_rate": 9.371137596259623e-05,
445
- "loss": 2.529341735839844,
446
  "step": 6100
447
  },
448
  {
449
  "epoch": 0.20666666666666667,
450
- "grad_norm": 4.9603352546691895,
451
- "learning_rate": 9.344113012542963e-05,
452
- "loss": 2.478318634033203,
453
  "step": 6200
454
  },
455
  {
456
  "epoch": 0.21,
457
- "grad_norm": 4.8668389320373535,
458
- "learning_rate": 9.316560583424403e-05,
459
- "loss": 2.4962451171875,
460
  "step": 6300
461
  },
462
  {
463
  "epoch": 0.21333333333333335,
464
- "grad_norm": 4.65514612197876,
465
- "learning_rate": 9.288483656750322e-05,
466
- "loss": 2.465853424072266,
467
  "step": 6400
468
  },
469
  {
470
  "epoch": 0.21666666666666667,
471
- "grad_norm": 4.887564182281494,
472
- "learning_rate": 9.259885644097861e-05,
473
- "loss": 2.454242858886719,
474
  "step": 6500
475
  },
476
  {
477
  "epoch": 0.22,
478
- "grad_norm": 4.730443477630615,
479
- "learning_rate": 9.230770020360382e-05,
480
- "loss": 2.443849639892578,
481
  "step": 6600
482
  },
483
  {
484
  "epoch": 0.22333333333333333,
485
- "grad_norm": 5.151344299316406,
486
- "learning_rate": 9.201140323325248e-05,
487
- "loss": 2.4249298095703127,
488
  "step": 6700
489
  },
490
  {
491
  "epoch": 0.22666666666666666,
492
- "grad_norm": 5.001748561859131,
493
- "learning_rate": 9.171000153243947e-05,
494
- "loss": 2.3924867248535158,
495
  "step": 6800
496
  },
497
  {
498
  "epoch": 0.23,
499
- "grad_norm": 4.810725688934326,
500
- "learning_rate": 9.140353172394636e-05,
501
- "loss": 2.4176744079589843,
502
  "step": 6900
503
  },
504
  {
505
  "epoch": 0.23333333333333334,
506
- "grad_norm": 4.894969463348389,
507
- "learning_rate": 9.109203104637137e-05,
508
- "loss": 2.3665452575683594,
509
  "step": 7000
510
  },
511
  {
512
  "epoch": 0.23666666666666666,
513
- "grad_norm": 4.827425479888916,
514
- "learning_rate": 9.077553734960468e-05,
515
- "loss": 2.3609941101074217,
516
  "step": 7100
517
  },
518
  {
519
  "epoch": 0.24,
520
- "grad_norm": 4.975261211395264,
521
- "learning_rate": 9.045408909022928e-05,
522
- "loss": 2.3557579040527346,
523
  "step": 7200
524
  },
525
  {
526
  "epoch": 0.24333333333333335,
527
- "grad_norm": 4.766048908233643,
528
- "learning_rate": 9.012772532684818e-05,
529
- "loss": 2.3431201171875,
530
  "step": 7300
531
  },
532
  {
533
  "epoch": 0.24666666666666667,
534
- "grad_norm": 4.788959503173828,
535
- "learning_rate": 8.979648571533852e-05,
536
- "loss": 2.3297906494140626,
537
  "step": 7400
538
  },
539
  {
540
  "epoch": 0.25,
541
- "grad_norm": 4.961067199707031,
542
- "learning_rate": 8.9460410504033e-05,
543
- "loss": 2.331878662109375,
544
  "step": 7500
545
  },
546
  {
547
  "epoch": 0.25333333333333335,
548
- "grad_norm": 4.572299003601074,
549
- "learning_rate": 8.91195405288294e-05,
550
- "loss": 2.29117919921875,
551
  "step": 7600
552
  },
553
  {
554
  "epoch": 0.25666666666666665,
555
- "grad_norm": 4.729584217071533,
556
- "learning_rate": 8.877391720822875e-05,
557
- "loss": 2.2867362976074217,
558
  "step": 7700
559
  },
560
  {
561
  "epoch": 0.26,
562
- "grad_norm": 4.712250232696533,
563
- "learning_rate": 8.842358253830246e-05,
564
- "loss": 2.2930256652832033,
565
  "step": 7800
566
  },
567
  {
568
  "epoch": 0.2633333333333333,
569
- "grad_norm": 4.344603061676025,
570
- "learning_rate": 8.806857908758967e-05,
571
- "loss": 2.2762042236328126,
572
  "step": 7900
573
  },
574
  {
575
  "epoch": 0.26666666666666666,
576
- "grad_norm": 4.702202320098877,
577
- "learning_rate": 8.770894999192467e-05,
578
- "loss": 2.2673519897460936,
579
  "step": 8000
580
  },
581
  {
582
  "epoch": 0.27,
583
- "grad_norm": 4.727926731109619,
584
- "learning_rate": 8.734473894919564e-05,
585
- "loss": 2.2311663818359375,
586
  "step": 8100
587
  },
588
  {
589
  "epoch": 0.2733333333333333,
590
- "grad_norm": 4.6895294189453125,
591
- "learning_rate": 8.697599021403489e-05,
592
- "loss": 2.2383134460449217,
593
  "step": 8200
594
  },
595
  {
596
  "epoch": 0.27666666666666667,
597
- "grad_norm": 4.4664998054504395,
598
- "learning_rate": 8.660274859244168e-05,
599
- "loss": 2.1981523132324217,
600
  "step": 8300
601
  },
602
  {
603
  "epoch": 0.28,
604
- "grad_norm": 4.363753318786621,
605
- "learning_rate": 8.62250594363378e-05,
606
- "loss": 2.1935469055175782,
607
  "step": 8400
608
  },
609
  {
610
  "epoch": 0.2833333333333333,
611
- "grad_norm": 4.9684062004089355,
612
- "learning_rate": 8.584296863805709e-05,
613
- "loss": 2.1947981262207032,
614
  "step": 8500
615
  },
616
  {
617
  "epoch": 0.2866666666666667,
618
- "grad_norm": 4.717839241027832,
619
- "learning_rate": 8.545652262476897e-05,
620
- "loss": 2.190624237060547,
621
  "step": 8600
622
  },
623
  {
624
  "epoch": 0.29,
625
- "grad_norm": 4.820233345031738,
626
- "learning_rate": 8.50657683528373e-05,
627
- "loss": 2.1814524841308596,
628
  "step": 8700
629
  },
630
  {
631
  "epoch": 0.29333333333333333,
632
- "grad_norm": 4.834990501403809,
633
- "learning_rate": 8.467075330211474e-05,
634
- "loss": 2.14441162109375,
635
  "step": 8800
636
  },
637
  {
638
  "epoch": 0.2966666666666667,
639
- "grad_norm": 4.696875095367432,
640
- "learning_rate": 8.42715254701735e-05,
641
- "loss": 2.1534934997558595,
642
  "step": 8900
643
  },
644
  {
645
  "epoch": 0.3,
646
- "grad_norm": 4.435513973236084,
647
- "learning_rate": 8.386813336647339e-05,
648
- "loss": 2.1541061401367188,
649
  "step": 9000
650
  },
651
  {
652
  "epoch": 0.30333333333333334,
653
- "grad_norm": 4.625392436981201,
654
- "learning_rate": 8.346062600646738e-05,
655
- "loss": 2.167764892578125,
656
  "step": 9100
657
  },
658
  {
659
  "epoch": 0.30666666666666664,
660
- "grad_norm": 4.518789291381836,
661
- "learning_rate": 8.304905290564586e-05,
662
- "loss": 2.125498504638672,
663
  "step": 9200
664
  },
665
  {
666
  "epoch": 0.31,
667
- "grad_norm": 4.772843360900879,
668
- "learning_rate": 8.263346407352018e-05,
669
- "loss": 2.104402770996094,
670
  "step": 9300
671
  },
672
  {
673
  "epoch": 1.002,
674
- "grad_norm": 5.314713478088379,
675
- "learning_rate": 8.22139100075459e-05,
676
- "loss": 2.1437747192382814,
677
  "step": 9400
678
  },
679
  {
680
  "epoch": 1.0053333333333334,
681
- "grad_norm": 5.156741619110107,
682
- "learning_rate": 8.179044168698721e-05,
683
- "loss": 2.150110626220703,
684
  "step": 9500
685
  },
686
  {
687
  "epoch": 1.0086666666666666,
688
- "grad_norm": 4.473363876342773,
689
- "learning_rate": 8.136311056672223e-05,
690
- "loss": 2.1256982421875,
691
  "step": 9600
692
  },
693
  {
694
  "epoch": 1.012,
695
- "grad_norm": 4.629226207733154,
696
- "learning_rate": 8.093196857099106e-05,
697
- "loss": 2.0655870056152343,
698
  "step": 9700
699
  },
700
  {
701
  "epoch": 1.0153333333333334,
702
- "grad_norm": 4.722533226013184,
703
- "learning_rate": 8.04970680870864e-05,
704
- "loss": 2.046549987792969,
705
  "step": 9800
706
  },
707
  {
708
  "epoch": 1.0186666666666666,
709
- "grad_norm": 4.950850486755371,
710
- "learning_rate": 8.005846195898814e-05,
711
- "loss": 2.065498809814453,
712
  "step": 9900
713
  },
714
  {
715
  "epoch": 1.022,
716
- "grad_norm": 4.620322227478027,
717
- "learning_rate": 7.961620348094241e-05,
718
- "loss": 2.052088165283203,
719
  "step": 10000
720
  },
721
  {
722
  "epoch": 1.022,
723
- "eval_loss": 2.195895195007324,
724
- "eval_masked_accuracy": 0.48914785142024764,
725
- "eval_runtime": 5.9829,
726
- "eval_samples_per_second": 684.616,
727
- "eval_steps_per_second": 2.674,
728
  "step": 10000
729
  },
730
  {
731
  "epoch": 1.0253333333333334,
732
- "grad_norm": 5.006026744842529,
733
- "learning_rate": 7.917034639098579e-05,
734
- "loss": 2.0433953857421874,
735
  "step": 10100
736
  },
737
  {
738
  "epoch": 1.0286666666666666,
739
- "grad_norm": 4.821838855743408,
740
- "learning_rate": 7.872094486441579e-05,
741
- "loss": 2.0248480224609375,
742
  "step": 10200
743
  },
744
  {
745
  "epoch": 1.032,
746
- "grad_norm": 5.129427433013916,
747
- "learning_rate": 7.826805350720807e-05,
748
- "loss": 2.034512481689453,
749
  "step": 10300
750
  },
751
  {
752
  "epoch": 1.0353333333333334,
753
- "grad_norm": 4.920040130615234,
754
- "learning_rate": 7.781172734938136e-05,
755
- "loss": 2.0023085021972657,
756
  "step": 10400
757
  },
758
  {
759
  "epoch": 1.0386666666666666,
760
- "grad_norm": 4.989480495452881,
761
- "learning_rate": 7.735202183831085e-05,
762
- "loss": 2.0228404235839843,
763
  "step": 10500
764
  },
765
  {
766
  "epoch": 1.042,
767
- "grad_norm": 4.8022308349609375,
768
- "learning_rate": 7.688899283199096e-05,
769
- "loss": 2.004698944091797,
770
  "step": 10600
771
  },
772
  {
773
  "epoch": 1.0453333333333332,
774
- "grad_norm": 4.959015846252441,
775
- "learning_rate": 7.642269659224803e-05,
776
- "loss": 1.984919891357422,
777
  "step": 10700
778
  },
779
  {
780
  "epoch": 1.0486666666666666,
781
- "grad_norm": 5.1211018562316895,
782
- "learning_rate": 7.595318977790408e-05,
783
- "loss": 1.9975146484375,
784
  "step": 10800
785
  },
786
  {
787
  "epoch": 1.052,
788
- "grad_norm": 5.355852127075195,
789
- "learning_rate": 7.54805294378923e-05,
790
- "loss": 2.001761627197266,
791
  "step": 10900
792
  },
793
  {
794
  "epoch": 1.0553333333333332,
795
- "grad_norm": 5.076831340789795,
796
- "learning_rate": 7.50047730043252e-05,
797
- "loss": 1.9820744323730468,
798
  "step": 11000
799
  },
800
  {
801
  "epoch": 1.0586666666666666,
802
- "grad_norm": 5.53018045425415,
803
- "learning_rate": 7.452597828551604e-05,
804
- "loss": 1.9947706604003905,
805
  "step": 11100
806
  },
807
  {
808
  "epoch": 1.062,
809
- "grad_norm": 5.11814546585083,
810
- "learning_rate": 7.404420345895467e-05,
811
- "loss": 1.990592498779297,
812
  "step": 11200
813
  },
814
  {
815
  "epoch": 1.0653333333333332,
816
- "grad_norm": 5.014266490936279,
817
- "learning_rate": 7.355950706423853e-05,
818
- "loss": 1.9744894409179687,
819
  "step": 11300
820
  },
821
  {
822
  "epoch": 1.0686666666666667,
823
- "grad_norm": 5.087450981140137,
824
- "learning_rate": 7.307194799595958e-05,
825
- "loss": 1.9660249328613282,
826
  "step": 11400
827
  },
828
  {
829
  "epoch": 1.072,
830
- "grad_norm": 4.689304828643799,
831
- "learning_rate": 7.25815854965481e-05,
832
- "loss": 1.9629814147949218,
833
  "step": 11500
834
  },
835
  {
836
  "epoch": 1.0753333333333333,
837
- "grad_norm": 4.9676008224487305,
838
- "learning_rate": 7.20884791490743e-05,
839
- "loss": 1.9364776611328125,
840
  "step": 11600
841
  },
842
  {
843
  "epoch": 1.0786666666666667,
844
- "grad_norm": 5.643824100494385,
845
- "learning_rate": 7.159268887000846e-05,
846
- "loss": 1.93596435546875,
847
  "step": 11700
848
  },
849
  {
850
  "epoch": 1.082,
851
- "grad_norm": 5.153912544250488,
852
- "learning_rate": 7.109427490194056e-05,
853
- "loss": 1.9413229370117187,
854
  "step": 11800
855
  },
856
  {
857
  "epoch": 1.0853333333333333,
858
- "grad_norm": 4.910811424255371,
859
- "learning_rate": 7.059329780626034e-05,
860
- "loss": 1.9431932067871094,
861
  "step": 11900
862
  },
863
  {
864
  "epoch": 1.0886666666666667,
865
- "grad_norm": 5.167984962463379,
866
- "learning_rate": 7.008981845579864e-05,
867
- "loss": 1.9339044189453125,
868
  "step": 12000
869
  },
870
  {
871
  "epoch": 1.092,
872
- "grad_norm": 5.159730911254883,
873
- "learning_rate": 6.958389802743077e-05,
874
- "loss": 1.928137969970703,
875
  "step": 12100
876
  },
877
  {
878
  "epoch": 1.0953333333333333,
879
- "grad_norm": 5.2495341300964355,
880
- "learning_rate": 6.9075597994643e-05,
881
- "loss": 1.9172648620605468,
882
  "step": 12200
883
  },
884
  {
885
  "epoch": 1.0986666666666667,
886
- "grad_norm": 5.271884918212891,
887
- "learning_rate": 6.856498012006318e-05,
888
- "loss": 1.9498109436035156,
889
  "step": 12300
890
  },
891
  {
892
  "epoch": 1.102,
893
- "grad_norm": 4.869717121124268,
894
- "learning_rate": 6.805210644795588e-05,
895
- "loss": 1.9088368225097656,
896
  "step": 12400
897
  },
898
  {
899
  "epoch": 1.1053333333333333,
900
- "grad_norm": 4.915546894073486,
901
- "learning_rate": 6.753703929668362e-05,
902
- "loss": 1.9135501098632812,
903
  "step": 12500
904
  },
905
  {
906
  "epoch": 1.1086666666666667,
907
- "grad_norm": 4.548986434936523,
908
- "learning_rate": 6.70198412511347e-05,
909
- "loss": 1.9082426452636718,
910
  "step": 12600
911
  },
912
  {
913
  "epoch": 1.112,
914
- "grad_norm": 5.1761579513549805,
915
- "learning_rate": 6.650057515511848e-05,
916
- "loss": 1.9233914184570313,
917
  "step": 12700
918
  },
919
  {
920
  "epoch": 1.1153333333333333,
921
- "grad_norm": 4.711123943328857,
922
- "learning_rate": 6.597930410372954e-05,
923
- "loss": 1.9090065002441405,
924
  "step": 12800
925
  },
926
  {
927
  "epoch": 1.1186666666666667,
928
- "grad_norm": 4.753604888916016,
929
- "learning_rate": 6.54560914356809e-05,
930
- "loss": 1.913031768798828,
931
  "step": 12900
932
  },
933
  {
934
  "epoch": 1.1219999999999999,
935
- "grad_norm": 4.507719993591309,
936
- "learning_rate": 6.493100072560799e-05,
937
- "loss": 1.9241600036621094,
938
  "step": 13000
939
  },
940
  {
941
  "epoch": 1.1253333333333333,
942
- "grad_norm": 4.860040187835693,
943
- "learning_rate": 6.44040957763438e-05,
944
- "loss": 1.921043701171875,
945
  "step": 13100
946
  },
947
  {
948
  "epoch": 1.1286666666666667,
949
- "grad_norm": 4.9244465827941895,
950
- "learning_rate": 6.387544061116621e-05,
951
- "loss": 1.9413529968261718,
952
  "step": 13200
953
  },
954
  {
955
  "epoch": 1.1320000000000001,
956
- "grad_norm": 4.874339580535889,
957
- "learning_rate": 6.334509946601879e-05,
958
- "loss": 1.9148121643066407,
959
  "step": 13300
960
  },
961
  {
962
  "epoch": 1.1353333333333333,
963
- "grad_norm": 4.540445804595947,
964
- "learning_rate": 6.281313678170542e-05,
965
- "loss": 1.923395538330078,
966
  "step": 13400
967
  },
968
  {
969
  "epoch": 1.1386666666666667,
970
- "grad_norm": 5.011052131652832,
971
- "learning_rate": 6.227961719606039e-05,
972
- "loss": 1.9019638061523438,
973
  "step": 13500
974
  },
975
  {
976
  "epoch": 1.142,
977
- "grad_norm": 5.090750694274902,
978
- "learning_rate": 6.174460553609426e-05,
979
- "loss": 1.9019752502441407,
980
  "step": 13600
981
  },
982
  {
983
  "epoch": 1.1453333333333333,
984
- "grad_norm": 5.096031665802002,
985
- "learning_rate": 6.120816681011684e-05,
986
- "loss": 1.9170556640625,
987
  "step": 13700
988
  },
989
  {
990
  "epoch": 1.1486666666666667,
991
- "grad_norm": 5.055447101593018,
992
- "learning_rate": 6.0670366199838215e-05,
993
- "loss": 1.8996456909179686,
994
  "step": 13800
995
  },
996
  {
997
  "epoch": 1.152,
998
- "grad_norm": 4.6030097007751465,
999
- "learning_rate": 6.013126905244858e-05,
1000
- "loss": 1.9002468872070313,
1001
  "step": 13900
1002
  },
1003
  {
1004
  "epoch": 1.1553333333333333,
1005
- "grad_norm": 4.697137355804443,
1006
- "learning_rate": 5.959094087267804e-05,
1007
- "loss": 1.886578826904297,
1008
  "step": 14000
1009
  },
1010
  {
1011
  "epoch": 1.1586666666666667,
1012
- "grad_norm": 4.779449462890625,
1013
- "learning_rate": 5.904944731483723e-05,
1014
- "loss": 1.8922029113769532,
1015
  "step": 14100
1016
  },
1017
  {
1018
  "epoch": 1.162,
1019
- "grad_norm": 4.6244893074035645,
1020
- "learning_rate": 5.850685417483983e-05,
1021
- "loss": 1.894721221923828,
1022
  "step": 14200
1023
  },
1024
  {
1025
  "epoch": 1.1653333333333333,
1026
- "grad_norm": 4.580394268035889,
1027
- "learning_rate": 5.796322738220774e-05,
1028
- "loss": 1.8998484802246094,
1029
  "step": 14300
1030
  },
1031
  {
1032
  "epoch": 1.1686666666666667,
1033
- "grad_norm": 4.821572780609131,
1034
- "learning_rate": 5.741863299206014e-05,
1035
- "loss": 1.881027069091797,
1036
  "step": 14400
1037
  },
1038
  {
1039
  "epoch": 1.172,
1040
- "grad_norm": 4.807371139526367,
1041
- "learning_rate": 5.687313717708728e-05,
1042
- "loss": 1.8675735473632813,
1043
  "step": 14500
1044
  },
1045
  {
1046
  "epoch": 1.1753333333333333,
1047
- "grad_norm": 4.700822830200195,
1048
- "learning_rate": 5.632680621950992e-05,
1049
- "loss": 1.8618142700195313,
1050
  "step": 14600
1051
  },
1052
  {
1053
  "epoch": 1.1786666666666668,
1054
- "grad_norm": 4.157495021820068,
1055
- "learning_rate": 5.57797065030255e-05,
1056
- "loss": 1.8685194396972655,
1057
  "step": 14700
1058
  },
1059
  {
1060
  "epoch": 1.182,
1061
- "grad_norm": 4.889394283294678,
1062
- "learning_rate": 5.523190450474197e-05,
1063
- "loss": 1.886773681640625,
1064
  "step": 14800
1065
  },
1066
  {
1067
  "epoch": 1.1853333333333333,
1068
- "grad_norm": 4.845384120941162,
1069
- "learning_rate": 5.4683466787100304e-05,
1070
- "loss": 1.8534288024902343,
1071
  "step": 14900
1072
  },
1073
  {
1074
  "epoch": 1.1886666666666668,
1075
- "grad_norm": 4.679961204528809,
1076
- "learning_rate": 5.413445998978658e-05,
1077
- "loss": 1.8429244995117187,
1078
  "step": 15000
1079
  },
1080
  {
1081
  "epoch": 1.1886666666666668,
1082
- "eval_loss": 1.8467531204223633,
1083
- "eval_masked_accuracy": 0.5551868417255807,
1084
- "eval_runtime": 6.0839,
1085
- "eval_samples_per_second": 673.248,
1086
- "eval_steps_per_second": 2.63,
1087
  "step": 15000
1088
  },
1089
  {
1090
  "epoch": 1.192,
1091
- "grad_norm": 4.631464004516602,
1092
- "learning_rate": 5.358495082163476e-05,
1093
- "loss": 1.8469007873535157,
1094
  "step": 15100
1095
  },
1096
  {
1097
  "epoch": 1.1953333333333334,
1098
- "grad_norm": 4.638521194458008,
1099
- "learning_rate": 5.3035006052520955e-05,
1100
- "loss": 1.8356764221191406,
1101
  "step": 15200
1102
  },
1103
  {
1104
  "epoch": 1.1986666666666665,
1105
- "grad_norm": 4.570642471313477,
1106
- "learning_rate": 5.2484692505250376e-05,
1107
- "loss": 1.8426182556152344,
1108
  "step": 15300
1109
  },
1110
  {
1111
  "epoch": 1.202,
1112
- "grad_norm": 4.465674877166748,
1113
- "learning_rate": 5.193407704743782e-05,
1114
- "loss": 1.8424899291992187,
1115
  "step": 15400
1116
  },
1117
  {
1118
  "epoch": 1.2053333333333334,
1119
- "grad_norm": 4.427441596984863,
1120
- "learning_rate": 5.1383226583382684e-05,
1121
- "loss": 1.8333729553222655,
1122
  "step": 15500
1123
  },
1124
  {
1125
  "epoch": 1.2086666666666668,
1126
- "grad_norm": 4.944128036499023,
1127
- "learning_rate": 5.0832208045939556e-05,
1128
- "loss": 1.8115110778808594,
1129
  "step": 15600
1130
  },
1131
  {
1132
  "epoch": 1.212,
1133
- "grad_norm": 4.622330188751221,
1134
- "learning_rate": 5.028108838838533e-05,
1135
- "loss": 1.8149687194824218,
1136
  "step": 15700
1137
  },
1138
  {
1139
  "epoch": 1.2153333333333334,
1140
- "grad_norm": 4.573352336883545,
1141
- "learning_rate": 4.972993457628381e-05,
1142
- "loss": 1.8161116027832032,
1143
  "step": 15800
1144
  },
1145
  {
1146
  "epoch": 1.2186666666666666,
1147
- "grad_norm": 4.753305435180664,
1148
- "learning_rate": 4.9178813579348865e-05,
1149
- "loss": 1.8010633850097657,
1150
  "step": 15900
1151
  },
1152
  {
1153
  "epoch": 1.222,
1154
- "grad_norm": 5.017966270446777,
1155
- "learning_rate": 4.862779236330705e-05,
1156
- "loss": 1.8063246154785155,
1157
  "step": 16000
1158
  },
1159
  {
1160
  "epoch": 1.2253333333333334,
1161
- "grad_norm": 4.491023063659668,
1162
- "learning_rate": 4.807693788176071e-05,
1163
- "loss": 1.8086869812011719,
1164
  "step": 16100
1165
  },
1166
  {
1167
  "epoch": 1.2286666666666666,
1168
- "grad_norm": 4.622035503387451,
1169
- "learning_rate": 4.752631706805261e-05,
1170
- "loss": 1.7760255432128906,
1171
  "step": 16200
1172
  },
1173
  {
1174
  "epoch": 1.232,
1175
- "grad_norm": 4.742088317871094,
1176
- "learning_rate": 4.6975996827132926e-05,
1177
- "loss": 1.7725007629394531,
1178
  "step": 16300
1179
  },
1180
  {
1181
  "epoch": 1.2353333333333334,
1182
- "grad_norm": 4.786332130432129,
1183
- "learning_rate": 4.6426044027429786e-05,
1184
- "loss": 1.7803855895996095,
1185
  "step": 16400
1186
  },
1187
  {
1188
  "epoch": 1.2386666666666666,
1189
- "grad_norm": 4.642701625823975,
1190
- "learning_rate": 4.58765254927242e-05,
1191
- "loss": 1.7837786865234375,
1192
  "step": 16500
1193
  },
1194
  {
1195
  "epoch": 1.242,
1196
- "grad_norm": 4.578219890594482,
1197
- "learning_rate": 4.5327507994030394e-05,
1198
- "loss": 1.7726612854003907,
1199
  "step": 16600
1200
  },
1201
  {
1202
  "epoch": 1.2453333333333334,
1203
- "grad_norm": 4.572558403015137,
1204
- "learning_rate": 4.47790582414826e-05,
1205
- "loss": 1.7728559875488281,
1206
  "step": 16700
1207
  },
1208
  {
1209
  "epoch": 1.2486666666666666,
1210
- "grad_norm": 4.7602434158325195,
1211
- "learning_rate": 4.423124287622926e-05,
1212
- "loss": 1.7534779357910155,
1213
  "step": 16800
1214
  },
1215
  {
1216
  "epoch": 1.252,
1217
- "grad_norm": 4.802716255187988,
1218
- "learning_rate": 4.3684128462335533e-05,
1219
- "loss": 1.7711273193359376,
1220
  "step": 16900
1221
  },
1222
  {
1223
  "epoch": 1.2553333333333334,
1224
- "grad_norm": 4.785411357879639,
1225
- "learning_rate": 4.3137781478695236e-05,
1226
- "loss": 1.752899169921875,
1227
  "step": 17000
1228
  },
1229
  {
1230
  "epoch": 1.2586666666666666,
1231
- "grad_norm": 4.973933219909668,
1232
- "learning_rate": 4.25922683109531e-05,
1233
- "loss": 1.7573219299316407,
1234
  "step": 17100
1235
  },
1236
  {
1237
  "epoch": 1.262,
1238
- "grad_norm": 4.814939022064209,
1239
- "learning_rate": 4.204765524343841e-05,
1240
- "loss": 1.7253883361816407,
1241
  "step": 17200
1242
  },
1243
  {
1244
  "epoch": 1.2653333333333334,
1245
- "grad_norm": 4.742300987243652,
1246
- "learning_rate": 4.1504008451110845e-05,
1247
- "loss": 1.7295744323730469,
1248
  "step": 17300
1249
  },
1250
  {
1251
  "epoch": 1.2686666666666666,
1252
- "grad_norm": 4.9945969581604,
1253
- "learning_rate": 4.096139399151971e-05,
1254
- "loss": 1.7228933715820312,
1255
  "step": 17400
1256
  },
1257
  {
1258
  "epoch": 1.272,
1259
- "grad_norm": 4.486416339874268,
1260
- "learning_rate": 4.041987779677745e-05,
1261
- "loss": 1.7148330688476563,
1262
  "step": 17500
1263
  },
1264
  {
1265
  "epoch": 1.2753333333333332,
1266
- "grad_norm": 4.558888912200928,
1267
- "learning_rate": 3.9879525665548276e-05,
1268
- "loss": 1.7216806030273437,
1269
  "step": 17600
1270
  },
1271
  {
1272
  "epoch": 1.2786666666666666,
1273
- "grad_norm": 4.67527437210083,
1274
- "learning_rate": 3.9340403255053135e-05,
1275
- "loss": 1.700666961669922,
1276
  "step": 17700
1277
  },
1278
  {
1279
  "epoch": 1.282,
1280
- "grad_norm": 4.606650352478027,
1281
- "learning_rate": 3.880257607309178e-05,
1282
- "loss": 1.7064649963378906,
1283
  "step": 17800
1284
  },
1285
  {
1286
  "epoch": 1.2853333333333334,
1287
- "grad_norm": 4.782898902893066,
1288
- "learning_rate": 3.826610947008312e-05,
1289
- "loss": 1.6886534118652343,
1290
  "step": 17900
1291
  },
1292
  {
1293
  "epoch": 1.2886666666666666,
1294
- "grad_norm": 4.922590732574463,
1295
- "learning_rate": 3.773106863112451e-05,
1296
- "loss": 1.703627471923828,
1297
  "step": 18000
1298
  },
1299
  {
1300
  "epoch": 1.292,
1301
- "grad_norm": 4.657540321350098,
1302
- "learning_rate": 3.719751856807125e-05,
1303
- "loss": 1.6833297729492187,
1304
  "step": 18100
1305
  },
1306
  {
1307
  "epoch": 1.2953333333333332,
1308
- "grad_norm": 4.772761344909668,
1309
- "learning_rate": 3.666552411163718e-05,
1310
- "loss": 1.688351593017578,
1311
  "step": 18200
1312
  },
1313
  {
1314
  "epoch": 1.2986666666666666,
1315
- "grad_norm": 4.486453056335449,
1316
- "learning_rate": 3.6135149903517115e-05,
1317
- "loss": 1.6901985168457032,
1318
  "step": 18300
1319
  },
1320
  {
1321
  "epoch": 1.302,
1322
- "grad_norm": 4.456425189971924,
1323
- "learning_rate": 3.56064603885324e-05,
1324
- "loss": 1.6628305053710937,
1325
  "step": 18400
1326
  },
1327
  {
1328
  "epoch": 1.3053333333333335,
1329
- "grad_norm": 4.608875751495361,
1330
- "learning_rate": 3.5079519806800374e-05,
1331
- "loss": 1.6773171997070313,
1332
  "step": 18500
1333
  },
1334
  {
1335
  "epoch": 1.3086666666666666,
1336
- "grad_norm": 4.784965515136719,
1337
- "learning_rate": 3.4554392185928564e-05,
1338
- "loss": 1.6454412841796875,
1339
  "step": 18600
1340
  },
1341
  {
1342
  "epoch": 2.0006666666666666,
1343
- "grad_norm": 4.08699893951416,
1344
- "learning_rate": 3.40311413332349e-05,
1345
- "loss": 1.6564366149902343,
1346
  "step": 18700
1347
  },
1348
  {
1349
  "epoch": 2.004,
1350
- "grad_norm": 4.481525897979736,
1351
- "learning_rate": 3.350983082799456e-05,
1352
- "loss": 1.62840576171875,
1353
  "step": 18800
1354
  },
1355
  {
1356
  "epoch": 2.0073333333333334,
1357
- "grad_norm": 3.9877312183380127,
1358
- "learning_rate": 3.299052401371456e-05,
1359
- "loss": 1.5869935607910157,
1360
  "step": 18900
1361
  },
1362
  {
1363
  "epoch": 2.010666666666667,
1364
- "grad_norm": 4.130960464477539,
1365
- "learning_rate": 3.247328399043706e-05,
1366
- "loss": 1.570656280517578,
1367
  "step": 19000
1368
  },
1369
  {
1370
  "epoch": 2.014,
1371
- "grad_norm": 4.480629920959473,
1372
- "learning_rate": 3.195817360707207e-05,
1373
- "loss": 1.5836396789550782,
1374
  "step": 19100
1375
  },
1376
  {
1377
  "epoch": 2.017333333333333,
1378
- "grad_norm": 4.205255031585693,
1379
- "learning_rate": 3.144525545376095e-05,
1380
- "loss": 1.5562339782714845,
1381
  "step": 19200
1382
  },
1383
  {
1384
  "epoch": 2.0206666666666666,
1385
- "grad_norm": 4.235847473144531,
1386
- "learning_rate": 3.093459185427102e-05,
1387
- "loss": 1.5763328552246094,
1388
  "step": 19300
1389
  },
1390
  {
1391
  "epoch": 2.024,
1392
- "grad_norm": 4.205441951751709,
1393
- "learning_rate": 3.0426244858422847e-05,
1394
- "loss": 1.5626734924316406,
1395
  "step": 19400
1396
  },
1397
  {
1398
  "epoch": 2.0273333333333334,
1399
- "grad_norm": 4.186418533325195,
1400
- "learning_rate": 2.9920276234550636e-05,
1401
- "loss": 1.575146484375,
1402
  "step": 19500
1403
  },
1404
  {
1405
  "epoch": 2.030666666666667,
1406
- "grad_norm": 4.292003154754639,
1407
- "learning_rate": 2.9416747461996853e-05,
1408
- "loss": 1.54133544921875,
1409
  "step": 19600
1410
  },
1411
  {
1412
  "epoch": 2.034,
1413
- "grad_norm": 4.439959526062012,
1414
- "learning_rate": 2.8915719723641975e-05,
1415
- "loss": 1.5504551696777344,
1416
  "step": 19700
1417
  },
1418
  {
1419
  "epoch": 2.037333333333333,
1420
- "grad_norm": 4.374598503112793,
1421
- "learning_rate": 2.841725389847032e-05,
1422
- "loss": 1.5403448486328124,
1423
  "step": 19800
1424
  },
1425
  {
1426
  "epoch": 2.0406666666666666,
1427
- "grad_norm": 4.581845760345459,
1428
- "learning_rate": 2.7921410554172723e-05,
1429
- "loss": 1.550257568359375,
1430
  "step": 19900
1431
  },
1432
  {
1433
  "epoch": 2.044,
1434
- "grad_norm": 4.183570384979248,
1435
- "learning_rate": 2.7428249939787e-05,
1436
- "loss": 1.5298226928710938,
1437
  "step": 20000
1438
  },
1439
  {
1440
  "epoch": 2.044,
1441
- "eval_loss": 1.6956673860549927,
1442
- "eval_masked_accuracy": 0.5865110984632897,
1443
- "eval_runtime": 6.0932,
1444
- "eval_samples_per_second": 672.222,
1445
- "eval_steps_per_second": 2.626,
1446
  "step": 20000
1447
  },
1448
  {
1449
  "epoch": 2.0473333333333334,
1450
- "grad_norm": 4.26902437210083,
1451
- "learning_rate": 2.6937831978377325e-05,
1452
- "loss": 1.5412590026855468,
1453
  "step": 20100
1454
  },
1455
  {
1456
  "epoch": 2.050666666666667,
1457
- "grad_norm": 4.665940761566162,
1458
- "learning_rate": 2.6450216259753e-05,
1459
- "loss": 1.5438227844238281,
1460
  "step": 20200
1461
  },
1462
  {
1463
  "epoch": 2.054,
1464
- "grad_norm": 4.335201740264893,
1465
- "learning_rate": 2.596546203322777e-05,
1466
- "loss": 1.5362275695800782,
1467
  "step": 20300
1468
  },
1469
  {
1470
  "epoch": 2.0573333333333332,
1471
- "grad_norm": 4.486615180969238,
1472
- "learning_rate": 2.5483628200420644e-05,
1473
- "loss": 1.53197021484375,
1474
  "step": 20400
1475
  },
1476
  {
1477
  "epoch": 2.0606666666666666,
1478
- "grad_norm": 4.637569904327393,
1479
- "learning_rate": 2.500477330809881e-05,
1480
- "loss": 1.510602264404297,
1481
  "step": 20500
1482
  },
1483
  {
1484
  "epoch": 2.064,
1485
- "grad_norm": 4.1064558029174805,
1486
- "learning_rate": 2.452895554106368e-05,
1487
- "loss": 1.502353973388672,
1488
  "step": 20600
1489
  },
1490
  {
1491
  "epoch": 2.0673333333333335,
1492
- "grad_norm": 4.285604953765869,
1493
- "learning_rate": 2.405623271508108e-05,
1494
- "loss": 1.528131866455078,
1495
  "step": 20700
1496
  },
1497
  {
1498
  "epoch": 2.070666666666667,
1499
- "grad_norm": 4.3571367263793945,
1500
- "learning_rate": 2.358666226985599e-05,
1501
- "loss": 1.530682373046875,
1502
  "step": 20800
1503
  },
1504
  {
1505
  "epoch": 2.074,
1506
- "grad_norm": 4.226117134094238,
1507
- "learning_rate": 2.312030126205335e-05,
1508
- "loss": 1.5152372741699218,
1509
  "step": 20900
1510
  },
1511
  {
1512
  "epoch": 2.0773333333333333,
1513
- "grad_norm": 4.25309419631958,
1514
- "learning_rate": 2.2657206358364997e-05,
1515
- "loss": 1.5110414123535156,
1516
  "step": 21000
1517
  },
1518
  {
1519
  "epoch": 2.0806666666666667,
1520
- "grad_norm": 4.612072467803955,
1521
- "learning_rate": 2.219743382862437e-05,
1522
- "loss": 1.4938458251953124,
1523
  "step": 21100
1524
  },
1525
  {
1526
  "epoch": 2.084,
1527
- "grad_norm": 4.316677093505859,
1528
- "learning_rate": 2.1741039538969183e-05,
1529
- "loss": 1.4943765258789063,
1530
  "step": 21200
1531
  },
1532
  {
1533
  "epoch": 2.0873333333333335,
1534
- "grad_norm": 4.053011417388916,
1535
- "learning_rate": 2.1288078945053193e-05,
1536
- "loss": 1.486304931640625,
1537
  "step": 21300
1538
  },
1539
  {
1540
  "epoch": 2.0906666666666665,
1541
- "grad_norm": 4.295980453491211,
1542
- "learning_rate": 2.083860708530798e-05,
1543
- "loss": 1.4813737487792968,
1544
  "step": 21400
1545
  },
1546
  {
1547
  "epoch": 2.094,
1548
- "grad_norm": 4.288027763366699,
1549
- "learning_rate": 2.0392678574255282e-05,
1550
- "loss": 1.490546875,
1551
  "step": 21500
1552
  },
1553
  {
1554
  "epoch": 2.0973333333333333,
1555
- "grad_norm": 4.3048505783081055,
1556
- "learning_rate": 1.99503475958708e-05,
1557
- "loss": 1.4724571228027343,
1558
  "step": 21600
1559
  },
1560
  {
1561
  "epoch": 2.1006666666666667,
1562
- "grad_norm": 4.423007488250732,
1563
- "learning_rate": 1.9511667897000574e-05,
1564
- "loss": 1.475355682373047,
1565
  "step": 21700
1566
  },
1567
  {
1568
  "epoch": 2.104,
1569
- "grad_norm": 4.3376336097717285,
1570
- "learning_rate": 1.9076692780830114e-05,
1571
- "loss": 1.4873141479492187,
1572
  "step": 21800
1573
  },
1574
  {
1575
  "epoch": 2.1073333333333335,
1576
- "grad_norm": 4.22784423828125,
1577
- "learning_rate": 1.8645475100407788e-05,
1578
- "loss": 1.5029916381835937,
1579
  "step": 21900
1580
  },
1581
  {
1582
  "epoch": 2.1106666666666665,
1583
- "grad_norm": 4.327232360839844,
1584
- "learning_rate": 1.8218067252222597e-05,
1585
- "loss": 1.5122482299804687,
1586
  "step": 22000
1587
  },
1588
  {
1589
  "epoch": 2.114,
1590
- "grad_norm": 4.530300140380859,
1591
- "learning_rate": 1.779452116983769e-05,
1592
- "loss": 1.5061280822753906,
1593
  "step": 22100
1594
  },
1595
  {
1596
  "epoch": 2.1173333333333333,
1597
- "grad_norm": 4.228301525115967,
1598
- "learning_rate": 1.737488831757997e-05,
1599
- "loss": 1.52053955078125,
1600
  "step": 22200
1601
  },
1602
  {
1603
  "epoch": 2.1206666666666667,
1604
- "grad_norm": 4.379787921905518,
1605
- "learning_rate": 1.695921968428668e-05,
1606
- "loss": 1.5291818237304688,
1607
  "step": 22300
1608
  },
1609
  {
1610
  "epoch": 2.124,
1611
- "grad_norm": 4.750154972076416,
1612
- "learning_rate": 1.6547565777109976e-05,
1613
- "loss": 1.5258726501464843,
1614
  "step": 22400
1615
  },
1616
  {
1617
  "epoch": 2.1273333333333335,
1618
- "grad_norm": 5.20265007019043,
1619
- "learning_rate": 1.613997661537981e-05,
1620
- "loss": 1.5335383605957031,
1621
  "step": 22500
1622
  },
1623
  {
1624
  "epoch": 2.1306666666666665,
1625
- "grad_norm": 4.6225433349609375,
1626
- "learning_rate": 1.573650172452615e-05,
1627
- "loss": 1.5420014953613281,
1628
  "step": 22600
1629
  },
1630
  {
1631
  "epoch": 2.134,
1632
- "grad_norm": 4.721563339233398,
1633
- "learning_rate": 1.5337190130061318e-05,
1634
- "loss": 1.5496218872070313,
1635
  "step": 22700
1636
  },
1637
  {
1638
  "epoch": 2.1373333333333333,
1639
- "grad_norm": 4.762903690338135,
1640
- "learning_rate": 1.4942090351622883e-05,
1641
- "loss": 1.570287322998047,
1642
  "step": 22800
1643
  },
1644
  {
1645
  "epoch": 2.1406666666666667,
1646
- "grad_norm": 4.561542510986328,
1647
- "learning_rate": 1.4551250397078253e-05,
1648
- "loss": 1.5680990600585938,
1649
  "step": 22900
1650
  },
1651
  {
1652
  "epoch": 2.144,
1653
- "grad_norm": 4.693943500518799,
1654
- "learning_rate": 1.4164717756691176e-05,
1655
- "loss": 1.5905775451660156,
1656
  "step": 23000
1657
  },
1658
  {
1659
  "epoch": 2.1473333333333335,
1660
- "grad_norm": 5.039695739746094,
1661
- "learning_rate": 1.3782539397351418e-05,
1662
- "loss": 1.5886349487304687,
1663
  "step": 23100
1664
  },
1665
  {
1666
  "epoch": 2.1506666666666665,
1667
- "grad_norm": 5.3282790184021,
1668
- "learning_rate": 1.340476175686784e-05,
1669
- "loss": 1.5803268432617188,
1670
  "step": 23200
1671
  },
1672
  {
1673
  "epoch": 2.154,
1674
- "grad_norm": 4.672342777252197,
1675
- "learning_rate": 1.3031430738325778e-05,
1676
- "loss": 1.5878211975097656,
1677
  "step": 23300
1678
  },
1679
  {
1680
  "epoch": 2.1573333333333333,
1681
- "grad_norm": 4.686863899230957,
1682
- "learning_rate": 1.2662591704509547e-05,
1683
- "loss": 1.611242218017578,
1684
  "step": 23400
1685
  },
1686
  {
1687
  "epoch": 2.1606666666666667,
1688
- "grad_norm": 5.2701568603515625,
1689
- "learning_rate": 1.2298289472390417e-05,
1690
- "loss": 1.5942909240722656,
1691
  "step": 23500
1692
  },
1693
  {
1694
  "epoch": 2.164,
1695
- "grad_norm": 4.708863258361816,
1696
- "learning_rate": 1.1938568307680964e-05,
1697
- "loss": 1.6314300537109374,
1698
  "step": 23600
1699
  },
1700
  {
1701
  "epoch": 2.1673333333333336,
1702
- "grad_norm": 4.914238929748535,
1703
- "learning_rate": 1.1583471919456506e-05,
1704
- "loss": 1.6009869384765625,
1705
  "step": 23700
1706
  },
1707
  {
1708
  "epoch": 2.1706666666666665,
1709
- "grad_norm": 5.067790508270264,
1710
- "learning_rate": 1.1233043454844016e-05,
1711
- "loss": 1.5916122436523437,
1712
  "step": 23800
1713
  },
1714
  {
1715
  "epoch": 2.174,
1716
- "grad_norm": 5.132817268371582,
1717
- "learning_rate": 1.0887325493779405e-05,
1718
- "loss": 1.6167672729492188,
1719
  "step": 23900
1720
  },
1721
  {
1722
  "epoch": 2.1773333333333333,
1723
- "grad_norm": 5.293063640594482,
1724
- "learning_rate": 1.0546360043833747e-05,
1725
- "loss": 1.6026080322265626,
1726
  "step": 24000
1727
  },
1728
  {
1729
  "epoch": 2.1806666666666668,
1730
- "grad_norm": 5.52355432510376,
1731
- "learning_rate": 1.0210188535108995e-05,
1732
- "loss": 1.6140333557128905,
1733
  "step": 24100
1734
  },
1735
  {
1736
  "epoch": 2.184,
1737
- "grad_norm": 5.356894016265869,
1738
- "learning_rate": 9.878851815203882e-06,
1739
- "loss": 1.6005001831054688,
1740
  "step": 24200
1741
  },
1742
  {
1743
  "epoch": 2.187333333333333,
1744
- "grad_norm": 5.4585771560668945,
1745
- "learning_rate": 9.55239014425055e-06,
1746
- "loss": 1.6022555541992187,
1747
  "step": 24300
1748
  },
1749
  {
1750
  "epoch": 2.1906666666666665,
1751
- "grad_norm": 5.152921676635742,
1752
- "learning_rate": 9.230843190022725e-06,
1753
- "loss": 1.6190740966796875,
1754
  "step": 24400
1755
  },
1756
  {
1757
  "epoch": 2.194,
1758
- "grad_norm": 5.397445201873779,
1759
- "learning_rate": 8.914250023115672e-06,
1760
- "loss": 1.616868438720703,
1761
  "step": 24500
1762
  },
1763
  {
1764
  "epoch": 2.1973333333333334,
1765
- "grad_norm": 5.553057670593262,
1766
- "learning_rate": 8.602649112198796e-06,
1767
- "loss": 1.621106414794922,
1768
  "step": 24600
1769
  },
1770
  {
1771
  "epoch": 2.2006666666666668,
1772
- "grad_norm": 4.983733177185059,
1773
- "learning_rate": 8.296078319341443e-06,
1774
- "loss": 1.6104743957519532,
1775
  "step": 24700
1776
  },
1777
  {
1778
  "epoch": 2.204,
1779
- "grad_norm": 4.88228702545166,
1780
- "learning_rate": 7.994574895412293e-06,
1781
- "loss": 1.6215898132324218,
1782
  "step": 24800
1783
  },
1784
  {
1785
  "epoch": 2.207333333333333,
1786
- "grad_norm": 5.843441963195801,
1787
- "learning_rate": 7.698175475553077e-06,
1788
- "loss": 1.613902587890625,
1789
  "step": 24900
1790
  },
1791
  {
1792
  "epoch": 2.2106666666666666,
1793
- "grad_norm": 5.504673957824707,
1794
- "learning_rate": 7.40691607472715e-06,
1795
- "loss": 1.623016357421875,
1796
  "step": 25000
1797
  },
1798
  {
1799
  "epoch": 2.2106666666666666,
1800
- "eval_loss": 1.500394344329834,
1801
- "eval_masked_accuracy": 0.6250727166957534,
1802
- "eval_runtime": 6.4092,
1803
- "eval_samples_per_second": 639.084,
1804
- "eval_steps_per_second": 2.496,
1805
  "step": 25000
1806
  },
1807
  {
1808
  "epoch": 2.214,
1809
- "grad_norm": 5.493242263793945,
1810
- "learning_rate": 7.120832083343337e-06,
1811
- "loss": 1.6365603637695312,
1812
  "step": 25100
1813
  },
1814
  {
1815
  "epoch": 2.2173333333333334,
1816
- "grad_norm": 5.239762783050537,
1817
- "learning_rate": 6.839958262955709e-06,
1818
- "loss": 1.6364859008789063,
1819
  "step": 25200
1820
  },
1821
  {
1822
  "epoch": 2.220666666666667,
1823
- "grad_norm": 5.058232307434082,
1824
- "learning_rate": 6.564328742039783e-06,
1825
- "loss": 1.641663818359375,
1826
  "step": 25300
1827
  },
1828
  {
1829
  "epoch": 2.224,
1830
- "grad_norm": 5.345419406890869,
1831
- "learning_rate": 6.293977011845648e-06,
1832
- "loss": 1.6362882995605468,
1833
  "step": 25400
1834
  },
1835
  {
1836
  "epoch": 2.227333333333333,
1837
- "grad_norm": 5.698750019073486,
1838
- "learning_rate": 6.0289359223284434e-06,
1839
- "loss": 1.6450096130371095,
1840
  "step": 25500
1841
  },
1842
  {
1843
  "epoch": 2.2306666666666666,
1844
- "grad_norm": 5.43581485748291,
1845
- "learning_rate": 5.769237678156897e-06,
1846
- "loss": 1.6310890197753907,
1847
  "step": 25600
1848
  },
1849
  {
1850
  "epoch": 2.234,
1851
- "grad_norm": 5.170186996459961,
1852
- "learning_rate": 5.514913834800134e-06,
1853
- "loss": 1.6681497192382813,
1854
  "step": 25700
1855
  },
1856
  {
1857
  "epoch": 2.2373333333333334,
1858
- "grad_norm": 5.491499423980713,
1859
- "learning_rate": 5.265995294693471e-06,
1860
- "loss": 1.6503074645996094,
1861
  "step": 25800
1862
  },
1863
  {
1864
  "epoch": 2.240666666666667,
1865
- "grad_norm": 4.995376110076904,
1866
- "learning_rate": 5.022512303483451e-06,
1867
- "loss": 1.6396957397460938,
1868
  "step": 25900
1869
  },
1870
  {
1871
  "epoch": 2.2439999999999998,
1872
- "grad_norm": 5.047297477722168,
1873
- "learning_rate": 4.784494446352833e-06,
1874
- "loss": 1.658381805419922,
1875
  "step": 26000
1876
  },
1877
  {
1878
  "epoch": 2.247333333333333,
1879
- "grad_norm": 5.690036296844482,
1880
- "learning_rate": 4.551970644425707e-06,
1881
- "loss": 1.6450552368164062,
1882
  "step": 26100
1883
  },
1884
  {
1885
  "epoch": 2.2506666666666666,
1886
- "grad_norm": 5.233314514160156,
1887
- "learning_rate": 4.324969151253317e-06,
1888
- "loss": 1.6168133544921874,
1889
  "step": 26200
1890
  },
1891
  {
1892
  "epoch": 2.254,
1893
- "grad_norm": 5.15321159362793,
1894
- "learning_rate": 4.10351754938107e-06,
1895
- "loss": 1.615177764892578,
1896
  "step": 26300
1897
  },
1898
  {
1899
  "epoch": 2.2573333333333334,
1900
- "grad_norm": 6.050407886505127,
1901
- "learning_rate": 3.887642746997017e-06,
1902
- "loss": 1.6591305541992187,
1903
  "step": 26400
1904
  },
1905
  {
1906
  "epoch": 2.260666666666667,
1907
- "grad_norm": 5.440352439880371,
1908
- "learning_rate": 3.6773709746622363e-06,
1909
- "loss": 1.6324659729003905,
1910
  "step": 26500
1911
  },
1912
  {
1913
  "epoch": 2.2640000000000002,
1914
- "grad_norm": 5.16418981552124,
1915
- "learning_rate": 3.472727782123697e-06,
1916
- "loss": 1.634721221923828,
1917
  "step": 26600
1918
  },
1919
  {
1920
  "epoch": 2.267333333333333,
1921
- "grad_norm": 5.912958145141602,
1922
- "learning_rate": 3.273738035209678e-06,
1923
- "loss": 1.6322593688964844,
1924
  "step": 26700
1925
  },
1926
  {
1927
  "epoch": 2.2706666666666666,
1928
- "grad_norm": 6.0202155113220215,
1929
- "learning_rate": 3.0804259128083936e-06,
1930
- "loss": 1.6233775329589843,
1931
  "step": 26800
1932
  },
1933
  {
1934
  "epoch": 2.274,
1935
- "grad_norm": 5.666730880737305,
1936
- "learning_rate": 2.8928149039300524e-06,
1937
- "loss": 1.6298930358886718,
1938
  "step": 26900
1939
  },
1940
  {
1941
  "epoch": 2.2773333333333334,
1942
- "grad_norm": 5.367899417877197,
1943
- "learning_rate": 2.7109278048527752e-06,
1944
- "loss": 1.6212306213378906,
1945
  "step": 27000
1946
  },
1947
  {
1948
  "epoch": 2.280666666666667,
1949
- "grad_norm": 5.847186088562012,
1950
- "learning_rate": 2.5347867163526384e-06,
1951
- "loss": 1.6395831298828125,
1952
  "step": 27100
1953
  },
1954
  {
1955
  "epoch": 2.284,
1956
- "grad_norm": 5.451877117156982,
1957
- "learning_rate": 2.364413041018232e-06,
1958
- "loss": 1.6114913940429687,
1959
  "step": 27200
1960
  },
1961
  {
1962
  "epoch": 2.287333333333333,
1963
- "grad_norm": 5.2447190284729,
1964
- "learning_rate": 2.1998274806501074e-06,
1965
- "loss": 1.6211642456054687,
1966
  "step": 27300
1967
  },
1968
  {
1969
  "epoch": 2.2906666666666666,
1970
- "grad_norm": 5.420331001281738,
1971
- "learning_rate": 2.0410500337453176e-06,
1972
- "loss": 1.5998692321777344,
1973
  "step": 27400
1974
  },
1975
  {
1976
  "epoch": 2.294,
1977
- "grad_norm": 5.493936538696289,
1978
- "learning_rate": 1.8880999930674215e-06,
1979
- "loss": 1.6333512878417968,
1980
  "step": 27500
1981
  },
1982
  {
1983
  "epoch": 2.2973333333333334,
1984
- "grad_norm": 5.61967658996582,
1985
- "learning_rate": 1.7409959433022871e-06,
1986
- "loss": 1.637555389404297,
1987
  "step": 27600
1988
  },
1989
  {
1990
  "epoch": 2.300666666666667,
1991
- "grad_norm": 5.362664699554443,
1992
- "learning_rate": 1.5997557587998868e-06,
1993
- "loss": 1.597519073486328,
1994
  "step": 27700
1995
  },
1996
  {
1997
  "epoch": 2.304,
1998
- "grad_norm": 5.862389087677002,
1999
- "learning_rate": 1.4643966014023957e-06,
2000
- "loss": 1.6198776245117188,
2001
  "step": 27800
2002
  },
2003
  {
2004
  "epoch": 2.3073333333333332,
2005
- "grad_norm": 5.315817356109619,
2006
- "learning_rate": 1.3349349183589155e-06,
2007
- "loss": 1.6214700317382813,
2008
  "step": 27900
2009
  },
2010
  {
2011
  "epoch": 2.3106666666666666,
2012
- "grad_norm": 5.45588493347168,
2013
- "learning_rate": 1.2113864403269836e-06,
2014
- "loss": 1.6254971313476563,
2015
  "step": 28000
2016
  },
2017
  {
2018
  "epoch": 3.002666666666667,
2019
- "grad_norm": 5.6935906410217285,
2020
- "learning_rate": 1.0937661794611864e-06,
2021
- "loss": 1.4845796203613282,
2022
  "step": 28100
2023
  },
2024
  {
2025
  "epoch": 3.006,
2026
- "grad_norm": 5.128046989440918,
2027
- "learning_rate": 9.820884275890286e-07,
2028
- "loss": 1.456612548828125,
2029
  "step": 28200
2030
  },
2031
  {
2032
  "epoch": 3.009333333333333,
2033
- "grad_norm": 5.23906946182251,
2034
- "learning_rate": 8.763667544743836e-07,
2035
- "loss": 1.4703726196289062,
2036
  "step": 28300
2037
  },
2038
  {
2039
  "epoch": 3.0126666666666666,
2040
- "grad_norm": 5.33555793762207,
2041
- "learning_rate": 7.766140061686522e-07,
2042
- "loss": 1.4658856201171875,
2043
  "step": 28400
2044
  },
2045
  {
2046
  "epoch": 3.016,
2047
- "grad_norm": 5.468862533569336,
2048
- "learning_rate": 6.828423034498488e-07,
2049
- "loss": 1.4503196716308593,
2050
  "step": 28500
2051
  },
2052
  {
2053
  "epoch": 3.0193333333333334,
2054
- "grad_norm": 5.648383140563965,
2055
- "learning_rate": 5.950630403498469e-07,
2056
- "loss": 1.4786280822753906,
2057
  "step": 28600
2058
  },
2059
  {
2060
  "epoch": 3.022666666666667,
2061
- "grad_norm": 5.5019659996032715,
2062
- "learning_rate": 5.132868827698978e-07,
2063
- "loss": 1.4625227355957031,
2064
  "step": 28700
2065
  },
2066
  {
2067
  "epoch": 3.026,
2068
- "grad_norm": 5.69915771484375,
2069
- "learning_rate": 4.375237671846333e-07,
2070
- "loss": 1.4489666748046874,
2071
  "step": 28800
2072
  },
2073
  {
2074
  "epoch": 3.029333333333333,
2075
- "grad_norm": 5.224785327911377,
2076
- "learning_rate": 3.677828994347154e-07,
2077
- "loss": 1.4654063415527343,
2078
  "step": 28900
2079
  },
2080
  {
2081
  "epoch": 3.0326666666666666,
2082
- "grad_norm": 5.944694519042969,
2083
- "learning_rate": 3.040727536082366e-07,
2084
- "loss": 1.4619117736816407,
2085
  "step": 29000
2086
  },
2087
  {
2088
  "epoch": 3.036,
2089
- "grad_norm": 5.931241989135742,
2090
- "learning_rate": 2.464010710110598e-07,
2091
- "loss": 1.464918975830078,
2092
  "step": 29100
2093
  },
2094
  {
2095
  "epoch": 3.0393333333333334,
2096
- "grad_norm": 5.546744346618652,
2097
- "learning_rate": 1.9477485922618222e-07,
2098
- "loss": 1.4493109130859374,
2099
  "step": 29200
2100
  },
2101
  {
2102
  "epoch": 3.042666666666667,
2103
- "grad_norm": 5.485001564025879,
2104
- "learning_rate": 1.4920039126225527e-07,
2105
- "loss": 1.4527821350097656,
2106
  "step": 29300
2107
  },
2108
  {
2109
  "epoch": 3.046,
2110
- "grad_norm": 5.745002746582031,
2111
- "learning_rate": 1.0968320479136095e-07,
2112
- "loss": 1.46337646484375,
2113
  "step": 29400
2114
  },
2115
  {
2116
  "epoch": 3.0493333333333332,
2117
- "grad_norm": 4.96608829498291,
2118
- "learning_rate": 7.622810147614456e-08,
2119
- "loss": 1.4616835021972656,
2120
  "step": 29500
2121
  },
2122
  {
2123
  "epoch": 3.0526666666666666,
2124
- "grad_norm": 4.910149097442627,
2125
- "learning_rate": 4.883914638636467e-08,
2126
- "loss": 1.4573419189453125,
2127
  "step": 29600
2128
  },
2129
  {
2130
  "epoch": 3.056,
2131
- "grad_norm": 5.22091007232666,
2132
- "learning_rate": 2.7519667504971593e-08,
2133
- "loss": 1.4733062744140626,
2134
  "step": 29700
2135
  },
2136
  {
2137
  "epoch": 3.0593333333333335,
2138
- "grad_norm": 5.838210582733154,
2139
- "learning_rate": 1.2272255323708681e-08,
2140
- "loss": 1.49260498046875,
2141
  "step": 29800
2142
  },
2143
  {
2144
  "epoch": 3.062666666666667,
2145
- "grad_norm": 5.322798252105713,
2146
- "learning_rate": 3.0987625283473987e-09,
2147
- "loss": 1.4649183654785156,
2148
  "step": 29900
2149
  },
2150
  {
2151
  "epoch": 3.066,
2152
- "grad_norm": 6.612534999847412,
2153
- "learning_rate": 3.0377360626943076e-13,
2154
- "loss": 1.4366880798339843,
2155
  "step": 30000
2156
  },
2157
  {
2158
  "epoch": 3.066,
2159
- "eval_loss": 1.5919160842895508,
2160
- "eval_masked_accuracy": 0.6138884886903905,
2161
- "eval_runtime": 6.0117,
2162
- "eval_samples_per_second": 681.335,
2163
- "eval_steps_per_second": 2.661,
2164
  "step": 30000
2165
  },
2166
  {
2167
  "epoch": 3.066,
2168
  "step": 30000,
2169
- "total_flos": 5.639177852861803e+16,
2170
- "train_loss": 2.222940887959798,
2171
- "train_runtime": 3365.6547,
2172
- "train_samples_per_second": 2281.874,
2173
- "train_steps_per_second": 8.914
2174
  },
2175
  {
2176
  "epoch": 3.066,
2177
- "eval_loss": 1.538759469985962,
2178
- "eval_masked_accuracy": 0.6228862973760932,
2179
- "eval_runtime": 5.9881,
2180
- "eval_samples_per_second": 684.026,
2181
- "eval_steps_per_second": 2.672,
2182
  "step": 30000
2183
  }
2184
  ],
@@ -2199,7 +2199,7 @@
2199
  "attributes": {}
2200
  }
2201
  },
2202
- "total_flos": 5.639177852861803e+16,
2203
  "train_batch_size": 256,
2204
  "trial_name": null,
2205
  "trial_params": null
 
1
  {
2
+ "best_global_step": 30000,
3
+ "best_metric": 0.37694016098976135,
4
+ "best_model_checkpoint": "runs/chembl36_small_mask_mlm_lr_sweep/mask_standard__mlm_0p15__lr_4e-4/checkpoint-30000",
5
  "epoch": 3.066,
6
  "eval_steps": 5000,
7
  "global_step": 30000,
 
11
  "log_history": [
12
  {
13
  "epoch": 0.0033333333333333335,
14
+ "grad_norm": 2.7403433322906494,
15
+ "learning_rate": 2.64e-05,
16
+ "loss": 5.425458984375,
17
  "step": 100
18
  },
19
  {
20
  "epoch": 0.006666666666666667,
21
+ "grad_norm": 4.65195894241333,
22
+ "learning_rate": 5.3066666666666665e-05,
23
+ "loss": 3.9814361572265624,
24
  "step": 200
25
  },
26
  {
27
  "epoch": 0.01,
28
+ "grad_norm": 2.9648351669311523,
29
+ "learning_rate": 7.973333333333334e-05,
30
+ "loss": 2.9717633056640627,
31
  "step": 300
32
  },
33
  {
34
  "epoch": 0.013333333333333334,
35
+ "grad_norm": 2.79247784614563,
36
+ "learning_rate": 0.00010640000000000001,
37
+ "loss": 2.318418426513672,
38
  "step": 400
39
  },
40
  {
41
  "epoch": 0.016666666666666666,
42
+ "grad_norm": 2.95702862739563,
43
+ "learning_rate": 0.00013306666666666668,
44
+ "loss": 2.012203826904297,
45
  "step": 500
46
  },
47
  {
48
  "epoch": 0.02,
49
+ "grad_norm": 2.464130401611328,
50
+ "learning_rate": 0.00015973333333333333,
51
+ "loss": 1.8253421020507812,
52
  "step": 600
53
  },
54
  {
55
  "epoch": 0.023333333333333334,
56
+ "grad_norm": 2.5683345794677734,
57
+ "learning_rate": 0.00018640000000000003,
58
+ "loss": 1.7040005493164063,
59
  "step": 700
60
  },
61
  {
62
  "epoch": 0.02666666666666667,
63
+ "grad_norm": 2.7064743041992188,
64
+ "learning_rate": 0.00021306666666666665,
65
+ "loss": 1.5912832641601562,
66
  "step": 800
67
  },
68
  {
69
  "epoch": 0.03,
70
+ "grad_norm": 1.7914412021636963,
71
+ "learning_rate": 0.00023973333333333338,
72
+ "loss": 1.532608184814453,
73
  "step": 900
74
  },
75
  {
76
  "epoch": 0.03333333333333333,
77
+ "grad_norm": 2.02378511428833,
78
+ "learning_rate": 0.0002664,
79
+ "loss": 1.4479930114746093,
80
  "step": 1000
81
  },
82
  {
83
  "epoch": 0.03666666666666667,
84
+ "grad_norm": 1.8761825561523438,
85
+ "learning_rate": 0.00029306666666666667,
86
+ "loss": 1.4139170837402344,
87
  "step": 1100
88
  },
89
  {
90
  "epoch": 0.04,
91
+ "grad_norm": 1.751976490020752,
92
+ "learning_rate": 0.00031973333333333337,
93
+ "loss": 1.3751948547363282,
94
  "step": 1200
95
  },
96
  {
97
  "epoch": 0.043333333333333335,
98
+ "grad_norm": 1.8251773118972778,
99
+ "learning_rate": 0.0003464,
100
+ "loss": 1.3400251770019531,
101
  "step": 1300
102
  },
103
  {
104
  "epoch": 0.04666666666666667,
105
+ "grad_norm": 1.5843342542648315,
106
+ "learning_rate": 0.00037306666666666666,
107
+ "loss": 1.327974853515625,
108
  "step": 1400
109
  },
110
  {
111
  "epoch": 0.05,
112
+ "grad_norm": 1.5720994472503662,
113
+ "learning_rate": 0.00039973333333333336,
114
+ "loss": 1.2728753662109376,
115
  "step": 1500
116
  },
117
  {
118
  "epoch": 0.05333333333333334,
119
+ "grad_norm": 1.2932488918304443,
120
+ "learning_rate": 0.0003999880909778094,
121
+ "loss": 1.259843521118164,
122
  "step": 1600
123
  },
124
  {
125
  "epoch": 0.056666666666666664,
126
+ "grad_norm": 1.4394837617874146,
127
+ "learning_rate": 0.00039995188297549443,
128
+ "loss": 1.2250770568847655,
129
  "step": 1700
130
  },
131
  {
132
  "epoch": 0.06,
133
+ "grad_norm": 1.3632104396820068,
134
+ "learning_rate": 0.0003998913791775301,
135
+ "loss": 1.1869202423095704,
136
  "step": 1800
137
  },
138
  {
139
  "epoch": 0.06333333333333334,
140
+ "grad_norm": 1.4223003387451172,
141
+ "learning_rate": 0.000399806586935625,
142
+ "loss": 1.1602543640136718,
143
  "step": 1900
144
  },
145
  {
146
  "epoch": 0.06666666666666667,
147
+ "grad_norm": 1.3835265636444092,
148
+ "learning_rate": 0.00039969751655273246,
149
+ "loss": 1.1331352233886718,
150
  "step": 2000
151
  },
152
  {
153
  "epoch": 0.07,
154
+ "grad_norm": 1.4172451496124268,
155
+ "learning_rate": 0.0003995641812817998,
156
+ "loss": 1.1115520477294922,
157
  "step": 2100
158
  },
159
  {
160
  "epoch": 0.07333333333333333,
161
+ "grad_norm": 1.2611116170883179,
162
+ "learning_rate": 0.00039940659732415714,
163
+ "loss": 1.0953889465332032,
164
  "step": 2200
165
  },
166
  {
167
  "epoch": 0.07666666666666666,
168
+ "grad_norm": 1.4010944366455078,
169
+ "learning_rate": 0.00039922478382754947,
170
+ "loss": 1.0633756256103515,
171
  "step": 2300
172
  },
173
  {
174
  "epoch": 0.08,
175
+ "grad_norm": 1.277366280555725,
176
+ "learning_rate": 0.00039901876288380946,
177
+ "loss": 1.0482559967041016,
178
  "step": 2400
179
  },
180
  {
181
  "epoch": 0.08333333333333333,
182
+ "grad_norm": 1.1845537424087524,
183
+ "learning_rate": 0.00039878855952617357,
184
+ "loss": 1.0299220275878906,
185
  "step": 2500
186
  },
187
  {
188
  "epoch": 0.08666666666666667,
189
+ "grad_norm": 1.1772642135620117,
190
+ "learning_rate": 0.00039853420172623985,
191
+ "loss": 1.0119639587402345,
192
  "step": 2600
193
  },
194
  {
195
  "epoch": 0.09,
196
+ "grad_norm": 1.241080641746521,
197
+ "learning_rate": 0.00039825572039056976,
198
+ "loss": 0.9945954895019531,
199
  "step": 2700
200
  },
201
  {
202
  "epoch": 0.09333333333333334,
203
+ "grad_norm": 1.1556016206741333,
204
+ "learning_rate": 0.0003979531493569322,
205
+ "loss": 0.9795339965820312,
206
  "step": 2800
207
  },
208
  {
209
  "epoch": 0.09666666666666666,
210
+ "grad_norm": 1.1028602123260498,
211
+ "learning_rate": 0.0003976265253901924,
212
+ "loss": 0.9684971618652344,
213
  "step": 2900
214
  },
215
  {
216
  "epoch": 0.1,
217
+ "grad_norm": 1.3073146343231201,
218
+ "learning_rate": 0.00039727588817784414,
219
+ "loss": 0.9519919586181641,
220
  "step": 3000
221
  },
222
  {
223
  "epoch": 0.10333333333333333,
224
+ "grad_norm": 1.224905252456665,
225
+ "learning_rate": 0.000396901280325188,
226
+ "loss": 0.9399765777587891,
227
  "step": 3100
228
  },
229
  {
230
  "epoch": 0.10666666666666667,
231
+ "grad_norm": 1.0792871713638306,
232
+ "learning_rate": 0.0003965027473501541,
233
+ "loss": 0.9271878814697265,
234
  "step": 3200
235
  },
236
  {
237
  "epoch": 0.11,
238
+ "grad_norm": 1.077876329421997,
239
+ "learning_rate": 0.0003960803376777714,
240
+ "loss": 0.9128645324707031,
241
  "step": 3300
242
  },
243
  {
244
  "epoch": 0.11333333333333333,
245
+ "grad_norm": 1.1184345483779907,
246
+ "learning_rate": 0.0003956341026342837,
247
+ "loss": 0.9120386505126953,
248
  "step": 3400
249
  },
250
  {
251
  "epoch": 0.11666666666666667,
252
+ "grad_norm": 1.1383893489837646,
253
+ "learning_rate": 0.0003951640964409127,
254
+ "loss": 0.9151699829101563,
255
  "step": 3500
256
  },
257
  {
258
  "epoch": 0.12,
259
+ "grad_norm": 1.12523353099823,
260
+ "learning_rate": 0.0003946703762072706,
261
+ "loss": 0.8922748565673828,
262
  "step": 3600
263
  },
264
  {
265
  "epoch": 0.12333333333333334,
266
+ "grad_norm": 1.0355699062347412,
267
+ "learning_rate": 0.0003941530019244196,
268
+ "loss": 0.8890122222900391,
269
  "step": 3700
270
  },
271
  {
272
  "epoch": 0.12666666666666668,
273
+ "grad_norm": 1.0852240324020386,
274
+ "learning_rate": 0.00039361203645758364,
275
+ "loss": 0.8781277465820313,
276
  "step": 3800
277
  },
278
  {
279
  "epoch": 0.13,
280
+ "grad_norm": 1.0739648342132568,
281
+ "learning_rate": 0.00039304754553850873,
282
+ "loss": 0.8778704833984375,
283
  "step": 3900
284
  },
285
  {
286
  "epoch": 0.13333333333333333,
287
+ "grad_norm": 1.0522024631500244,
288
+ "learning_rate": 0.0003924595977574769,
289
+ "loss": 0.8774790954589844,
290
  "step": 4000
291
  },
292
  {
293
  "epoch": 0.13666666666666666,
294
+ "grad_norm": 1.0717562437057495,
295
+ "learning_rate": 0.00039184826455497133,
296
+ "loss": 0.8516897583007812,
297
  "step": 4100
298
  },
299
  {
300
  "epoch": 0.14,
301
+ "grad_norm": 1.0378234386444092,
302
+ "learning_rate": 0.00039121362021299604,
303
+ "loss": 0.8448622894287109,
304
  "step": 4200
305
  },
306
  {
307
  "epoch": 0.14333333333333334,
308
+ "grad_norm": 1.0532786846160889,
309
+ "learning_rate": 0.00039055574184604976,
310
+ "loss": 0.8344584655761719,
311
  "step": 4300
312
  },
313
  {
314
  "epoch": 0.14666666666666667,
315
+ "grad_norm": 1.021437644958496,
316
+ "learning_rate": 0.0003898747093917561,
317
+ "loss": 0.8287362670898437,
318
  "step": 4400
319
  },
320
  {
321
  "epoch": 0.15,
322
+ "grad_norm": 0.9874396920204163,
323
+ "learning_rate": 0.0003891706056011505,
324
+ "loss": 0.8258264923095703,
325
  "step": 4500
326
  },
327
  {
328
  "epoch": 0.15333333333333332,
329
+ "grad_norm": 0.9322711825370789,
330
+ "learning_rate": 0.0003884435160286251,
331
+ "loss": 0.816080322265625,
332
  "step": 4600
333
  },
334
  {
335
  "epoch": 0.15666666666666668,
336
+ "grad_norm": 0.9402130842208862,
337
+ "learning_rate": 0.00038769352902153333,
338
+ "loss": 0.8135909271240235,
339
  "step": 4700
340
  },
341
  {
342
  "epoch": 0.16,
343
+ "grad_norm": 1.0193718671798706,
344
+ "learning_rate": 0.00038692073570945496,
345
+ "loss": 0.817694091796875,
346
  "step": 4800
347
  },
348
  {
349
  "epoch": 0.16333333333333333,
350
+ "grad_norm": 0.9926565289497375,
351
+ "learning_rate": 0.000386125229993123,
352
+ "loss": 0.7987307739257813,
353
  "step": 4900
354
  },
355
  {
356
  "epoch": 0.16666666666666666,
357
+ "grad_norm": 0.9364326596260071,
358
+ "learning_rate": 0.0003853071085330141,
359
+ "loss": 0.8007232666015625,
360
  "step": 5000
361
  },
362
  {
363
  "epoch": 0.16666666666666666,
364
+ "eval_loss": 0.7967580556869507,
365
+ "eval_masked_accuracy": 0.7653559496273451,
366
+ "eval_runtime": 2.5634,
367
+ "eval_samples_per_second": 1597.853,
368
+ "eval_steps_per_second": 6.242,
369
  "step": 5000
370
  },
371
  {
372
  "epoch": 0.17,
373
+ "grad_norm": 0.9981640577316284,
374
+ "learning_rate": 0.0003844664707376037,
375
+ "loss": 0.7831909942626953,
376
  "step": 5100
377
  },
378
  {
379
  "epoch": 0.17333333333333334,
380
+ "grad_norm": 0.935793936252594,
381
+ "learning_rate": 0.00038360341875128646,
382
+ "loss": 0.7719477081298828,
383
  "step": 5200
384
  },
385
  {
386
  "epoch": 0.17666666666666667,
387
+ "grad_norm": 0.9942166805267334,
388
+ "learning_rate": 0.0003827180574419656,
389
+ "loss": 0.7788728332519531,
390
  "step": 5300
391
  },
392
  {
393
  "epoch": 0.18,
394
+ "grad_norm": 0.921302318572998,
395
+ "learning_rate": 0.00038181049438831024,
396
+ "loss": 0.7685958099365234,
397
  "step": 5400
398
  },
399
  {
400
  "epoch": 0.18333333333333332,
401
+ "grad_norm": 0.8787013292312622,
402
+ "learning_rate": 0.0003808808398666837,
403
+ "loss": 0.7563288116455078,
404
  "step": 5500
405
  },
406
  {
407
  "epoch": 0.18666666666666668,
408
+ "grad_norm": 0.8968636989593506,
409
+ "learning_rate": 0.00037992920683774386,
410
+ "loss": 0.7474672698974609,
411
  "step": 5600
412
  },
413
  {
414
  "epoch": 0.19,
415
+ "grad_norm": 0.9104163646697998,
416
+ "learning_rate": 0.00037895571093271807,
417
+ "loss": 0.7457213592529297,
418
  "step": 5700
419
  },
420
  {
421
  "epoch": 0.19333333333333333,
422
+ "grad_norm": 0.8929153680801392,
423
+ "learning_rate": 0.00037796047043935234,
424
+ "loss": 0.7423068237304687,
425
  "step": 5800
426
  },
427
  {
428
  "epoch": 0.19666666666666666,
429
+ "grad_norm": 0.9810736775398254,
430
+ "learning_rate": 0.00037694360628753897,
431
+ "loss": 0.7346783447265625,
432
  "step": 5900
433
  },
434
  {
435
  "epoch": 0.2,
436
+ "grad_norm": 0.931078314781189,
437
+ "learning_rate": 0.00037590524203462216,
438
+ "loss": 0.7334535217285156,
439
  "step": 6000
440
  },
441
  {
442
  "epoch": 0.20333333333333334,
443
+ "grad_norm": 1.019803524017334,
444
+ "learning_rate": 0.0003748455038503849,
445
+ "loss": 0.7276763916015625,
446
  "step": 6100
447
  },
448
  {
449
  "epoch": 0.20666666666666667,
450
+ "grad_norm": 0.9782306551933289,
451
+ "learning_rate": 0.0003737645205017185,
452
+ "loss": 0.7344593048095703,
453
  "step": 6200
454
  },
455
  {
456
  "epoch": 0.21,
457
+ "grad_norm": 0.9293437004089355,
458
+ "learning_rate": 0.0003726624233369761,
459
+ "loss": 0.7246415710449219,
460
  "step": 6300
461
  },
462
  {
463
  "epoch": 0.21333333333333335,
464
+ "grad_norm": 0.8795522451400757,
465
+ "learning_rate": 0.0003715393462700129,
466
+ "loss": 0.7216864776611328,
467
  "step": 6400
468
  },
469
  {
470
  "epoch": 0.21666666666666667,
471
+ "grad_norm": 0.9632502198219299,
472
+ "learning_rate": 0.00037039542576391445,
473
+ "loss": 0.7085445404052735,
474
  "step": 6500
475
  },
476
  {
477
  "epoch": 0.22,
478
+ "grad_norm": 0.8495221138000488,
479
+ "learning_rate": 0.0003692308008144153,
480
+ "loss": 0.7115458679199219,
481
  "step": 6600
482
  },
483
  {
484
  "epoch": 0.22333333333333333,
485
+ "grad_norm": 0.8541926741600037,
486
+ "learning_rate": 0.0003680456129330099,
487
+ "loss": 0.6990865325927734,
488
  "step": 6700
489
  },
490
  {
491
  "epoch": 0.22666666666666666,
492
+ "grad_norm": 0.8344811201095581,
493
+ "learning_rate": 0.0003668400061297579,
494
+ "loss": 0.6993592071533203,
495
  "step": 6800
496
  },
497
  {
498
  "epoch": 0.23,
499
+ "grad_norm": 0.8975337147712708,
500
+ "learning_rate": 0.00036561412689578544,
501
+ "loss": 0.6972901153564454,
502
  "step": 6900
503
  },
504
  {
505
  "epoch": 0.23333333333333334,
506
+ "grad_norm": 0.8364660143852234,
507
+ "learning_rate": 0.00036436812418548547,
508
+ "loss": 0.6967823791503907,
509
  "step": 7000
510
  },
511
  {
512
  "epoch": 0.23666666666666666,
513
+ "grad_norm": 0.8676795363426208,
514
+ "learning_rate": 0.00036310214939841873,
515
+ "loss": 0.6893701934814453,
516
  "step": 7100
517
  },
518
  {
519
  "epoch": 0.24,
520
+ "grad_norm": 0.8879637718200684,
521
+ "learning_rate": 0.0003618163563609171,
522
+ "loss": 0.6855775451660157,
523
  "step": 7200
524
  },
525
  {
526
  "epoch": 0.24333333333333335,
527
+ "grad_norm": 0.9070082306861877,
528
+ "learning_rate": 0.00036051090130739274,
529
+ "loss": 0.6840663146972656,
530
  "step": 7300
531
  },
532
  {
533
  "epoch": 0.24666666666666667,
534
+ "grad_norm": 0.8394324779510498,
535
+ "learning_rate": 0.0003591859428613541,
536
+ "loss": 0.6798997497558594,
537
  "step": 7400
538
  },
539
  {
540
  "epoch": 0.25,
541
+ "grad_norm": 0.8838658332824707,
542
+ "learning_rate": 0.000357841642016132,
543
+ "loss": 0.6784028625488281,
544
  "step": 7500
545
  },
546
  {
547
  "epoch": 0.25333333333333335,
548
+ "grad_norm": 0.8179841041564941,
549
+ "learning_rate": 0.0003564781621153176,
550
+ "loss": 0.6701314544677734,
551
  "step": 7600
552
  },
553
  {
554
  "epoch": 0.25666666666666665,
555
+ "grad_norm": 0.8342909812927246,
556
+ "learning_rate": 0.000355095668832915,
557
+ "loss": 0.6615406799316407,
558
  "step": 7700
559
  },
560
  {
561
  "epoch": 0.26,
562
+ "grad_norm": 0.8877819180488586,
563
+ "learning_rate": 0.00035369433015320983,
564
+ "loss": 0.6670161437988281,
565
  "step": 7800
566
  },
567
  {
568
  "epoch": 0.2633333333333333,
569
+ "grad_norm": 0.9063718914985657,
570
+ "learning_rate": 0.0003522743163503587,
571
+ "loss": 0.6525628662109375,
572
  "step": 7900
573
  },
574
  {
575
  "epoch": 0.26666666666666666,
576
+ "grad_norm": 0.8738296627998352,
577
+ "learning_rate": 0.00035083579996769866,
578
+ "loss": 0.6613227081298828,
579
  "step": 8000
580
  },
581
  {
582
  "epoch": 0.27,
583
+ "grad_norm": 0.9108850359916687,
584
+ "learning_rate": 0.00034937895579678256,
585
+ "loss": 0.6542455291748047,
586
  "step": 8100
587
  },
588
  {
589
  "epoch": 0.2733333333333333,
590
+ "grad_norm": 0.7989206314086914,
591
+ "learning_rate": 0.00034790396085613955,
592
+ "loss": 0.6540352630615235,
593
  "step": 8200
594
  },
595
  {
596
  "epoch": 0.27666666666666667,
597
+ "grad_norm": 0.8691635727882385,
598
+ "learning_rate": 0.0003464109943697667,
599
+ "loss": 0.6410691070556641,
600
  "step": 8300
601
  },
602
  {
603
  "epoch": 0.28,
604
+ "grad_norm": 0.8667342066764832,
605
+ "learning_rate": 0.0003449002377453512,
606
+ "loss": 0.6395606994628906,
607
  "step": 8400
608
  },
609
  {
610
  "epoch": 0.2833333333333333,
611
+ "grad_norm": 0.7986162900924683,
612
+ "learning_rate": 0.00034337187455222835,
613
+ "loss": 0.6376551055908203,
614
  "step": 8500
615
  },
616
  {
617
  "epoch": 0.2866666666666667,
618
+ "grad_norm": 0.9031108617782593,
619
+ "learning_rate": 0.0003418260904990759,
620
+ "loss": 0.6303312683105469,
621
  "step": 8600
622
  },
623
  {
624
  "epoch": 0.29,
625
+ "grad_norm": 0.8435996174812317,
626
+ "learning_rate": 0.0003402630734113492,
627
+ "loss": 0.6225329971313477,
628
  "step": 8700
629
  },
630
  {
631
  "epoch": 0.29333333333333333,
632
+ "grad_norm": 0.9413688778877258,
633
+ "learning_rate": 0.00033868301320845895,
634
+ "loss": 0.6248882293701172,
635
  "step": 8800
636
  },
637
  {
638
  "epoch": 0.2966666666666667,
639
+ "grad_norm": 0.7998372316360474,
640
+ "learning_rate": 0.000337086101880694,
641
+ "loss": 0.6171749496459961,
642
  "step": 8900
643
  },
644
  {
645
  "epoch": 0.3,
646
+ "grad_norm": 0.8585835099220276,
647
+ "learning_rate": 0.00033547253346589355,
648
+ "loss": 0.6206340789794922,
649
  "step": 9000
650
  },
651
  {
652
  "epoch": 0.30333333333333334,
653
+ "grad_norm": 0.8483954071998596,
654
+ "learning_rate": 0.00033384250402586954,
655
+ "loss": 0.6195469665527343,
656
  "step": 9100
657
  },
658
  {
659
  "epoch": 0.30666666666666664,
660
+ "grad_norm": 0.9016720056533813,
661
+ "learning_rate": 0.00033219621162258343,
662
+ "loss": 0.6200881958007812,
663
  "step": 9200
664
  },
665
  {
666
  "epoch": 0.31,
667
+ "grad_norm": 0.829871416091919,
668
+ "learning_rate": 0.0003305338562940807,
669
+ "loss": 0.6127318954467773,
670
  "step": 9300
671
  },
672
  {
673
  "epoch": 1.002,
674
+ "grad_norm": 0.9081104397773743,
675
+ "learning_rate": 0.0003288556400301836,
676
+ "loss": 0.603317756652832,
677
  "step": 9400
678
  },
679
  {
680
  "epoch": 1.0053333333333334,
681
+ "grad_norm": 0.8421012759208679,
682
+ "learning_rate": 0.00032716176674794884,
683
+ "loss": 0.5797752380371094,
684
  "step": 9500
685
  },
686
  {
687
  "epoch": 1.0086666666666666,
688
+ "grad_norm": 0.8119559288024902,
689
+ "learning_rate": 0.0003254524422668889,
690
+ "loss": 0.5843183898925781,
691
  "step": 9600
692
  },
693
  {
694
  "epoch": 1.012,
695
+ "grad_norm": 0.8360543847084045,
696
+ "learning_rate": 0.00032372787428396423,
697
+ "loss": 0.5793385696411133,
698
  "step": 9700
699
  },
700
  {
701
  "epoch": 1.0153333333333334,
702
+ "grad_norm": 0.780649721622467,
703
+ "learning_rate": 0.0003219882723483456,
704
+ "loss": 0.5682408142089844,
705
  "step": 9800
706
  },
707
  {
708
  "epoch": 1.0186666666666666,
709
+ "grad_norm": 0.7468474507331848,
710
+ "learning_rate": 0.00032023384783595255,
711
+ "loss": 0.5659066772460938,
712
  "step": 9900
713
  },
714
  {
715
  "epoch": 1.022,
716
+ "grad_norm": 0.8460882902145386,
717
+ "learning_rate": 0.00031846481392376966,
718
+ "loss": 0.5553397369384766,
719
  "step": 10000
720
  },
721
  {
722
  "epoch": 1.022,
723
+ "eval_loss": 0.5976771116256714,
724
+ "eval_masked_accuracy": 0.8167562724014337,
725
+ "eval_runtime": 2.8203,
726
+ "eval_samples_per_second": 1452.351,
727
+ "eval_steps_per_second": 5.673,
728
  "step": 10000
729
  },
730
  {
731
  "epoch": 1.0253333333333334,
732
+ "grad_norm": 0.7821327447891235,
733
+ "learning_rate": 0.00031668138556394316,
734
+ "loss": 0.5550868606567383,
735
  "step": 10100
736
  },
737
  {
738
  "epoch": 1.0286666666666666,
739
+ "grad_norm": 1.0433557033538818,
740
+ "learning_rate": 0.00031488377945766314,
741
+ "loss": 0.5548404312133789,
742
  "step": 10200
743
  },
744
  {
745
  "epoch": 1.032,
746
+ "grad_norm": 0.8580315113067627,
747
+ "learning_rate": 0.00031307221402883227,
748
+ "loss": 0.5406364440917969,
749
  "step": 10300
750
  },
751
  {
752
  "epoch": 1.0353333333333334,
753
+ "grad_norm": 0.8950467705726624,
754
+ "learning_rate": 0.00031124690939752543,
755
+ "loss": 0.533514404296875,
756
  "step": 10400
757
  },
758
  {
759
  "epoch": 1.0386666666666666,
760
+ "grad_norm": 0.7847508192062378,
761
+ "learning_rate": 0.0003094080873532434,
762
+ "loss": 0.538754539489746,
763
  "step": 10500
764
  },
765
  {
766
  "epoch": 1.042,
767
+ "grad_norm": 0.868969738483429,
768
+ "learning_rate": 0.00030755597132796385,
769
+ "loss": 0.5428607177734375,
770
  "step": 10600
771
  },
772
  {
773
  "epoch": 1.0453333333333332,
774
+ "grad_norm": 0.7972626090049744,
775
+ "learning_rate": 0.0003056907863689921,
776
+ "loss": 0.5347858810424805,
777
  "step": 10700
778
  },
779
  {
780
  "epoch": 1.0486666666666666,
781
+ "grad_norm": 0.763969361782074,
782
+ "learning_rate": 0.0003038127591116163,
783
+ "loss": 0.532847785949707,
784
  "step": 10800
785
  },
786
  {
787
  "epoch": 1.052,
788
+ "grad_norm": 0.7701809406280518,
789
+ "learning_rate": 0.0003019221177515692,
790
+ "loss": 0.5308395767211914,
791
  "step": 10900
792
  },
793
  {
794
  "epoch": 1.0553333333333332,
795
+ "grad_norm": 0.8959071636199951,
796
+ "learning_rate": 0.0003000190920173008,
797
+ "loss": 0.5308527374267578,
798
  "step": 11000
799
  },
800
  {
801
  "epoch": 1.0586666666666666,
802
+ "grad_norm": 1.0272624492645264,
803
+ "learning_rate": 0.00029810391314206416,
804
+ "loss": 0.5359263992309571,
805
  "step": 11100
806
  },
807
  {
808
  "epoch": 1.062,
809
+ "grad_norm": 0.8793138861656189,
810
+ "learning_rate": 0.00029617681383581866,
811
+ "loss": 0.5368635559082031,
812
  "step": 11200
813
  },
814
  {
815
  "epoch": 1.0653333333333332,
816
+ "grad_norm": 0.9605848789215088,
817
+ "learning_rate": 0.0002942380282569541,
818
+ "loss": 0.5313293838500976,
819
  "step": 11300
820
  },
821
  {
822
  "epoch": 1.0686666666666667,
823
+ "grad_norm": 0.8334460258483887,
824
+ "learning_rate": 0.00029228779198383834,
825
+ "loss": 0.5360410690307618,
826
  "step": 11400
827
  },
828
  {
829
  "epoch": 1.072,
830
+ "grad_norm": 0.8171955347061157,
831
+ "learning_rate": 0.0002903263419861924,
832
+ "loss": 0.5353861999511719,
833
  "step": 11500
834
  },
835
  {
836
  "epoch": 1.0753333333333333,
837
+ "grad_norm": 0.8680943250656128,
838
+ "learning_rate": 0.0002883539165962972,
839
+ "loss": 0.5278213119506836,
840
  "step": 11600
841
  },
842
  {
843
  "epoch": 1.0786666666666667,
844
+ "grad_norm": 0.9106718897819519,
845
+ "learning_rate": 0.0002863707554800338,
846
+ "loss": 0.5310506439208984,
847
  "step": 11700
848
  },
849
  {
850
  "epoch": 1.082,
851
+ "grad_norm": 0.9140894412994385,
852
+ "learning_rate": 0.00028437709960776224,
853
+ "loss": 0.5164321899414063,
854
  "step": 11800
855
  },
856
  {
857
  "epoch": 1.0853333333333333,
858
+ "grad_norm": 0.790691077709198,
859
+ "learning_rate": 0.0002823731912250414,
860
+ "loss": 0.5228651428222656,
861
  "step": 11900
862
  },
863
  {
864
  "epoch": 1.0886666666666667,
865
+ "grad_norm": 0.757777988910675,
866
+ "learning_rate": 0.0002803592738231946,
867
+ "loss": 0.5215324401855469,
868
  "step": 12000
869
  },
870
  {
871
  "epoch": 1.092,
872
+ "grad_norm": 0.8369808793067932,
873
+ "learning_rate": 0.00027833559210972307,
874
+ "loss": 0.5239771270751953,
875
  "step": 12100
876
  },
877
  {
878
  "epoch": 1.0953333333333333,
879
+ "grad_norm": 0.8947746157646179,
880
+ "learning_rate": 0.000276302391978572,
881
+ "loss": 0.5179909896850586,
882
  "step": 12200
883
  },
884
  {
885
  "epoch": 1.0986666666666667,
886
+ "grad_norm": 0.9140170812606812,
887
+ "learning_rate": 0.00027425992048025273,
888
+ "loss": 0.5237076568603516,
889
  "step": 12300
890
  },
891
  {
892
  "epoch": 1.102,
893
+ "grad_norm": 0.8575257062911987,
894
+ "learning_rate": 0.00027220842579182353,
895
+ "loss": 0.5152669525146485,
896
  "step": 12400
897
  },
898
  {
899
  "epoch": 1.1053333333333333,
900
+ "grad_norm": 0.7598596215248108,
901
+ "learning_rate": 0.0002701481571867345,
902
+ "loss": 0.5134631729125977,
903
  "step": 12500
904
  },
905
  {
906
  "epoch": 1.1086666666666667,
907
+ "grad_norm": 0.8437865972518921,
908
+ "learning_rate": 0.0002680793650045388,
909
+ "loss": 0.5225432586669921,
910
  "step": 12600
911
  },
912
  {
913
  "epoch": 1.112,
914
+ "grad_norm": 0.7969825863838196,
915
+ "learning_rate": 0.00026600230062047393,
916
+ "loss": 0.5257926177978516,
917
  "step": 12700
918
  },
919
  {
920
  "epoch": 1.1153333333333333,
921
+ "grad_norm": 0.8563022613525391,
922
+ "learning_rate": 0.00026391721641491817,
923
+ "loss": 0.5251951217651367,
924
  "step": 12800
925
  },
926
  {
927
  "epoch": 1.1186666666666667,
928
+ "grad_norm": 0.708271861076355,
929
+ "learning_rate": 0.0002618243657427236,
930
+ "loss": 0.5297073745727539,
931
  "step": 12900
932
  },
933
  {
934
  "epoch": 1.1219999999999999,
935
+ "grad_norm": 0.7699816823005676,
936
+ "learning_rate": 0.00025972400290243195,
937
+ "loss": 0.5333083724975586,
938
  "step": 13000
939
  },
940
  {
941
  "epoch": 1.1253333333333333,
942
+ "grad_norm": 0.8275418877601624,
943
+ "learning_rate": 0.0002576163831053752,
944
+ "loss": 0.5334249114990235,
945
  "step": 13100
946
  },
947
  {
948
  "epoch": 1.1286666666666667,
949
+ "grad_norm": 0.83842533826828,
950
+ "learning_rate": 0.00025550176244466485,
951
+ "loss": 0.5315378189086915,
952
  "step": 13200
953
  },
954
  {
955
  "epoch": 1.1320000000000001,
956
+ "grad_norm": 0.8859015703201294,
957
+ "learning_rate": 0.00025338039786407517,
958
+ "loss": 0.5462711715698242,
959
  "step": 13300
960
  },
961
  {
962
  "epoch": 1.1353333333333333,
963
+ "grad_norm": 0.7318875193595886,
964
+ "learning_rate": 0.0002512525471268217,
965
+ "loss": 0.5278379440307617,
966
  "step": 13400
967
  },
968
  {
969
  "epoch": 1.1386666666666667,
970
+ "grad_norm": 0.7980539798736572,
971
+ "learning_rate": 0.00024911846878424156,
972
+ "loss": 0.5409846115112305,
973
  "step": 13500
974
  },
975
  {
976
  "epoch": 1.142,
977
+ "grad_norm": 0.8805834650993347,
978
+ "learning_rate": 0.00024697842214437704,
979
+ "loss": 0.538138427734375,
980
  "step": 13600
981
  },
982
  {
983
  "epoch": 1.1453333333333333,
984
+ "grad_norm": 0.8037357330322266,
985
+ "learning_rate": 0.00024483266724046736,
986
+ "loss": 0.528113784790039,
987
  "step": 13700
988
  },
989
  {
990
  "epoch": 1.1486666666666667,
991
+ "grad_norm": 0.8429805636405945,
992
+ "learning_rate": 0.00024268146479935286,
993
+ "loss": 0.5357782363891601,
994
  "step": 13800
995
  },
996
  {
997
  "epoch": 1.152,
998
+ "grad_norm": 0.876872181892395,
999
+ "learning_rate": 0.0002405250762097943,
1000
+ "loss": 0.5338603591918946,
1001
  "step": 13900
1002
  },
1003
  {
1004
  "epoch": 1.1553333333333333,
1005
+ "grad_norm": 0.798278272151947,
1006
+ "learning_rate": 0.00023836376349071215,
1007
+ "loss": 0.5351076889038086,
1008
  "step": 14000
1009
  },
1010
  {
1011
  "epoch": 1.1586666666666667,
1012
+ "grad_norm": 0.8131340742111206,
1013
+ "learning_rate": 0.00023619778925934893,
1014
+ "loss": 0.5315785598754883,
1015
  "step": 14100
1016
  },
1017
  {
1018
  "epoch": 1.162,
1019
+ "grad_norm": 0.8453519940376282,
1020
+ "learning_rate": 0.00023402741669935933,
1021
+ "loss": 0.5312258911132812,
1022
  "step": 14200
1023
  },
1024
  {
1025
  "epoch": 1.1653333333333333,
1026
+ "grad_norm": 0.7479920387268066,
1027
+ "learning_rate": 0.00023185290952883097,
1028
+ "loss": 0.5305691909790039,
1029
  "step": 14300
1030
  },
1031
  {
1032
  "epoch": 1.1686666666666667,
1033
+ "grad_norm": 0.7968600392341614,
1034
+ "learning_rate": 0.00022967453196824056,
1035
+ "loss": 0.5351016998291016,
1036
  "step": 14400
1037
  },
1038
  {
1039
  "epoch": 1.172,
1040
+ "grad_norm": 0.7319141030311584,
1041
+ "learning_rate": 0.0002274925487083491,
1042
+ "loss": 0.523140754699707,
1043
  "step": 14500
1044
  },
1045
  {
1046
  "epoch": 1.1753333333333333,
1047
+ "grad_norm": 0.7255148887634277,
1048
+ "learning_rate": 0.00022530722487803967,
1049
+ "loss": 0.5274886322021485,
1050
  "step": 14600
1051
  },
1052
  {
1053
  "epoch": 1.1786666666666668,
1054
+ "grad_norm": 0.8094624876976013,
1055
+ "learning_rate": 0.000223118826012102,
1056
+ "loss": 0.5305857467651367,
1057
  "step": 14700
1058
  },
1059
  {
1060
  "epoch": 1.182,
1061
+ "grad_norm": 0.7611061930656433,
1062
+ "learning_rate": 0.0002209276180189679,
1063
+ "loss": 0.5199204635620117,
1064
  "step": 14800
1065
  },
1066
  {
1067
  "epoch": 1.1853333333333333,
1068
+ "grad_norm": 0.7731903195381165,
1069
+ "learning_rate": 0.00021873386714840122,
1070
+ "loss": 0.5233501434326172,
1071
  "step": 14900
1072
  },
1073
  {
1074
  "epoch": 1.1886666666666668,
1075
+ "grad_norm": 0.802269697189331,
1076
+ "learning_rate": 0.0002165378399591463,
1077
+ "loss": 0.5173654556274414,
1078
  "step": 15000
1079
  },
1080
  {
1081
  "epoch": 1.1886666666666668,
1082
+ "eval_loss": 0.4867754876613617,
1083
+ "eval_masked_accuracy": 0.8465927303032246,
1084
+ "eval_runtime": 2.9083,
1085
+ "eval_samples_per_second": 1408.378,
1086
+ "eval_steps_per_second": 5.501,
1087
  "step": 15000
1088
  },
1089
  {
1090
  "epoch": 1.192,
1091
+ "grad_norm": 0.8154687285423279,
1092
+ "learning_rate": 0.00021433980328653903,
1093
+ "loss": 0.5211496353149414,
1094
  "step": 15100
1095
  },
1096
  {
1097
  "epoch": 1.1953333333333334,
1098
+ "grad_norm": 0.870178759098053,
1099
+ "learning_rate": 0.00021214002421008382,
1100
+ "loss": 0.5156788253784179,
1101
  "step": 15200
1102
  },
1103
  {
1104
  "epoch": 1.1986666666666665,
1105
+ "grad_norm": 0.7339473962783813,
1106
+ "learning_rate": 0.0002099387700210015,
1107
+ "loss": 0.5113505935668945,
1108
  "step": 15300
1109
  },
1110
  {
1111
  "epoch": 1.202,
1112
+ "grad_norm": 0.8333882689476013,
1113
+ "learning_rate": 0.00020773630818975128,
1114
+ "loss": 0.5066380310058594,
1115
  "step": 15400
1116
  },
1117
  {
1118
  "epoch": 1.2053333333333334,
1119
+ "grad_norm": 0.7248000502586365,
1120
+ "learning_rate": 0.00020553290633353074,
1121
+ "loss": 0.5148737716674805,
1122
  "step": 15500
1123
  },
1124
  {
1125
  "epoch": 1.2086666666666668,
1126
+ "grad_norm": 0.8077163696289062,
1127
+ "learning_rate": 0.00020332883218375823,
1128
+ "loss": 0.5026751327514648,
1129
  "step": 15600
1130
  },
1131
  {
1132
  "epoch": 1.212,
1133
+ "grad_norm": 0.7529610991477966,
1134
+ "learning_rate": 0.00020112435355354132,
1135
+ "loss": 0.5074459457397461,
1136
  "step": 15700
1137
  },
1138
  {
1139
  "epoch": 1.2153333333333334,
1140
+ "grad_norm": 0.8418951630592346,
1141
+ "learning_rate": 0.00019891973830513525,
1142
+ "loss": 0.4947340393066406,
1143
  "step": 15800
1144
  },
1145
  {
1146
  "epoch": 1.2186666666666666,
1147
+ "grad_norm": 0.7463741302490234,
1148
+ "learning_rate": 0.00019671525431739546,
1149
+ "loss": 0.49930683135986326,
1150
  "step": 15900
1151
  },
1152
  {
1153
  "epoch": 1.222,
1154
+ "grad_norm": 0.7505474090576172,
1155
+ "learning_rate": 0.0001945111694532282,
1156
+ "loss": 0.49693927764892576,
1157
  "step": 16000
1158
  },
1159
  {
1160
  "epoch": 1.2253333333333334,
1161
+ "grad_norm": 0.7937129735946655,
1162
+ "learning_rate": 0.00019230775152704284,
1163
+ "loss": 0.5052358627319335,
1164
  "step": 16100
1165
  },
1166
  {
1167
  "epoch": 1.2286666666666666,
1168
+ "grad_norm": 0.6797370910644531,
1169
+ "learning_rate": 0.00019010526827221045,
1170
+ "loss": 0.4982032775878906,
1171
  "step": 16200
1172
  },
1173
  {
1174
  "epoch": 1.232,
1175
+ "grad_norm": 0.755185604095459,
1176
+ "learning_rate": 0.0001879039873085317,
1177
+ "loss": 0.4924372482299805,
1178
  "step": 16300
1179
  },
1180
  {
1181
  "epoch": 1.2353333333333334,
1182
+ "grad_norm": 0.6874153017997742,
1183
+ "learning_rate": 0.00018570417610971914,
1184
+ "loss": 0.49145896911621095,
1185
  "step": 16400
1186
  },
1187
  {
1188
  "epoch": 1.2386666666666666,
1189
+ "grad_norm": 0.785365879535675,
1190
+ "learning_rate": 0.0001835061019708968,
1191
+ "loss": 0.4896976470947266,
1192
  "step": 16500
1193
  },
1194
  {
1195
  "epoch": 1.242,
1196
+ "grad_norm": 0.7931706309318542,
1197
+ "learning_rate": 0.00018131003197612158,
1198
+ "loss": 0.48486351013183593,
1199
  "step": 16600
1200
  },
1201
  {
1202
  "epoch": 1.2453333333333334,
1203
+ "grad_norm": 0.711540162563324,
1204
+ "learning_rate": 0.0001791162329659304,
1205
+ "loss": 0.4865373992919922,
1206
  "step": 16700
1207
  },
1208
  {
1209
  "epoch": 1.2486666666666666,
1210
+ "grad_norm": 0.8093428611755371,
1211
+ "learning_rate": 0.00017692497150491703,
1212
+ "loss": 0.4822272491455078,
1213
  "step": 16800
1214
  },
1215
  {
1216
  "epoch": 1.252,
1217
+ "grad_norm": 0.8606541156768799,
1218
+ "learning_rate": 0.00017473651384934213,
1219
+ "loss": 0.47816139221191406,
1220
  "step": 16900
1221
  },
1222
  {
1223
  "epoch": 1.2553333333333334,
1224
+ "grad_norm": 0.6578624248504639,
1225
+ "learning_rate": 0.00017255112591478094,
1226
+ "loss": 0.4819015121459961,
1227
  "step": 17000
1228
  },
1229
  {
1230
  "epoch": 1.2586666666666666,
1231
+ "grad_norm": 0.8381503224372864,
1232
+ "learning_rate": 0.0001703690732438124,
1233
+ "loss": 0.4800693893432617,
1234
  "step": 17100
1235
  },
1236
  {
1237
  "epoch": 1.262,
1238
+ "grad_norm": 0.9081389904022217,
1239
+ "learning_rate": 0.00016819062097375365,
1240
+ "loss": 0.4796139907836914,
1241
  "step": 17200
1242
  },
1243
  {
1244
  "epoch": 1.2653333333333334,
1245
+ "grad_norm": 0.8076674938201904,
1246
+ "learning_rate": 0.00016601603380444338,
1247
+ "loss": 0.47347488403320315,
1248
  "step": 17300
1249
  },
1250
  {
1251
  "epoch": 1.2686666666666666,
1252
+ "grad_norm": 0.7531787157058716,
1253
+ "learning_rate": 0.00016384557596607884,
1254
+ "loss": 0.4700050354003906,
1255
  "step": 17400
1256
  },
1257
  {
1258
  "epoch": 1.272,
1259
+ "grad_norm": 0.843329131603241,
1260
+ "learning_rate": 0.0001616795111871098,
1261
+ "loss": 0.47036163330078123,
1262
  "step": 17500
1263
  },
1264
  {
1265
  "epoch": 1.2753333333333332,
1266
+ "grad_norm": 0.7025447487831116,
1267
+ "learning_rate": 0.0001595181026621931,
1268
+ "loss": 0.46735321044921874,
1269
  "step": 17600
1270
  },
1271
  {
1272
  "epoch": 1.2786666666666666,
1273
+ "grad_norm": 0.7623017430305481,
1274
+ "learning_rate": 0.00015736161302021254,
1275
+ "loss": 0.46535400390625,
1276
  "step": 17700
1277
  },
1278
  {
1279
  "epoch": 1.282,
1280
+ "grad_norm": 0.7620524764060974,
1281
+ "learning_rate": 0.00015521030429236713,
1282
+ "loss": 0.4652018356323242,
1283
  "step": 17800
1284
  },
1285
  {
1286
  "epoch": 1.2853333333333334,
1287
+ "grad_norm": 0.7925307154655457,
1288
+ "learning_rate": 0.00015306443788033248,
1289
+ "loss": 0.46518348693847655,
1290
  "step": 17900
1291
  },
1292
  {
1293
  "epoch": 1.2886666666666666,
1294
+ "grad_norm": 0.7878969311714172,
1295
+ "learning_rate": 0.00015092427452449803,
1296
+ "loss": 0.4622929382324219,
1297
  "step": 18000
1298
  },
1299
  {
1300
  "epoch": 1.292,
1301
+ "grad_norm": 0.7757784724235535,
1302
+ "learning_rate": 0.000148790074272285,
1303
+ "loss": 0.4650875091552734,
1304
  "step": 18100
1305
  },
1306
  {
1307
  "epoch": 1.2953333333333332,
1308
+ "grad_norm": 0.735175371170044,
1309
+ "learning_rate": 0.00014666209644654873,
1310
+ "loss": 0.4549406433105469,
1311
  "step": 18200
1312
  },
1313
  {
1314
  "epoch": 1.2986666666666666,
1315
+ "grad_norm": 0.6873441934585571,
1316
+ "learning_rate": 0.00014454059961406846,
1317
+ "loss": 0.4520915985107422,
1318
  "step": 18300
1319
  },
1320
  {
1321
  "epoch": 1.302,
1322
+ "grad_norm": 0.7766420841217041,
1323
+ "learning_rate": 0.0001424258415541296,
1324
+ "loss": 0.447607536315918,
1325
  "step": 18400
1326
  },
1327
  {
1328
  "epoch": 1.3053333333333335,
1329
+ "grad_norm": 0.6834190487861633,
1330
+ "learning_rate": 0.0001403180792272015,
1331
+ "loss": 0.4524835205078125,
1332
  "step": 18500
1333
  },
1334
  {
1335
  "epoch": 1.3086666666666666,
1336
+ "grad_norm": 0.7714037299156189,
1337
+ "learning_rate": 0.00013821756874371426,
1338
+ "loss": 0.43865036010742187,
1339
  "step": 18600
1340
  },
1341
  {
1342
  "epoch": 2.0006666666666666,
1343
+ "grad_norm": 0.6421045064926147,
1344
+ "learning_rate": 0.0001361245653329396,
1345
+ "loss": 0.45037097930908204,
1346
  "step": 18700
1347
  },
1348
  {
1349
  "epoch": 2.004,
1350
+ "grad_norm": 0.8619283437728882,
1351
+ "learning_rate": 0.00013403932331197823,
1352
+ "loss": 0.4485680389404297,
1353
  "step": 18800
1354
  },
1355
  {
1356
  "epoch": 2.0073333333333334,
1357
+ "grad_norm": 0.7336652278900146,
1358
+ "learning_rate": 0.00013196209605485825,
1359
+ "loss": 0.4345798110961914,
1360
  "step": 18900
1361
  },
1362
  {
1363
  "epoch": 2.010666666666667,
1364
+ "grad_norm": 0.7360154986381531,
1365
+ "learning_rate": 0.00012989313596174825,
1366
+ "loss": 0.4353963470458984,
1367
  "step": 19000
1368
  },
1369
  {
1370
  "epoch": 2.014,
1371
+ "grad_norm": 0.7875688076019287,
1372
+ "learning_rate": 0.0001278326944282883,
1373
+ "loss": 0.4323548126220703,
1374
  "step": 19100
1375
  },
1376
  {
1377
  "epoch": 2.017333333333333,
1378
+ "grad_norm": 0.8237797617912292,
1379
+ "learning_rate": 0.0001257810218150438,
1380
+ "loss": 0.43446548461914064,
1381
  "step": 19200
1382
  },
1383
  {
1384
  "epoch": 2.0206666666666666,
1385
+ "grad_norm": 0.775242030620575,
1386
+ "learning_rate": 0.0001237383674170841,
1387
+ "loss": 0.4317903900146484,
1388
  "step": 19300
1389
  },
1390
  {
1391
  "epoch": 2.024,
1392
+ "grad_norm": 0.7316193580627441,
1393
+ "learning_rate": 0.00012170497943369139,
1394
+ "loss": 0.4266176223754883,
1395
  "step": 19400
1396
  },
1397
  {
1398
  "epoch": 2.0273333333333334,
1399
+ "grad_norm": 0.8828946352005005,
1400
+ "learning_rate": 0.00011968110493820255,
1401
+ "loss": 0.42110267639160154,
1402
  "step": 19500
1403
  },
1404
  {
1405
  "epoch": 2.030666666666667,
1406
+ "grad_norm": 0.7441554665565491,
1407
+ "learning_rate": 0.00011766698984798741,
1408
+ "loss": 0.42277420043945313,
1409
  "step": 19600
1410
  },
1411
  {
1412
  "epoch": 2.034,
1413
+ "grad_norm": 0.7916893362998962,
1414
+ "learning_rate": 0.0001156628788945679,
1415
+ "loss": 0.42497276306152343,
1416
  "step": 19700
1417
  },
1418
  {
1419
  "epoch": 2.037333333333333,
1420
+ "grad_norm": 0.7108286023139954,
1421
+ "learning_rate": 0.00011366901559388127,
1422
+ "loss": 0.42226448059082033,
1423
  "step": 19800
1424
  },
1425
  {
1426
  "epoch": 2.0406666666666666,
1427
+ "grad_norm": 0.7501102089881897,
1428
+ "learning_rate": 0.00011168564221669089,
1429
+ "loss": 0.4148076629638672,
1430
  "step": 19900
1431
  },
1432
  {
1433
  "epoch": 2.044,
1434
+ "grad_norm": 0.7276322841644287,
1435
+ "learning_rate": 0.000109712999759148,
1436
+ "loss": 0.41933116912841795,
1437
  "step": 20000
1438
  },
1439
  {
1440
  "epoch": 2.044,
1441
+ "eval_loss": 0.4309006333351135,
1442
+ "eval_masked_accuracy": 0.862885533617241,
1443
+ "eval_runtime": 2.9684,
1444
+ "eval_samples_per_second": 1379.874,
1445
+ "eval_steps_per_second": 5.39,
1446
  "step": 20000
1447
  },
1448
  {
1449
  "epoch": 2.0473333333333334,
1450
+ "grad_norm": 0.8200253844261169,
1451
+ "learning_rate": 0.0001077513279135093,
1452
+ "loss": 0.4121805572509766,
1453
  "step": 20100
1454
  },
1455
  {
1456
  "epoch": 2.050666666666667,
1457
+ "grad_norm": 0.7574154734611511,
1458
+ "learning_rate": 0.000105800865039012,
1459
+ "loss": 0.4140956115722656,
1460
  "step": 20200
1461
  },
1462
  {
1463
  "epoch": 2.054,
1464
+ "grad_norm": 0.7535119652748108,
1465
+ "learning_rate": 0.00010386184813291108,
1466
+ "loss": 0.4128216552734375,
1467
  "step": 20300
1468
  },
1469
  {
1470
  "epoch": 2.0573333333333332,
1471
+ "grad_norm": 0.7665644884109497,
1472
+ "learning_rate": 0.00010193451280168258,
1473
+ "loss": 0.4141941833496094,
1474
  "step": 20400
1475
  },
1476
  {
1477
  "epoch": 2.0606666666666666,
1478
+ "grad_norm": 0.6833004951477051,
1479
+ "learning_rate": 0.00010001909323239524,
1480
+ "loss": 0.41669425964355467,
1481
  "step": 20500
1482
  },
1483
  {
1484
  "epoch": 2.064,
1485
+ "grad_norm": 0.6854680180549622,
1486
+ "learning_rate": 9.811582216425472e-05,
1487
+ "loss": 0.40588130950927737,
1488
  "step": 20600
1489
  },
1490
  {
1491
  "epoch": 2.0673333333333335,
1492
+ "grad_norm": 0.7551723122596741,
1493
+ "learning_rate": 9.622493086032432e-05,
1494
+ "loss": 0.40616172790527344,
1495
  "step": 20700
1496
  },
1497
  {
1498
  "epoch": 2.070666666666667,
1499
+ "grad_norm": 0.7875136733055115,
1500
+ "learning_rate": 9.434664907942397e-05,
1501
+ "loss": 0.40618175506591797,
1502
  "step": 20800
1503
  },
1504
  {
1505
  "epoch": 2.074,
1506
+ "grad_norm": 0.7156426906585693,
1507
+ "learning_rate": 9.24812050482134e-05,
1508
+ "loss": 0.40087387084960935,
1509
  "step": 20900
1510
  },
1511
  {
1512
  "epoch": 2.0773333333333333,
1513
+ "grad_norm": 0.7035794258117676,
1514
+ "learning_rate": 9.062882543345999e-05,
1515
+ "loss": 0.3979297637939453,
1516
  "step": 21000
1517
  },
1518
  {
1519
  "epoch": 2.0806666666666667,
1520
+ "grad_norm": 0.7434916496276855,
1521
+ "learning_rate": 8.878973531449748e-05,
1522
+ "loss": 0.3994139099121094,
1523
  "step": 21100
1524
  },
1525
  {
1526
  "epoch": 2.084,
1527
+ "grad_norm": 0.6868703961372375,
1528
+ "learning_rate": 8.696415815587673e-05,
1529
+ "loss": 0.39528240203857423,
1530
  "step": 21200
1531
  },
1532
  {
1533
  "epoch": 2.0873333333333335,
1534
+ "grad_norm": 0.7844119071960449,
1535
+ "learning_rate": 8.515231578021277e-05,
1536
+ "loss": 0.3911682891845703,
1537
  "step": 21300
1538
  },
1539
  {
1540
  "epoch": 2.0906666666666665,
1541
+ "grad_norm": 0.7842739820480347,
1542
+ "learning_rate": 8.335442834123192e-05,
1543
+ "loss": 0.3987908935546875,
1544
  "step": 21400
1545
  },
1546
  {
1547
  "epoch": 2.094,
1548
+ "grad_norm": 0.7348713874816895,
1549
+ "learning_rate": 8.157071429702113e-05,
1550
+ "loss": 0.38934185028076174,
1551
  "step": 21500
1552
  },
1553
  {
1554
  "epoch": 2.0973333333333333,
1555
+ "grad_norm": 0.7054168581962585,
1556
+ "learning_rate": 7.98013903834832e-05,
1557
+ "loss": 0.39156261444091794,
1558
  "step": 21600
1559
  },
1560
  {
1561
  "epoch": 2.1006666666666667,
1562
+ "grad_norm": 0.7588643431663513,
1563
+ "learning_rate": 7.80466715880023e-05,
1564
+ "loss": 0.38873050689697264,
1565
  "step": 21700
1566
  },
1567
  {
1568
  "epoch": 2.104,
1569
+ "grad_norm": 0.7288216948509216,
1570
+ "learning_rate": 7.630677112332046e-05,
1571
+ "loss": 0.3866202926635742,
1572
  "step": 21800
1573
  },
1574
  {
1575
  "epoch": 2.1073333333333335,
1576
+ "grad_norm": 0.7503123879432678,
1577
+ "learning_rate": 7.458190040163115e-05,
1578
+ "loss": 0.39182708740234373,
1579
  "step": 21900
1580
  },
1581
  {
1582
  "epoch": 2.1106666666666665,
1583
+ "grad_norm": 0.7055880427360535,
1584
+ "learning_rate": 7.287226900889039e-05,
1585
+ "loss": 0.401009635925293,
1586
  "step": 22000
1587
  },
1588
  {
1589
  "epoch": 2.114,
1590
+ "grad_norm": 0.8966184258460999,
1591
+ "learning_rate": 7.117808467935076e-05,
1592
+ "loss": 0.39603382110595703,
1593
  "step": 22100
1594
  },
1595
  {
1596
  "epoch": 2.1173333333333333,
1597
+ "grad_norm": 0.6970842480659485,
1598
+ "learning_rate": 6.949955327031988e-05,
1599
+ "loss": 0.398880729675293,
1600
  "step": 22200
1601
  },
1602
  {
1603
  "epoch": 2.1206666666666667,
1604
+ "grad_norm": 0.7583353519439697,
1605
+ "learning_rate": 6.783687873714672e-05,
1606
+ "loss": 0.3997147369384766,
1607
  "step": 22300
1608
  },
1609
  {
1610
  "epoch": 2.124,
1611
+ "grad_norm": 0.7861075401306152,
1612
+ "learning_rate": 6.61902631084399e-05,
1613
+ "loss": 0.4028291702270508,
1614
  "step": 22400
1615
  },
1616
  {
1617
  "epoch": 2.1273333333333335,
1618
+ "grad_norm": 0.6678594946861267,
1619
+ "learning_rate": 6.455990646151924e-05,
1620
+ "loss": 0.3987395095825195,
1621
  "step": 22500
1622
  },
1623
  {
1624
  "epoch": 2.1306666666666665,
1625
+ "grad_norm": 0.7038342952728271,
1626
+ "learning_rate": 6.29460068981046e-05,
1627
+ "loss": 0.39326480865478514,
1628
  "step": 22600
1629
  },
1630
  {
1631
  "epoch": 2.134,
1632
+ "grad_norm": 0.7392048239707947,
1633
+ "learning_rate": 6.134876052024527e-05,
1634
+ "loss": 0.40042667388916015,
1635
  "step": 22700
1636
  },
1637
  {
1638
  "epoch": 2.1373333333333333,
1639
+ "grad_norm": 0.8075382113456726,
1640
+ "learning_rate": 5.9768361406491533e-05,
1641
+ "loss": 0.3967801284790039,
1642
  "step": 22800
1643
  },
1644
  {
1645
  "epoch": 2.1406666666666667,
1646
+ "grad_norm": 0.7892723679542542,
1647
+ "learning_rate": 5.8205001588313014e-05,
1648
+ "loss": 0.39166572570800784,
1649
  "step": 22900
1650
  },
1651
  {
1652
  "epoch": 2.144,
1653
+ "grad_norm": 0.7251806855201721,
1654
+ "learning_rate": 5.6658871026764704e-05,
1655
+ "loss": 0.3836771011352539,
1656
  "step": 23000
1657
  },
1658
  {
1659
  "epoch": 2.1473333333333335,
1660
+ "grad_norm": 0.782537579536438,
1661
+ "learning_rate": 5.513015758940567e-05,
1662
+ "loss": 0.39198822021484375,
1663
  "step": 23100
1664
  },
1665
  {
1666
  "epoch": 2.1506666666666665,
1667
+ "grad_norm": 0.8268524408340454,
1668
+ "learning_rate": 5.361904702747136e-05,
1669
+ "loss": 0.38895458221435547,
1670
  "step": 23200
1671
  },
1672
  {
1673
  "epoch": 2.154,
1674
+ "grad_norm": 0.7508871555328369,
1675
+ "learning_rate": 5.212572295330311e-05,
1676
+ "loss": 0.40076961517333987,
1677
  "step": 23300
1678
  },
1679
  {
1680
  "epoch": 2.1573333333333333,
1681
+ "grad_norm": 0.6501144170761108,
1682
+ "learning_rate": 5.065036681803819e-05,
1683
+ "loss": 0.4024519348144531,
1684
  "step": 23400
1685
  },
1686
  {
1687
  "epoch": 2.1606666666666667,
1688
+ "grad_norm": 0.6458573937416077,
1689
+ "learning_rate": 4.919315788956167e-05,
1690
+ "loss": 0.4000421142578125,
1691
  "step": 23500
1692
  },
1693
  {
1694
  "epoch": 2.164,
1695
+ "grad_norm": 0.732280433177948,
1696
+ "learning_rate": 4.775427323072386e-05,
1697
+ "loss": 0.39758953094482424,
1698
  "step": 23600
1699
  },
1700
  {
1701
  "epoch": 2.1673333333333336,
1702
+ "grad_norm": 0.6772671937942505,
1703
+ "learning_rate": 4.6333887677826025e-05,
1704
+ "loss": 0.39006378173828127,
1705
  "step": 23700
1706
  },
1707
  {
1708
  "epoch": 2.1706666666666665,
1709
+ "grad_norm": 0.7737159729003906,
1710
+ "learning_rate": 4.4932173819376064e-05,
1711
+ "loss": 0.3929125213623047,
1712
  "step": 23800
1713
  },
1714
  {
1715
  "epoch": 2.174,
1716
+ "grad_norm": 0.8250499963760376,
1717
+ "learning_rate": 4.354930197511762e-05,
1718
+ "loss": 0.396903076171875,
1719
  "step": 23900
1720
  },
1721
  {
1722
  "epoch": 2.1773333333333333,
1723
+ "grad_norm": 0.7866168022155762,
1724
+ "learning_rate": 4.218544017533499e-05,
1725
+ "loss": 0.387851676940918,
1726
  "step": 24000
1727
  },
1728
  {
1729
  "epoch": 2.1806666666666668,
1730
+ "grad_norm": 0.7040881514549255,
1731
+ "learning_rate": 4.084075414043598e-05,
1732
+ "loss": 0.3934907913208008,
1733
  "step": 24100
1734
  },
1735
  {
1736
  "epoch": 2.184,
1737
+ "grad_norm": 0.7672249674797058,
1738
+ "learning_rate": 3.951540726081553e-05,
1739
+ "loss": 0.3852077484130859,
1740
  "step": 24200
1741
  },
1742
  {
1743
  "epoch": 2.187333333333333,
1744
+ "grad_norm": 0.7783628702163696,
1745
+ "learning_rate": 3.82095605770022e-05,
1746
+ "loss": 0.3871307373046875,
1747
  "step": 24300
1748
  },
1749
  {
1750
  "epoch": 2.1906666666666665,
1751
+ "grad_norm": 0.8870095610618591,
1752
+ "learning_rate": 3.69233727600909e-05,
1753
+ "loss": 0.3772114181518555,
1754
  "step": 24400
1755
  },
1756
  {
1757
  "epoch": 2.194,
1758
+ "grad_norm": 0.738532304763794,
1759
+ "learning_rate": 3.565700009246269e-05,
1760
+ "loss": 0.3705712890625,
1761
  "step": 24500
1762
  },
1763
  {
1764
  "epoch": 2.1973333333333334,
1765
+ "grad_norm": 0.6864748001098633,
1766
+ "learning_rate": 3.4410596448795184e-05,
1767
+ "loss": 0.383516845703125,
1768
  "step": 24600
1769
  },
1770
  {
1771
  "epoch": 2.2006666666666668,
1772
+ "grad_norm": 0.6553505063056946,
1773
+ "learning_rate": 3.318431327736577e-05,
1774
+ "loss": 0.38183685302734377,
1775
  "step": 24700
1776
  },
1777
  {
1778
  "epoch": 2.204,
1779
+ "grad_norm": 0.6033626794815063,
1780
+ "learning_rate": 3.197829958164917e-05,
1781
+ "loss": 0.3845671081542969,
1782
  "step": 24800
1783
  },
1784
  {
1785
  "epoch": 2.207333333333333,
1786
+ "grad_norm": 0.7695163488388062,
1787
+ "learning_rate": 3.079270190221231e-05,
1788
+ "loss": 0.3796828079223633,
1789
  "step": 24900
1790
  },
1791
  {
1792
  "epoch": 2.2106666666666666,
1793
+ "grad_norm": 0.7200196385383606,
1794
+ "learning_rate": 2.96276642989086e-05,
1795
+ "loss": 0.38924953460693357,
1796
  "step": 25000
1797
  },
1798
  {
1799
  "epoch": 2.2106666666666666,
1800
+ "eval_loss": 0.3823796212673187,
1801
+ "eval_masked_accuracy": 0.878150720164609,
1802
+ "eval_runtime": 3.0159,
1803
+ "eval_samples_per_second": 1358.12,
1804
+ "eval_steps_per_second": 5.305,
1805
  "step": 25000
1806
  },
1807
  {
1808
  "epoch": 2.214,
1809
+ "grad_norm": 0.7287200689315796,
1810
+ "learning_rate": 2.848332833337335e-05,
1811
+ "loss": 0.3876392364501953,
1812
  "step": 25100
1813
  },
1814
  {
1815
  "epoch": 2.2173333333333334,
1816
+ "grad_norm": 0.7604002952575684,
1817
+ "learning_rate": 2.7359833051822837e-05,
1818
+ "loss": 0.3845469284057617,
1819
  "step": 25200
1820
  },
1821
  {
1822
  "epoch": 2.220666666666667,
1823
+ "grad_norm": 0.6634399890899658,
1824
+ "learning_rate": 2.625731496815913e-05,
1825
+ "loss": 0.3846179962158203,
1826
  "step": 25300
1827
  },
1828
  {
1829
  "epoch": 2.224,
1830
+ "grad_norm": 0.7272804975509644,
1831
+ "learning_rate": 2.5175908047382592e-05,
1832
+ "loss": 0.39008934020996094,
1833
  "step": 25400
1834
  },
1835
  {
1836
  "epoch": 2.227333333333333,
1837
+ "grad_norm": 0.714460015296936,
1838
+ "learning_rate": 2.4115743689313774e-05,
1839
+ "loss": 0.3927734756469727,
1840
  "step": 25500
1841
  },
1842
  {
1843
  "epoch": 2.2306666666666666,
1844
+ "grad_norm": 0.8357155919075012,
1845
+ "learning_rate": 2.3076950712627588e-05,
1846
+ "loss": 0.38554725646972654,
1847
  "step": 25600
1848
  },
1849
  {
1850
  "epoch": 2.234,
1851
+ "grad_norm": 0.7323917150497437,
1852
+ "learning_rate": 2.2059655339200536e-05,
1853
+ "loss": 0.3921313095092773,
1854
  "step": 25700
1855
  },
1856
  {
1857
  "epoch": 2.2373333333333334,
1858
+ "grad_norm": 0.7257605791091919,
1859
+ "learning_rate": 2.1063981178773884e-05,
1860
+ "loss": 0.38508140563964843,
1861
  "step": 25800
1862
  },
1863
  {
1864
  "epoch": 2.240666666666667,
1865
+ "grad_norm": 0.7842901945114136,
1866
+ "learning_rate": 2.0090049213933803e-05,
1867
+ "loss": 0.39042671203613283,
1868
  "step": 25900
1869
  },
1870
  {
1871
  "epoch": 2.2439999999999998,
1872
+ "grad_norm": 0.6478227376937866,
1873
+ "learning_rate": 1.9137977785411333e-05,
1874
+ "loss": 0.3918688201904297,
1875
  "step": 26000
1876
  },
1877
  {
1878
  "epoch": 2.247333333333333,
1879
+ "grad_norm": 0.7710049748420715,
1880
+ "learning_rate": 1.820788257770283e-05,
1881
+ "loss": 0.3908076858520508,
1882
  "step": 26100
1883
  },
1884
  {
1885
  "epoch": 2.2506666666666666,
1886
+ "grad_norm": 0.7351255416870117,
1887
+ "learning_rate": 1.7299876605013267e-05,
1888
+ "loss": 0.37932159423828127,
1889
  "step": 26200
1890
  },
1891
  {
1892
  "epoch": 2.254,
1893
+ "grad_norm": 0.6514462232589722,
1894
+ "learning_rate": 1.641407019752428e-05,
1895
+ "loss": 0.38645931243896486,
1896
  "step": 26300
1897
  },
1898
  {
1899
  "epoch": 2.2573333333333334,
1900
+ "grad_norm": 0.7680016160011292,
1901
+ "learning_rate": 1.5550570987988067e-05,
1902
+ "loss": 0.381392707824707,
1903
  "step": 26400
1904
  },
1905
  {
1906
  "epoch": 2.260666666666667,
1907
+ "grad_norm": 0.7839369177818298,
1908
+ "learning_rate": 1.4709483898648945e-05,
1909
+ "loss": 0.37340118408203127,
1910
  "step": 26500
1911
  },
1912
  {
1913
  "epoch": 2.2640000000000002,
1914
+ "grad_norm": 0.6791050434112549,
1915
+ "learning_rate": 1.3890911128494788e-05,
1916
+ "loss": 0.38508747100830076,
1917
  "step": 26600
1918
  },
1919
  {
1920
  "epoch": 2.267333333333333,
1921
+ "grad_norm": 0.6227408051490784,
1922
+ "learning_rate": 1.3094952140838712e-05,
1923
+ "loss": 0.3770198059082031,
1924
  "step": 26700
1925
  },
1926
  {
1927
  "epoch": 2.2706666666666666,
1928
+ "grad_norm": 0.6502448916435242,
1929
+ "learning_rate": 1.2321703651233574e-05,
1930
+ "loss": 0.37348697662353514,
1931
  "step": 26800
1932
  },
1933
  {
1934
  "epoch": 2.274,
1935
+ "grad_norm": 0.6978487968444824,
1936
+ "learning_rate": 1.157125961572021e-05,
1937
+ "loss": 0.3783902359008789,
1938
  "step": 26900
1939
  },
1940
  {
1941
  "epoch": 2.2773333333333334,
1942
+ "grad_norm": 0.7682250738143921,
1943
+ "learning_rate": 1.0843711219411101e-05,
1944
+ "loss": 0.3767197799682617,
1945
  "step": 27000
1946
  },
1947
  {
1948
  "epoch": 2.280666666666667,
1949
+ "grad_norm": 0.6915271878242493,
1950
+ "learning_rate": 1.0139146865410554e-05,
1951
+ "loss": 0.3798466110229492,
1952
  "step": 27100
1953
  },
1954
  {
1955
  "epoch": 2.284,
1956
+ "grad_norm": 0.819548487663269,
1957
+ "learning_rate": 9.457652164072928e-06,
1958
+ "loss": 0.3809815979003906,
1959
  "step": 27200
1960
  },
1961
  {
1962
  "epoch": 2.287333333333333,
1963
+ "grad_norm": 0.7806178331375122,
1964
+ "learning_rate": 8.79930992260043e-06,
1965
+ "loss": 0.3813274383544922,
1966
  "step": 27300
1967
  },
1968
  {
1969
  "epoch": 2.2906666666666666,
1970
+ "grad_norm": 0.9139585494995117,
1971
+ "learning_rate": 8.16420013498127e-06,
1972
+ "loss": 0.38432167053222654,
1973
  "step": 27400
1974
  },
1975
  {
1976
  "epoch": 2.294,
1977
+ "grad_norm": 0.719249963760376,
1978
+ "learning_rate": 7.552399972269686e-06,
1979
+ "loss": 0.3763787078857422,
1980
  "step": 27500
1981
  },
1982
  {
1983
  "epoch": 2.2973333333333334,
1984
+ "grad_norm": 0.7366885542869568,
1985
+ "learning_rate": 6.963983773209149e-06,
1986
+ "loss": 0.3752469253540039,
1987
  "step": 27600
1988
  },
1989
  {
1990
  "epoch": 2.300666666666667,
1991
+ "grad_norm": 0.7235630750656128,
1992
+ "learning_rate": 6.399023035199547e-06,
1993
+ "loss": 0.37348270416259766,
1994
  "step": 27700
1995
  },
1996
  {
1997
  "epoch": 2.304,
1998
+ "grad_norm": 0.6602711081504822,
1999
+ "learning_rate": 5.857586405609583e-06,
2000
+ "loss": 0.38024497985839845,
2001
  "step": 27800
2002
  },
2003
  {
2004
  "epoch": 2.3073333333333332,
2005
+ "grad_norm": 0.6910043954849243,
2006
+ "learning_rate": 5.339739673435662e-06,
2007
+ "loss": 0.3761766815185547,
2008
  "step": 27900
2009
  },
2010
  {
2011
  "epoch": 2.3106666666666666,
2012
+ "grad_norm": 0.7024565935134888,
2013
+ "learning_rate": 4.8455457613079345e-06,
2014
+ "loss": 0.37851264953613284,
2015
  "step": 28000
2016
  },
2017
  {
2018
  "epoch": 3.002666666666667,
2019
+ "grad_norm": 0.9012552499771118,
2020
+ "learning_rate": 4.375064717844746e-06,
2021
+ "loss": 0.3574191665649414,
2022
  "step": 28100
2023
  },
2024
  {
2025
  "epoch": 3.006,
2026
+ "grad_norm": 0.680111825466156,
2027
+ "learning_rate": 3.928353710356114e-06,
2028
+ "loss": 0.3549924087524414,
2029
  "step": 28200
2030
  },
2031
  {
2032
  "epoch": 3.009333333333333,
2033
+ "grad_norm": 0.79486083984375,
2034
+ "learning_rate": 3.5054670178975346e-06,
2035
+ "loss": 0.35243122100830077,
2036
  "step": 28300
2037
  },
2038
  {
2039
  "epoch": 3.0126666666666666,
2040
+ "grad_norm": 0.6971395015716553,
2041
+ "learning_rate": 3.1064560246746088e-06,
2042
+ "loss": 0.34856960296630857,
2043
  "step": 28400
2044
  },
2045
  {
2046
  "epoch": 3.016,
2047
+ "grad_norm": 0.7989268898963928,
2048
+ "learning_rate": 2.7313692137993952e-06,
2049
+ "loss": 0.35404052734375,
2050
  "step": 28500
2051
  },
2052
  {
2053
  "epoch": 3.0193333333333334,
2054
+ "grad_norm": 0.681338369846344,
2055
+ "learning_rate": 2.3802521613993878e-06,
2056
+ "loss": 0.3551434326171875,
2057
  "step": 28600
2058
  },
2059
  {
2060
  "epoch": 3.022666666666667,
2061
+ "grad_norm": 0.6259098052978516,
2062
+ "learning_rate": 2.053147531079591e-06,
2063
+ "loss": 0.3543955230712891,
2064
  "step": 28700
2065
  },
2066
  {
2067
  "epoch": 3.026,
2068
+ "grad_norm": 0.6789717078208923,
2069
+ "learning_rate": 1.7500950687385332e-06,
2070
+ "loss": 0.3479387664794922,
2071
  "step": 28800
2072
  },
2073
  {
2074
  "epoch": 3.029333333333333,
2075
+ "grad_norm": 0.6986877918243408,
2076
+ "learning_rate": 1.4711315977388617e-06,
2077
+ "loss": 0.35285072326660155,
2078
  "step": 28900
2079
  },
2080
  {
2081
  "epoch": 3.0326666666666666,
2082
+ "grad_norm": 0.8804546594619751,
2083
+ "learning_rate": 1.2162910144329464e-06,
2084
+ "loss": 0.3571059799194336,
2085
  "step": 29000
2086
  },
2087
  {
2088
  "epoch": 3.036,
2089
+ "grad_norm": 0.7633663415908813,
2090
+ "learning_rate": 9.856042840442393e-07,
2091
+ "loss": 0.3522502517700195,
2092
  "step": 29100
2093
  },
2094
  {
2095
  "epoch": 3.0393333333333334,
2096
+ "grad_norm": 0.8087472319602966,
2097
+ "learning_rate": 7.790994369047289e-07,
2098
+ "loss": 0.3503116607666016,
2099
  "step": 29200
2100
  },
2101
  {
2102
  "epoch": 3.042666666666667,
2103
+ "grad_norm": 0.6872431039810181,
2104
+ "learning_rate": 5.968015650490211e-07,
2105
+ "loss": 0.34913509368896484,
2106
  "step": 29300
2107
  },
2108
  {
2109
  "epoch": 3.046,
2110
+ "grad_norm": 0.7077915668487549,
2111
+ "learning_rate": 4.387328191654438e-07,
2112
+ "loss": 0.34669517517089843,
2113
  "step": 29400
2114
  },
2115
  {
2116
  "epoch": 3.0493333333333332,
2117
+ "grad_norm": 0.721786379814148,
2118
+ "learning_rate": 3.0491240590457823e-07,
2119
+ "loss": 0.3519774627685547,
2120
  "step": 29500
2121
  },
2122
  {
2123
  "epoch": 3.0526666666666666,
2124
+ "grad_norm": 0.7876111268997192,
2125
+ "learning_rate": 1.9535658554545867e-07,
2126
+ "loss": 0.34955368041992185,
2127
  "step": 29600
2128
  },
2129
  {
2130
  "epoch": 3.056,
2131
+ "grad_norm": 0.5993502140045166,
2132
+ "learning_rate": 1.1007867001988637e-07,
2133
+ "loss": 0.3491347885131836,
2134
  "step": 29700
2135
  },
2136
  {
2137
  "epoch": 3.0593333333333335,
2138
+ "grad_norm": 0.7406614422798157,
2139
+ "learning_rate": 4.9089021294834726e-08,
2140
+ "loss": 0.35303794860839843,
2141
  "step": 29800
2142
  },
2143
  {
2144
  "epoch": 3.062666666666667,
2145
+ "grad_norm": 0.7397328615188599,
2146
+ "learning_rate": 1.2395050113389595e-08,
2147
+ "loss": 0.34634124755859375,
2148
  "step": 29900
2149
  },
2150
  {
2151
  "epoch": 3.066,
2152
+ "grad_norm": 0.7702119946479797,
2153
+ "learning_rate": 1.215094425077723e-12,
2154
+ "loss": 0.34748374938964843,
2155
  "step": 30000
2156
  },
2157
  {
2158
  "epoch": 3.066,
2159
+ "eval_loss": 0.37694016098976135,
2160
+ "eval_masked_accuracy": 0.8775784753363228,
2161
+ "eval_runtime": 2.9576,
2162
+ "eval_samples_per_second": 1384.896,
2163
+ "eval_steps_per_second": 5.41,
2164
  "step": 30000
2165
  },
2166
  {
2167
  "epoch": 3.066,
2168
  "step": 30000,
2169
+ "total_flos": 9.74439612930639e+16,
2170
+ "train_loss": 0.6228721523284912,
2171
+ "train_runtime": 2832.8619,
2172
+ "train_samples_per_second": 2711.039,
2173
+ "train_steps_per_second": 10.59
2174
  },
2175
  {
2176
  "epoch": 3.066,
2177
+ "eval_loss": 0.3744058609008789,
2178
+ "eval_masked_accuracy": 0.8805643239064613,
2179
+ "eval_runtime": 2.8656,
2180
+ "eval_samples_per_second": 1429.379,
2181
+ "eval_steps_per_second": 5.584,
2182
  "step": 30000
2183
  }
2184
  ],
 
2199
  "attributes": {}
2200
  }
2201
  },
2202
+ "total_flos": 9.74439612930639e+16,
2203
  "train_batch_size": 256,
2204
  "trial_name": null,
2205
  "trial_params": null
vocab.json CHANGED
The diff for this file is too large to render. See raw diff