Harley-ml commited on
Commit
909a630
·
verified ·
1 Parent(s): a0f6666

Upload 9 files

Browse files
config.json ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "CustomModelForCausalLM"
4
+ ],
5
+ "auto_map": {
6
+ "AutoConfig": "configuration_custom.CustomConfig",
7
+ "AutoModel": "modeling_custom.CustomModel",
8
+ "AutoModelForCausalLM": "modeling_custom.CustomModelForCausalLM"
9
+ },
10
+ "dtype": "float32",
11
+ "engram_entries": 196,
12
+ "engram_ngram_orders": [
13
+ 4,
14
+ 8
15
+ ],
16
+ "head_dim": 8,
17
+ "hidden_size": 32,
18
+ "initializer_range": 0.02,
19
+ "intermediate_size": 64,
20
+ "max_position_embeddings": 96,
21
+ "model_type": "custom_model",
22
+ "num_attention_heads": 4,
23
+ "num_hidden_layers": 9,
24
+ "num_key_value_heads": 2,
25
+ "num_lanes": 8,
26
+ "rms_norm_eps": 1e-05,
27
+ "rope_theta": 2500.0,
28
+ "swiglu_interval": 4,
29
+ "tie_word_embeddings": true,
30
+ "transformers_version": "5.8.0.dev0",
31
+ "use_cache": false,
32
+ "use_engram": true,
33
+ "use_per_head_gating": false,
34
+ "use_xsa": false,
35
+ "vocab_size": 260
36
+ }
configuration_custom.py ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from transformers.configuration_utils import PretrainedConfig
2
+ from typing import Tuple, List, Optional
3
+
4
+ class CustomConfig(PretrainedConfig):
5
+ model_type = "custom_model"
6
+ keys_to_ignore_at_inference = ["past_key_values"]
7
+
8
+ def __init__(
9
+ self,
10
+ vocab_size: int = 2564,
11
+ hidden_size: int = 128,
12
+ num_hidden_layers: int = 21,
13
+ num_attention_heads: int = 4,
14
+ num_key_value_heads: int = 2,
15
+ intermediate_size: int = 345,
16
+ swiglu_interval: int = 3,
17
+ num_lanes: int = 4,
18
+ use_engram: bool = True,
19
+ engram_entries: int = 2400,
20
+ engram_ngram_orders: Tuple[int, ...] = (2, 3),
21
+ use_xsa: bool = False,
22
+ use_per_head_gating: bool = False,
23
+ max_position_embeddings: int = 2048,
24
+ rope_theta: float = 2500.0,
25
+ rms_norm_eps: float = 1e-5,
26
+ tie_word_embeddings: bool = True,
27
+ use_cache: bool = False,
28
+ initializer_range: float = 0.02,
29
+ **kwargs,
30
+ ):
31
+ self.vocab_size = vocab_size
32
+ self.hidden_size = hidden_size
33
+ self.num_hidden_layers = num_hidden_layers
34
+ self.num_attention_heads = num_attention_heads
35
+ self.num_key_value_heads = num_key_value_heads
36
+ self.intermediate_size = intermediate_size
37
+ self.swiglu_interval = swiglu_interval
38
+ self.num_lanes = num_lanes
39
+ self.use_engram = use_engram
40
+ self.engram_entries = engram_entries
41
+ self.engram_ngram_orders = list(engram_ngram_orders)
42
+ self.use_xsa = use_xsa
43
+ self.use_per_head_gating = use_per_head_gating
44
+ self.max_position_embeddings = max_position_embeddings
45
+ self.rope_theta = rope_theta
46
+ self.rms_norm_eps = rms_norm_eps
47
+ self.initializer_range = initializer_range
48
+ self.head_dim = hidden_size // num_attention_heads
49
+ self.auto_map = {
50
+ "AutoConfig": "configuration_custom.CustomConfig",
51
+ "AutoModel": "modeling_custom.CustomModel",
52
+ "AutoModelForCausalLM": "modeling_custom.CustomModelForCausalLM",
53
+ }
54
+
55
+ super().__init__(
56
+ tie_word_embeddings=tie_word_embeddings,
57
+ use_cache=use_cache,
58
+ **kwargs,
59
+ )
60
+
generation_config.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "output_attentions": false,
4
+ "output_hidden_states": false,
5
+ "transformers_version": "5.8.0.dev0"
6
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:00a05ac6aa9f306e158b90ef2885def022f23a056fbb9bd584f6bb8ab8283f2c
3
+ size 283192
modeling_custom.py ADDED
@@ -0,0 +1,459 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import math
2
+ import os
3
+ from typing import Optional, Tuple, Union
4
+ import torch
5
+ import torch.nn as nn
6
+ import torch.nn.functional as F
7
+ import torch.utils.checkpoint as cp
8
+ from transformers.modeling_utils import PreTrainedModel
9
+ from transformers.modeling_outputs import CausalLMOutputWithPast
10
+ from transformers.generation import GenerationMixin
11
+ from safetensors.torch import load_file
12
+ from transformers import AutoConfig, AutoModel, AutoModelForCausalLM
13
+
14
+ from .configuration_custom import CustomConfig
15
+
16
+ @torch.no_grad()
17
+ def get_hadamard_matrix(d: int, dtype=torch.float32) -> torch.Tensor:
18
+ eye = torch.eye(d, dtype=dtype)
19
+ h = 1
20
+ out = eye.clone()
21
+ while h < d:
22
+ out = out.view(-1, 2, h)
23
+ u = out[:, 0, :]
24
+ v = out[:, 1, :]
25
+ out = torch.cat((u + v, u - v), dim=-2)
26
+ out = out.view(d, d)
27
+ h *= 2
28
+ return (out * (1.0 / math.sqrt(d))).contiguous()
29
+
30
+ class HadamardMLP(nn.Module):
31
+ def __init__(self, config: CustomConfig):
32
+ super().__init__()
33
+ self.dim = config.hidden_size
34
+ self.scale1 = nn.Parameter(torch.ones(self.dim))
35
+ self.scale2 = nn.Parameter(torch.ones(self.dim))
36
+ self.gate = nn.Parameter(torch.ones(self.dim))
37
+ self.bias = nn.Parameter(torch.zeros(self.dim))
38
+
39
+ hadamard_mat = get_hadamard_matrix(self.dim)
40
+ self.register_buffer("hadamard_mat", hadamard_mat, persistent=False)
41
+
42
+ def forward(self, x: torch.Tensor) -> torch.Tensor:
43
+ mat = self.hadamard_mat.type_as(x)
44
+ h = (x * self.scale1) @ mat
45
+ g = F.silu(x * self.gate)
46
+ out = ((h * g) @ mat) * self.scale2 + self.bias
47
+ return out
48
+
49
+ class SwiGLUMLP(nn.Module):
50
+ def __init__(self, config: CustomConfig):
51
+ super().__init__()
52
+ self.gate_proj = nn.Linear(config.hidden_size, config.intermediate_size, bias=False)
53
+ self.up_proj = nn.Linear(config.hidden_size, config.intermediate_size, bias=False)
54
+ self.down_proj = nn.Linear(config.intermediate_size, config.hidden_size, bias=False)
55
+
56
+ def forward(self, x: torch.Tensor) -> torch.Tensor:
57
+ return self.down_proj(F.silu(self.gate_proj(x)) * self.up_proj(x))
58
+
59
+ class EngramMemory(nn.Module):
60
+ def __init__(self, config: CustomConfig):
61
+ super().__init__()
62
+ self.dim = config.hidden_size
63
+ self.num_entries = config.engram_entries
64
+ self.n_gram_orders = config.engram_ngram_orders
65
+
66
+ self.tables = nn.ModuleList([
67
+ nn.Embedding(self.num_entries, self.dim) for _ in self.n_gram_orders
68
+ ])
69
+ self.gate_proj = nn.Linear(self.dim, self.dim * len(self.n_gram_orders), bias=False)
70
+ self.out_proj = nn.Linear(self.dim * len(self.n_gram_orders), self.dim, bias=False)
71
+
72
+ def _hash_ngram(self, tokens: torch.Tensor, order: int, table_idx: int) -> torch.Tensor:
73
+ bsz, seqlen = tokens.shape
74
+ padded = F.pad(tokens, (order - 1, 0), value=0)
75
+ primes = (10007, 10009, 10037, 10039, 10061, 10067)
76
+ p = primes[table_idx % len(primes)]
77
+
78
+ if order == 2:
79
+ return (padded[:, :seqlen] * p + padded[:, 1 : seqlen + 1]) % self.num_entries
80
+ elif order == 3:
81
+ h = (padded[:, :seqlen] * p + padded[:, 1 : seqlen + 1]) % self.num_entries
82
+ return (h * p + padded[:, 2 : seqlen + 2]) % self.num_entries
83
+ else:
84
+ hash_val = torch.zeros((bsz, seqlen), dtype=torch.int64, device=tokens.device)
85
+ for k in range(order):
86
+ tok = padded[:, k : k + seqlen]
87
+ hash_val = (hash_val * p + tok) % self.num_entries
88
+ return hash_val
89
+
90
+ def forward(self, x: torch.Tensor, tokens: torch.Tensor) -> torch.Tensor:
91
+ mem_lookups = [self.tables[i](self._hash_ngram(tokens, order, i)) for i, order in enumerate(self.n_gram_orders)]
92
+ concat_mem = torch.cat(mem_lookups, dim=-1)
93
+ gate = torch.sigmoid(self.gate_proj(x))
94
+ return self.out_proj(concat_mem * gate)
95
+
96
+ class RMSNorm(nn.Module):
97
+ def __init__(self, dim: int, eps: float = 1e-5):
98
+ super().__init__()
99
+ self.eps = eps
100
+ self.weight = nn.Parameter(torch.ones(dim))
101
+
102
+ def forward(self, x: torch.Tensor) -> torch.Tensor:
103
+ norm = torch.rsqrt(x.pow(2).mean(-1, keepdim=True) + self.eps)
104
+ return x * norm * self.weight
105
+
106
+ class RotaryEmbedding(nn.Module):
107
+ def __init__(self, dim: int, max_position_embeddings: int = 2048, base: float = 10000.0):
108
+ super().__init__()
109
+ self.dim = dim
110
+ self.max_position_embeddings = max_position_embeddings
111
+ self.base = base
112
+ inv_freq = 1.0 / (self.base ** (torch.arange(0, self.dim, 2, dtype=torch.float32) / self.dim))
113
+ self.register_buffer("inv_freq", inv_freq, persistent=False)
114
+ self._set_cos_sin_cache(max_position_embeddings)
115
+
116
+ def _set_cos_sin_cache(self, seq_len: int, device=None, dtype=torch.float32):
117
+ t = torch.arange(seq_len, device=device, dtype=torch.float32)
118
+ inv_freq = self.inv_freq.to(device=device, dtype=torch.float32)
119
+ freqs = torch.outer(t, inv_freq)
120
+ emb = torch.cat((freqs, freqs), dim=-1)
121
+ self.register_buffer("cos_cached", emb.cos().to(dtype=dtype), persistent=False)
122
+ self.register_buffer("sin_cached", emb.sin().to(dtype=dtype), persistent=False)
123
+
124
+ def forward(self, seq_len: int, device: torch.device, dtype: torch.dtype = torch.float32):
125
+ if not hasattr(self, "cos_cached") or seq_len > self.cos_cached.shape[0] or self.cos_cached.device != device:
126
+ self._set_cos_sin_cache(seq_len, device=device, dtype=dtype)
127
+ return (
128
+ self.cos_cached[:seq_len].to(device=device, dtype=dtype),
129
+ self.sin_cached[:seq_len].to(device=device, dtype=dtype),
130
+ )
131
+
132
+ def rotate_half(x: torch.Tensor) -> torch.Tensor:
133
+ x1 = x[..., : x.shape[-1] // 2]
134
+ x2 = x[..., x.shape[-1] // 2 :]
135
+ return torch.cat((-x2, x1), dim=-1)
136
+
137
+ def apply_rotary_pos_emb(q: torch.Tensor, k: torch.Tensor, cos: torch.Tensor, sin: torch.Tensor):
138
+ q_embed = (q * cos) + (rotate_half(q) * sin)
139
+ k_embed = (k * cos) + (rotate_half(k) * sin)
140
+ return q_embed, k_embed
141
+
142
+ class XSAGQAttention(nn.Module):
143
+ def __init__(self, config: CustomConfig):
144
+ super().__init__()
145
+ self.dim = config.hidden_size
146
+ self.n_heads = config.num_attention_heads
147
+ self.n_kv_heads = config.num_key_value_heads
148
+ self.head_dim = config.head_dim
149
+ self.num_kv_groups = self.n_heads // self.n_kv_heads
150
+ self.use_xsa = config.use_xsa
151
+ self.use_per_head_gating = config.use_per_head_gating
152
+
153
+ self.wq = nn.Linear(self.dim, self.n_heads * self.head_dim, bias=False)
154
+ self.wk = nn.Linear(self.dim, self.n_kv_heads * self.head_dim, bias=False)
155
+ self.wv = nn.Linear(self.dim, self.n_kv_heads * self.head_dim, bias=False)
156
+ self.wo = nn.Linear(self.n_heads * self.head_dim, self.dim, bias=False)
157
+
158
+ self.q_norm = RMSNorm(self.head_dim, eps=config.rms_norm_eps)
159
+ self.k_norm = RMSNorm(self.head_dim, eps=config.rms_norm_eps)
160
+
161
+ if self.use_per_head_gating:
162
+ self.head_gate = nn.Linear(self.dim, self.n_heads, bias=True)
163
+ nn.init.constant_(self.head_gate.bias, 1.0)
164
+ nn.init.zeros_(self.head_gate.weight)
165
+
166
+ def forward(self, x: torch.Tensor, cos: torch.Tensor, sin: torch.Tensor) -> torch.Tensor:
167
+ bsz, seqlen, _ = x.shape
168
+
169
+ xq = self.wq(x).view(bsz, seqlen, self.n_heads, self.head_dim).transpose(1, 2)
170
+ xk = self.wk(x).view(bsz, seqlen, self.n_kv_heads, self.head_dim).transpose(1, 2)
171
+ xv = self.wv(x).view(bsz, seqlen, self.n_kv_heads, self.head_dim).transpose(1, 2)
172
+
173
+ xq = self.q_norm(xq)
174
+ xk = self.k_norm(xk)
175
+
176
+ xq, xk = apply_rotary_pos_emb(xq, xk, cos, sin)
177
+
178
+ if self.num_kv_groups > 1:
179
+ xk = xk.repeat_interleave(self.num_kv_groups, dim=1)
180
+ xv_expanded = xv.repeat_interleave(self.num_kv_groups, dim=1)
181
+ else:
182
+ xv_expanded = xv
183
+
184
+ attn_out = F.scaled_dot_product_attention(xq, xk, xv_expanded, is_causal=True)
185
+
186
+ if self.use_xsa:
187
+ vn = F.normalize(xv_expanded, p=2, dim=-1, eps=1e-6)
188
+ proj = (attn_out * vn).sum(dim=-1, keepdim=True)
189
+ attn_out = attn_out - proj * vn
190
+
191
+ if self.use_per_head_gating:
192
+ gate = torch.sigmoid(self.head_gate(x)).transpose(1, 2).unsqueeze(-1)
193
+ attn_out = attn_out * gate
194
+
195
+ out = attn_out.transpose(1, 2).contiguous().view(bsz, seqlen, -1)
196
+ return self.wo(out)
197
+
198
+
199
+ class MultiLaneBlock(nn.Module):
200
+ def __init__(self, config: CustomConfig, layer_idx: int):
201
+ super().__init__()
202
+ self.num_lanes = config.num_lanes
203
+ self.dim = config.hidden_size
204
+ self.layer_idx = layer_idx
205
+
206
+ self.attn_norm = RMSNorm(self.dim, eps=config.rms_norm_eps)
207
+ self.attn = XSAGQAttention(config)
208
+
209
+ self.mlp_norm = RMSNorm(self.dim, eps=config.rms_norm_eps)
210
+ if config.swiglu_interval == 0:
211
+ self.use_swiglu = False
212
+ elif config.swiglu_interval == 1:
213
+ self.use_swiglu = True
214
+ else:
215
+ self.use_swiglu = ((layer_idx + 1) % config.swiglu_interval == 0)
216
+
217
+ if self.use_swiglu:
218
+ self.mlp = SwiGLUMLP(config)
219
+ else:
220
+ self.mlp = HadamardMLP(config)
221
+
222
+ self.lane_mix_attn = nn.Parameter(torch.eye(self.num_lanes) + 0.05 * torch.randn(self.num_lanes, self.num_lanes))
223
+ self.lane_mix_mlp = nn.Parameter(torch.eye(self.num_lanes) + 0.05 * torch.randn(self.num_lanes, self.num_lanes))
224
+
225
+ def forward(self, lanes: torch.Tensor, cos: torch.Tensor, sin: torch.Tensor) -> torch.Tensor:
226
+ primary = lanes[0]
227
+ attn_update = self.attn(self.attn_norm(primary), cos, sin)
228
+
229
+ mixed = torch.matmul(self.lane_mix_attn, lanes.view(self.num_lanes, -1)).view_as(lanes)
230
+ lanes = torch.cat([(mixed[0] + attn_update).unsqueeze(0), mixed[1:]], dim=0)
231
+
232
+ mlp_update = self.mlp(self.mlp_norm(lanes[0]))
233
+ mixed = torch.matmul(self.lane_mix_mlp, lanes.view(self.num_lanes, -1)).view_as(lanes)
234
+ lanes = torch.cat([(mixed[0] + mlp_update).unsqueeze(0), mixed[1:]], dim=0)
235
+ return lanes
236
+
237
+ class CustomPreTrainedModel(PreTrainedModel):
238
+ config_class = CustomConfig
239
+ base_model_prefix = "model"
240
+ supports_gradient_checkpointing = True
241
+ _no_split_modules = ["MultiLaneBlock"]
242
+
243
+ def _init_weights(self, module):
244
+ std = self.config.initializer_range
245
+ if isinstance(module, (nn.Linear, nn.Embedding)):
246
+ module.weight.data.normal_(mean=0.0, std=std)
247
+ if hasattr(module, "bias") and module.bias is not None:
248
+ module.bias.data.zero_()
249
+ elif isinstance(module, RMSNorm):
250
+ module.weight.data.fill_(1.0)
251
+
252
+ @classmethod
253
+ def from_pretrained(cls, pretrained_model_name_or_path, *model_args, **kwargs):
254
+ config = kwargs.pop("config", None)
255
+ kwargs.pop("trust_remote_code", None)
256
+ torch_dtype = kwargs.pop("torch_dtype", None)
257
+ kwargs.pop("device_map", None)
258
+ kwargs.pop("low_cpu_mem_usage", None)
259
+
260
+ if config is None:
261
+ config = CustomConfig.from_pretrained(pretrained_model_name_or_path)
262
+
263
+ model = cls(config, *model_args)
264
+
265
+ st_file = os.path.join(pretrained_model_name_or_path, "model.safetensors")
266
+ bin_file = os.path.join(pretrained_model_name_or_path, "pytorch_model.bin")
267
+
268
+ if os.path.exists(st_file):
269
+ state_dict = load_file(st_file)
270
+ model.load_state_dict(state_dict, strict=False)
271
+ elif os.path.exists(bin_file):
272
+ state_dict = torch.load(bin_file, map_location="cpu")
273
+ model.load_state_dict(state_dict, strict=False)
274
+ else:
275
+ return super().from_pretrained(pretrained_model_name_or_path, *model_args, config=config, **kwargs)
276
+
277
+ if getattr(config, "tie_word_embeddings", True) and hasattr(model, "lm_head") and hasattr(model, "model"):
278
+ model.lm_head.weight = model.model.embed_tokens.weight
279
+
280
+ if torch_dtype is not None:
281
+ model.to(dtype=torch_dtype)
282
+
283
+ return model
284
+
285
+ class CustomModel(CustomPreTrainedModel):
286
+ def __init__(self, config: CustomConfig, *args, **kwargs):
287
+ super().__init__(config)
288
+ self.config = config
289
+ self.num_lanes = config.num_lanes
290
+ self.gradient_checkpointing = False
291
+
292
+ self.embed_tokens = nn.Embedding(config.vocab_size, config.hidden_size)
293
+ if config.use_engram:
294
+ self.engram = EngramMemory(config)
295
+ self.engram_norm = RMSNorm(config.hidden_size, eps=config.rms_norm_eps)
296
+ else:
297
+ self.engram = None
298
+ self.engram_norm = None
299
+
300
+ self.layers = nn.ModuleList([
301
+ MultiLaneBlock(config, layer_idx=i) for i in range(config.num_hidden_layers)
302
+ ])
303
+
304
+ # Enhanced Lane Pooling: Learned softmax combination of all 3 lanes before norm
305
+ self.lane_pool_weights = nn.Parameter(torch.tensor([1.0] + [0.1] * (config.num_lanes - 1)))
306
+ self.norm = RMSNorm(config.hidden_size, eps=config.rms_norm_eps)
307
+ self.rotary_emb = RotaryEmbedding(config.head_dim, config.max_position_embeddings, config.rope_theta)
308
+
309
+ self.post_init()
310
+
311
+ def get_input_embeddings(self):
312
+ return self.embed_tokens
313
+
314
+ def set_input_embeddings(self, value):
315
+ self.embed_tokens = value
316
+
317
+ def forward(
318
+ self,
319
+ input_ids: torch.LongTensor = None,
320
+ attention_mask: Optional[torch.Tensor] = None,
321
+ position_ids: Optional[torch.LongTensor] = None,
322
+ inputs_embeds: Optional[torch.FloatTensor] = None,
323
+ use_cache: Optional[bool] = None,
324
+ output_attentions: Optional[bool] = None,
325
+ output_hidden_states: Optional[bool] = None,
326
+ return_dict: Optional[bool] = None,
327
+ ):
328
+ if input_ids is not None:
329
+ bsz, seqlen = input_ids.shape
330
+ h0 = self.embed_tokens(input_ids)
331
+ tokens_for_engram = input_ids
332
+ elif inputs_embeds is not None:
333
+ bsz, seqlen, _ = inputs_embeds.shape
334
+ h0 = inputs_embeds
335
+ tokens_for_engram = torch.zeros((bsz, seqlen), dtype=torch.long, device=inputs_embeds.device)
336
+ else:
337
+ raise ValueError("You must specify either input_ids or inputs_embeds")
338
+
339
+ if self.engram is not None:
340
+ engram_out = self.engram(self.engram_norm(h0), tokens_for_engram)
341
+ h0 = h0 + engram_out
342
+
343
+ lanes = h0.unsqueeze(0).repeat(self.num_lanes, 1, 1, 1)
344
+
345
+ cos, sin = self.rotary_emb(seqlen, device=h0.device, dtype=h0.dtype)
346
+ cos = cos.unsqueeze(0).unsqueeze(0)
347
+ sin = sin.unsqueeze(0).unsqueeze(0)
348
+
349
+ for layer in self.layers:
350
+ if self.gradient_checkpointing and self.training:
351
+ lanes = cp.checkpoint(layer, lanes, cos, sin, use_reentrant=False)
352
+ else:
353
+ lanes = layer(lanes, cos, sin)
354
+
355
+ # Weighted lane pooling for higher representation power
356
+ pool_weights = F.softmax(self.lane_pool_weights, dim=0).view(self.num_lanes, 1, 1, 1)
357
+ pooled = (lanes * pool_weights).sum(dim=0)
358
+ out = self.norm(pooled)
359
+ return out
360
+
361
+ class CustomModelForCausalLM(CustomPreTrainedModel, GenerationMixin):
362
+ _tied_weights_keys = {"lm_head.weight": "model.embed_tokens.weight"}
363
+ _keys_to_ignore_on_load_missing = ["lm_head.weight"]
364
+ supports_gradient_checkpointing = True
365
+
366
+ def __init__(self, config: CustomConfig, *args, **kwargs):
367
+ super().__init__(config)
368
+ self.model = CustomModel(config)
369
+ self.vocab_size = config.vocab_size
370
+ self.lm_head = nn.Linear(config.hidden_size, config.vocab_size, bias=False)
371
+
372
+ self.post_init()
373
+
374
+ def get_input_embeddings(self):
375
+ return self.model.embed_tokens
376
+
377
+ def set_input_embeddings(self, value):
378
+ self.model.embed_tokens = value
379
+
380
+ def get_output_embeddings(self):
381
+ return self.lm_head
382
+
383
+ def set_output_embeddings(self, new_embeddings):
384
+ self.lm_head = new_embeddings
385
+
386
+ def prepare_inputs_for_generation(
387
+ self,
388
+ input_ids,
389
+ past_key_values=None,
390
+ attention_mask=None,
391
+ inputs_embeds=None,
392
+ **kwargs,
393
+ ):
394
+ if inputs_embeds is not None and past_key_values is None:
395
+ model_inputs = {"inputs_embeds": inputs_embeds}
396
+ else:
397
+ model_inputs = {"input_ids": input_ids}
398
+
399
+ model_inputs.update({
400
+ "attention_mask": attention_mask,
401
+ "use_cache": False,
402
+ })
403
+ return model_inputs
404
+
405
+ def forward(
406
+ self,
407
+ input_ids: torch.LongTensor = None,
408
+ attention_mask: Optional[torch.Tensor] = None,
409
+ position_ids: Optional[torch.LongTensor] = None,
410
+ inputs_embeds: Optional[torch.FloatTensor] = None,
411
+ labels: Optional[torch.LongTensor] = None,
412
+ use_cache: Optional[bool] = None,
413
+ output_attentions: Optional[bool] = None,
414
+ output_hidden_states: Optional[bool] = None,
415
+ return_dict: Optional[bool] = None,
416
+ ) -> Union[Tuple, CausalLMOutputWithPast]:
417
+ return_dict = return_dict if return_dict is not None else getattr(self.config, "return_dict", True)
418
+
419
+ hidden_states = self.model(
420
+ input_ids=input_ids,
421
+ attention_mask=attention_mask,
422
+ position_ids=position_ids,
423
+ inputs_embeds=inputs_embeds,
424
+ use_cache=use_cache,
425
+ output_attentions=output_attentions,
426
+ output_hidden_states=output_hidden_states,
427
+ return_dict=return_dict,
428
+ )
429
+
430
+ logits = self.lm_head(hidden_states)
431
+ logits = logits.float()
432
+
433
+ loss = None
434
+ if labels is not None:
435
+ shift_logits = logits[..., :-1, :].contiguous()
436
+ shift_labels = labels[..., 1:].contiguous()
437
+ loss = F.cross_entropy(
438
+ shift_logits.view(-1, self.config.vocab_size),
439
+ shift_labels.view(-1),
440
+ ignore_index=-100
441
+ )
442
+
443
+ if not return_dict:
444
+ output = (logits,)
445
+ return ((loss,) + output) if loss is not None else output
446
+
447
+ return CausalLMOutputWithPast(
448
+ loss=loss,
449
+ logits=logits,
450
+ past_key_values=None,
451
+ hidden_states=None,
452
+ attentions=None,
453
+ )
454
+
455
+
456
+
457
+ AutoConfig.register("custom_model", CustomConfig)
458
+ AutoModel.register(CustomConfig, CustomModel)
459
+ AutoModelForCausalLM.register(CustomConfig, CustomModelForCausalLM)
special_tokens_map.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": "<|bos|>",
3
+ "eos_token": "<|eos|>",
4
+ "unk_token": "<|unk|>",
5
+ "pad_token": "<|pad|>"
6
+ }
tokenizer.json ADDED
@@ -0,0 +1,351 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": "1.0",
3
+ "truncation": null,
4
+ "padding": null,
5
+ "added_tokens": [
6
+ {
7
+ "id": 256,
8
+ "content": "<|bos|>",
9
+ "single_word": false,
10
+ "lstrip": false,
11
+ "rstrip": false,
12
+ "normalized": false,
13
+ "special": true
14
+ },
15
+ {
16
+ "id": 257,
17
+ "content": "<|eos|>",
18
+ "single_word": false,
19
+ "lstrip": false,
20
+ "rstrip": false,
21
+ "normalized": false,
22
+ "special": true
23
+ },
24
+ {
25
+ "id": 258,
26
+ "content": "<|unk|>",
27
+ "single_word": false,
28
+ "lstrip": false,
29
+ "rstrip": false,
30
+ "normalized": false,
31
+ "special": true
32
+ },
33
+ {
34
+ "id": 259,
35
+ "content": "<|pad|>",
36
+ "single_word": false,
37
+ "lstrip": false,
38
+ "rstrip": false,
39
+ "normalized": false,
40
+ "special": true
41
+ }
42
+ ],
43
+ "normalizer": null,
44
+ "pre_tokenizer": {
45
+ "type": "ByteLevel",
46
+ "add_prefix_space": false,
47
+ "trim_offsets": true,
48
+ "use_regex": false
49
+ },
50
+ "post_processor": {
51
+ "type": "TemplateProcessing",
52
+ "single": [
53
+ {
54
+ "Sequence": {
55
+ "id": "A",
56
+ "type_id": 0
57
+ }
58
+ }
59
+ ],
60
+ "pair": [
61
+ {
62
+ "Sequence": {
63
+ "id": "A",
64
+ "type_id": 0
65
+ }
66
+ },
67
+ {
68
+ "Sequence": {
69
+ "id": "B",
70
+ "type_id": 1
71
+ }
72
+ }
73
+ ],
74
+ "special_tokens": {}
75
+ },
76
+ "decoder": {
77
+ "type": "ByteLevel",
78
+ "add_prefix_space": true,
79
+ "trim_offsets": true,
80
+ "use_regex": true
81
+ },
82
+ "model": {
83
+ "type": "BPE",
84
+ "dropout": null,
85
+ "unk_token": null,
86
+ "continuing_subword_prefix": null,
87
+ "end_of_word_suffix": null,
88
+ "fuse_unk": false,
89
+ "byte_fallback": false,
90
+ "ignore_merges": false,
91
+ "vocab": {
92
+ "Ā": 0,
93
+ "ā": 1,
94
+ "Ă": 2,
95
+ "ă": 3,
96
+ "Ą": 4,
97
+ "ą": 5,
98
+ "Ć": 6,
99
+ "ć": 7,
100
+ "Ĉ": 8,
101
+ "ĉ": 9,
102
+ "Ċ": 10,
103
+ "ċ": 11,
104
+ "Č": 12,
105
+ "č": 13,
106
+ "Ď": 14,
107
+ "ď": 15,
108
+ "Đ": 16,
109
+ "đ": 17,
110
+ "Ē": 18,
111
+ "ē": 19,
112
+ "Ĕ": 20,
113
+ "ĕ": 21,
114
+ "Ė": 22,
115
+ "ė": 23,
116
+ "Ę": 24,
117
+ "ę": 25,
118
+ "Ě": 26,
119
+ "ě": 27,
120
+ "Ĝ": 28,
121
+ "ĝ": 29,
122
+ "Ğ": 30,
123
+ "ğ": 31,
124
+ "Ġ": 32,
125
+ "!": 33,
126
+ "\"": 34,
127
+ "#": 35,
128
+ "$": 36,
129
+ "%": 37,
130
+ "&": 38,
131
+ "'": 39,
132
+ "(": 40,
133
+ ")": 41,
134
+ "*": 42,
135
+ "+": 43,
136
+ ",": 44,
137
+ "-": 45,
138
+ ".": 46,
139
+ "/": 47,
140
+ "0": 48,
141
+ "1": 49,
142
+ "2": 50,
143
+ "3": 51,
144
+ "4": 52,
145
+ "5": 53,
146
+ "6": 54,
147
+ "7": 55,
148
+ "8": 56,
149
+ "9": 57,
150
+ ":": 58,
151
+ ";": 59,
152
+ "<": 60,
153
+ "=": 61,
154
+ ">": 62,
155
+ "?": 63,
156
+ "@": 64,
157
+ "A": 65,
158
+ "B": 66,
159
+ "C": 67,
160
+ "D": 68,
161
+ "E": 69,
162
+ "F": 70,
163
+ "G": 71,
164
+ "H": 72,
165
+ "I": 73,
166
+ "J": 74,
167
+ "K": 75,
168
+ "L": 76,
169
+ "M": 77,
170
+ "N": 78,
171
+ "O": 79,
172
+ "P": 80,
173
+ "Q": 81,
174
+ "R": 82,
175
+ "S": 83,
176
+ "T": 84,
177
+ "U": 85,
178
+ "V": 86,
179
+ "W": 87,
180
+ "X": 88,
181
+ "Y": 89,
182
+ "Z": 90,
183
+ "[": 91,
184
+ "\\": 92,
185
+ "]": 93,
186
+ "^": 94,
187
+ "_": 95,
188
+ "`": 96,
189
+ "a": 97,
190
+ "b": 98,
191
+ "c": 99,
192
+ "d": 100,
193
+ "e": 101,
194
+ "f": 102,
195
+ "g": 103,
196
+ "h": 104,
197
+ "i": 105,
198
+ "j": 106,
199
+ "k": 107,
200
+ "l": 108,
201
+ "m": 109,
202
+ "n": 110,
203
+ "o": 111,
204
+ "p": 112,
205
+ "q": 113,
206
+ "r": 114,
207
+ "s": 115,
208
+ "t": 116,
209
+ "u": 117,
210
+ "v": 118,
211
+ "w": 119,
212
+ "x": 120,
213
+ "y": 121,
214
+ "z": 122,
215
+ "{": 123,
216
+ "|": 124,
217
+ "}": 125,
218
+ "~": 126,
219
+ "ġ": 127,
220
+ "Ģ": 128,
221
+ "ģ": 129,
222
+ "Ĥ": 130,
223
+ "ĥ": 131,
224
+ "Ħ": 132,
225
+ "ħ": 133,
226
+ "Ĩ": 134,
227
+ "ĩ": 135,
228
+ "Ī": 136,
229
+ "ī": 137,
230
+ "Ĭ": 138,
231
+ "ĭ": 139,
232
+ "Į": 140,
233
+ "į": 141,
234
+ "İ": 142,
235
+ "ı": 143,
236
+ "IJ": 144,
237
+ "ij": 145,
238
+ "Ĵ": 146,
239
+ "ĵ": 147,
240
+ "Ķ": 148,
241
+ "ķ": 149,
242
+ "ĸ": 150,
243
+ "Ĺ": 151,
244
+ "ĺ": 152,
245
+ "Ļ": 153,
246
+ "ļ": 154,
247
+ "Ľ": 155,
248
+ "ľ": 156,
249
+ "Ŀ": 157,
250
+ "ŀ": 158,
251
+ "Ł": 159,
252
+ "ł": 160,
253
+ "¡": 161,
254
+ "¢": 162,
255
+ "£": 163,
256
+ "¤": 164,
257
+ "¥": 165,
258
+ "¦": 166,
259
+ "§": 167,
260
+ "¨": 168,
261
+ "©": 169,
262
+ "ª": 170,
263
+ "«": 171,
264
+ "¬": 172,
265
+ "Ń": 173,
266
+ "®": 174,
267
+ "¯": 175,
268
+ "°": 176,
269
+ "±": 177,
270
+ "²": 178,
271
+ "³": 179,
272
+ "´": 180,
273
+ "µ": 181,
274
+ "¶": 182,
275
+ "·": 183,
276
+ "¸": 184,
277
+ "¹": 185,
278
+ "º": 186,
279
+ "»": 187,
280
+ "¼": 188,
281
+ "½": 189,
282
+ "¾": 190,
283
+ "¿": 191,
284
+ "À": 192,
285
+ "Á": 193,
286
+ "Â": 194,
287
+ "Ã": 195,
288
+ "Ä": 196,
289
+ "Å": 197,
290
+ "Æ": 198,
291
+ "Ç": 199,
292
+ "È": 200,
293
+ "É": 201,
294
+ "Ê": 202,
295
+ "Ë": 203,
296
+ "Ì": 204,
297
+ "Í": 205,
298
+ "Î": 206,
299
+ "Ï": 207,
300
+ "Ð": 208,
301
+ "Ñ": 209,
302
+ "Ò": 210,
303
+ "Ó": 211,
304
+ "Ô": 212,
305
+ "Õ": 213,
306
+ "Ö": 214,
307
+ "×": 215,
308
+ "Ø": 216,
309
+ "Ù": 217,
310
+ "Ú": 218,
311
+ "Û": 219,
312
+ "Ü": 220,
313
+ "Ý": 221,
314
+ "Þ": 222,
315
+ "ß": 223,
316
+ "à": 224,
317
+ "á": 225,
318
+ "â": 226,
319
+ "ã": 227,
320
+ "ä": 228,
321
+ "å": 229,
322
+ "æ": 230,
323
+ "ç": 231,
324
+ "è": 232,
325
+ "é": 233,
326
+ "ê": 234,
327
+ "ë": 235,
328
+ "ì": 236,
329
+ "í": 237,
330
+ "î": 238,
331
+ "ï": 239,
332
+ "ð": 240,
333
+ "ñ": 241,
334
+ "ò": 242,
335
+ "ó": 243,
336
+ "ô": 244,
337
+ "õ": 245,
338
+ "ö": 246,
339
+ "÷": 247,
340
+ "ø": 248,
341
+ "ù": 249,
342
+ "ú": 250,
343
+ "û": 251,
344
+ "ü": 252,
345
+ "ý": 253,
346
+ "þ": 254,
347
+ "ÿ": 255
348
+ },
349
+ "merges": []
350
+ }
351
+ }
tokenizer_config.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "backend": "tokenizers",
3
+ "bos_token": "<|bos|>",
4
+ "eos_token": "<|eos|>",
5
+ "model_max_length": 1000000000000000019884624838656,
6
+ "pad_token": "<|pad|>",
7
+ "tokenizer_class": "TokenizersBackend",
8
+ "unk_token": "<|unk|>"
9
+ }
trainer_state.json ADDED
@@ -0,0 +1,1410 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_global_step": null,
3
+ "best_metric": null,
4
+ "best_model_checkpoint": null,
5
+ "epoch": 0.22103569035662726,
6
+ "eval_steps": 250,
7
+ "global_step": 8000,
8
+ "is_hyper_param_search": false,
9
+ "is_local_process_zero": true,
10
+ "is_world_process_zero": true,
11
+ "log_history": [
12
+ {
13
+ "epoch": 0.0013814730647289204,
14
+ "grad_norm": 1.3092303276062012,
15
+ "learning_rate": 0.0009187500000000001,
16
+ "loss": 5.301650390625,
17
+ "step": 50
18
+ },
19
+ {
20
+ "epoch": 0.0027629461294578408,
21
+ "grad_norm": 0.2540936768054962,
22
+ "learning_rate": 0.00185625,
23
+ "loss": 3.7713958740234377,
24
+ "step": 100
25
+ },
26
+ {
27
+ "epoch": 0.004144419194186761,
28
+ "grad_norm": 0.8980741500854492,
29
+ "learning_rate": 0.0027937500000000002,
30
+ "loss": 3.084112548828125,
31
+ "step": 150
32
+ },
33
+ {
34
+ "epoch": 0.0055258922589156816,
35
+ "grad_norm": 0.513289213180542,
36
+ "learning_rate": 0.003,
37
+ "loss": 2.6681784057617186,
38
+ "step": 200
39
+ },
40
+ {
41
+ "epoch": 0.006907365323644602,
42
+ "grad_norm": 0.8646414875984192,
43
+ "learning_rate": 0.003,
44
+ "loss": 2.4488145446777345,
45
+ "step": 250
46
+ },
47
+ {
48
+ "epoch": 0.006907365323644602,
49
+ "eval_loss": 2.3864049911499023,
50
+ "eval_runtime": 5.0393,
51
+ "eval_samples_per_second": 404.423,
52
+ "eval_steps_per_second": 3.175,
53
+ "step": 250
54
+ },
55
+ {
56
+ "epoch": 0.008288838388373522,
57
+ "grad_norm": 1.049102783203125,
58
+ "learning_rate": 0.003,
59
+ "loss": 2.3174089050292968,
60
+ "step": 300
61
+ },
62
+ {
63
+ "epoch": 0.009670311453102444,
64
+ "grad_norm": 2.3267924785614014,
65
+ "learning_rate": 0.003,
66
+ "loss": 2.2231291198730467,
67
+ "step": 350
68
+ },
69
+ {
70
+ "epoch": 0.011051784517831363,
71
+ "grad_norm": 1.4895470142364502,
72
+ "learning_rate": 0.003,
73
+ "loss": 2.136985168457031,
74
+ "step": 400
75
+ },
76
+ {
77
+ "epoch": 0.012433257582560284,
78
+ "grad_norm": 0.8463179469108582,
79
+ "learning_rate": 0.003,
80
+ "loss": 2.075450897216797,
81
+ "step": 450
82
+ },
83
+ {
84
+ "epoch": 0.013814730647289204,
85
+ "grad_norm": 1.4170407056808472,
86
+ "learning_rate": 0.003,
87
+ "loss": 2.0253837585449217,
88
+ "step": 500
89
+ },
90
+ {
91
+ "epoch": 0.013814730647289204,
92
+ "eval_loss": 2.0032660961151123,
93
+ "eval_runtime": 4.8177,
94
+ "eval_samples_per_second": 423.027,
95
+ "eval_steps_per_second": 3.321,
96
+ "step": 500
97
+ },
98
+ {
99
+ "epoch": 0.015196203712018125,
100
+ "grad_norm": 0.9727197289466858,
101
+ "learning_rate": 0.003,
102
+ "loss": 1.985428924560547,
103
+ "step": 550
104
+ },
105
+ {
106
+ "epoch": 0.016577676776747045,
107
+ "grad_norm": 1.3294126987457275,
108
+ "learning_rate": 0.003,
109
+ "loss": 1.945387725830078,
110
+ "step": 600
111
+ },
112
+ {
113
+ "epoch": 0.017959149841475966,
114
+ "grad_norm": 1.1075317859649658,
115
+ "learning_rate": 0.003,
116
+ "loss": 1.909156494140625,
117
+ "step": 650
118
+ },
119
+ {
120
+ "epoch": 0.019340622906204887,
121
+ "grad_norm": 1.532372236251831,
122
+ "learning_rate": 0.003,
123
+ "loss": 1.8862774658203125,
124
+ "step": 700
125
+ },
126
+ {
127
+ "epoch": 0.02072209597093381,
128
+ "grad_norm": 1.4036468267440796,
129
+ "learning_rate": 0.003,
130
+ "loss": 1.8624417114257812,
131
+ "step": 750
132
+ },
133
+ {
134
+ "epoch": 0.02072209597093381,
135
+ "eval_loss": 1.8611562252044678,
136
+ "eval_runtime": 4.8927,
137
+ "eval_samples_per_second": 416.539,
138
+ "eval_steps_per_second": 3.27,
139
+ "step": 750
140
+ },
141
+ {
142
+ "epoch": 0.022103569035662726,
143
+ "grad_norm": 0.9797951579093933,
144
+ "learning_rate": 0.003,
145
+ "loss": 1.8470022583007812,
146
+ "step": 800
147
+ },
148
+ {
149
+ "epoch": 0.023485042100391647,
150
+ "grad_norm": 1.0192056894302368,
151
+ "learning_rate": 0.003,
152
+ "loss": 1.8303775024414062,
153
+ "step": 850
154
+ },
155
+ {
156
+ "epoch": 0.02486651516512057,
157
+ "grad_norm": 1.3044160604476929,
158
+ "learning_rate": 0.003,
159
+ "loss": 1.8083892822265626,
160
+ "step": 900
161
+ },
162
+ {
163
+ "epoch": 0.02624798822984949,
164
+ "grad_norm": 1.347043514251709,
165
+ "learning_rate": 0.003,
166
+ "loss": 1.7919261169433593,
167
+ "step": 950
168
+ },
169
+ {
170
+ "epoch": 0.027629461294578408,
171
+ "grad_norm": 1.4868067502975464,
172
+ "learning_rate": 0.003,
173
+ "loss": 1.7848297119140626,
174
+ "step": 1000
175
+ },
176
+ {
177
+ "epoch": 0.027629461294578408,
178
+ "eval_loss": 1.7806859016418457,
179
+ "eval_runtime": 4.9437,
180
+ "eval_samples_per_second": 412.245,
181
+ "eval_steps_per_second": 3.236,
182
+ "step": 1000
183
+ },
184
+ {
185
+ "epoch": 0.02901093435930733,
186
+ "grad_norm": 1.3199470043182373,
187
+ "learning_rate": 0.003,
188
+ "loss": 1.770255584716797,
189
+ "step": 1050
190
+ },
191
+ {
192
+ "epoch": 0.03039240742403625,
193
+ "grad_norm": 0.942984402179718,
194
+ "learning_rate": 0.003,
195
+ "loss": 1.764229278564453,
196
+ "step": 1100
197
+ },
198
+ {
199
+ "epoch": 0.03177388048876517,
200
+ "grad_norm": 1.001526951789856,
201
+ "learning_rate": 0.003,
202
+ "loss": 1.748619842529297,
203
+ "step": 1150
204
+ },
205
+ {
206
+ "epoch": 0.03315535355349409,
207
+ "grad_norm": 0.9165797233581543,
208
+ "learning_rate": 0.003,
209
+ "loss": 1.7377178955078125,
210
+ "step": 1200
211
+ },
212
+ {
213
+ "epoch": 0.034536826618223014,
214
+ "grad_norm": 1.5860354900360107,
215
+ "learning_rate": 0.003,
216
+ "loss": 1.7299589538574218,
217
+ "step": 1250
218
+ },
219
+ {
220
+ "epoch": 0.034536826618223014,
221
+ "eval_loss": 1.7355499267578125,
222
+ "eval_runtime": 4.8017,
223
+ "eval_samples_per_second": 424.429,
224
+ "eval_steps_per_second": 3.332,
225
+ "step": 1250
226
+ },
227
+ {
228
+ "epoch": 0.03591829968295193,
229
+ "grad_norm": 1.7614655494689941,
230
+ "learning_rate": 0.003,
231
+ "loss": 1.7231251525878906,
232
+ "step": 1300
233
+ },
234
+ {
235
+ "epoch": 0.03729977274768085,
236
+ "grad_norm": 0.8269591927528381,
237
+ "learning_rate": 0.003,
238
+ "loss": 1.7191682434082032,
239
+ "step": 1350
240
+ },
241
+ {
242
+ "epoch": 0.038681245812409774,
243
+ "grad_norm": 1.2936993837356567,
244
+ "learning_rate": 0.003,
245
+ "loss": 1.715775146484375,
246
+ "step": 1400
247
+ },
248
+ {
249
+ "epoch": 0.04006271887713869,
250
+ "grad_norm": 0.8943546414375305,
251
+ "learning_rate": 0.003,
252
+ "loss": 1.7027583312988281,
253
+ "step": 1450
254
+ },
255
+ {
256
+ "epoch": 0.04144419194186762,
257
+ "grad_norm": 0.8446581959724426,
258
+ "learning_rate": 0.003,
259
+ "loss": 1.7010877990722657,
260
+ "step": 1500
261
+ },
262
+ {
263
+ "epoch": 0.04144419194186762,
264
+ "eval_loss": 1.7066650390625,
265
+ "eval_runtime": 4.8419,
266
+ "eval_samples_per_second": 420.908,
267
+ "eval_steps_per_second": 3.304,
268
+ "step": 1500
269
+ },
270
+ {
271
+ "epoch": 0.042825665006596535,
272
+ "grad_norm": 1.1785316467285156,
273
+ "learning_rate": 0.003,
274
+ "loss": 1.6969337463378906,
275
+ "step": 1550
276
+ },
277
+ {
278
+ "epoch": 0.04420713807132545,
279
+ "grad_norm": 1.1146525144577026,
280
+ "learning_rate": 0.003,
281
+ "loss": 1.6898464965820312,
282
+ "step": 1600
283
+ },
284
+ {
285
+ "epoch": 0.04558861113605438,
286
+ "grad_norm": 1.050032377243042,
287
+ "learning_rate": 0.003,
288
+ "loss": 1.6903854370117188,
289
+ "step": 1650
290
+ },
291
+ {
292
+ "epoch": 0.046970084200783295,
293
+ "grad_norm": 0.817931056022644,
294
+ "learning_rate": 0.003,
295
+ "loss": 1.6805955505371093,
296
+ "step": 1700
297
+ },
298
+ {
299
+ "epoch": 0.04835155726551221,
300
+ "grad_norm": 0.7598580121994019,
301
+ "learning_rate": 0.003,
302
+ "loss": 1.6817108154296876,
303
+ "step": 1750
304
+ },
305
+ {
306
+ "epoch": 0.04835155726551221,
307
+ "eval_loss": 1.681281328201294,
308
+ "eval_runtime": 4.9443,
309
+ "eval_samples_per_second": 412.196,
310
+ "eval_steps_per_second": 3.236,
311
+ "step": 1750
312
+ },
313
+ {
314
+ "epoch": 0.04973303033024114,
315
+ "grad_norm": 1.0627769231796265,
316
+ "learning_rate": 0.003,
317
+ "loss": 1.6690780639648437,
318
+ "step": 1800
319
+ },
320
+ {
321
+ "epoch": 0.051114503394970055,
322
+ "grad_norm": 0.9967713952064514,
323
+ "learning_rate": 0.003,
324
+ "loss": 1.6677894592285156,
325
+ "step": 1850
326
+ },
327
+ {
328
+ "epoch": 0.05249597645969898,
329
+ "grad_norm": 0.8788776397705078,
330
+ "learning_rate": 0.003,
331
+ "loss": 1.671481170654297,
332
+ "step": 1900
333
+ },
334
+ {
335
+ "epoch": 0.0538774495244279,
336
+ "grad_norm": 0.8975939750671387,
337
+ "learning_rate": 0.003,
338
+ "loss": 1.6636967468261719,
339
+ "step": 1950
340
+ },
341
+ {
342
+ "epoch": 0.055258922589156816,
343
+ "grad_norm": 0.8807463645935059,
344
+ "learning_rate": 0.003,
345
+ "loss": 1.662882080078125,
346
+ "step": 2000
347
+ },
348
+ {
349
+ "epoch": 0.055258922589156816,
350
+ "eval_loss": 1.659508228302002,
351
+ "eval_runtime": 4.8341,
352
+ "eval_samples_per_second": 421.589,
353
+ "eval_steps_per_second": 3.31,
354
+ "step": 2000
355
+ },
356
+ {
357
+ "epoch": 0.05664039565388574,
358
+ "grad_norm": 0.8365132212638855,
359
+ "learning_rate": 0.003,
360
+ "loss": 1.6577224731445312,
361
+ "step": 2050
362
+ },
363
+ {
364
+ "epoch": 0.05802186871861466,
365
+ "grad_norm": 1.006463646888733,
366
+ "learning_rate": 0.003,
367
+ "loss": 1.651870574951172,
368
+ "step": 2100
369
+ },
370
+ {
371
+ "epoch": 0.059403341783343576,
372
+ "grad_norm": 1.0645591020584106,
373
+ "learning_rate": 0.003,
374
+ "loss": 1.655391845703125,
375
+ "step": 2150
376
+ },
377
+ {
378
+ "epoch": 0.0607848148480725,
379
+ "grad_norm": 0.7508670091629028,
380
+ "learning_rate": 0.003,
381
+ "loss": 1.641587677001953,
382
+ "step": 2200
383
+ },
384
+ {
385
+ "epoch": 0.06216628791280142,
386
+ "grad_norm": 0.9019992351531982,
387
+ "learning_rate": 0.003,
388
+ "loss": 1.6511729431152344,
389
+ "step": 2250
390
+ },
391
+ {
392
+ "epoch": 0.06216628791280142,
393
+ "eval_loss": 1.6495267152786255,
394
+ "eval_runtime": 4.9408,
395
+ "eval_samples_per_second": 412.485,
396
+ "eval_steps_per_second": 3.238,
397
+ "step": 2250
398
+ },
399
+ {
400
+ "epoch": 0.06354776097753034,
401
+ "grad_norm": 0.8229948282241821,
402
+ "learning_rate": 0.003,
403
+ "loss": 1.647374725341797,
404
+ "step": 2300
405
+ },
406
+ {
407
+ "epoch": 0.06492923404225927,
408
+ "grad_norm": 0.9779911041259766,
409
+ "learning_rate": 0.003,
410
+ "loss": 1.6417164611816406,
411
+ "step": 2350
412
+ },
413
+ {
414
+ "epoch": 0.06631070710698818,
415
+ "grad_norm": 0.8557340502738953,
416
+ "learning_rate": 0.003,
417
+ "loss": 1.6406777954101563,
418
+ "step": 2400
419
+ },
420
+ {
421
+ "epoch": 0.0676921801717171,
422
+ "grad_norm": 0.7618058919906616,
423
+ "learning_rate": 0.003,
424
+ "loss": 1.6387905883789062,
425
+ "step": 2450
426
+ },
427
+ {
428
+ "epoch": 0.06907365323644603,
429
+ "grad_norm": 0.9702732563018799,
430
+ "learning_rate": 0.003,
431
+ "loss": 1.6384074401855468,
432
+ "step": 2500
433
+ },
434
+ {
435
+ "epoch": 0.06907365323644603,
436
+ "eval_loss": 1.6367918252944946,
437
+ "eval_runtime": 5.186,
438
+ "eval_samples_per_second": 392.979,
439
+ "eval_steps_per_second": 3.085,
440
+ "step": 2500
441
+ },
442
+ {
443
+ "epoch": 0.07045512630117494,
444
+ "grad_norm": 0.8180472254753113,
445
+ "learning_rate": 0.003,
446
+ "loss": 1.6398277282714844,
447
+ "step": 2550
448
+ },
449
+ {
450
+ "epoch": 0.07183659936590386,
451
+ "grad_norm": 0.8394176959991455,
452
+ "learning_rate": 0.003,
453
+ "loss": 1.6309616088867187,
454
+ "step": 2600
455
+ },
456
+ {
457
+ "epoch": 0.07321807243063279,
458
+ "grad_norm": 1.1738929748535156,
459
+ "learning_rate": 0.003,
460
+ "loss": 1.6329539489746094,
461
+ "step": 2650
462
+ },
463
+ {
464
+ "epoch": 0.0745995454953617,
465
+ "grad_norm": 0.7382224798202515,
466
+ "learning_rate": 0.003,
467
+ "loss": 1.6252481079101562,
468
+ "step": 2700
469
+ },
470
+ {
471
+ "epoch": 0.07598101856009062,
472
+ "grad_norm": 0.7925794720649719,
473
+ "learning_rate": 0.003,
474
+ "loss": 1.628258056640625,
475
+ "step": 2750
476
+ },
477
+ {
478
+ "epoch": 0.07598101856009062,
479
+ "eval_loss": 1.6294986009597778,
480
+ "eval_runtime": 5.0001,
481
+ "eval_samples_per_second": 407.594,
482
+ "eval_steps_per_second": 3.2,
483
+ "step": 2750
484
+ },
485
+ {
486
+ "epoch": 0.07736249162481955,
487
+ "grad_norm": 1.0887517929077148,
488
+ "learning_rate": 0.003,
489
+ "loss": 1.6292604064941407,
490
+ "step": 2800
491
+ },
492
+ {
493
+ "epoch": 0.07874396468954846,
494
+ "grad_norm": 0.8471100926399231,
495
+ "learning_rate": 0.003,
496
+ "loss": 1.6208766174316407,
497
+ "step": 2850
498
+ },
499
+ {
500
+ "epoch": 0.08012543775427738,
501
+ "grad_norm": 0.8405469059944153,
502
+ "learning_rate": 0.003,
503
+ "loss": 1.6250108337402345,
504
+ "step": 2900
505
+ },
506
+ {
507
+ "epoch": 0.08150691081900631,
508
+ "grad_norm": 0.7940107583999634,
509
+ "learning_rate": 0.003,
510
+ "loss": 1.6223403930664062,
511
+ "step": 2950
512
+ },
513
+ {
514
+ "epoch": 0.08288838388373523,
515
+ "grad_norm": 0.9527040123939514,
516
+ "learning_rate": 0.003,
517
+ "loss": 1.62312744140625,
518
+ "step": 3000
519
+ },
520
+ {
521
+ "epoch": 0.08288838388373523,
522
+ "eval_loss": 1.622558832168579,
523
+ "eval_runtime": 4.9038,
524
+ "eval_samples_per_second": 415.594,
525
+ "eval_steps_per_second": 3.263,
526
+ "step": 3000
527
+ },
528
+ {
529
+ "epoch": 0.08426985694846414,
530
+ "grad_norm": 0.7105967402458191,
531
+ "learning_rate": 0.003,
532
+ "loss": 1.6175238037109374,
533
+ "step": 3050
534
+ },
535
+ {
536
+ "epoch": 0.08565133001319307,
537
+ "grad_norm": 1.089608907699585,
538
+ "learning_rate": 0.003,
539
+ "loss": 1.6170733642578126,
540
+ "step": 3100
541
+ },
542
+ {
543
+ "epoch": 0.087032803077922,
544
+ "grad_norm": 0.8875170350074768,
545
+ "learning_rate": 0.003,
546
+ "loss": 1.61830322265625,
547
+ "step": 3150
548
+ },
549
+ {
550
+ "epoch": 0.0884142761426509,
551
+ "grad_norm": 0.9304706454277039,
552
+ "learning_rate": 0.003,
553
+ "loss": 1.6177555847167968,
554
+ "step": 3200
555
+ },
556
+ {
557
+ "epoch": 0.08979574920737983,
558
+ "grad_norm": 0.8498280644416809,
559
+ "learning_rate": 0.0029992286819925424,
560
+ "loss": 1.6121067810058594,
561
+ "step": 3250
562
+ },
563
+ {
564
+ "epoch": 0.08979574920737983,
565
+ "eval_loss": 1.6201170682907104,
566
+ "eval_runtime": 4.8624,
567
+ "eval_samples_per_second": 419.135,
568
+ "eval_steps_per_second": 3.291,
569
+ "step": 3250
570
+ },
571
+ {
572
+ "epoch": 0.09117722227210875,
573
+ "grad_norm": 0.884667694568634,
574
+ "learning_rate": 0.0029968522736369967,
575
+ "loss": 1.6176124572753907,
576
+ "step": 3300
577
+ },
578
+ {
579
+ "epoch": 0.09255869533683767,
580
+ "grad_norm": 0.8628567457199097,
581
+ "learning_rate": 0.0029928729983747797,
582
+ "loss": 1.6118777465820313,
583
+ "step": 3350
584
+ },
585
+ {
586
+ "epoch": 0.09394016840156659,
587
+ "grad_norm": 0.7607647776603699,
588
+ "learning_rate": 0.002987295117313512,
589
+ "loss": 1.6121871948242188,
590
+ "step": 3400
591
+ },
592
+ {
593
+ "epoch": 0.09532164146629551,
594
+ "grad_norm": 0.6003952622413635,
595
+ "learning_rate": 0.002980124603387944,
596
+ "loss": 1.6035992431640624,
597
+ "step": 3450
598
+ },
599
+ {
600
+ "epoch": 0.09670311453102443,
601
+ "grad_norm": 0.668270468711853,
602
+ "learning_rate": 0.0029713691349639894,
603
+ "loss": 1.6169198608398438,
604
+ "step": 3500
605
+ },
606
+ {
607
+ "epoch": 0.09670311453102443,
608
+ "eval_loss": 1.61012864112854,
609
+ "eval_runtime": 4.8048,
610
+ "eval_samples_per_second": 424.158,
611
+ "eval_steps_per_second": 3.33,
612
+ "step": 3500
613
+ },
614
+ {
615
+ "epoch": 0.09808458759575335,
616
+ "grad_norm": 0.8415676355361938,
617
+ "learning_rate": 0.002961038087616538,
618
+ "loss": 1.6114456176757812,
619
+ "step": 3550
620
+ },
621
+ {
622
+ "epoch": 0.09946606066048228,
623
+ "grad_norm": 0.7975565195083618,
624
+ "learning_rate": 0.002949142524089853,
625
+ "loss": 1.6004766845703124,
626
+ "step": 3600
627
+ },
628
+ {
629
+ "epoch": 0.10084753372521119,
630
+ "grad_norm": 0.6167800426483154,
631
+ "learning_rate": 0.00293569518245131,
632
+ "loss": 1.60706298828125,
633
+ "step": 3650
634
+ },
635
+ {
636
+ "epoch": 0.10222900678994011,
637
+ "grad_norm": 0.6672324538230896,
638
+ "learning_rate": 0.0029207104624511555,
639
+ "loss": 1.6043368530273439,
640
+ "step": 3700
641
+ },
642
+ {
643
+ "epoch": 0.10361047985466904,
644
+ "grad_norm": 0.7184829115867615,
645
+ "learning_rate": 0.0029042044101028914,
646
+ "loss": 1.6044706726074218,
647
+ "step": 3750
648
+ },
649
+ {
650
+ "epoch": 0.10361047985466904,
651
+ "eval_loss": 1.608585238456726,
652
+ "eval_runtime": 4.872,
653
+ "eval_samples_per_second": 418.307,
654
+ "eval_steps_per_second": 3.284,
655
+ "step": 3750
656
+ },
657
+ {
658
+ "epoch": 0.10499195291939796,
659
+ "grad_norm": 0.6598625779151917,
660
+ "learning_rate": 0.002886194700500804,
661
+ "loss": 1.6044143676757812,
662
+ "step": 3800
663
+ },
664
+ {
665
+ "epoch": 0.10637342598412687,
666
+ "grad_norm": 0.7797738313674927,
667
+ "learning_rate": 0.002866700618893029,
668
+ "loss": 1.600813751220703,
669
+ "step": 3850
670
+ },
671
+ {
672
+ "epoch": 0.1077548990488558,
673
+ "grad_norm": 0.6865859031677246,
674
+ "learning_rate": 0.002845743040030426,
675
+ "loss": 1.6023855590820313,
676
+ "step": 3900
677
+ },
678
+ {
679
+ "epoch": 0.10913637211358472,
680
+ "grad_norm": 0.6436059474945068,
681
+ "learning_rate": 0.002823344405813371,
682
+ "loss": 1.6005615234375,
683
+ "step": 3950
684
+ },
685
+ {
686
+ "epoch": 0.11051784517831363,
687
+ "grad_norm": 0.6858559250831604,
688
+ "learning_rate": 0.0027995287012604077,
689
+ "loss": 1.5992294311523438,
690
+ "step": 4000
691
+ },
692
+ {
693
+ "epoch": 0.11051784517831363,
694
+ "eval_loss": 1.6017545461654663,
695
+ "eval_runtime": 4.9861,
696
+ "eval_samples_per_second": 408.736,
697
+ "eval_steps_per_second": 3.209,
698
+ "step": 4000
699
+ },
700
+ {
701
+ "epoch": 0.11189931824304256,
702
+ "grad_norm": 0.7086427807807922,
703
+ "learning_rate": 0.0027743214288244904,
704
+ "loss": 1.5969778442382812,
705
+ "step": 4050
706
+ },
707
+ {
708
+ "epoch": 0.11328079130777148,
709
+ "grad_norm": 0.6547996997833252,
710
+ "learning_rate": 0.002747749581084317,
711
+ "loss": 1.5946481323242188,
712
+ "step": 4100
713
+ },
714
+ {
715
+ "epoch": 0.11466226437250039,
716
+ "grad_norm": 0.6854317784309387,
717
+ "learning_rate": 0.0027198416118399986,
718
+ "loss": 1.594525146484375,
719
+ "step": 4150
720
+ },
721
+ {
722
+ "epoch": 0.11604373743722932,
723
+ "grad_norm": 0.8039860129356384,
724
+ "learning_rate": 0.0026906274056440215,
725
+ "loss": 1.6002627563476564,
726
+ "step": 4200
727
+ },
728
+ {
729
+ "epoch": 0.11742521050195824,
730
+ "grad_norm": 0.7050207257270813,
731
+ "learning_rate": 0.0026601382458001166,
732
+ "loss": 1.5937403869628906,
733
+ "step": 4250
734
+ },
735
+ {
736
+ "epoch": 0.11742521050195824,
737
+ "eval_loss": 1.5975710153579712,
738
+ "eval_runtime": 4.8014,
739
+ "eval_samples_per_second": 424.46,
740
+ "eval_steps_per_second": 3.332,
741
+ "step": 4250
742
+ },
743
+ {
744
+ "epoch": 0.11880668356668715,
745
+ "grad_norm": 0.6737009286880493,
746
+ "learning_rate": 0.0026284067808643144,
747
+ "loss": 1.5923365783691406,
748
+ "step": 4300
749
+ },
750
+ {
751
+ "epoch": 0.12018815663141608,
752
+ "grad_norm": 0.7063266634941101,
753
+ "learning_rate": 0.002595466989684055,
754
+ "loss": 1.5977363586425781,
755
+ "step": 4350
756
+ },
757
+ {
758
+ "epoch": 0.121569629696145,
759
+ "grad_norm": 0.6896716356277466,
760
+ "learning_rate": 0.0025613541450127857,
761
+ "loss": 1.5926210021972655,
762
+ "step": 4400
763
+ },
764
+ {
765
+ "epoch": 0.12295110276087393,
766
+ "grad_norm": 0.6772384643554688,
767
+ "learning_rate": 0.0025261047757390138,
768
+ "loss": 1.5924766540527344,
769
+ "step": 4450
770
+ },
771
+ {
772
+ "epoch": 0.12433257582560284,
773
+ "grad_norm": 0.6963664293289185,
774
+ "learning_rate": 0.002489756627770259,
775
+ "loss": 1.5876535034179688,
776
+ "step": 4500
777
+ },
778
+ {
779
+ "epoch": 0.12433257582560284,
780
+ "eval_loss": 1.5943443775177002,
781
+ "eval_runtime": 4.8657,
782
+ "eval_samples_per_second": 418.853,
783
+ "eval_steps_per_second": 3.288,
784
+ "step": 4500
785
+ },
786
+ {
787
+ "epoch": 0.12571404889033175,
788
+ "grad_norm": 0.7814108729362488,
789
+ "learning_rate": 0.002452348623613788,
790
+ "loss": 1.5891021728515624,
791
+ "step": 4550
792
+ },
793
+ {
794
+ "epoch": 0.1270955219550607,
795
+ "grad_norm": 0.6211883425712585,
796
+ "learning_rate": 0.002413920820697419,
797
+ "loss": 1.5855482482910157,
798
+ "step": 4600
799
+ },
800
+ {
801
+ "epoch": 0.1284769950197896,
802
+ "grad_norm": 0.6522833108901978,
803
+ "learning_rate": 0.0023745143684750264,
804
+ "loss": 1.5884809875488282,
805
+ "step": 4650
806
+ },
807
+ {
808
+ "epoch": 0.12985846808451854,
809
+ "grad_norm": 0.6828014254570007,
810
+ "learning_rate": 0.002334171464362675,
811
+ "loss": 1.5833425903320313,
812
+ "step": 4700
813
+ },
814
+ {
815
+ "epoch": 0.13123994114924745,
816
+ "grad_norm": 0.6603298783302307,
817
+ "learning_rate": 0.002292935308552567,
818
+ "loss": 1.583031005859375,
819
+ "step": 4750
820
+ },
821
+ {
822
+ "epoch": 0.13123994114924745,
823
+ "eval_loss": 1.5896168947219849,
824
+ "eval_runtime": 4.8861,
825
+ "eval_samples_per_second": 417.099,
826
+ "eval_steps_per_second": 3.275,
827
+ "step": 4750
828
+ },
829
+ {
830
+ "epoch": 0.13262141421397636,
831
+ "grad_norm": 0.6717214584350586,
832
+ "learning_rate": 0.002250850057753197,
833
+ "loss": 1.5836068725585937,
834
+ "step": 4800
835
+ },
836
+ {
837
+ "epoch": 0.1340028872787053,
838
+ "grad_norm": 0.6846370100975037,
839
+ "learning_rate": 0.002207960777905242,
840
+ "loss": 1.586727294921875,
841
+ "step": 4850
842
+ },
843
+ {
844
+ "epoch": 0.1353843603434342,
845
+ "grad_norm": 0.7362879514694214,
846
+ "learning_rate": 0.0021643133959238225,
847
+ "loss": 1.5847500610351561,
848
+ "step": 4900
849
+ },
850
+ {
851
+ "epoch": 0.13676583340816312,
852
+ "grad_norm": 0.7345172166824341,
853
+ "learning_rate": 0.0021199546505188105,
854
+ "loss": 1.5825830078125,
855
+ "step": 4950
856
+ },
857
+ {
858
+ "epoch": 0.13814730647289206,
859
+ "grad_norm": 0.5534242391586304,
860
+ "learning_rate": 0.0020749320421458535,
861
+ "loss": 1.5811091613769532,
862
+ "step": 5000
863
+ },
864
+ {
865
+ "epoch": 0.13814730647289206,
866
+ "eval_loss": 1.5833630561828613,
867
+ "eval_runtime": 4.9704,
868
+ "eval_samples_per_second": 410.03,
869
+ "eval_steps_per_second": 3.219,
870
+ "step": 5000
871
+ },
872
+ {
873
+ "epoch": 0.13952877953762097,
874
+ "grad_norm": 0.552155613899231,
875
+ "learning_rate": 0.002029293782141689,
876
+ "loss": 1.5763238525390626,
877
+ "step": 5050
878
+ },
879
+ {
880
+ "epoch": 0.14091025260234988,
881
+ "grad_norm": 0.7206612825393677,
882
+ "learning_rate": 0.001983088741098243,
883
+ "loss": 1.5772702026367187,
884
+ "step": 5100
885
+ },
886
+ {
887
+ "epoch": 0.14229172566707882,
888
+ "grad_norm": 0.6678832769393921,
889
+ "learning_rate": 0.001936366396530776,
890
+ "loss": 1.5752102661132812,
891
+ "step": 5150
892
+ },
893
+ {
894
+ "epoch": 0.14367319873180773,
895
+ "grad_norm": 0.6534181237220764,
896
+ "learning_rate": 0.0018891767798961177,
897
+ "loss": 1.5794488525390624,
898
+ "step": 5200
899
+ },
900
+ {
901
+ "epoch": 0.14505467179653664,
902
+ "grad_norm": 0.6262516379356384,
903
+ "learning_rate": 0.0018415704230177307,
904
+ "loss": 1.574145050048828,
905
+ "step": 5250
906
+ },
907
+ {
908
+ "epoch": 0.14505467179653664,
909
+ "eval_loss": 1.5795270204544067,
910
+ "eval_runtime": 4.8927,
911
+ "eval_samples_per_second": 416.542,
912
+ "eval_steps_per_second": 3.27,
913
+ "step": 5250
914
+ },
915
+ {
916
+ "epoch": 0.14643614486126558,
917
+ "grad_norm": 0.5793588757514954,
918
+ "learning_rate": 0.0017935983039749706,
919
+ "loss": 1.5746864318847655,
920
+ "step": 5300
921
+ },
922
+ {
923
+ "epoch": 0.1478176179259945,
924
+ "grad_norm": 0.6871621012687683,
925
+ "learning_rate": 0.0017453117925144783,
926
+ "loss": 1.5744833374023437,
927
+ "step": 5350
928
+ },
929
+ {
930
+ "epoch": 0.1491990909907234,
931
+ "grad_norm": 0.6331185102462769,
932
+ "learning_rate": 0.0016967625950421712,
933
+ "loss": 1.57496337890625,
934
+ "step": 5400
935
+ },
936
+ {
937
+ "epoch": 0.15058056405545234,
938
+ "grad_norm": 0.6986100673675537,
939
+ "learning_rate": 0.0016480026992547268,
940
+ "loss": 1.578210906982422,
941
+ "step": 5450
942
+ },
943
+ {
944
+ "epoch": 0.15196203712018125,
945
+ "grad_norm": 0.6834849715232849,
946
+ "learning_rate": 0.001599084318469858,
947
+ "loss": 1.5710919189453125,
948
+ "step": 5500
949
+ },
950
+ {
951
+ "epoch": 0.15196203712018125,
952
+ "eval_loss": 1.5749062299728394,
953
+ "eval_runtime": 4.8609,
954
+ "eval_samples_per_second": 419.261,
955
+ "eval_steps_per_second": 3.292,
956
+ "step": 5500
957
+ },
958
+ {
959
+ "epoch": 0.15334351018491016,
960
+ "grad_norm": 0.6833263039588928,
961
+ "learning_rate": 0.0015500598357149793,
962
+ "loss": 1.5740811157226562,
963
+ "step": 5550
964
+ },
965
+ {
966
+ "epoch": 0.1547249832496391,
967
+ "grad_norm": 0.8077707886695862,
968
+ "learning_rate": 0.001500981747634155,
969
+ "loss": 1.5700558471679686,
970
+ "step": 5600
971
+ },
972
+ {
973
+ "epoch": 0.156106456314368,
974
+ "grad_norm": 0.6584182977676392,
975
+ "learning_rate": 0.001451902608273374,
976
+ "loss": 1.5697401428222657,
977
+ "step": 5650
978
+ },
979
+ {
980
+ "epoch": 0.15748792937909692,
981
+ "grad_norm": 0.7573363184928894,
982
+ "learning_rate": 0.0014028749728043628,
983
+ "loss": 1.5668351745605469,
984
+ "step": 5700
985
+ },
986
+ {
987
+ "epoch": 0.15886940244382586,
988
+ "grad_norm": 0.6129063963890076,
989
+ "learning_rate": 0.0013539513412471889,
990
+ "loss": 1.570359344482422,
991
+ "step": 5750
992
+ },
993
+ {
994
+ "epoch": 0.15886940244382586,
995
+ "eval_loss": 1.5709928274154663,
996
+ "eval_runtime": 4.859,
997
+ "eval_samples_per_second": 419.431,
998
+ "eval_steps_per_second": 3.293,
999
+ "step": 5750
1000
+ },
1001
+ {
1002
+ "epoch": 0.16025087550855477,
1003
+ "grad_norm": 0.5028947591781616,
1004
+ "learning_rate": 0.0013051841022519272,
1005
+ "loss": 1.561181640625,
1006
+ "step": 5800
1007
+ },
1008
+ {
1009
+ "epoch": 0.16163234857328368,
1010
+ "grad_norm": 0.7434332966804504,
1011
+ "learning_rate": 0.0012566254769995806,
1012
+ "loss": 1.5647598266601563,
1013
+ "step": 5850
1014
+ },
1015
+ {
1016
+ "epoch": 0.16301382163801262,
1017
+ "grad_norm": 0.5033641457557678,
1018
+ "learning_rate": 0.0012083274632823304,
1019
+ "loss": 1.5645637512207031,
1020
+ "step": 5900
1021
+ },
1022
+ {
1023
+ "epoch": 0.16439529470274153,
1024
+ "grad_norm": 0.5664800405502319,
1025
+ "learning_rate": 0.0011603417798229966,
1026
+ "loss": 1.567978515625,
1027
+ "step": 5950
1028
+ },
1029
+ {
1030
+ "epoch": 0.16577676776747047,
1031
+ "grad_norm": 0.6270240545272827,
1032
+ "learning_rate": 0.0011127198108933402,
1033
+ "loss": 1.5611529541015625,
1034
+ "step": 6000
1035
+ },
1036
+ {
1037
+ "epoch": 0.16577676776747047,
1038
+ "eval_loss": 1.5664807558059692,
1039
+ "eval_runtime": 4.8532,
1040
+ "eval_samples_per_second": 419.927,
1041
+ "eval_steps_per_second": 3.297,
1042
+ "step": 6000
1043
+ },
1044
+ {
1045
+ "epoch": 0.16715824083219938,
1046
+ "grad_norm": 0.5457693934440613,
1047
+ "learning_rate": 0.0010655125512904898,
1048
+ "loss": 1.5654832458496093,
1049
+ "step": 6050
1050
+ },
1051
+ {
1052
+ "epoch": 0.1685397138969283,
1053
+ "grad_norm": 0.5332794785499573,
1054
+ "learning_rate": 0.0010187705517304413,
1055
+ "loss": 1.5635955810546875,
1056
+ "step": 6100
1057
+ },
1058
+ {
1059
+ "epoch": 0.16992118696165723,
1060
+ "grad_norm": 0.5312942862510681,
1061
+ "learning_rate": 0.0009725438647170831,
1062
+ "loss": 1.5631723022460937,
1063
+ "step": 6150
1064
+ },
1065
+ {
1066
+ "epoch": 0.17130266002638614,
1067
+ "grad_norm": 0.6611814498901367,
1068
+ "learning_rate": 0.0009268819909447218,
1069
+ "loss": 1.5617874145507813,
1070
+ "step": 6200
1071
+ },
1072
+ {
1073
+ "epoch": 0.17268413309111505,
1074
+ "grad_norm": 0.5385921001434326,
1075
+ "learning_rate": 0.000881833826291497,
1076
+ "loss": 1.5621722412109376,
1077
+ "step": 6250
1078
+ },
1079
+ {
1080
+ "epoch": 0.17268413309111505,
1081
+ "eval_loss": 1.5625797510147095,
1082
+ "eval_runtime": 4.9424,
1083
+ "eval_samples_per_second": 412.354,
1084
+ "eval_steps_per_second": 3.237,
1085
+ "step": 6250
1086
+ },
1087
+ {
1088
+ "epoch": 0.174065606155844,
1089
+ "grad_norm": 0.48100849986076355,
1090
+ "learning_rate": 0.0008374476094604538,
1091
+ "loss": 1.5620567321777343,
1092
+ "step": 6300
1093
+ },
1094
+ {
1095
+ "epoch": 0.1754470792205729,
1096
+ "grad_norm": 0.5656850934028625,
1097
+ "learning_rate": 0.0007937708703243286,
1098
+ "loss": 1.5645301818847657,
1099
+ "step": 6350
1100
+ },
1101
+ {
1102
+ "epoch": 0.1768285522853018,
1103
+ "grad_norm": 0.6062788367271423,
1104
+ "learning_rate": 0.0007508503790293705,
1105
+ "loss": 1.5537733459472656,
1106
+ "step": 6400
1107
+ },
1108
+ {
1109
+ "epoch": 0.17821002535003075,
1110
+ "grad_norm": 0.5672012567520142,
1111
+ "learning_rate": 0.0007087320959126999,
1112
+ "loss": 1.559359130859375,
1113
+ "step": 6450
1114
+ },
1115
+ {
1116
+ "epoch": 0.17959149841475966,
1117
+ "grad_norm": 0.5249131321907043,
1118
+ "learning_rate": 0.0006674611222868254,
1119
+ "loss": 1.5566461181640625,
1120
+ "step": 6500
1121
+ },
1122
+ {
1123
+ "epoch": 0.17959149841475966,
1124
+ "eval_loss": 1.559727430343628,
1125
+ "eval_runtime": 4.8874,
1126
+ "eval_samples_per_second": 416.989,
1127
+ "eval_steps_per_second": 3.274,
1128
+ "step": 6500
1129
+ },
1130
+ {
1131
+ "epoch": 0.18097297147948857,
1132
+ "grad_norm": 0.5304768681526184,
1133
+ "learning_rate": 0.000627081652144031,
1134
+ "loss": 1.5591546630859374,
1135
+ "step": 6550
1136
+ },
1137
+ {
1138
+ "epoch": 0.1823544445442175,
1139
+ "grad_norm": 0.5281299948692322,
1140
+ "learning_rate": 0.0005876369248323417,
1141
+ "loss": 1.5576934814453125,
1142
+ "step": 6600
1143
+ },
1144
+ {
1145
+ "epoch": 0.18373591760894642,
1146
+ "grad_norm": 0.4922367334365845,
1147
+ "learning_rate": 0.0005491691787537452,
1148
+ "loss": 1.5613423156738282,
1149
+ "step": 6650
1150
+ },
1151
+ {
1152
+ "epoch": 0.18511739067367533,
1153
+ "grad_norm": 0.6296632289886475,
1154
+ "learning_rate": 0.000511719606134253,
1155
+ "loss": 1.5597859191894532,
1156
+ "step": 6700
1157
+ },
1158
+ {
1159
+ "epoch": 0.18649886373840427,
1160
+ "grad_norm": 0.49581730365753174,
1161
+ "learning_rate": 0.00047532830891423806,
1162
+ "loss": 1.5527120971679687,
1163
+ "step": 6750
1164
+ },
1165
+ {
1166
+ "epoch": 0.18649886373840427,
1167
+ "eval_loss": 1.5563873052597046,
1168
+ "eval_runtime": 4.8751,
1169
+ "eval_samples_per_second": 418.047,
1170
+ "eval_steps_per_second": 3.282,
1171
+ "step": 6750
1172
+ },
1173
+ {
1174
+ "epoch": 0.18788033680313318,
1175
+ "grad_norm": 0.5099366307258606,
1176
+ "learning_rate": 0.00044003425580626496,
1177
+ "loss": 1.549066619873047,
1178
+ "step": 6800
1179
+ },
1180
+ {
1181
+ "epoch": 0.1892618098678621,
1182
+ "grad_norm": 0.4683798551559448,
1183
+ "learning_rate": 0.0004058752405664207,
1184
+ "loss": 1.5529069519042968,
1185
+ "step": 6850
1186
+ },
1187
+ {
1188
+ "epoch": 0.19064328293259103,
1189
+ "grad_norm": 0.5025731921195984,
1190
+ "learning_rate": 0.0003728878415238149,
1191
+ "loss": 1.5490866088867188,
1192
+ "step": 6900
1193
+ },
1194
+ {
1195
+ "epoch": 0.19202475599731994,
1196
+ "grad_norm": 0.5808431506156921,
1197
+ "learning_rate": 0.00034110738241158677,
1198
+ "loss": 1.5539451599121095,
1199
+ "step": 6950
1200
+ },
1201
+ {
1202
+ "epoch": 0.19340622906204885,
1203
+ "grad_norm": 0.5575580596923828,
1204
+ "learning_rate": 0.0003105678945413668,
1205
+ "loss": 1.5520620727539063,
1206
+ "step": 7000
1207
+ },
1208
+ {
1209
+ "epoch": 0.19340622906204885,
1210
+ "eval_loss": 1.5543574094772339,
1211
+ "eval_runtime": 4.8945,
1212
+ "eval_samples_per_second": 416.387,
1213
+ "eval_steps_per_second": 3.269,
1214
+ "step": 7000
1215
+ },
1216
+ {
1217
+ "epoch": 0.1947877021267778,
1218
+ "grad_norm": 0.4817080497741699,
1219
+ "learning_rate": 0.0002813020803616979,
1220
+ "loss": 1.552979736328125,
1221
+ "step": 7050
1222
+ },
1223
+ {
1224
+ "epoch": 0.1961691751915067,
1225
+ "grad_norm": 0.45744574069976807,
1226
+ "learning_rate": 0.00025334127843943164,
1227
+ "loss": 1.548302459716797,
1228
+ "step": 7100
1229
+ },
1230
+ {
1231
+ "epoch": 0.1975506482562356,
1232
+ "grad_norm": 0.46788737177848816,
1233
+ "learning_rate": 0.00022671542990160843,
1234
+ "loss": 1.5542337036132812,
1235
+ "step": 7150
1236
+ },
1237
+ {
1238
+ "epoch": 0.19893212132096455,
1239
+ "grad_norm": 0.44763970375061035,
1240
+ "learning_rate": 0.00020145304637374757,
1241
+ "loss": 1.5487118530273438,
1242
+ "step": 7200
1243
+ },
1244
+ {
1245
+ "epoch": 0.20031359438569346,
1246
+ "grad_norm": 0.4314698576927185,
1247
+ "learning_rate": 0.0001775811794488842,
1248
+ "loss": 1.5508662414550782,
1249
+ "step": 7250
1250
+ },
1251
+ {
1252
+ "epoch": 0.20031359438569346,
1253
+ "eval_loss": 1.551482915878296,
1254
+ "eval_runtime": 4.8891,
1255
+ "eval_samples_per_second": 416.845,
1256
+ "eval_steps_per_second": 3.273,
1257
+ "step": 7250
1258
+ },
1259
+ {
1260
+ "epoch": 0.20169506745042237,
1261
+ "grad_norm": 0.44681674242019653,
1262
+ "learning_rate": 0.00015512539172004598,
1263
+ "loss": 1.5449916076660157,
1264
+ "step": 7300
1265
+ },
1266
+ {
1267
+ "epoch": 0.2030765405151513,
1268
+ "grad_norm": 0.4624103903770447,
1269
+ "learning_rate": 0.00013410972940719012,
1270
+ "loss": 1.5420948791503906,
1271
+ "step": 7350
1272
+ },
1273
+ {
1274
+ "epoch": 0.20445801357988022,
1275
+ "grad_norm": 0.42456161975860596,
1276
+ "learning_rate": 0.00011455669660790574,
1277
+ "loss": 1.5426979064941406,
1278
+ "step": 7400
1279
+ },
1280
+ {
1281
+ "epoch": 0.20583948664460916,
1282
+ "grad_norm": 0.43187159299850464,
1283
+ "learning_rate": 9.648723119946411e-05,
1284
+ "loss": 1.55113037109375,
1285
+ "step": 7450
1286
+ },
1287
+ {
1288
+ "epoch": 0.20722095970933807,
1289
+ "grad_norm": 0.4058364927768707,
1290
+ "learning_rate": 7.992068241801543e-05,
1291
+ "loss": 1.5490814208984376,
1292
+ "step": 7500
1293
+ },
1294
+ {
1295
+ "epoch": 0.20722095970933807,
1296
+ "eval_loss": 1.5499120950698853,
1297
+ "eval_runtime": 4.6438,
1298
+ "eval_samples_per_second": 438.865,
1299
+ "eval_steps_per_second": 3.445,
1300
+ "step": 7500
1301
+ },
1302
+ {
1303
+ "epoch": 0.20860243277406698,
1304
+ "grad_norm": 0.41115882992744446,
1305
+ "learning_rate": 6.487479013894215e-05,
1306
+ "loss": 1.53897705078125,
1307
+ "step": 7550
1308
+ },
1309
+ {
1310
+ "epoch": 0.20998390583879592,
1311
+ "grad_norm": 0.40895798802375793,
1312
+ "learning_rate": 5.1365665880554635e-05,
1313
+ "loss": 1.5461245727539064,
1314
+ "step": 7600
1315
+ },
1316
+ {
1317
+ "epoch": 0.21136537890352483,
1318
+ "grad_norm": 0.43710294365882874,
1319
+ "learning_rate": 3.940777555147568e-05,
1320
+ "loss": 1.5500086975097656,
1321
+ "step": 7650
1322
+ },
1323
+ {
1324
+ "epoch": 0.21274685196825374,
1325
+ "grad_norm": 0.37500861287117004,
1326
+ "learning_rate": 2.9013923960182153e-05,
1327
+ "loss": 1.5431840515136719,
1328
+ "step": 7700
1329
+ },
1330
+ {
1331
+ "epoch": 0.21412832503298268,
1332
+ "grad_norm": 0.4327012598514557,
1333
+ "learning_rate": 2.019524110329557e-05,
1334
+ "loss": 1.5467581176757812,
1335
+ "step": 7750
1336
+ },
1337
+ {
1338
+ "epoch": 0.21412832503298268,
1339
+ "eval_loss": 1.548779010772705,
1340
+ "eval_runtime": 5.0548,
1341
+ "eval_samples_per_second": 403.183,
1342
+ "eval_steps_per_second": 3.165,
1343
+ "step": 7750
1344
+ },
1345
+ {
1346
+ "epoch": 0.2155097980977116,
1347
+ "grad_norm": 0.3742528557777405,
1348
+ "learning_rate": 1.2961170247303034e-05,
1349
+ "loss": 1.543158721923828,
1350
+ "step": 7800
1351
+ },
1352
+ {
1353
+ "epoch": 0.2168912711624405,
1354
+ "grad_norm": 0.39662519097328186,
1355
+ "learning_rate": 7.319457816470754e-06,
1356
+ "loss": 1.5452882385253905,
1357
+ "step": 7850
1358
+ },
1359
+ {
1360
+ "epoch": 0.21827274422716944,
1361
+ "grad_norm": 0.439929336309433,
1362
+ "learning_rate": 3.276145097779237e-06,
1363
+ "loss": 1.54449462890625,
1364
+ "step": 7900
1365
+ },
1366
+ {
1367
+ "epoch": 0.21965421729189835,
1368
+ "grad_norm": 0.3996962904930115,
1369
+ "learning_rate": 8.355617717617503e-07,
1370
+ "loss": 1.5445120239257812,
1371
+ "step": 7950
1372
+ },
1373
+ {
1374
+ "epoch": 0.22103569035662726,
1375
+ "grad_norm": 0.3886605203151703,
1376
+ "learning_rate": 3.2127617349830827e-10,
1377
+ "loss": 1.541259765625,
1378
+ "step": 8000
1379
+ },
1380
+ {
1381
+ "epoch": 0.22103569035662726,
1382
+ "eval_loss": 1.5484822988510132,
1383
+ "eval_runtime": 10.2225,
1384
+ "eval_samples_per_second": 199.364,
1385
+ "eval_steps_per_second": 1.565,
1386
+ "step": 8000
1387
+ }
1388
+ ],
1389
+ "logging_steps": 50,
1390
+ "max_steps": 8000,
1391
+ "num_input_tokens_seen": 0,
1392
+ "num_train_epochs": 1,
1393
+ "save_steps": 250,
1394
+ "stateful_callbacks": {
1395
+ "TrainerControl": {
1396
+ "args": {
1397
+ "should_epoch_stop": false,
1398
+ "should_evaluate": false,
1399
+ "should_log": false,
1400
+ "should_save": true,
1401
+ "should_training_stop": true
1402
+ },
1403
+ "attributes": {}
1404
+ }
1405
+ },
1406
+ "total_flos": 110584922112000.0,
1407
+ "train_batch_size": 128,
1408
+ "trial_name": null,
1409
+ "trial_params": null
1410
+ }