Upload folder using huggingface_hub
Browse files- config.json +52 -0
- configuration_olmo.py +44 -0
- generation_config.json +6 -0
- model.safetensors +3 -0
- modeling_olmo.py +570 -0
- pytorch_model.bin +3 -0
- special_tokens_map.json +37 -0
- tokenization_olmo_fast.py +16 -0
- tokenizer.json +0 -0
- tokenizer_config.json +0 -0
- trainer_state.json +1076 -0
config.json
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "/home/v-zehuili/repositories/amlt/codes/SSF-GFM/root/section6_model/extended_model/8192_vocab",
|
3 |
+
"activation_type": "swiglu",
|
4 |
+
"alibi": false,
|
5 |
+
"alibi_bias_max": 8.0,
|
6 |
+
"architectures": [
|
7 |
+
"OLMoForCausalLM"
|
8 |
+
],
|
9 |
+
"auto_map": {
|
10 |
+
"AutoConfig": "configuration_olmo.OLMoConfig",
|
11 |
+
"AutoModelForSequenceClassification": "modeling_olmo.OLMoForSequenceCLS",
|
12 |
+
"AutoModelForCausalLM": "modeling_olmo.OLMoForCausalLM"
|
13 |
+
},
|
14 |
+
"attention_dropout": 0.0,
|
15 |
+
"attention_layer_norm": false,
|
16 |
+
"attention_layer_norm_with_affine": false,
|
17 |
+
"bias_for_layer_norm": false,
|
18 |
+
"block_group_size": 1,
|
19 |
+
"block_type": "sequential",
|
20 |
+
"clip_qkv": null,
|
21 |
+
"d_model": 2048,
|
22 |
+
"embedding_dropout": 0.0,
|
23 |
+
"embedding_size": 8174,
|
24 |
+
"eos_token_id": 3,
|
25 |
+
"flash_attention": false,
|
26 |
+
"include_bias": false,
|
27 |
+
"init_cutoff_factor": null,
|
28 |
+
"init_device": "meta",
|
29 |
+
"init_fn": "mitchell",
|
30 |
+
"init_std": 0.02,
|
31 |
+
"layer_norm_type": "default",
|
32 |
+
"layer_norm_with_affine": false,
|
33 |
+
"max_sequence_length": 250,
|
34 |
+
"mlp_hidden_size": null,
|
35 |
+
"mlp_ratio": 8,
|
36 |
+
"model_type": "olmo-gfm",
|
37 |
+
"multi_query_attention": false,
|
38 |
+
"n_heads": 16,
|
39 |
+
"n_kv_heads": null,
|
40 |
+
"n_layers": 16,
|
41 |
+
"pad_token_id": 3,
|
42 |
+
"precision": "amp_bf16",
|
43 |
+
"residual_dropout": 0.0,
|
44 |
+
"rope": true,
|
45 |
+
"rope_full_precision": true,
|
46 |
+
"scale_logits": false,
|
47 |
+
"torch_dtype": "float32",
|
48 |
+
"transformers_version": "4.47.1",
|
49 |
+
"use_cache": true,
|
50 |
+
"vocab_size": 4096,
|
51 |
+
"weight_tying": true
|
52 |
+
}
|
configuration_olmo.py
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"""
|
2 |
+
OLMo configuration
|
3 |
+
"""
|
4 |
+
|
5 |
+
from transformers import AutoConfig, PretrainedConfig
|
6 |
+
from transformers.utils import logging
|
7 |
+
|
8 |
+
from olmo.config import ModelConfig
|
9 |
+
|
10 |
+
logger = logging.get_logger(__name__)
|
11 |
+
|
12 |
+
|
13 |
+
class OLMoConfig(PretrainedConfig):
|
14 |
+
model_type = "olmo-gfm"
|
15 |
+
keys_to_ignore_at_inference = ["past_key_values"] # TODO: confirm
|
16 |
+
|
17 |
+
def __init__(self, use_cache: bool = False, num_labels: int = 2,**kwargs):
|
18 |
+
model_config = ModelConfig()
|
19 |
+
all_kwargs = model_config.asdict()
|
20 |
+
all_kwargs.update(kwargs)
|
21 |
+
all_kwargs.update({"use_cache": use_cache, "num_labels": num_labels})
|
22 |
+
all_kwargs.update(
|
23 |
+
{
|
24 |
+
"architectures": all_kwargs.get("architectures", ["OLMoModelForCausalLM"])
|
25 |
+
or ["OLMoModelForCausalLM"]
|
26 |
+
}
|
27 |
+
)
|
28 |
+
super().__init__(**all_kwargs)
|
29 |
+
|
30 |
+
@property
|
31 |
+
def num_attention_heads(self):
|
32 |
+
return self.n_heads
|
33 |
+
|
34 |
+
@property
|
35 |
+
def num_hidden_layers(self):
|
36 |
+
return self.n_layers
|
37 |
+
|
38 |
+
@property
|
39 |
+
def hidden_size(self):
|
40 |
+
return self.d_model
|
41 |
+
|
42 |
+
|
43 |
+
# Register the config class so that it is available for transformer pipelines, auto-loading etc.
|
44 |
+
AutoConfig.register("olmo-gfm", OLMoConfig)
|
generation_config.json
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_from_model_config": true,
|
3 |
+
"eos_token_id": 3,
|
4 |
+
"pad_token_id": 3,
|
5 |
+
"transformers_version": "4.47.1"
|
6 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e22993c779187d095f4ef348569433ed3cfd94209453068f92c00cbe517ec554
|
3 |
+
size 4428897960
|
modeling_olmo.py
ADDED
@@ -0,0 +1,570 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import logging
|
2 |
+
from dataclasses import fields
|
3 |
+
from typing import List, Optional, Tuple, Union
|
4 |
+
|
5 |
+
import torch
|
6 |
+
from transformers import PreTrainedModel
|
7 |
+
from transformers.cache_utils import Cache
|
8 |
+
from transformers.modeling_outputs import CausalLMOutputWithPast, SequenceClassifierOutputWithPast
|
9 |
+
from transformers.models.auto import AutoModelForCausalLM, AutoModelForSequenceClassification
|
10 |
+
|
11 |
+
from olmo.config import ModelConfig
|
12 |
+
from olmo.model import OLMo
|
13 |
+
import sys
|
14 |
+
import os
|
15 |
+
|
16 |
+
# Add the parent directory to sys.path
|
17 |
+
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
|
18 |
+
|
19 |
+
from .configuration_olmo import OLMoConfig
|
20 |
+
|
21 |
+
log = logging.getLogger(__name__)
|
22 |
+
|
23 |
+
|
24 |
+
def create_model_config_from_pretrained_config(config: OLMoConfig, is_cls = False):
|
25 |
+
"""
|
26 |
+
Utility function
|
27 |
+
"""
|
28 |
+
kwargs = {}
|
29 |
+
for field in fields(ModelConfig):
|
30 |
+
kwargs[field.name] = getattr(config, field.name)
|
31 |
+
# add num_labels for being compatible with the AutoSeqClassification downstream task
|
32 |
+
model_config = ModelConfig(**kwargs)
|
33 |
+
if is_cls:
|
34 |
+
num_labels = len(getattr(config,'label2id'))
|
35 |
+
# print(f"{config}")
|
36 |
+
return model_config, num_labels
|
37 |
+
return model_config
|
38 |
+
|
39 |
+
|
40 |
+
class OLMoForCausalLM(PreTrainedModel):
|
41 |
+
"""
|
42 |
+
Extremely barebones HF model wrapper.
|
43 |
+
"""
|
44 |
+
|
45 |
+
config_class = OLMoConfig
|
46 |
+
base_model_prefix = "model"
|
47 |
+
_no_split_modules = ["OLMoBlock"]
|
48 |
+
|
49 |
+
def __init__(self, config: OLMoConfig, model: Optional[OLMo] = None, init_params: bool = False):
|
50 |
+
super().__init__(config)
|
51 |
+
|
52 |
+
if not model:
|
53 |
+
model_config = create_model_config_from_pretrained_config(config)
|
54 |
+
# Initialize model (always on CPU to start with so we don't run out of GPU memory).
|
55 |
+
model_config.init_device = "cpu"
|
56 |
+
self.model = OLMo(model_config, init_params=init_params)
|
57 |
+
else:
|
58 |
+
self.model = model
|
59 |
+
self.word_embeddings = self.model.transformer.wte
|
60 |
+
def forward(
|
61 |
+
self,
|
62 |
+
input_ids: torch.LongTensor = None,
|
63 |
+
inputs_embeds: Optional[torch.FloatTensor] = None,
|
64 |
+
attention_mask: Optional[torch.Tensor] = None,
|
65 |
+
attention_bias: Optional[torch.Tensor] = None,
|
66 |
+
token_type_ids: Optional[torch.LongTensor] = None, # Added parameter
|
67 |
+
past_key_values: Optional[List[torch.FloatTensor]] = None,
|
68 |
+
labels: Optional[torch.LongTensor] = None,
|
69 |
+
use_cache: Optional[bool] = None,
|
70 |
+
output_attentions: Optional[bool] = None,
|
71 |
+
output_hidden_states: Optional[bool] = True,
|
72 |
+
return_dict: Optional[bool] = None,
|
73 |
+
cache_position: Optional[
|
74 |
+
Cache
|
75 |
+
] = None, # This is a hack mitigation of an issue in transformers `4.39.x` https://github.com/huggingface/transformers/issues/29426
|
76 |
+
) -> Union[Tuple, CausalLMOutputWithPast]:
|
77 |
+
if use_cache is None:
|
78 |
+
use_cache = self.config.use_cache
|
79 |
+
|
80 |
+
if output_attentions:
|
81 |
+
raise ValueError("output_attentions is not yet supported in OLMo")
|
82 |
+
|
83 |
+
return_dict = return_dict if return_dict is not None else self.config.use_return_dict
|
84 |
+
|
85 |
+
######
|
86 |
+
# Create attention bias only if it's not provided for bidirectional finetuning
|
87 |
+
# Should only uncomment when performing MNTP finetuning
|
88 |
+
######
|
89 |
+
# if attention_bias is None:
|
90 |
+
# seq_len = input_ids.shape[1] if input_ids is not None else inputs_embeds.shape[1]
|
91 |
+
# attention_bias = self.get_bidirectional_attention_bias(seq_len=seq_len, device=input_ids.device)
|
92 |
+
|
93 |
+
# decoder outputs consists of (dec_features, layer_state, dec_hidden, dec_attn)
|
94 |
+
outputs = self.model.forward(
|
95 |
+
input_ids=input_ids,
|
96 |
+
input_embeddings=inputs_embeds,
|
97 |
+
attention_mask=attention_mask,
|
98 |
+
attention_bias=attention_bias,
|
99 |
+
past_key_values=past_key_values,
|
100 |
+
use_cache=use_cache,
|
101 |
+
output_hidden_states=output_hidden_states,
|
102 |
+
)
|
103 |
+
|
104 |
+
logits = outputs.logits
|
105 |
+
hidden_states = outputs.hidden_states
|
106 |
+
|
107 |
+
loss = None
|
108 |
+
if labels is not None:
|
109 |
+
# Shift so that tokens < n predict n
|
110 |
+
shift_logits = logits[..., :-1, :].contiguous()
|
111 |
+
shift_labels = labels[..., 1:].contiguous()
|
112 |
+
# Flatten the tokens
|
113 |
+
loss_fct = torch.nn.CrossEntropyLoss()
|
114 |
+
shift_logits = shift_logits.view(-1, self.config.embedding_size)
|
115 |
+
shift_labels = shift_labels.view(-1)
|
116 |
+
# Enable model parallelism
|
117 |
+
shift_labels = shift_labels.to(shift_logits.device)
|
118 |
+
loss = loss_fct(shift_logits, shift_labels)
|
119 |
+
|
120 |
+
if not return_dict:
|
121 |
+
output = (logits,) + outputs[1:]
|
122 |
+
return (loss,) + output if loss is not None else output
|
123 |
+
|
124 |
+
return CausalLMOutputWithPast(
|
125 |
+
loss=loss,
|
126 |
+
logits=logits,
|
127 |
+
past_key_values=outputs.attn_key_values,
|
128 |
+
hidden_states=hidden_states,
|
129 |
+
)
|
130 |
+
|
131 |
+
def can_generate(self) -> bool:
|
132 |
+
return True
|
133 |
+
|
134 |
+
def get_bidirectional_attention_bias(self, seq_len: int, device: torch.device):
|
135 |
+
"""
|
136 |
+
Create a bidirectional attention bias for full sequence attention.
|
137 |
+
The bias matrix will not restrict attention in any direction.
|
138 |
+
"""
|
139 |
+
# Bias shape: (1, 1, seq_len, seq_len)
|
140 |
+
bias = torch.zeros(1, 1, seq_len, seq_len, device=device)
|
141 |
+
return bias
|
142 |
+
|
143 |
+
def prepare_inputs_for_generation(
|
144 |
+
self, input_ids: torch.LongTensor, past_key_values: Optional[List[Tuple]] = None, **kwargs
|
145 |
+
):
|
146 |
+
if past_key_values:
|
147 |
+
# This is because we want the model to only process the last generated token.
|
148 |
+
input_ids = input_ids[:, -1:]
|
149 |
+
model_inputs = {"input_ids": input_ids, "past_key_values": past_key_values}
|
150 |
+
|
151 |
+
model_inputs.update(kwargs)
|
152 |
+
model_inputs["use_cache"] = kwargs.pop("use_cache", self.config.use_cache)
|
153 |
+
return model_inputs
|
154 |
+
|
155 |
+
# TODO: these are required to make the implementation complete.
|
156 |
+
# def resize_position_embeddings(self, new_num_position_embeddings: int):
|
157 |
+
# pass
|
158 |
+
#
|
159 |
+
# def get_position_embeddings(self) -> Union[nn.Embedding, Tuple[nn.Embedding]]:
|
160 |
+
# pass
|
161 |
+
#
|
162 |
+
# def _reorder_cache(self, past_key_values, beam_idx):
|
163 |
+
# pass
|
164 |
+
|
165 |
+
def get_input_embeddings(self) -> torch.nn.Module:
|
166 |
+
return self.model.transformer.wte
|
167 |
+
|
168 |
+
def set_input_embeddings(self, value: torch.nn.Module):
|
169 |
+
self.model.transformer.wte = value
|
170 |
+
|
171 |
+
def get_output_embeddings(self):
|
172 |
+
if self.config.weight_tying:
|
173 |
+
return self.model.transformer.wte
|
174 |
+
else:
|
175 |
+
return self.model.transformer.ff_out
|
176 |
+
|
177 |
+
def set_output_embeddings(self, value: torch.nn.Module):
|
178 |
+
if self.config.weight_tying:
|
179 |
+
self.model.transformer.wte = value
|
180 |
+
else:
|
181 |
+
self.model.transformer.ff_out = value
|
182 |
+
|
183 |
+
def tie_weights(self):
|
184 |
+
"""
|
185 |
+
This function is intentionally left as a no-op.
|
186 |
+
|
187 |
+
Weight tying is handled as follows:
|
188 |
+
- When the model is initialized, the `ff_out` layer is conditionally defined based on the `weight_tying` configuration.
|
189 |
+
See: `if not config.weight_tying: self.transformer.update(...)` in `olmo/model.py`.
|
190 |
+
- When computing logits, the `wte` weights are used directly if `weight_tying` is enabled.
|
191 |
+
See: `if self.config.weight_tying: logits = F.linear(x, self.transformer.wte.weight, None)` in the `forward` method.
|
192 |
+
|
193 |
+
Therefore, there is no need to explicitly tie the weights in this function.
|
194 |
+
"""
|
195 |
+
pass
|
196 |
+
|
197 |
+
def resize_token_embeddings(
|
198 |
+
self, new_num_tokens: Optional[int] = None, pad_to_multiple_of: Optional[int] = None
|
199 |
+
) -> torch.nn.Embedding:
|
200 |
+
"""
|
201 |
+
Resizes input token embeddings matrix of the model if `new_num_tokens != config.embedding_size`.
|
202 |
+
|
203 |
+
Takes care of tying weights embeddings afterwards if the model class has a `tie_weights()` method.
|
204 |
+
|
205 |
+
Arguments:
|
206 |
+
new_num_tokens (`int`, *optional*):
|
207 |
+
The new number of tokens in the embedding matrix. Increasing the size will add newly initialized
|
208 |
+
vectors at the end. Reducing the size will remove vectors from the end. If not provided or `None`, just
|
209 |
+
returns a pointer to the input tokens `torch.nn.Embedding` module of the model without doing anything.
|
210 |
+
pad_to_multiple_of (`int`, *optional*):
|
211 |
+
If set will pad the embedding matrix to a multiple of the provided value. If `new_num_tokens` is set to
|
212 |
+
`None` will just pad the embedding to a multiple of `pad_to_multiple_of`.
|
213 |
+
|
214 |
+
This is especially useful to enable the use of Tensor Cores on NVIDIA hardware with compute capability
|
215 |
+
`>= 7.5` (Volta), or on TPUs which benefit from having sequence lengths be a multiple of 128. For more
|
216 |
+
details about this, or help on choosing the correct value for resizing, refer to this guide:
|
217 |
+
https://docs.nvidia.com/deeplearning/performance/dl-performance-matrix-multiplication/index.html#requirements-tc
|
218 |
+
|
219 |
+
Return:
|
220 |
+
`torch.nn.Embedding`: Pointer to the input tokens Embeddings Module of the model.
|
221 |
+
|
222 |
+
Note:
|
223 |
+
This method differs from the base class implementation by resizing the `embedding_size` attribute of the
|
224 |
+
model configuration instead of the `vocab_size`. It also includes a warning if the resized `embedding_size`
|
225 |
+
is less than the `vocab_size`. In OLMo, `embedding_size` refers to the dimensionality of the model's token
|
226 |
+
embeddings, while `vocab_size` refers to the number of unique tokens in the vocabulary.
|
227 |
+
"""
|
228 |
+
model_embeds = self._resize_token_embeddings(new_num_tokens, pad_to_multiple_of)
|
229 |
+
if new_num_tokens is None and pad_to_multiple_of is None:
|
230 |
+
return model_embeds
|
231 |
+
|
232 |
+
# Update base model and current model config
|
233 |
+
self.config.embedding_size = model_embeds.weight.shape[0]
|
234 |
+
self.model.config.embedding_size = model_embeds.weight.shape[0]
|
235 |
+
|
236 |
+
# Check if the embedding size is less than the vocab size
|
237 |
+
if self.config.embedding_size < self.config.vocab_size:
|
238 |
+
warning_message = (
|
239 |
+
f"Resizing token embeddings to size {self.config.embedding_size}, which is less than the vocab size "
|
240 |
+
f"{self.config.vocab_size} defined in the model configuration. Make sure your tokenizer's vocabulary "
|
241 |
+
"size is less than or equal to the new token embedding size."
|
242 |
+
)
|
243 |
+
log.warning(warning_message)
|
244 |
+
|
245 |
+
# Tie weights again if needed
|
246 |
+
self.tie_weights()
|
247 |
+
|
248 |
+
return model_embeds
|
249 |
+
|
250 |
+
|
251 |
+
# Register the model so that it is available for transformer pipelines, auto-loading, etc.
|
252 |
+
AutoModelForCausalLM.register(OLMoConfig, OLMoForCausalLM)
|
253 |
+
|
254 |
+
|
255 |
+
from torch.nn import BCEWithLogitsLoss, CrossEntropyLoss, MSELoss
|
256 |
+
class OLMoForSequenceCLS(PreTrainedModel):
|
257 |
+
"""
|
258 |
+
Extremely barebones HF model wrapper.
|
259 |
+
"""
|
260 |
+
|
261 |
+
config_class = OLMoConfig
|
262 |
+
base_model_prefix = "model"
|
263 |
+
_no_split_modules = ["OLMoBlock"]
|
264 |
+
|
265 |
+
def __init__(self, config: OLMoConfig, model: Optional[OLMo] = None, init_params: bool = False):
|
266 |
+
super().__init__(config)
|
267 |
+
if not model:
|
268 |
+
model_config,num_labels = create_model_config_from_pretrained_config(config,is_cls=True)
|
269 |
+
# Initialize model (always on CPU to start with so we don't run out of GPU memory).
|
270 |
+
model_config.init_device = "cpu"
|
271 |
+
self.model = OLMo(model_config, init_params=init_params)
|
272 |
+
else:
|
273 |
+
self.model = model
|
274 |
+
self.word_embeddings = self.model.transformer.wte
|
275 |
+
self.num_labels = num_labels
|
276 |
+
print(f"num_labels: {self.num_labels}")
|
277 |
+
self.score = torch.nn.Linear(config.hidden_size, self.num_labels, bias=False)
|
278 |
+
|
279 |
+
|
280 |
+
###############
|
281 |
+
# mix resolution head
|
282 |
+
################
|
283 |
+
# self.CNN = CNN_Head(output_size=self.num_labels,cnn_output_dim=config.hidden_size, kernel_sizes=[4,9],dropout_rate=0.11,
|
284 |
+
# num_cnn_layers=2)
|
285 |
+
def get_bidirectional_attention_bias(self, seq_len: int, device: torch.device):
|
286 |
+
"""
|
287 |
+
Create a bidirectional attention bias for full sequence attention.
|
288 |
+
The bias matrix will not restrict attention in any direction.
|
289 |
+
"""
|
290 |
+
# Bias shape: (1, 1, seq_len, seq_len)
|
291 |
+
bias = torch.zeros(1, 1, seq_len, seq_len, device=device)
|
292 |
+
return bias
|
293 |
+
def forward(
|
294 |
+
self,
|
295 |
+
input_ids: torch.LongTensor = None,
|
296 |
+
inputs_embeds: Optional[torch.FloatTensor] = None,
|
297 |
+
attention_mask: Optional[torch.Tensor] = None,
|
298 |
+
attention_bias: Optional[torch.Tensor] = None,
|
299 |
+
past_key_values: Optional[List[torch.FloatTensor]] = None,
|
300 |
+
labels: Optional[torch.LongTensor] = None,
|
301 |
+
use_cache: Optional[bool] = None,
|
302 |
+
output_attentions: Optional[bool] = None,
|
303 |
+
output_hidden_states: Optional[bool] = None,
|
304 |
+
return_dict: Optional[bool] = None,
|
305 |
+
cache_position: Optional[
|
306 |
+
Cache
|
307 |
+
] = None, # This is a hack mitigation of an issue in transformers `4.39.x` https://github.com/huggingface/transformers/issues/29426
|
308 |
+
) -> Union[Tuple, CausalLMOutputWithPast]:
|
309 |
+
if use_cache is None:
|
310 |
+
use_cache = self.config.use_cache
|
311 |
+
|
312 |
+
if output_attentions:
|
313 |
+
raise ValueError("output_attentions is not yet supported in OLMo")
|
314 |
+
######
|
315 |
+
# Create attention bias only if it's not provided
|
316 |
+
######
|
317 |
+
# if attention_bias is None:
|
318 |
+
# seq_len = input_ids.shape[1] if input_ids is not None else inputs_embeds.shape[1]
|
319 |
+
# attention_bias = self.get_bidirectional_attention_bias(seq_len=seq_len, device=input_ids.device)
|
320 |
+
######
|
321 |
+
return_dict = return_dict if return_dict is not None else self.config.use_return_dict
|
322 |
+
########
|
323 |
+
# The output_hidden_states flag is set as the output format of olmo is the following:
|
324 |
+
# return OLMoOutput(logits=logits, attn_key_values=attn_key_values, hidden_states=tuple(all_hidden_states) if output_hidden_states else None)
|
325 |
+
# so we have to forcely set the output hidden_states flag
|
326 |
+
########
|
327 |
+
output_hidden_states = True
|
328 |
+
# decoder outputs consists of (dec_features, layer_state, dec_hidden, dec_attn)
|
329 |
+
outputs = self.model.forward(
|
330 |
+
input_ids=input_ids,
|
331 |
+
input_embeddings=inputs_embeds,
|
332 |
+
attention_mask=attention_mask,
|
333 |
+
attention_bias=attention_bias,
|
334 |
+
past_key_values=past_key_values,
|
335 |
+
use_cache=use_cache,
|
336 |
+
output_hidden_states=output_hidden_states,
|
337 |
+
)
|
338 |
+
hidden_states = outputs.hidden_states[-1]
|
339 |
+
# assume that the padding is done by prepadding at the left of the input sequence
|
340 |
+
# the logit of the last non-padding token is logit[:,-1,:]
|
341 |
+
logits = self.score(hidden_states)
|
342 |
+
##########
|
343 |
+
seq_lengths = attention_mask.sum(dim=-1)
|
344 |
+
# instead of taking the mean, we can also take the last token, taking the length of the sequence
|
345 |
+
pooled_logits = torch.stack(
|
346 |
+
[
|
347 |
+
logits[i, length - 1, :]
|
348 |
+
for i, length in enumerate(seq_lengths)
|
349 |
+
],
|
350 |
+
dim=0,
|
351 |
+
)
|
352 |
+
##########
|
353 |
+
loss = None
|
354 |
+
if labels is not None:
|
355 |
+
if self.config.problem_type is None:
|
356 |
+
if self.num_labels == 1:
|
357 |
+
self.config.problem_type = "regression"
|
358 |
+
elif self.num_labels > 1 and (labels.dtype == torch.long or labels.dtype == torch.int):
|
359 |
+
self.config.problem_type = "single_label_classification"
|
360 |
+
|
361 |
+
if self.config.problem_type == "regression":
|
362 |
+
loss_fct = MSELoss()
|
363 |
+
if self.num_labels == 1:
|
364 |
+
loss = loss_fct(pooled_logits.squeeze(), labels.squeeze())
|
365 |
+
else:
|
366 |
+
loss = loss_fct(pooled_logits, labels)
|
367 |
+
elif self.config.problem_type == "single_label_classification":
|
368 |
+
loss_fct = CrossEntropyLoss()
|
369 |
+
loss = loss_fct(pooled_logits.view(-1, self.num_labels), labels.view(-1))
|
370 |
+
|
371 |
+
if not return_dict:
|
372 |
+
output = (pooled_logits,) + outputs[1:]
|
373 |
+
return ((loss,) + output) if loss is not None else output
|
374 |
+
return SequenceClassifierOutputWithPast(
|
375 |
+
loss=loss,
|
376 |
+
logits=pooled_logits,
|
377 |
+
past_key_values=outputs.attn_key_values,
|
378 |
+
hidden_states=hidden_states,
|
379 |
+
)
|
380 |
+
def forward_new(
|
381 |
+
self,
|
382 |
+
input_ids: torch.LongTensor = None,
|
383 |
+
inputs_embeds: Optional[torch.FloatTensor] = None,
|
384 |
+
attention_mask: Optional[torch.Tensor] = None,
|
385 |
+
attention_bias: Optional[torch.Tensor] = None,
|
386 |
+
onehot: Optional[torch.Tensor] = None, # New field
|
387 |
+
past_key_values: Optional[List[torch.FloatTensor]] = None,
|
388 |
+
labels: Optional[torch.LongTensor] = None,
|
389 |
+
use_cache: Optional[bool] = None,
|
390 |
+
output_attentions: Optional[bool] = None,
|
391 |
+
output_hidden_states: Optional[bool] = None,
|
392 |
+
return_dict: Optional[bool] = None,
|
393 |
+
cache_position: Optional[
|
394 |
+
Cache
|
395 |
+
] = None, # This is a hack mitigation of an issue in transformers `4.39.x` https://github.com/huggingface/transformers/issues/29426
|
396 |
+
) -> Union[Tuple, CausalLMOutputWithPast]:
|
397 |
+
if use_cache is None:
|
398 |
+
use_cache = self.config.use_cache
|
399 |
+
|
400 |
+
if output_attentions:
|
401 |
+
raise ValueError("output_attentions is not yet supported in OLMo")
|
402 |
+
######
|
403 |
+
# input_ids shape
|
404 |
+
######
|
405 |
+
|
406 |
+
return_dict = return_dict if return_dict is not None else self.config.use_return_dict
|
407 |
+
########
|
408 |
+
# The output_hidden_states flag is set as the output format of olmo is the following:
|
409 |
+
# return OLMoOutput(logits=logits, attn_key_values=attn_key_values, hidden_states=tuple(all_hidden_states) if output_hidden_states else None)
|
410 |
+
# so we have to forcely set the output hidden_states flag
|
411 |
+
########
|
412 |
+
output_hidden_states = True
|
413 |
+
# decoder outputs consists of (dec_features, layer_state, dec_hidden, dec_attn)
|
414 |
+
#----------
|
415 |
+
# outputs = self.model.forward(
|
416 |
+
# input_ids=input_ids,
|
417 |
+
# input_embeddings=inputs_embeds,
|
418 |
+
# attention_mask=attention_mask,
|
419 |
+
# attention_bias=attention_bias,
|
420 |
+
# past_key_values=past_key_values,
|
421 |
+
# use_cache=use_cache,
|
422 |
+
# output_hidden_states=output_hidden_states,
|
423 |
+
# )
|
424 |
+
# hidden_states = outputs.hidden_states[-1]
|
425 |
+
#-------------
|
426 |
+
# assume that the padding is done by prepadding at the left of the input sequence
|
427 |
+
# the logit of the last non-padding token is logit[:,-1,:]
|
428 |
+
# logits = self.score(hidden_states)
|
429 |
+
# pooled_logits = hidden_states[:,-1,:]
|
430 |
+
pooled_logits = self.CNN(onehot)
|
431 |
+
|
432 |
+
loss = None
|
433 |
+
if labels is not None:
|
434 |
+
if self.config.problem_type is None:
|
435 |
+
if self.num_labels == 1:
|
436 |
+
self.config.problem_type = "regression"
|
437 |
+
elif self.num_labels > 1 and (labels.dtype == torch.long or labels.dtype == torch.int):
|
438 |
+
self.config.problem_type = "single_label_classification"
|
439 |
+
|
440 |
+
if self.config.problem_type == "regression":
|
441 |
+
loss_fct = MSELoss()
|
442 |
+
if self.num_labels == 1:
|
443 |
+
loss = loss_fct(pooled_logits.squeeze(), labels.squeeze())
|
444 |
+
else:
|
445 |
+
loss = loss_fct(pooled_logits, labels)
|
446 |
+
elif self.config.problem_type == "single_label_classification":
|
447 |
+
loss_fct = CrossEntropyLoss()
|
448 |
+
loss = loss_fct(pooled_logits.view(-1, self.num_labels), labels.view(-1))
|
449 |
+
|
450 |
+
# if not return_dict:
|
451 |
+
# output = (pooled_logits,) + outputs[1:] #------
|
452 |
+
# return ((loss,) + output) if loss is not None else output
|
453 |
+
return SequenceClassifierOutputWithPast(
|
454 |
+
loss=loss,
|
455 |
+
logits=pooled_logits,
|
456 |
+
# past_key_values=outputs.attn_key_values,
|
457 |
+
# hidden_states=hidden_states,
|
458 |
+
)
|
459 |
+
|
460 |
+
def can_generate(self) -> bool:
|
461 |
+
return True
|
462 |
+
|
463 |
+
def prepare_inputs_for_generation(
|
464 |
+
self, input_ids: torch.LongTensor, past_key_values: Optional[List[Tuple]] = None, **kwargs
|
465 |
+
):
|
466 |
+
if past_key_values:
|
467 |
+
# This is because we want the model to only process the last generated token.
|
468 |
+
input_ids = input_ids[:, -1:]
|
469 |
+
model_inputs = {"input_ids": input_ids, "past_key_values": past_key_values}
|
470 |
+
|
471 |
+
model_inputs.update(kwargs)
|
472 |
+
model_inputs["use_cache"] = kwargs.pop("use_cache", self.config.use_cache)
|
473 |
+
return model_inputs
|
474 |
+
|
475 |
+
# TODO: these are required to make the implementation complete.
|
476 |
+
# def resize_position_embeddings(self, new_num_position_embeddings: int):
|
477 |
+
# pass
|
478 |
+
#
|
479 |
+
# def get_position_embeddings(self) -> Union[nn.Embedding, Tuple[nn.Embedding]]:
|
480 |
+
# pass
|
481 |
+
#
|
482 |
+
# def _reorder_cache(self, past_key_values, beam_idx):
|
483 |
+
# pass
|
484 |
+
|
485 |
+
def get_input_embeddings(self) -> torch.nn.Module:
|
486 |
+
return self.model.transformer.wte
|
487 |
+
|
488 |
+
def set_input_embeddings(self, value: torch.nn.Module):
|
489 |
+
self.model.transformer.wte = value
|
490 |
+
|
491 |
+
def get_output_embeddings(self):
|
492 |
+
if self.config.weight_tying:
|
493 |
+
return self.model.transformer.wte
|
494 |
+
else:
|
495 |
+
return self.model.transformer.ff_out
|
496 |
+
|
497 |
+
def set_output_embeddings(self, value: torch.nn.Module):
|
498 |
+
if self.config.weight_tying:
|
499 |
+
self.model.transformer.wte = value
|
500 |
+
else:
|
501 |
+
self.model.transformer.ff_out = value
|
502 |
+
|
503 |
+
def tie_weights(self):
|
504 |
+
"""
|
505 |
+
This function is intentionally left as a no-op.
|
506 |
+
|
507 |
+
Weight tying is handled as follows:
|
508 |
+
- When the model is initialized, the `ff_out` layer is conditionally defined based on the `weight_tying` configuration.
|
509 |
+
See: `if not config.weight_tying: self.transformer.update(...)` in `olmo/model.py`.
|
510 |
+
- When computing logits, the `wte` weights are used directly if `weight_tying` is enabled.
|
511 |
+
See: `if self.config.weight_tying: logits = F.linear(x, self.transformer.wte.weight, None)` in the `forward` method.
|
512 |
+
|
513 |
+
Therefore, there is no need to explicitly tie the weights in this function.
|
514 |
+
"""
|
515 |
+
pass
|
516 |
+
|
517 |
+
def resize_token_embeddings(
|
518 |
+
self, new_num_tokens: Optional[int] = None, pad_to_multiple_of: Optional[int] = None
|
519 |
+
) -> torch.nn.Embedding:
|
520 |
+
"""
|
521 |
+
Resizes input token embeddings matrix of the model if `new_num_tokens != config.embedding_size`.
|
522 |
+
|
523 |
+
Takes care of tying weights embeddings afterwards if the model class has a `tie_weights()` method.
|
524 |
+
|
525 |
+
Arguments:
|
526 |
+
new_num_tokens (`int`, *optional*):
|
527 |
+
The new number of tokens in the embedding matrix. Increasing the size will add newly initialized
|
528 |
+
vectors at the end. Reducing the size will remove vectors from the end. If not provided or `None`, just
|
529 |
+
returns a pointer to the input tokens `torch.nn.Embedding` module of the model without doing anything.
|
530 |
+
pad_to_multiple_of (`int`, *optional*):
|
531 |
+
If set will pad the embedding matrix to a multiple of the provided value. If `new_num_tokens` is set to
|
532 |
+
`None` will just pad the embedding to a multiple of `pad_to_multiple_of`.
|
533 |
+
|
534 |
+
This is especially useful to enable the use of Tensor Cores on NVIDIA hardware with compute capability
|
535 |
+
`>= 7.5` (Volta), or on TPUs which benefit from having sequence lengths be a multiple of 128. For more
|
536 |
+
details about this, or help on choosing the correct value for resizing, refer to this guide:
|
537 |
+
https://docs.nvidia.com/deeplearning/performance/dl-performance-matrix-multiplication/index.html#requirements-tc
|
538 |
+
|
539 |
+
Return:
|
540 |
+
`torch.nn.Embedding`: Pointer to the input tokens Embeddings Module of the model.
|
541 |
+
|
542 |
+
Note:
|
543 |
+
This method differs from the base class implementation by resizing the `embedding_size` attribute of the
|
544 |
+
model configuration instead of the `vocab_size`. It also includes a warning if the resized `embedding_size`
|
545 |
+
is less than the `vocab_size`. In OLMo, `embedding_size` refers to the dimensionality of the model's token
|
546 |
+
embeddings, while `vocab_size` refers to the number of unique tokens in the vocabulary.
|
547 |
+
"""
|
548 |
+
model_embeds = self._resize_token_embeddings(new_num_tokens, pad_to_multiple_of)
|
549 |
+
if new_num_tokens is None and pad_to_multiple_of is None:
|
550 |
+
return model_embeds
|
551 |
+
|
552 |
+
# Update base model and current model config
|
553 |
+
self.config.embedding_size = model_embeds.weight.shape[0]
|
554 |
+
self.model.config.embedding_size = model_embeds.weight.shape[0]
|
555 |
+
|
556 |
+
# Check if the embedding size is less than the vocab size
|
557 |
+
if self.config.embedding_size < self.config.vocab_size:
|
558 |
+
warning_message = (
|
559 |
+
f"Resizing token embeddings to size {self.config.embedding_size}, which is less than the vocab size "
|
560 |
+
f"{self.config.vocab_size} defined in the model configuration. Make sure your tokenizer's vocabulary "
|
561 |
+
"size is less than or equal to the new token embedding size."
|
562 |
+
)
|
563 |
+
log.warning(warning_message)
|
564 |
+
|
565 |
+
# Tie weights again if needed
|
566 |
+
self.tie_weights()
|
567 |
+
|
568 |
+
return model_embeds
|
569 |
+
# Register the model so that it is available for transformer pipelines, auto-loading, etc.
|
570 |
+
AutoModelForSequenceClassification.register(OLMoConfig, OLMoForSequenceCLS)
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:99058408da686339aa2f83d078b3279100b29aaffb4e99fe7445ab8e00707b25
|
3 |
+
size 4361951261
|
special_tokens_map.json
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"cls_token": {
|
3 |
+
"content": "[CLS]",
|
4 |
+
"lstrip": false,
|
5 |
+
"normalized": false,
|
6 |
+
"rstrip": false,
|
7 |
+
"single_word": false
|
8 |
+
},
|
9 |
+
"mask_token": {
|
10 |
+
"content": "[MASK]",
|
11 |
+
"lstrip": false,
|
12 |
+
"normalized": false,
|
13 |
+
"rstrip": false,
|
14 |
+
"single_word": false
|
15 |
+
},
|
16 |
+
"pad_token": {
|
17 |
+
"content": "[PAD]",
|
18 |
+
"lstrip": false,
|
19 |
+
"normalized": false,
|
20 |
+
"rstrip": false,
|
21 |
+
"single_word": false
|
22 |
+
},
|
23 |
+
"sep_token": {
|
24 |
+
"content": "[SEP]",
|
25 |
+
"lstrip": false,
|
26 |
+
"normalized": false,
|
27 |
+
"rstrip": false,
|
28 |
+
"single_word": false
|
29 |
+
},
|
30 |
+
"unk_token": {
|
31 |
+
"content": "[UNK]",
|
32 |
+
"lstrip": false,
|
33 |
+
"normalized": false,
|
34 |
+
"rstrip": false,
|
35 |
+
"single_word": false
|
36 |
+
}
|
37 |
+
}
|
tokenization_olmo_fast.py
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from transformers import AutoTokenizer, PreTrainedTokenizerFast
|
2 |
+
|
3 |
+
from hf_olmo.configuration_olmo import OLMoConfig
|
4 |
+
|
5 |
+
|
6 |
+
class OLMoTokenizerFast(PreTrainedTokenizerFast):
|
7 |
+
# Note: OLMo's tokenizer is already a wrapper around huggingface. This is potentially unnecessary.
|
8 |
+
pass
|
9 |
+
|
10 |
+
# def save_vocabulary(self, save_directory: str, filename_prefix: Optional[str] = None) -> Tuple[str]:
|
11 |
+
# # This is required to make the implementation complete.
|
12 |
+
# pass
|
13 |
+
|
14 |
+
|
15 |
+
# Register the tokenizer class so that it is available for transformer pipelines, auto-loading etc.
|
16 |
+
AutoTokenizer.register(OLMoConfig, fast_tokenizer_class=OLMoTokenizerFast)
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
trainer_state.json
ADDED
@@ -0,0 +1,1076 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"best_metric": null,
|
3 |
+
"best_model_checkpoint": null,
|
4 |
+
"epoch": 4.851523834331857,
|
5 |
+
"eval_steps": 500,
|
6 |
+
"global_step": 74500,
|
7 |
+
"is_hyper_param_search": false,
|
8 |
+
"is_local_process_zero": true,
|
9 |
+
"is_world_process_zero": true,
|
10 |
+
"log_history": [
|
11 |
+
{
|
12 |
+
"epoch": 0.03256056264652253,
|
13 |
+
"grad_norm": 5.030904293060303,
|
14 |
+
"learning_rate": 1.986975774941391e-05,
|
15 |
+
"loss": 5.9746,
|
16 |
+
"step": 500
|
17 |
+
},
|
18 |
+
{
|
19 |
+
"epoch": 0.06512112529304506,
|
20 |
+
"grad_norm": 3.0790352821350098,
|
21 |
+
"learning_rate": 1.973951549882782e-05,
|
22 |
+
"loss": 4.2176,
|
23 |
+
"step": 1000
|
24 |
+
},
|
25 |
+
{
|
26 |
+
"epoch": 0.0976816879395676,
|
27 |
+
"grad_norm": 2.3053739070892334,
|
28 |
+
"learning_rate": 1.9609273248241733e-05,
|
29 |
+
"loss": 3.3847,
|
30 |
+
"step": 1500
|
31 |
+
},
|
32 |
+
{
|
33 |
+
"epoch": 0.13024225058609012,
|
34 |
+
"grad_norm": 2.5033621788024902,
|
35 |
+
"learning_rate": 1.9479030997655642e-05,
|
36 |
+
"loss": 2.9223,
|
37 |
+
"step": 2000
|
38 |
+
},
|
39 |
+
{
|
40 |
+
"epoch": 0.16280281323261267,
|
41 |
+
"grad_norm": 2.464855909347534,
|
42 |
+
"learning_rate": 1.934878874706955e-05,
|
43 |
+
"loss": 2.582,
|
44 |
+
"step": 2500
|
45 |
+
},
|
46 |
+
{
|
47 |
+
"epoch": 0.1953633758791352,
|
48 |
+
"grad_norm": 2.3733980655670166,
|
49 |
+
"learning_rate": 1.921854649648346e-05,
|
50 |
+
"loss": 2.381,
|
51 |
+
"step": 3000
|
52 |
+
},
|
53 |
+
{
|
54 |
+
"epoch": 0.22792393852565773,
|
55 |
+
"grad_norm": 2.560279130935669,
|
56 |
+
"learning_rate": 1.908830424589737e-05,
|
57 |
+
"loss": 2.2095,
|
58 |
+
"step": 3500
|
59 |
+
},
|
60 |
+
{
|
61 |
+
"epoch": 0.26048450117218025,
|
62 |
+
"grad_norm": 2.146317958831787,
|
63 |
+
"learning_rate": 1.895806199531128e-05,
|
64 |
+
"loss": 2.0995,
|
65 |
+
"step": 4000
|
66 |
+
},
|
67 |
+
{
|
68 |
+
"epoch": 0.29304506381870277,
|
69 |
+
"grad_norm": 2.359065294265747,
|
70 |
+
"learning_rate": 1.8827819744725192e-05,
|
71 |
+
"loss": 1.9948,
|
72 |
+
"step": 4500
|
73 |
+
},
|
74 |
+
{
|
75 |
+
"epoch": 0.32560562646522534,
|
76 |
+
"grad_norm": 2.245957851409912,
|
77 |
+
"learning_rate": 1.86975774941391e-05,
|
78 |
+
"loss": 1.9036,
|
79 |
+
"step": 5000
|
80 |
+
},
|
81 |
+
{
|
82 |
+
"epoch": 0.35816618911174786,
|
83 |
+
"grad_norm": 2.824934482574463,
|
84 |
+
"learning_rate": 1.856733524355301e-05,
|
85 |
+
"loss": 1.8212,
|
86 |
+
"step": 5500
|
87 |
+
},
|
88 |
+
{
|
89 |
+
"epoch": 0.3907267517582704,
|
90 |
+
"grad_norm": 2.4427430629730225,
|
91 |
+
"learning_rate": 1.843709299296692e-05,
|
92 |
+
"loss": 1.7307,
|
93 |
+
"step": 6000
|
94 |
+
},
|
95 |
+
{
|
96 |
+
"epoch": 0.4232873144047929,
|
97 |
+
"grad_norm": 2.3356220722198486,
|
98 |
+
"learning_rate": 1.830685074238083e-05,
|
99 |
+
"loss": 1.658,
|
100 |
+
"step": 6500
|
101 |
+
},
|
102 |
+
{
|
103 |
+
"epoch": 0.45584787705131546,
|
104 |
+
"grad_norm": 2.7466249465942383,
|
105 |
+
"learning_rate": 1.817660849179474e-05,
|
106 |
+
"loss": 1.5993,
|
107 |
+
"step": 7000
|
108 |
+
},
|
109 |
+
{
|
110 |
+
"epoch": 0.488408439697838,
|
111 |
+
"grad_norm": 2.31550669670105,
|
112 |
+
"learning_rate": 1.8046366241208652e-05,
|
113 |
+
"loss": 1.5493,
|
114 |
+
"step": 7500
|
115 |
+
},
|
116 |
+
{
|
117 |
+
"epoch": 0.5209690023443605,
|
118 |
+
"grad_norm": 2.412864923477173,
|
119 |
+
"learning_rate": 1.791612399062256e-05,
|
120 |
+
"loss": 1.4979,
|
121 |
+
"step": 8000
|
122 |
+
},
|
123 |
+
{
|
124 |
+
"epoch": 0.553529564990883,
|
125 |
+
"grad_norm": 2.5272300243377686,
|
126 |
+
"learning_rate": 1.778588174003647e-05,
|
127 |
+
"loss": 1.4487,
|
128 |
+
"step": 8500
|
129 |
+
},
|
130 |
+
{
|
131 |
+
"epoch": 0.5860901276374055,
|
132 |
+
"grad_norm": 2.343013286590576,
|
133 |
+
"learning_rate": 1.765563948945038e-05,
|
134 |
+
"loss": 1.4119,
|
135 |
+
"step": 9000
|
136 |
+
},
|
137 |
+
{
|
138 |
+
"epoch": 0.618650690283928,
|
139 |
+
"grad_norm": 2.6124706268310547,
|
140 |
+
"learning_rate": 1.752539723886429e-05,
|
141 |
+
"loss": 1.3896,
|
142 |
+
"step": 9500
|
143 |
+
},
|
144 |
+
{
|
145 |
+
"epoch": 0.6512112529304507,
|
146 |
+
"grad_norm": 2.8961498737335205,
|
147 |
+
"learning_rate": 1.73951549882782e-05,
|
148 |
+
"loss": 1.3333,
|
149 |
+
"step": 10000
|
150 |
+
},
|
151 |
+
{
|
152 |
+
"epoch": 0.6837718155769732,
|
153 |
+
"grad_norm": 2.8462820053100586,
|
154 |
+
"learning_rate": 1.7264912737692108e-05,
|
155 |
+
"loss": 1.3036,
|
156 |
+
"step": 10500
|
157 |
+
},
|
158 |
+
{
|
159 |
+
"epoch": 0.7163323782234957,
|
160 |
+
"grad_norm": 2.2509639263153076,
|
161 |
+
"learning_rate": 1.7134670487106017e-05,
|
162 |
+
"loss": 1.2872,
|
163 |
+
"step": 11000
|
164 |
+
},
|
165 |
+
{
|
166 |
+
"epoch": 0.7488929408700182,
|
167 |
+
"grad_norm": 2.3151662349700928,
|
168 |
+
"learning_rate": 1.7004428236519926e-05,
|
169 |
+
"loss": 1.2498,
|
170 |
+
"step": 11500
|
171 |
+
},
|
172 |
+
{
|
173 |
+
"epoch": 0.7814535035165407,
|
174 |
+
"grad_norm": 2.587400197982788,
|
175 |
+
"learning_rate": 1.687418598593384e-05,
|
176 |
+
"loss": 1.2433,
|
177 |
+
"step": 12000
|
178 |
+
},
|
179 |
+
{
|
180 |
+
"epoch": 0.8140140661630633,
|
181 |
+
"grad_norm": 2.7084901332855225,
|
182 |
+
"learning_rate": 1.674394373534775e-05,
|
183 |
+
"loss": 1.2189,
|
184 |
+
"step": 12500
|
185 |
+
},
|
186 |
+
{
|
187 |
+
"epoch": 0.8465746288095858,
|
188 |
+
"grad_norm": 2.3007726669311523,
|
189 |
+
"learning_rate": 1.6613701484761658e-05,
|
190 |
+
"loss": 1.1927,
|
191 |
+
"step": 13000
|
192 |
+
},
|
193 |
+
{
|
194 |
+
"epoch": 0.8791351914561084,
|
195 |
+
"grad_norm": 2.200362205505371,
|
196 |
+
"learning_rate": 1.6483459234175567e-05,
|
197 |
+
"loss": 1.1849,
|
198 |
+
"step": 13500
|
199 |
+
},
|
200 |
+
{
|
201 |
+
"epoch": 0.9116957541026309,
|
202 |
+
"grad_norm": 2.2914557456970215,
|
203 |
+
"learning_rate": 1.6353216983589476e-05,
|
204 |
+
"loss": 1.1706,
|
205 |
+
"step": 14000
|
206 |
+
},
|
207 |
+
{
|
208 |
+
"epoch": 0.9442563167491534,
|
209 |
+
"grad_norm": 2.357699155807495,
|
210 |
+
"learning_rate": 1.6222974733003386e-05,
|
211 |
+
"loss": 1.161,
|
212 |
+
"step": 14500
|
213 |
+
},
|
214 |
+
{
|
215 |
+
"epoch": 0.976816879395676,
|
216 |
+
"grad_norm": 2.5686471462249756,
|
217 |
+
"learning_rate": 1.60927324824173e-05,
|
218 |
+
"loss": 1.1459,
|
219 |
+
"step": 15000
|
220 |
+
},
|
221 |
+
{
|
222 |
+
"epoch": 1.0093774420421986,
|
223 |
+
"grad_norm": 2.511021375656128,
|
224 |
+
"learning_rate": 1.5962490231831208e-05,
|
225 |
+
"loss": 1.114,
|
226 |
+
"step": 15500
|
227 |
+
},
|
228 |
+
{
|
229 |
+
"epoch": 1.041938004688721,
|
230 |
+
"grad_norm": 2.976020097732544,
|
231 |
+
"learning_rate": 1.5832247981245117e-05,
|
232 |
+
"loss": 1.0509,
|
233 |
+
"step": 16000
|
234 |
+
},
|
235 |
+
{
|
236 |
+
"epoch": 1.0744985673352436,
|
237 |
+
"grad_norm": 2.2788777351379395,
|
238 |
+
"learning_rate": 1.5702005730659026e-05,
|
239 |
+
"loss": 1.0342,
|
240 |
+
"step": 16500
|
241 |
+
},
|
242 |
+
{
|
243 |
+
"epoch": 1.107059129981766,
|
244 |
+
"grad_norm": 2.359161853790283,
|
245 |
+
"learning_rate": 1.5571763480072936e-05,
|
246 |
+
"loss": 1.0347,
|
247 |
+
"step": 17000
|
248 |
+
},
|
249 |
+
{
|
250 |
+
"epoch": 1.1396196926282887,
|
251 |
+
"grad_norm": 2.8540244102478027,
|
252 |
+
"learning_rate": 1.5441521229486845e-05,
|
253 |
+
"loss": 1.0288,
|
254 |
+
"step": 17500
|
255 |
+
},
|
256 |
+
{
|
257 |
+
"epoch": 1.172180255274811,
|
258 |
+
"grad_norm": 2.635509729385376,
|
259 |
+
"learning_rate": 1.5311278978900758e-05,
|
260 |
+
"loss": 1.0166,
|
261 |
+
"step": 18000
|
262 |
+
},
|
263 |
+
{
|
264 |
+
"epoch": 1.2047408179213337,
|
265 |
+
"grad_norm": 2.5582518577575684,
|
266 |
+
"learning_rate": 1.5181036728314667e-05,
|
267 |
+
"loss": 1.0124,
|
268 |
+
"step": 18500
|
269 |
+
},
|
270 |
+
{
|
271 |
+
"epoch": 1.2373013805678563,
|
272 |
+
"grad_norm": 2.1439788341522217,
|
273 |
+
"learning_rate": 1.5050794477728576e-05,
|
274 |
+
"loss": 1.0141,
|
275 |
+
"step": 19000
|
276 |
+
},
|
277 |
+
{
|
278 |
+
"epoch": 1.2698619432143787,
|
279 |
+
"grad_norm": 2.3901960849761963,
|
280 |
+
"learning_rate": 1.4920552227142486e-05,
|
281 |
+
"loss": 1.0014,
|
282 |
+
"step": 19500
|
283 |
+
},
|
284 |
+
{
|
285 |
+
"epoch": 1.3024225058609014,
|
286 |
+
"grad_norm": 2.6219823360443115,
|
287 |
+
"learning_rate": 1.4790309976556397e-05,
|
288 |
+
"loss": 1.0073,
|
289 |
+
"step": 20000
|
290 |
+
},
|
291 |
+
{
|
292 |
+
"epoch": 1.3349830685074238,
|
293 |
+
"grad_norm": 2.7062482833862305,
|
294 |
+
"learning_rate": 1.4660067725970306e-05,
|
295 |
+
"loss": 0.9964,
|
296 |
+
"step": 20500
|
297 |
+
},
|
298 |
+
{
|
299 |
+
"epoch": 1.3675436311539464,
|
300 |
+
"grad_norm": 2.4956464767456055,
|
301 |
+
"learning_rate": 1.4529825475384215e-05,
|
302 |
+
"loss": 0.9936,
|
303 |
+
"step": 21000
|
304 |
+
},
|
305 |
+
{
|
306 |
+
"epoch": 1.4001041938004688,
|
307 |
+
"grad_norm": 2.357893228530884,
|
308 |
+
"learning_rate": 1.4399583224798126e-05,
|
309 |
+
"loss": 0.9904,
|
310 |
+
"step": 21500
|
311 |
+
},
|
312 |
+
{
|
313 |
+
"epoch": 1.4326647564469914,
|
314 |
+
"grad_norm": 2.3728160858154297,
|
315 |
+
"learning_rate": 1.4269340974212036e-05,
|
316 |
+
"loss": 0.9798,
|
317 |
+
"step": 22000
|
318 |
+
},
|
319 |
+
{
|
320 |
+
"epoch": 1.465225319093514,
|
321 |
+
"grad_norm": 2.1804134845733643,
|
322 |
+
"learning_rate": 1.4139098723625945e-05,
|
323 |
+
"loss": 0.9786,
|
324 |
+
"step": 22500
|
325 |
+
},
|
326 |
+
{
|
327 |
+
"epoch": 1.4977858817400365,
|
328 |
+
"grad_norm": 2.3426220417022705,
|
329 |
+
"learning_rate": 1.4008856473039856e-05,
|
330 |
+
"loss": 0.9717,
|
331 |
+
"step": 23000
|
332 |
+
},
|
333 |
+
{
|
334 |
+
"epoch": 1.5303464443865589,
|
335 |
+
"grad_norm": 2.6158998012542725,
|
336 |
+
"learning_rate": 1.3878614222453765e-05,
|
337 |
+
"loss": 0.969,
|
338 |
+
"step": 23500
|
339 |
+
},
|
340 |
+
{
|
341 |
+
"epoch": 1.5629070070330815,
|
342 |
+
"grad_norm": 2.3006558418273926,
|
343 |
+
"learning_rate": 1.3748371971867675e-05,
|
344 |
+
"loss": 0.9655,
|
345 |
+
"step": 24000
|
346 |
+
},
|
347 |
+
{
|
348 |
+
"epoch": 1.5954675696796041,
|
349 |
+
"grad_norm": 2.3054986000061035,
|
350 |
+
"learning_rate": 1.3618129721281586e-05,
|
351 |
+
"loss": 0.9576,
|
352 |
+
"step": 24500
|
353 |
+
},
|
354 |
+
{
|
355 |
+
"epoch": 1.6280281323261265,
|
356 |
+
"grad_norm": 2.3399717807769775,
|
357 |
+
"learning_rate": 1.3487887470695495e-05,
|
358 |
+
"loss": 0.9522,
|
359 |
+
"step": 25000
|
360 |
+
},
|
361 |
+
{
|
362 |
+
"epoch": 1.6605886949726492,
|
363 |
+
"grad_norm": 2.381333589553833,
|
364 |
+
"learning_rate": 1.3357645220109406e-05,
|
365 |
+
"loss": 0.963,
|
366 |
+
"step": 25500
|
367 |
+
},
|
368 |
+
{
|
369 |
+
"epoch": 1.6931492576191718,
|
370 |
+
"grad_norm": 2.5838122367858887,
|
371 |
+
"learning_rate": 1.3227402969523315e-05,
|
372 |
+
"loss": 0.952,
|
373 |
+
"step": 26000
|
374 |
+
},
|
375 |
+
{
|
376 |
+
"epoch": 1.7257098202656942,
|
377 |
+
"grad_norm": 2.398665428161621,
|
378 |
+
"learning_rate": 1.3097160718937225e-05,
|
379 |
+
"loss": 0.9482,
|
380 |
+
"step": 26500
|
381 |
+
},
|
382 |
+
{
|
383 |
+
"epoch": 1.7582703829122166,
|
384 |
+
"grad_norm": 2.4087893962860107,
|
385 |
+
"learning_rate": 1.2966918468351136e-05,
|
386 |
+
"loss": 0.9436,
|
387 |
+
"step": 27000
|
388 |
+
},
|
389 |
+
{
|
390 |
+
"epoch": 1.7908309455587392,
|
391 |
+
"grad_norm": 2.380199432373047,
|
392 |
+
"learning_rate": 1.2836676217765045e-05,
|
393 |
+
"loss": 0.9491,
|
394 |
+
"step": 27500
|
395 |
+
},
|
396 |
+
{
|
397 |
+
"epoch": 1.8233915082052619,
|
398 |
+
"grad_norm": 2.5550014972686768,
|
399 |
+
"learning_rate": 1.2706433967178954e-05,
|
400 |
+
"loss": 0.9365,
|
401 |
+
"step": 28000
|
402 |
+
},
|
403 |
+
{
|
404 |
+
"epoch": 1.8559520708517843,
|
405 |
+
"grad_norm": 2.352365493774414,
|
406 |
+
"learning_rate": 1.2576191716592865e-05,
|
407 |
+
"loss": 0.9314,
|
408 |
+
"step": 28500
|
409 |
+
},
|
410 |
+
{
|
411 |
+
"epoch": 1.888512633498307,
|
412 |
+
"grad_norm": 2.1357262134552,
|
413 |
+
"learning_rate": 1.2445949466006773e-05,
|
414 |
+
"loss": 0.9287,
|
415 |
+
"step": 29000
|
416 |
+
},
|
417 |
+
{
|
418 |
+
"epoch": 1.9210731961448295,
|
419 |
+
"grad_norm": 2.809288501739502,
|
420 |
+
"learning_rate": 1.2315707215420682e-05,
|
421 |
+
"loss": 0.9231,
|
422 |
+
"step": 29500
|
423 |
+
},
|
424 |
+
{
|
425 |
+
"epoch": 1.953633758791352,
|
426 |
+
"grad_norm": 2.195413589477539,
|
427 |
+
"learning_rate": 1.2185464964834592e-05,
|
428 |
+
"loss": 0.9165,
|
429 |
+
"step": 30000
|
430 |
+
},
|
431 |
+
{
|
432 |
+
"epoch": 1.9861943214378743,
|
433 |
+
"grad_norm": 2.4369585514068604,
|
434 |
+
"learning_rate": 1.2055222714248503e-05,
|
435 |
+
"loss": 0.9261,
|
436 |
+
"step": 30500
|
437 |
+
},
|
438 |
+
{
|
439 |
+
"epoch": 2.018754884084397,
|
440 |
+
"grad_norm": 2.0791983604431152,
|
441 |
+
"learning_rate": 1.1924980463662412e-05,
|
442 |
+
"loss": 0.8401,
|
443 |
+
"step": 31000
|
444 |
+
},
|
445 |
+
{
|
446 |
+
"epoch": 2.0513154467309196,
|
447 |
+
"grad_norm": 2.3653042316436768,
|
448 |
+
"learning_rate": 1.1794738213076321e-05,
|
449 |
+
"loss": 0.7797,
|
450 |
+
"step": 31500
|
451 |
+
},
|
452 |
+
{
|
453 |
+
"epoch": 2.083876009377442,
|
454 |
+
"grad_norm": 2.7878382205963135,
|
455 |
+
"learning_rate": 1.1664495962490232e-05,
|
456 |
+
"loss": 0.7782,
|
457 |
+
"step": 32000
|
458 |
+
},
|
459 |
+
{
|
460 |
+
"epoch": 2.1164365720239644,
|
461 |
+
"grad_norm": 2.4624345302581787,
|
462 |
+
"learning_rate": 1.1534253711904142e-05,
|
463 |
+
"loss": 0.7783,
|
464 |
+
"step": 32500
|
465 |
+
},
|
466 |
+
{
|
467 |
+
"epoch": 2.1489971346704873,
|
468 |
+
"grad_norm": 2.4672300815582275,
|
469 |
+
"learning_rate": 1.1404011461318051e-05,
|
470 |
+
"loss": 0.7778,
|
471 |
+
"step": 33000
|
472 |
+
},
|
473 |
+
{
|
474 |
+
"epoch": 2.1815576973170097,
|
475 |
+
"grad_norm": 2.6120986938476562,
|
476 |
+
"learning_rate": 1.1273769210731962e-05,
|
477 |
+
"loss": 0.7774,
|
478 |
+
"step": 33500
|
479 |
+
},
|
480 |
+
{
|
481 |
+
"epoch": 2.214118259963532,
|
482 |
+
"grad_norm": 2.7739064693450928,
|
483 |
+
"learning_rate": 1.1143526960145871e-05,
|
484 |
+
"loss": 0.7817,
|
485 |
+
"step": 34000
|
486 |
+
},
|
487 |
+
{
|
488 |
+
"epoch": 2.246678822610055,
|
489 |
+
"grad_norm": 2.5610642433166504,
|
490 |
+
"learning_rate": 1.1013284709559782e-05,
|
491 |
+
"loss": 0.7733,
|
492 |
+
"step": 34500
|
493 |
+
},
|
494 |
+
{
|
495 |
+
"epoch": 2.2792393852565773,
|
496 |
+
"grad_norm": 2.655161142349243,
|
497 |
+
"learning_rate": 1.0883042458973692e-05,
|
498 |
+
"loss": 0.78,
|
499 |
+
"step": 35000
|
500 |
+
},
|
501 |
+
{
|
502 |
+
"epoch": 2.3117999479030997,
|
503 |
+
"grad_norm": 2.468252182006836,
|
504 |
+
"learning_rate": 1.0752800208387601e-05,
|
505 |
+
"loss": 0.7799,
|
506 |
+
"step": 35500
|
507 |
+
},
|
508 |
+
{
|
509 |
+
"epoch": 2.344360510549622,
|
510 |
+
"grad_norm": 2.766505718231201,
|
511 |
+
"learning_rate": 1.0622557957801512e-05,
|
512 |
+
"loss": 0.7743,
|
513 |
+
"step": 36000
|
514 |
+
},
|
515 |
+
{
|
516 |
+
"epoch": 2.376921073196145,
|
517 |
+
"grad_norm": 3.1091792583465576,
|
518 |
+
"learning_rate": 1.0492315707215421e-05,
|
519 |
+
"loss": 0.7831,
|
520 |
+
"step": 36500
|
521 |
+
},
|
522 |
+
{
|
523 |
+
"epoch": 2.4094816358426674,
|
524 |
+
"grad_norm": 2.9491870403289795,
|
525 |
+
"learning_rate": 1.036207345662933e-05,
|
526 |
+
"loss": 0.7766,
|
527 |
+
"step": 37000
|
528 |
+
},
|
529 |
+
{
|
530 |
+
"epoch": 2.44204219848919,
|
531 |
+
"grad_norm": 2.8023264408111572,
|
532 |
+
"learning_rate": 1.0231831206043242e-05,
|
533 |
+
"loss": 0.7759,
|
534 |
+
"step": 37500
|
535 |
+
},
|
536 |
+
{
|
537 |
+
"epoch": 2.4746027611357126,
|
538 |
+
"grad_norm": 2.604647636413574,
|
539 |
+
"learning_rate": 1.0101588955457151e-05,
|
540 |
+
"loss": 0.7778,
|
541 |
+
"step": 38000
|
542 |
+
},
|
543 |
+
{
|
544 |
+
"epoch": 2.507163323782235,
|
545 |
+
"grad_norm": 2.879962205886841,
|
546 |
+
"learning_rate": 9.97134670487106e-06,
|
547 |
+
"loss": 0.7685,
|
548 |
+
"step": 38500
|
549 |
+
},
|
550 |
+
{
|
551 |
+
"epoch": 2.5397238864287575,
|
552 |
+
"grad_norm": 3.1485841274261475,
|
553 |
+
"learning_rate": 9.841104454284971e-06,
|
554 |
+
"loss": 0.7758,
|
555 |
+
"step": 39000
|
556 |
+
},
|
557 |
+
{
|
558 |
+
"epoch": 2.57228444907528,
|
559 |
+
"grad_norm": 2.426480293273926,
|
560 |
+
"learning_rate": 9.71086220369888e-06,
|
561 |
+
"loss": 0.7696,
|
562 |
+
"step": 39500
|
563 |
+
},
|
564 |
+
{
|
565 |
+
"epoch": 2.6048450117218027,
|
566 |
+
"grad_norm": 2.696232318878174,
|
567 |
+
"learning_rate": 9.58061995311279e-06,
|
568 |
+
"loss": 0.7738,
|
569 |
+
"step": 40000
|
570 |
+
},
|
571 |
+
{
|
572 |
+
"epoch": 2.637405574368325,
|
573 |
+
"grad_norm": 3.0641300678253174,
|
574 |
+
"learning_rate": 9.450377702526701e-06,
|
575 |
+
"loss": 0.7718,
|
576 |
+
"step": 40500
|
577 |
+
},
|
578 |
+
{
|
579 |
+
"epoch": 2.6699661370148475,
|
580 |
+
"grad_norm": 2.822618246078491,
|
581 |
+
"learning_rate": 9.32013545194061e-06,
|
582 |
+
"loss": 0.7657,
|
583 |
+
"step": 41000
|
584 |
+
},
|
585 |
+
{
|
586 |
+
"epoch": 2.7025266996613704,
|
587 |
+
"grad_norm": 3.1593356132507324,
|
588 |
+
"learning_rate": 9.18989320135452e-06,
|
589 |
+
"loss": 0.7718,
|
590 |
+
"step": 41500
|
591 |
+
},
|
592 |
+
{
|
593 |
+
"epoch": 2.735087262307893,
|
594 |
+
"grad_norm": 2.6383330821990967,
|
595 |
+
"learning_rate": 9.05965095076843e-06,
|
596 |
+
"loss": 0.7693,
|
597 |
+
"step": 42000
|
598 |
+
},
|
599 |
+
{
|
600 |
+
"epoch": 2.767647824954415,
|
601 |
+
"grad_norm": 2.7163684368133545,
|
602 |
+
"learning_rate": 8.92940870018234e-06,
|
603 |
+
"loss": 0.7648,
|
604 |
+
"step": 42500
|
605 |
+
},
|
606 |
+
{
|
607 |
+
"epoch": 2.8002083876009376,
|
608 |
+
"grad_norm": 3.0254065990448,
|
609 |
+
"learning_rate": 8.79916644959625e-06,
|
610 |
+
"loss": 0.7609,
|
611 |
+
"step": 43000
|
612 |
+
},
|
613 |
+
{
|
614 |
+
"epoch": 2.83276895024746,
|
615 |
+
"grad_norm": 3.440492630004883,
|
616 |
+
"learning_rate": 8.668924199010159e-06,
|
617 |
+
"loss": 0.7641,
|
618 |
+
"step": 43500
|
619 |
+
},
|
620 |
+
{
|
621 |
+
"epoch": 2.865329512893983,
|
622 |
+
"grad_norm": 2.6121511459350586,
|
623 |
+
"learning_rate": 8.53868194842407e-06,
|
624 |
+
"loss": 0.7645,
|
625 |
+
"step": 44000
|
626 |
+
},
|
627 |
+
{
|
628 |
+
"epoch": 2.8978900755405053,
|
629 |
+
"grad_norm": 2.865845203399658,
|
630 |
+
"learning_rate": 8.40843969783798e-06,
|
631 |
+
"loss": 0.7652,
|
632 |
+
"step": 44500
|
633 |
+
},
|
634 |
+
{
|
635 |
+
"epoch": 2.930450638187028,
|
636 |
+
"grad_norm": 2.8584651947021484,
|
637 |
+
"learning_rate": 8.278197447251888e-06,
|
638 |
+
"loss": 0.7603,
|
639 |
+
"step": 45000
|
640 |
+
},
|
641 |
+
{
|
642 |
+
"epoch": 2.9630112008335505,
|
643 |
+
"grad_norm": 2.286515235900879,
|
644 |
+
"learning_rate": 8.1479551966658e-06,
|
645 |
+
"loss": 0.7655,
|
646 |
+
"step": 45500
|
647 |
+
},
|
648 |
+
{
|
649 |
+
"epoch": 2.995571763480073,
|
650 |
+
"grad_norm": 3.0863349437713623,
|
651 |
+
"learning_rate": 8.017712946079709e-06,
|
652 |
+
"loss": 0.7598,
|
653 |
+
"step": 46000
|
654 |
+
},
|
655 |
+
{
|
656 |
+
"epoch": 3.0281323261265953,
|
657 |
+
"grad_norm": 2.7062647342681885,
|
658 |
+
"learning_rate": 7.887470695493618e-06,
|
659 |
+
"loss": 0.6164,
|
660 |
+
"step": 46500
|
661 |
+
},
|
662 |
+
{
|
663 |
+
"epoch": 3.060692888773118,
|
664 |
+
"grad_norm": 3.3541259765625,
|
665 |
+
"learning_rate": 7.75722844490753e-06,
|
666 |
+
"loss": 0.5882,
|
667 |
+
"step": 47000
|
668 |
+
},
|
669 |
+
{
|
670 |
+
"epoch": 3.0932534514196406,
|
671 |
+
"grad_norm": 3.511744260787964,
|
672 |
+
"learning_rate": 7.6269861943214385e-06,
|
673 |
+
"loss": 0.5884,
|
674 |
+
"step": 47500
|
675 |
+
},
|
676 |
+
{
|
677 |
+
"epoch": 3.125814014066163,
|
678 |
+
"grad_norm": 3.1489553451538086,
|
679 |
+
"learning_rate": 7.496743943735349e-06,
|
680 |
+
"loss": 0.5837,
|
681 |
+
"step": 48000
|
682 |
+
},
|
683 |
+
{
|
684 |
+
"epoch": 3.1583745767126854,
|
685 |
+
"grad_norm": 3.2325332164764404,
|
686 |
+
"learning_rate": 7.366501693149258e-06,
|
687 |
+
"loss": 0.5841,
|
688 |
+
"step": 48500
|
689 |
+
},
|
690 |
+
{
|
691 |
+
"epoch": 3.1909351393592083,
|
692 |
+
"grad_norm": 3.4985926151275635,
|
693 |
+
"learning_rate": 7.236259442563168e-06,
|
694 |
+
"loss": 0.5847,
|
695 |
+
"step": 49000
|
696 |
+
},
|
697 |
+
{
|
698 |
+
"epoch": 3.2234957020057307,
|
699 |
+
"grad_norm": 3.218742609024048,
|
700 |
+
"learning_rate": 7.106017191977078e-06,
|
701 |
+
"loss": 0.5868,
|
702 |
+
"step": 49500
|
703 |
+
},
|
704 |
+
{
|
705 |
+
"epoch": 3.256056264652253,
|
706 |
+
"grad_norm": 3.2203478813171387,
|
707 |
+
"learning_rate": 6.975774941390988e-06,
|
708 |
+
"loss": 0.5883,
|
709 |
+
"step": 50000
|
710 |
+
},
|
711 |
+
{
|
712 |
+
"epoch": 3.288616827298776,
|
713 |
+
"grad_norm": 3.2793335914611816,
|
714 |
+
"learning_rate": 6.845532690804898e-06,
|
715 |
+
"loss": 0.5876,
|
716 |
+
"step": 50500
|
717 |
+
},
|
718 |
+
{
|
719 |
+
"epoch": 3.3211773899452983,
|
720 |
+
"grad_norm": 3.3763086795806885,
|
721 |
+
"learning_rate": 6.715290440218808e-06,
|
722 |
+
"loss": 0.5843,
|
723 |
+
"step": 51000
|
724 |
+
},
|
725 |
+
{
|
726 |
+
"epoch": 3.3537379525918207,
|
727 |
+
"grad_norm": 3.314659833908081,
|
728 |
+
"learning_rate": 6.585048189632718e-06,
|
729 |
+
"loss": 0.5834,
|
730 |
+
"step": 51500
|
731 |
+
},
|
732 |
+
{
|
733 |
+
"epoch": 3.386298515238343,
|
734 |
+
"grad_norm": 4.0635457038879395,
|
735 |
+
"learning_rate": 6.4548059390466275e-06,
|
736 |
+
"loss": 0.5839,
|
737 |
+
"step": 52000
|
738 |
+
},
|
739 |
+
{
|
740 |
+
"epoch": 3.418859077884866,
|
741 |
+
"grad_norm": 3.561662197113037,
|
742 |
+
"learning_rate": 6.324563688460537e-06,
|
743 |
+
"loss": 0.586,
|
744 |
+
"step": 52500
|
745 |
+
},
|
746 |
+
{
|
747 |
+
"epoch": 3.4514196405313884,
|
748 |
+
"grad_norm": 3.3345561027526855,
|
749 |
+
"learning_rate": 6.194321437874446e-06,
|
750 |
+
"loss": 0.5819,
|
751 |
+
"step": 53000
|
752 |
+
},
|
753 |
+
{
|
754 |
+
"epoch": 3.483980203177911,
|
755 |
+
"grad_norm": 3.2945241928100586,
|
756 |
+
"learning_rate": 6.064079187288356e-06,
|
757 |
+
"loss": 0.5846,
|
758 |
+
"step": 53500
|
759 |
+
},
|
760 |
+
{
|
761 |
+
"epoch": 3.516540765824433,
|
762 |
+
"grad_norm": 3.8004238605499268,
|
763 |
+
"learning_rate": 5.9338369367022665e-06,
|
764 |
+
"loss": 0.5847,
|
765 |
+
"step": 54000
|
766 |
+
},
|
767 |
+
{
|
768 |
+
"epoch": 3.549101328470956,
|
769 |
+
"grad_norm": 3.7713723182678223,
|
770 |
+
"learning_rate": 5.803594686116176e-06,
|
771 |
+
"loss": 0.5846,
|
772 |
+
"step": 54500
|
773 |
+
},
|
774 |
+
{
|
775 |
+
"epoch": 3.5816618911174785,
|
776 |
+
"grad_norm": 3.562333822250366,
|
777 |
+
"learning_rate": 5.673352435530086e-06,
|
778 |
+
"loss": 0.5849,
|
779 |
+
"step": 55000
|
780 |
+
},
|
781 |
+
{
|
782 |
+
"epoch": 3.6142224537640013,
|
783 |
+
"grad_norm": 4.006633758544922,
|
784 |
+
"learning_rate": 5.543110184943996e-06,
|
785 |
+
"loss": 0.5847,
|
786 |
+
"step": 55500
|
787 |
+
},
|
788 |
+
{
|
789 |
+
"epoch": 3.6467830164105237,
|
790 |
+
"grad_norm": 3.453509569168091,
|
791 |
+
"learning_rate": 5.412867934357906e-06,
|
792 |
+
"loss": 0.5825,
|
793 |
+
"step": 56000
|
794 |
+
},
|
795 |
+
{
|
796 |
+
"epoch": 3.679343579057046,
|
797 |
+
"grad_norm": 3.36258864402771,
|
798 |
+
"learning_rate": 5.282625683771816e-06,
|
799 |
+
"loss": 0.5819,
|
800 |
+
"step": 56500
|
801 |
+
},
|
802 |
+
{
|
803 |
+
"epoch": 3.7119041417035685,
|
804 |
+
"grad_norm": 3.6564488410949707,
|
805 |
+
"learning_rate": 5.152383433185726e-06,
|
806 |
+
"loss": 0.5809,
|
807 |
+
"step": 57000
|
808 |
+
},
|
809 |
+
{
|
810 |
+
"epoch": 3.744464704350091,
|
811 |
+
"grad_norm": 3.977710485458374,
|
812 |
+
"learning_rate": 5.022141182599636e-06,
|
813 |
+
"loss": 0.5803,
|
814 |
+
"step": 57500
|
815 |
+
},
|
816 |
+
{
|
817 |
+
"epoch": 3.777025266996614,
|
818 |
+
"grad_norm": 3.4889750480651855,
|
819 |
+
"learning_rate": 4.891898932013545e-06,
|
820 |
+
"loss": 0.5808,
|
821 |
+
"step": 58000
|
822 |
+
},
|
823 |
+
{
|
824 |
+
"epoch": 3.809585829643136,
|
825 |
+
"grad_norm": 3.451753616333008,
|
826 |
+
"learning_rate": 4.7616566814274556e-06,
|
827 |
+
"loss": 0.5783,
|
828 |
+
"step": 58500
|
829 |
+
},
|
830 |
+
{
|
831 |
+
"epoch": 3.842146392289659,
|
832 |
+
"grad_norm": 3.9667842388153076,
|
833 |
+
"learning_rate": 4.631414430841366e-06,
|
834 |
+
"loss": 0.578,
|
835 |
+
"step": 59000
|
836 |
+
},
|
837 |
+
{
|
838 |
+
"epoch": 3.8747069549361814,
|
839 |
+
"grad_norm": 3.6356189250946045,
|
840 |
+
"learning_rate": 4.501172180255275e-06,
|
841 |
+
"loss": 0.5776,
|
842 |
+
"step": 59500
|
843 |
+
},
|
844 |
+
{
|
845 |
+
"epoch": 3.907267517582704,
|
846 |
+
"grad_norm": 4.25313663482666,
|
847 |
+
"learning_rate": 4.370929929669185e-06,
|
848 |
+
"loss": 0.5775,
|
849 |
+
"step": 60000
|
850 |
+
},
|
851 |
+
{
|
852 |
+
"epoch": 3.9398280802292263,
|
853 |
+
"grad_norm": 3.822178602218628,
|
854 |
+
"learning_rate": 4.2406876790830946e-06,
|
855 |
+
"loss": 0.5774,
|
856 |
+
"step": 60500
|
857 |
+
},
|
858 |
+
{
|
859 |
+
"epoch": 3.9723886428757487,
|
860 |
+
"grad_norm": 3.882927179336548,
|
861 |
+
"learning_rate": 4.110445428497005e-06,
|
862 |
+
"loss": 0.5733,
|
863 |
+
"step": 61000
|
864 |
+
},
|
865 |
+
{
|
866 |
+
"epoch": 4.004949205522271,
|
867 |
+
"grad_norm": 2.9648609161376953,
|
868 |
+
"learning_rate": 3.980203177910915e-06,
|
869 |
+
"loss": 0.553,
|
870 |
+
"step": 61500
|
871 |
+
},
|
872 |
+
{
|
873 |
+
"epoch": 4.037509768168794,
|
874 |
+
"grad_norm": 3.1388580799102783,
|
875 |
+
"learning_rate": 3.849960927324824e-06,
|
876 |
+
"loss": 0.4113,
|
877 |
+
"step": 62000
|
878 |
+
},
|
879 |
+
{
|
880 |
+
"epoch": 4.070070330815317,
|
881 |
+
"grad_norm": 3.7440290451049805,
|
882 |
+
"learning_rate": 3.7197186767387344e-06,
|
883 |
+
"loss": 0.4071,
|
884 |
+
"step": 62500
|
885 |
+
},
|
886 |
+
{
|
887 |
+
"epoch": 4.102630893461839,
|
888 |
+
"grad_norm": 3.4993302822113037,
|
889 |
+
"learning_rate": 3.589476426152644e-06,
|
890 |
+
"loss": 0.4078,
|
891 |
+
"step": 63000
|
892 |
+
},
|
893 |
+
{
|
894 |
+
"epoch": 4.135191456108362,
|
895 |
+
"grad_norm": 3.8999550342559814,
|
896 |
+
"learning_rate": 3.4592341755665543e-06,
|
897 |
+
"loss": 0.404,
|
898 |
+
"step": 63500
|
899 |
+
},
|
900 |
+
{
|
901 |
+
"epoch": 4.167752018754884,
|
902 |
+
"grad_norm": 3.9213688373565674,
|
903 |
+
"learning_rate": 3.328991924980464e-06,
|
904 |
+
"loss": 0.4057,
|
905 |
+
"step": 64000
|
906 |
+
},
|
907 |
+
{
|
908 |
+
"epoch": 4.200312581401406,
|
909 |
+
"grad_norm": 4.091826438903809,
|
910 |
+
"learning_rate": 3.1987496743943734e-06,
|
911 |
+
"loss": 0.4037,
|
912 |
+
"step": 64500
|
913 |
+
},
|
914 |
+
{
|
915 |
+
"epoch": 4.232873144047929,
|
916 |
+
"grad_norm": 3.9140231609344482,
|
917 |
+
"learning_rate": 3.0685074238082836e-06,
|
918 |
+
"loss": 0.4053,
|
919 |
+
"step": 65000
|
920 |
+
},
|
921 |
+
{
|
922 |
+
"epoch": 4.265433706694452,
|
923 |
+
"grad_norm": 4.0627760887146,
|
924 |
+
"learning_rate": 2.9382651732221933e-06,
|
925 |
+
"loss": 0.4029,
|
926 |
+
"step": 65500
|
927 |
+
},
|
928 |
+
{
|
929 |
+
"epoch": 4.2979942693409745,
|
930 |
+
"grad_norm": 3.8601019382476807,
|
931 |
+
"learning_rate": 2.8080229226361035e-06,
|
932 |
+
"loss": 0.4005,
|
933 |
+
"step": 66000
|
934 |
+
},
|
935 |
+
{
|
936 |
+
"epoch": 4.330554831987497,
|
937 |
+
"grad_norm": 3.769637107849121,
|
938 |
+
"learning_rate": 2.6777806720500133e-06,
|
939 |
+
"loss": 0.4001,
|
940 |
+
"step": 66500
|
941 |
+
},
|
942 |
+
{
|
943 |
+
"epoch": 4.363115394634019,
|
944 |
+
"grad_norm": 4.234343528747559,
|
945 |
+
"learning_rate": 2.547538421463923e-06,
|
946 |
+
"loss": 0.4002,
|
947 |
+
"step": 67000
|
948 |
+
},
|
949 |
+
{
|
950 |
+
"epoch": 4.395675957280542,
|
951 |
+
"grad_norm": 3.9124088287353516,
|
952 |
+
"learning_rate": 2.417296170877833e-06,
|
953 |
+
"loss": 0.4005,
|
954 |
+
"step": 67500
|
955 |
+
},
|
956 |
+
{
|
957 |
+
"epoch": 4.428236519927064,
|
958 |
+
"grad_norm": 3.8314108848571777,
|
959 |
+
"learning_rate": 2.2870539202917425e-06,
|
960 |
+
"loss": 0.3993,
|
961 |
+
"step": 68000
|
962 |
+
},
|
963 |
+
{
|
964 |
+
"epoch": 4.4607970825735865,
|
965 |
+
"grad_norm": 4.098474979400635,
|
966 |
+
"learning_rate": 2.1568116697056527e-06,
|
967 |
+
"loss": 0.3988,
|
968 |
+
"step": 68500
|
969 |
+
},
|
970 |
+
{
|
971 |
+
"epoch": 4.49335764522011,
|
972 |
+
"grad_norm": 3.8353285789489746,
|
973 |
+
"learning_rate": 2.0265694191195624e-06,
|
974 |
+
"loss": 0.3987,
|
975 |
+
"step": 69000
|
976 |
+
},
|
977 |
+
{
|
978 |
+
"epoch": 4.525918207866632,
|
979 |
+
"grad_norm": 3.7794976234436035,
|
980 |
+
"learning_rate": 1.8963271685334724e-06,
|
981 |
+
"loss": 0.3972,
|
982 |
+
"step": 69500
|
983 |
+
},
|
984 |
+
{
|
985 |
+
"epoch": 4.558478770513155,
|
986 |
+
"grad_norm": 4.056552410125732,
|
987 |
+
"learning_rate": 1.7660849179473824e-06,
|
988 |
+
"loss": 0.3958,
|
989 |
+
"step": 70000
|
990 |
+
},
|
991 |
+
{
|
992 |
+
"epoch": 4.591039333159677,
|
993 |
+
"grad_norm": 3.7579519748687744,
|
994 |
+
"learning_rate": 1.6358426673612921e-06,
|
995 |
+
"loss": 0.3955,
|
996 |
+
"step": 70500
|
997 |
+
},
|
998 |
+
{
|
999 |
+
"epoch": 4.6235998958061995,
|
1000 |
+
"grad_norm": 4.280270576477051,
|
1001 |
+
"learning_rate": 1.5056004167752019e-06,
|
1002 |
+
"loss": 0.3951,
|
1003 |
+
"step": 71000
|
1004 |
+
},
|
1005 |
+
{
|
1006 |
+
"epoch": 4.656160458452722,
|
1007 |
+
"grad_norm": 4.043455123901367,
|
1008 |
+
"learning_rate": 1.3753581661891118e-06,
|
1009 |
+
"loss": 0.3944,
|
1010 |
+
"step": 71500
|
1011 |
+
},
|
1012 |
+
{
|
1013 |
+
"epoch": 4.688721021099244,
|
1014 |
+
"grad_norm": 3.790985584259033,
|
1015 |
+
"learning_rate": 1.2451159156030216e-06,
|
1016 |
+
"loss": 0.395,
|
1017 |
+
"step": 72000
|
1018 |
+
},
|
1019 |
+
{
|
1020 |
+
"epoch": 4.721281583745768,
|
1021 |
+
"grad_norm": 3.877270460128784,
|
1022 |
+
"learning_rate": 1.1148736650169315e-06,
|
1023 |
+
"loss": 0.3916,
|
1024 |
+
"step": 72500
|
1025 |
+
},
|
1026 |
+
{
|
1027 |
+
"epoch": 4.75384214639229,
|
1028 |
+
"grad_norm": 4.055418491363525,
|
1029 |
+
"learning_rate": 9.846314144308415e-07,
|
1030 |
+
"loss": 0.3928,
|
1031 |
+
"step": 73000
|
1032 |
+
},
|
1033 |
+
{
|
1034 |
+
"epoch": 4.786402709038812,
|
1035 |
+
"grad_norm": 4.357405662536621,
|
1036 |
+
"learning_rate": 8.543891638447512e-07,
|
1037 |
+
"loss": 0.3911,
|
1038 |
+
"step": 73500
|
1039 |
+
},
|
1040 |
+
{
|
1041 |
+
"epoch": 4.818963271685335,
|
1042 |
+
"grad_norm": 3.596019983291626,
|
1043 |
+
"learning_rate": 7.241469132586612e-07,
|
1044 |
+
"loss": 0.3897,
|
1045 |
+
"step": 74000
|
1046 |
+
},
|
1047 |
+
{
|
1048 |
+
"epoch": 4.851523834331857,
|
1049 |
+
"grad_norm": 4.408013820648193,
|
1050 |
+
"learning_rate": 5.939046626725711e-07,
|
1051 |
+
"loss": 0.3887,
|
1052 |
+
"step": 74500
|
1053 |
+
}
|
1054 |
+
],
|
1055 |
+
"logging_steps": 500,
|
1056 |
+
"max_steps": 76780,
|
1057 |
+
"num_input_tokens_seen": 0,
|
1058 |
+
"num_train_epochs": 5,
|
1059 |
+
"save_steps": 500,
|
1060 |
+
"stateful_callbacks": {
|
1061 |
+
"TrainerControl": {
|
1062 |
+
"args": {
|
1063 |
+
"should_epoch_stop": false,
|
1064 |
+
"should_evaluate": false,
|
1065 |
+
"should_log": false,
|
1066 |
+
"should_save": true,
|
1067 |
+
"should_training_stop": false
|
1068 |
+
},
|
1069 |
+
"attributes": {}
|
1070 |
+
}
|
1071 |
+
},
|
1072 |
+
"total_flos": 4.199090369536721e+18,
|
1073 |
+
"train_batch_size": 16,
|
1074 |
+
"trial_name": null,
|
1075 |
+
"trial_params": null
|
1076 |
+
}
|