Upload 12 files
Browse files- config.json +26 -0
- configuration_chatglm.py +92 -0
- generation_config.json +7 -0
- ice_text.model +3 -0
- pytorch_model.bin.index.json +375 -0
- rng_state.pth +3 -0
- scheduler.pt +3 -0
- special_tokens_map.json +7 -0
- tokenization_chatglm.py +346 -0
- tokenizer_config.json +16 -0
- trainer_state.json +604 -0
- training_args.bin +3 -0
config.json
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "/users7/hcwang/2023/medchat/model/chatglm/original",
|
3 |
+
"architectures": [
|
4 |
+
"ChatGLMForConditionalGeneration"
|
5 |
+
],
|
6 |
+
"auto_map": {
|
7 |
+
"AutoConfig": "configuration_chatglm.ChatGLMConfig",
|
8 |
+
"AutoModel": "modeling_chatglm.ChatGLMForConditionalGeneration",
|
9 |
+
"AutoModelForSeq2SeqLM": "modeling_chatglm.ChatGLMForConditionalGeneration"
|
10 |
+
},
|
11 |
+
"bos_token_id": 150004,
|
12 |
+
"eos_token_id": 150005,
|
13 |
+
"hidden_size": 4096,
|
14 |
+
"inner_hidden_size": 16384,
|
15 |
+
"layernorm_epsilon": 1e-05,
|
16 |
+
"max_sequence_length": 2048,
|
17 |
+
"model_type": "chatglm",
|
18 |
+
"num_attention_heads": 32,
|
19 |
+
"num_layers": 28,
|
20 |
+
"pad_token_id": 0,
|
21 |
+
"position_encoding_2d": true,
|
22 |
+
"torch_dtype": "float16",
|
23 |
+
"transformers_version": "4.27.1",
|
24 |
+
"use_cache": false,
|
25 |
+
"vocab_size": 150528
|
26 |
+
}
|
configuration_chatglm.py
ADDED
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
""" ChatGLM model configuration """
|
2 |
+
|
3 |
+
from transformers.configuration_utils import PretrainedConfig
|
4 |
+
from transformers.utils import logging
|
5 |
+
|
6 |
+
logger = logging.get_logger(__name__)
|
7 |
+
|
8 |
+
|
9 |
+
class ChatGLMConfig(PretrainedConfig):
|
10 |
+
r"""
|
11 |
+
This is the configuration class to store the configuration of a [`~ChatGLMModel`].
|
12 |
+
It is used to instantiate an ChatGLM model according to the specified arguments, defining the model
|
13 |
+
architecture. Instantiating a configuration with the defaults will yield a similar configuration to that of
|
14 |
+
the ChatGLM-6B [THUDM/ChatGLM-6B](https://huggingface.co/THUDM/chatglm-6b) architecture.
|
15 |
+
|
16 |
+
Configuration objects inherit from [`PretrainedConfig`] and can be used
|
17 |
+
to control the model outputs. Read the documentation from [`PretrainedConfig`]
|
18 |
+
for more information.
|
19 |
+
|
20 |
+
|
21 |
+
Args:
|
22 |
+
vocab_size (`int`, *optional*, defaults to 150528):
|
23 |
+
Vocabulary size of the ChatGLM-6B model. Defines the number of different tokens that can be represented by the
|
24 |
+
`inputs_ids` passed when calling [`~ChatGLMModel`] or
|
25 |
+
[`~TFChatGLMModel`].
|
26 |
+
hidden_size (`int`, *optional*, defaults to 4096):
|
27 |
+
Dimension of the encoder layers and the pooler layer.
|
28 |
+
num_hidden_layers (`int`, *optional*, defaults to 28):
|
29 |
+
Number of hidden layers in the Transformer encoder.
|
30 |
+
num_attention_heads (`int`, *optional*, defaults to 32):
|
31 |
+
Number of attention heads for each attention layer in the Transformer encoder.
|
32 |
+
inner_hidden_size (`int`, *optional*, defaults to 16384):
|
33 |
+
Dimension of the "intermediate" (i.e., feed-forward) layer in the Transformer encoder.
|
34 |
+
max_sequence_length (`int`, *optional*, defaults to 512):
|
35 |
+
The maximum sequence length that this model might ever be used with.
|
36 |
+
Typically set this to something large just in case (e.g., 512 or 1024 or 2048).
|
37 |
+
layernorm_epsilon (`float`, *optional*, defaults to 1e-5):
|
38 |
+
The epsilon used by the layer normalization layers.
|
39 |
+
use_cache (`bool`, *optional*, defaults to `True`):
|
40 |
+
Whether the model should return the last key/values attentions (not used by all models).
|
41 |
+
Example:
|
42 |
+
|
43 |
+
```python
|
44 |
+
>>> from configuration_chatglm import ChatGLMConfig
|
45 |
+
>>> from modeling_chatglm import ChatGLMModel
|
46 |
+
|
47 |
+
>>> # Initializing a ChatGLM-6B THUDM/ChatGLM-6B style configuration
|
48 |
+
>>> configuration = ChatGLMConfig()
|
49 |
+
|
50 |
+
>>> # Initializing a model from the THUDM/ChatGLM-6B style configuration
|
51 |
+
>>> model = ChatGLMModel(configuration)
|
52 |
+
|
53 |
+
>>> # Accessing the model configuration
|
54 |
+
>>> configuration = model.config
|
55 |
+
```
|
56 |
+
"""
|
57 |
+
model_type = "chatglm"
|
58 |
+
|
59 |
+
def __init__(
|
60 |
+
self,
|
61 |
+
vocab_size=150528,
|
62 |
+
hidden_size=4096,
|
63 |
+
num_layers=28,
|
64 |
+
num_attention_heads=32,
|
65 |
+
layernorm_epsilon=1e-5,
|
66 |
+
use_cache=False,
|
67 |
+
bos_token_id=150004,
|
68 |
+
eos_token_id=150005,
|
69 |
+
pad_token_id=0,
|
70 |
+
max_sequence_length=2048,
|
71 |
+
inner_hidden_size=16384,
|
72 |
+
position_encoding_2d=True,
|
73 |
+
**kwargs
|
74 |
+
):
|
75 |
+
self.num_layers = num_layers
|
76 |
+
self.vocab_size = vocab_size
|
77 |
+
self.hidden_size = hidden_size
|
78 |
+
self.num_attention_heads = num_attention_heads
|
79 |
+
self.max_sequence_length = max_sequence_length
|
80 |
+
self.layernorm_epsilon = layernorm_epsilon
|
81 |
+
self.inner_hidden_size = inner_hidden_size
|
82 |
+
self.use_cache = use_cache
|
83 |
+
self.bos_token_id = bos_token_id
|
84 |
+
self.eos_token_id = eos_token_id
|
85 |
+
self.pad_token_id = pad_token_id
|
86 |
+
self.position_encoding_2d = position_encoding_2d
|
87 |
+
super().__init__(
|
88 |
+
pad_token_id=pad_token_id,
|
89 |
+
bos_token_id=bos_token_id,
|
90 |
+
eos_token_id=eos_token_id,
|
91 |
+
**kwargs
|
92 |
+
)
|
generation_config.json
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_from_model_config": true,
|
3 |
+
"bos_token_id": 150004,
|
4 |
+
"eos_token_id": 150005,
|
5 |
+
"pad_token_id": 0,
|
6 |
+
"transformers_version": "4.27.1"
|
7 |
+
}
|
ice_text.model
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:99871e0c85db81ad7af1028854fd091cd5778c8414ae9d94bbbc10d02c831c21
|
3 |
+
size 2699926
|
pytorch_model.bin.index.json
ADDED
@@ -0,0 +1,375 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"metadata": {
|
3 |
+
"total_size": 13743539968
|
4 |
+
},
|
5 |
+
"weight_map": {
|
6 |
+
"lm_head.weight": "pytorch_model-00002-of-00002.bin",
|
7 |
+
"transformer.final_layernorm.bias": "pytorch_model-00002-of-00002.bin",
|
8 |
+
"transformer.final_layernorm.weight": "pytorch_model-00002-of-00002.bin",
|
9 |
+
"transformer.layers.0.attention.dense.bias": "pytorch_model-00001-of-00002.bin",
|
10 |
+
"transformer.layers.0.attention.dense.weight": "pytorch_model-00001-of-00002.bin",
|
11 |
+
"transformer.layers.0.attention.query_key_value.bias": "pytorch_model-00001-of-00002.bin",
|
12 |
+
"transformer.layers.0.attention.query_key_value.weight": "pytorch_model-00001-of-00002.bin",
|
13 |
+
"transformer.layers.0.attention.rotary_emb.inv_freq": "pytorch_model-00001-of-00002.bin",
|
14 |
+
"transformer.layers.0.input_layernorm.bias": "pytorch_model-00001-of-00002.bin",
|
15 |
+
"transformer.layers.0.input_layernorm.weight": "pytorch_model-00001-of-00002.bin",
|
16 |
+
"transformer.layers.0.mlp.dense_4h_to_h.bias": "pytorch_model-00001-of-00002.bin",
|
17 |
+
"transformer.layers.0.mlp.dense_4h_to_h.weight": "pytorch_model-00001-of-00002.bin",
|
18 |
+
"transformer.layers.0.mlp.dense_h_to_4h.bias": "pytorch_model-00001-of-00002.bin",
|
19 |
+
"transformer.layers.0.mlp.dense_h_to_4h.weight": "pytorch_model-00001-of-00002.bin",
|
20 |
+
"transformer.layers.0.post_attention_layernorm.bias": "pytorch_model-00001-of-00002.bin",
|
21 |
+
"transformer.layers.0.post_attention_layernorm.weight": "pytorch_model-00001-of-00002.bin",
|
22 |
+
"transformer.layers.1.attention.dense.bias": "pytorch_model-00001-of-00002.bin",
|
23 |
+
"transformer.layers.1.attention.dense.weight": "pytorch_model-00001-of-00002.bin",
|
24 |
+
"transformer.layers.1.attention.query_key_value.bias": "pytorch_model-00001-of-00002.bin",
|
25 |
+
"transformer.layers.1.attention.query_key_value.weight": "pytorch_model-00001-of-00002.bin",
|
26 |
+
"transformer.layers.1.attention.rotary_emb.inv_freq": "pytorch_model-00001-of-00002.bin",
|
27 |
+
"transformer.layers.1.input_layernorm.bias": "pytorch_model-00001-of-00002.bin",
|
28 |
+
"transformer.layers.1.input_layernorm.weight": "pytorch_model-00001-of-00002.bin",
|
29 |
+
"transformer.layers.1.mlp.dense_4h_to_h.bias": "pytorch_model-00001-of-00002.bin",
|
30 |
+
"transformer.layers.1.mlp.dense_4h_to_h.weight": "pytorch_model-00001-of-00002.bin",
|
31 |
+
"transformer.layers.1.mlp.dense_h_to_4h.bias": "pytorch_model-00001-of-00002.bin",
|
32 |
+
"transformer.layers.1.mlp.dense_h_to_4h.weight": "pytorch_model-00001-of-00002.bin",
|
33 |
+
"transformer.layers.1.post_attention_layernorm.bias": "pytorch_model-00001-of-00002.bin",
|
34 |
+
"transformer.layers.1.post_attention_layernorm.weight": "pytorch_model-00001-of-00002.bin",
|
35 |
+
"transformer.layers.10.attention.dense.bias": "pytorch_model-00001-of-00002.bin",
|
36 |
+
"transformer.layers.10.attention.dense.weight": "pytorch_model-00001-of-00002.bin",
|
37 |
+
"transformer.layers.10.attention.query_key_value.bias": "pytorch_model-00001-of-00002.bin",
|
38 |
+
"transformer.layers.10.attention.query_key_value.weight": "pytorch_model-00001-of-00002.bin",
|
39 |
+
"transformer.layers.10.attention.rotary_emb.inv_freq": "pytorch_model-00001-of-00002.bin",
|
40 |
+
"transformer.layers.10.input_layernorm.bias": "pytorch_model-00001-of-00002.bin",
|
41 |
+
"transformer.layers.10.input_layernorm.weight": "pytorch_model-00001-of-00002.bin",
|
42 |
+
"transformer.layers.10.mlp.dense_4h_to_h.bias": "pytorch_model-00001-of-00002.bin",
|
43 |
+
"transformer.layers.10.mlp.dense_4h_to_h.weight": "pytorch_model-00001-of-00002.bin",
|
44 |
+
"transformer.layers.10.mlp.dense_h_to_4h.bias": "pytorch_model-00001-of-00002.bin",
|
45 |
+
"transformer.layers.10.mlp.dense_h_to_4h.weight": "pytorch_model-00001-of-00002.bin",
|
46 |
+
"transformer.layers.10.post_attention_layernorm.bias": "pytorch_model-00001-of-00002.bin",
|
47 |
+
"transformer.layers.10.post_attention_layernorm.weight": "pytorch_model-00001-of-00002.bin",
|
48 |
+
"transformer.layers.11.attention.dense.bias": "pytorch_model-00001-of-00002.bin",
|
49 |
+
"transformer.layers.11.attention.dense.weight": "pytorch_model-00001-of-00002.bin",
|
50 |
+
"transformer.layers.11.attention.query_key_value.bias": "pytorch_model-00001-of-00002.bin",
|
51 |
+
"transformer.layers.11.attention.query_key_value.weight": "pytorch_model-00001-of-00002.bin",
|
52 |
+
"transformer.layers.11.attention.rotary_emb.inv_freq": "pytorch_model-00001-of-00002.bin",
|
53 |
+
"transformer.layers.11.input_layernorm.bias": "pytorch_model-00001-of-00002.bin",
|
54 |
+
"transformer.layers.11.input_layernorm.weight": "pytorch_model-00001-of-00002.bin",
|
55 |
+
"transformer.layers.11.mlp.dense_4h_to_h.bias": "pytorch_model-00001-of-00002.bin",
|
56 |
+
"transformer.layers.11.mlp.dense_4h_to_h.weight": "pytorch_model-00001-of-00002.bin",
|
57 |
+
"transformer.layers.11.mlp.dense_h_to_4h.bias": "pytorch_model-00001-of-00002.bin",
|
58 |
+
"transformer.layers.11.mlp.dense_h_to_4h.weight": "pytorch_model-00001-of-00002.bin",
|
59 |
+
"transformer.layers.11.post_attention_layernorm.bias": "pytorch_model-00001-of-00002.bin",
|
60 |
+
"transformer.layers.11.post_attention_layernorm.weight": "pytorch_model-00001-of-00002.bin",
|
61 |
+
"transformer.layers.12.attention.dense.bias": "pytorch_model-00001-of-00002.bin",
|
62 |
+
"transformer.layers.12.attention.dense.weight": "pytorch_model-00001-of-00002.bin",
|
63 |
+
"transformer.layers.12.attention.query_key_value.bias": "pytorch_model-00001-of-00002.bin",
|
64 |
+
"transformer.layers.12.attention.query_key_value.weight": "pytorch_model-00001-of-00002.bin",
|
65 |
+
"transformer.layers.12.attention.rotary_emb.inv_freq": "pytorch_model-00001-of-00002.bin",
|
66 |
+
"transformer.layers.12.input_layernorm.bias": "pytorch_model-00001-of-00002.bin",
|
67 |
+
"transformer.layers.12.input_layernorm.weight": "pytorch_model-00001-of-00002.bin",
|
68 |
+
"transformer.layers.12.mlp.dense_4h_to_h.bias": "pytorch_model-00001-of-00002.bin",
|
69 |
+
"transformer.layers.12.mlp.dense_4h_to_h.weight": "pytorch_model-00001-of-00002.bin",
|
70 |
+
"transformer.layers.12.mlp.dense_h_to_4h.bias": "pytorch_model-00001-of-00002.bin",
|
71 |
+
"transformer.layers.12.mlp.dense_h_to_4h.weight": "pytorch_model-00001-of-00002.bin",
|
72 |
+
"transformer.layers.12.post_attention_layernorm.bias": "pytorch_model-00001-of-00002.bin",
|
73 |
+
"transformer.layers.12.post_attention_layernorm.weight": "pytorch_model-00001-of-00002.bin",
|
74 |
+
"transformer.layers.13.attention.dense.bias": "pytorch_model-00001-of-00002.bin",
|
75 |
+
"transformer.layers.13.attention.dense.weight": "pytorch_model-00001-of-00002.bin",
|
76 |
+
"transformer.layers.13.attention.query_key_value.bias": "pytorch_model-00001-of-00002.bin",
|
77 |
+
"transformer.layers.13.attention.query_key_value.weight": "pytorch_model-00001-of-00002.bin",
|
78 |
+
"transformer.layers.13.attention.rotary_emb.inv_freq": "pytorch_model-00001-of-00002.bin",
|
79 |
+
"transformer.layers.13.input_layernorm.bias": "pytorch_model-00001-of-00002.bin",
|
80 |
+
"transformer.layers.13.input_layernorm.weight": "pytorch_model-00001-of-00002.bin",
|
81 |
+
"transformer.layers.13.mlp.dense_4h_to_h.bias": "pytorch_model-00001-of-00002.bin",
|
82 |
+
"transformer.layers.13.mlp.dense_4h_to_h.weight": "pytorch_model-00001-of-00002.bin",
|
83 |
+
"transformer.layers.13.mlp.dense_h_to_4h.bias": "pytorch_model-00001-of-00002.bin",
|
84 |
+
"transformer.layers.13.mlp.dense_h_to_4h.weight": "pytorch_model-00001-of-00002.bin",
|
85 |
+
"transformer.layers.13.post_attention_layernorm.bias": "pytorch_model-00001-of-00002.bin",
|
86 |
+
"transformer.layers.13.post_attention_layernorm.weight": "pytorch_model-00001-of-00002.bin",
|
87 |
+
"transformer.layers.14.attention.dense.bias": "pytorch_model-00001-of-00002.bin",
|
88 |
+
"transformer.layers.14.attention.dense.weight": "pytorch_model-00001-of-00002.bin",
|
89 |
+
"transformer.layers.14.attention.query_key_value.bias": "pytorch_model-00001-of-00002.bin",
|
90 |
+
"transformer.layers.14.attention.query_key_value.weight": "pytorch_model-00001-of-00002.bin",
|
91 |
+
"transformer.layers.14.attention.rotary_emb.inv_freq": "pytorch_model-00001-of-00002.bin",
|
92 |
+
"transformer.layers.14.input_layernorm.bias": "pytorch_model-00001-of-00002.bin",
|
93 |
+
"transformer.layers.14.input_layernorm.weight": "pytorch_model-00001-of-00002.bin",
|
94 |
+
"transformer.layers.14.mlp.dense_4h_to_h.bias": "pytorch_model-00001-of-00002.bin",
|
95 |
+
"transformer.layers.14.mlp.dense_4h_to_h.weight": "pytorch_model-00001-of-00002.bin",
|
96 |
+
"transformer.layers.14.mlp.dense_h_to_4h.bias": "pytorch_model-00001-of-00002.bin",
|
97 |
+
"transformer.layers.14.mlp.dense_h_to_4h.weight": "pytorch_model-00001-of-00002.bin",
|
98 |
+
"transformer.layers.14.post_attention_layernorm.bias": "pytorch_model-00001-of-00002.bin",
|
99 |
+
"transformer.layers.14.post_attention_layernorm.weight": "pytorch_model-00001-of-00002.bin",
|
100 |
+
"transformer.layers.15.attention.dense.bias": "pytorch_model-00001-of-00002.bin",
|
101 |
+
"transformer.layers.15.attention.dense.weight": "pytorch_model-00001-of-00002.bin",
|
102 |
+
"transformer.layers.15.attention.query_key_value.bias": "pytorch_model-00001-of-00002.bin",
|
103 |
+
"transformer.layers.15.attention.query_key_value.weight": "pytorch_model-00001-of-00002.bin",
|
104 |
+
"transformer.layers.15.attention.rotary_emb.inv_freq": "pytorch_model-00001-of-00002.bin",
|
105 |
+
"transformer.layers.15.input_layernorm.bias": "pytorch_model-00001-of-00002.bin",
|
106 |
+
"transformer.layers.15.input_layernorm.weight": "pytorch_model-00001-of-00002.bin",
|
107 |
+
"transformer.layers.15.mlp.dense_4h_to_h.bias": "pytorch_model-00001-of-00002.bin",
|
108 |
+
"transformer.layers.15.mlp.dense_4h_to_h.weight": "pytorch_model-00001-of-00002.bin",
|
109 |
+
"transformer.layers.15.mlp.dense_h_to_4h.bias": "pytorch_model-00001-of-00002.bin",
|
110 |
+
"transformer.layers.15.mlp.dense_h_to_4h.weight": "pytorch_model-00001-of-00002.bin",
|
111 |
+
"transformer.layers.15.post_attention_layernorm.bias": "pytorch_model-00001-of-00002.bin",
|
112 |
+
"transformer.layers.15.post_attention_layernorm.weight": "pytorch_model-00001-of-00002.bin",
|
113 |
+
"transformer.layers.16.attention.dense.bias": "pytorch_model-00001-of-00002.bin",
|
114 |
+
"transformer.layers.16.attention.dense.weight": "pytorch_model-00001-of-00002.bin",
|
115 |
+
"transformer.layers.16.attention.query_key_value.bias": "pytorch_model-00001-of-00002.bin",
|
116 |
+
"transformer.layers.16.attention.query_key_value.weight": "pytorch_model-00001-of-00002.bin",
|
117 |
+
"transformer.layers.16.attention.rotary_emb.inv_freq": "pytorch_model-00001-of-00002.bin",
|
118 |
+
"transformer.layers.16.input_layernorm.bias": "pytorch_model-00001-of-00002.bin",
|
119 |
+
"transformer.layers.16.input_layernorm.weight": "pytorch_model-00001-of-00002.bin",
|
120 |
+
"transformer.layers.16.mlp.dense_4h_to_h.bias": "pytorch_model-00001-of-00002.bin",
|
121 |
+
"transformer.layers.16.mlp.dense_4h_to_h.weight": "pytorch_model-00001-of-00002.bin",
|
122 |
+
"transformer.layers.16.mlp.dense_h_to_4h.bias": "pytorch_model-00001-of-00002.bin",
|
123 |
+
"transformer.layers.16.mlp.dense_h_to_4h.weight": "pytorch_model-00001-of-00002.bin",
|
124 |
+
"transformer.layers.16.post_attention_layernorm.bias": "pytorch_model-00001-of-00002.bin",
|
125 |
+
"transformer.layers.16.post_attention_layernorm.weight": "pytorch_model-00001-of-00002.bin",
|
126 |
+
"transformer.layers.17.attention.dense.bias": "pytorch_model-00001-of-00002.bin",
|
127 |
+
"transformer.layers.17.attention.dense.weight": "pytorch_model-00001-of-00002.bin",
|
128 |
+
"transformer.layers.17.attention.query_key_value.bias": "pytorch_model-00001-of-00002.bin",
|
129 |
+
"transformer.layers.17.attention.query_key_value.weight": "pytorch_model-00001-of-00002.bin",
|
130 |
+
"transformer.layers.17.attention.rotary_emb.inv_freq": "pytorch_model-00001-of-00002.bin",
|
131 |
+
"transformer.layers.17.input_layernorm.bias": "pytorch_model-00001-of-00002.bin",
|
132 |
+
"transformer.layers.17.input_layernorm.weight": "pytorch_model-00001-of-00002.bin",
|
133 |
+
"transformer.layers.17.mlp.dense_4h_to_h.bias": "pytorch_model-00001-of-00002.bin",
|
134 |
+
"transformer.layers.17.mlp.dense_4h_to_h.weight": "pytorch_model-00001-of-00002.bin",
|
135 |
+
"transformer.layers.17.mlp.dense_h_to_4h.bias": "pytorch_model-00001-of-00002.bin",
|
136 |
+
"transformer.layers.17.mlp.dense_h_to_4h.weight": "pytorch_model-00001-of-00002.bin",
|
137 |
+
"transformer.layers.17.post_attention_layernorm.bias": "pytorch_model-00001-of-00002.bin",
|
138 |
+
"transformer.layers.17.post_attention_layernorm.weight": "pytorch_model-00001-of-00002.bin",
|
139 |
+
"transformer.layers.18.attention.dense.bias": "pytorch_model-00001-of-00002.bin",
|
140 |
+
"transformer.layers.18.attention.dense.weight": "pytorch_model-00001-of-00002.bin",
|
141 |
+
"transformer.layers.18.attention.query_key_value.bias": "pytorch_model-00001-of-00002.bin",
|
142 |
+
"transformer.layers.18.attention.query_key_value.weight": "pytorch_model-00001-of-00002.bin",
|
143 |
+
"transformer.layers.18.attention.rotary_emb.inv_freq": "pytorch_model-00001-of-00002.bin",
|
144 |
+
"transformer.layers.18.input_layernorm.bias": "pytorch_model-00001-of-00002.bin",
|
145 |
+
"transformer.layers.18.input_layernorm.weight": "pytorch_model-00001-of-00002.bin",
|
146 |
+
"transformer.layers.18.mlp.dense_4h_to_h.bias": "pytorch_model-00001-of-00002.bin",
|
147 |
+
"transformer.layers.18.mlp.dense_4h_to_h.weight": "pytorch_model-00001-of-00002.bin",
|
148 |
+
"transformer.layers.18.mlp.dense_h_to_4h.bias": "pytorch_model-00001-of-00002.bin",
|
149 |
+
"transformer.layers.18.mlp.dense_h_to_4h.weight": "pytorch_model-00001-of-00002.bin",
|
150 |
+
"transformer.layers.18.post_attention_layernorm.bias": "pytorch_model-00001-of-00002.bin",
|
151 |
+
"transformer.layers.18.post_attention_layernorm.weight": "pytorch_model-00001-of-00002.bin",
|
152 |
+
"transformer.layers.19.attention.dense.bias": "pytorch_model-00001-of-00002.bin",
|
153 |
+
"transformer.layers.19.attention.dense.weight": "pytorch_model-00001-of-00002.bin",
|
154 |
+
"transformer.layers.19.attention.query_key_value.bias": "pytorch_model-00001-of-00002.bin",
|
155 |
+
"transformer.layers.19.attention.query_key_value.weight": "pytorch_model-00001-of-00002.bin",
|
156 |
+
"transformer.layers.19.attention.rotary_emb.inv_freq": "pytorch_model-00001-of-00002.bin",
|
157 |
+
"transformer.layers.19.input_layernorm.bias": "pytorch_model-00001-of-00002.bin",
|
158 |
+
"transformer.layers.19.input_layernorm.weight": "pytorch_model-00001-of-00002.bin",
|
159 |
+
"transformer.layers.19.mlp.dense_4h_to_h.bias": "pytorch_model-00001-of-00002.bin",
|
160 |
+
"transformer.layers.19.mlp.dense_4h_to_h.weight": "pytorch_model-00001-of-00002.bin",
|
161 |
+
"transformer.layers.19.mlp.dense_h_to_4h.bias": "pytorch_model-00001-of-00002.bin",
|
162 |
+
"transformer.layers.19.mlp.dense_h_to_4h.weight": "pytorch_model-00001-of-00002.bin",
|
163 |
+
"transformer.layers.19.post_attention_layernorm.bias": "pytorch_model-00001-of-00002.bin",
|
164 |
+
"transformer.layers.19.post_attention_layernorm.weight": "pytorch_model-00001-of-00002.bin",
|
165 |
+
"transformer.layers.2.attention.dense.bias": "pytorch_model-00001-of-00002.bin",
|
166 |
+
"transformer.layers.2.attention.dense.weight": "pytorch_model-00001-of-00002.bin",
|
167 |
+
"transformer.layers.2.attention.query_key_value.bias": "pytorch_model-00001-of-00002.bin",
|
168 |
+
"transformer.layers.2.attention.query_key_value.weight": "pytorch_model-00001-of-00002.bin",
|
169 |
+
"transformer.layers.2.attention.rotary_emb.inv_freq": "pytorch_model-00001-of-00002.bin",
|
170 |
+
"transformer.layers.2.input_layernorm.bias": "pytorch_model-00001-of-00002.bin",
|
171 |
+
"transformer.layers.2.input_layernorm.weight": "pytorch_model-00001-of-00002.bin",
|
172 |
+
"transformer.layers.2.mlp.dense_4h_to_h.bias": "pytorch_model-00001-of-00002.bin",
|
173 |
+
"transformer.layers.2.mlp.dense_4h_to_h.weight": "pytorch_model-00001-of-00002.bin",
|
174 |
+
"transformer.layers.2.mlp.dense_h_to_4h.bias": "pytorch_model-00001-of-00002.bin",
|
175 |
+
"transformer.layers.2.mlp.dense_h_to_4h.weight": "pytorch_model-00001-of-00002.bin",
|
176 |
+
"transformer.layers.2.post_attention_layernorm.bias": "pytorch_model-00001-of-00002.bin",
|
177 |
+
"transformer.layers.2.post_attention_layernorm.weight": "pytorch_model-00001-of-00002.bin",
|
178 |
+
"transformer.layers.20.attention.dense.bias": "pytorch_model-00001-of-00002.bin",
|
179 |
+
"transformer.layers.20.attention.dense.weight": "pytorch_model-00001-of-00002.bin",
|
180 |
+
"transformer.layers.20.attention.query_key_value.bias": "pytorch_model-00001-of-00002.bin",
|
181 |
+
"transformer.layers.20.attention.query_key_value.weight": "pytorch_model-00001-of-00002.bin",
|
182 |
+
"transformer.layers.20.attention.rotary_emb.inv_freq": "pytorch_model-00001-of-00002.bin",
|
183 |
+
"transformer.layers.20.input_layernorm.bias": "pytorch_model-00001-of-00002.bin",
|
184 |
+
"transformer.layers.20.input_layernorm.weight": "pytorch_model-00001-of-00002.bin",
|
185 |
+
"transformer.layers.20.mlp.dense_4h_to_h.bias": "pytorch_model-00001-of-00002.bin",
|
186 |
+
"transformer.layers.20.mlp.dense_4h_to_h.weight": "pytorch_model-00001-of-00002.bin",
|
187 |
+
"transformer.layers.20.mlp.dense_h_to_4h.bias": "pytorch_model-00001-of-00002.bin",
|
188 |
+
"transformer.layers.20.mlp.dense_h_to_4h.weight": "pytorch_model-00001-of-00002.bin",
|
189 |
+
"transformer.layers.20.post_attention_layernorm.bias": "pytorch_model-00001-of-00002.bin",
|
190 |
+
"transformer.layers.20.post_attention_layernorm.weight": "pytorch_model-00001-of-00002.bin",
|
191 |
+
"transformer.layers.21.attention.dense.bias": "pytorch_model-00001-of-00002.bin",
|
192 |
+
"transformer.layers.21.attention.dense.weight": "pytorch_model-00001-of-00002.bin",
|
193 |
+
"transformer.layers.21.attention.query_key_value.bias": "pytorch_model-00001-of-00002.bin",
|
194 |
+
"transformer.layers.21.attention.query_key_value.weight": "pytorch_model-00001-of-00002.bin",
|
195 |
+
"transformer.layers.21.attention.rotary_emb.inv_freq": "pytorch_model-00001-of-00002.bin",
|
196 |
+
"transformer.layers.21.input_layernorm.bias": "pytorch_model-00001-of-00002.bin",
|
197 |
+
"transformer.layers.21.input_layernorm.weight": "pytorch_model-00001-of-00002.bin",
|
198 |
+
"transformer.layers.21.mlp.dense_4h_to_h.bias": "pytorch_model-00002-of-00002.bin",
|
199 |
+
"transformer.layers.21.mlp.dense_4h_to_h.weight": "pytorch_model-00002-of-00002.bin",
|
200 |
+
"transformer.layers.21.mlp.dense_h_to_4h.bias": "pytorch_model-00001-of-00002.bin",
|
201 |
+
"transformer.layers.21.mlp.dense_h_to_4h.weight": "pytorch_model-00001-of-00002.bin",
|
202 |
+
"transformer.layers.21.post_attention_layernorm.bias": "pytorch_model-00001-of-00002.bin",
|
203 |
+
"transformer.layers.21.post_attention_layernorm.weight": "pytorch_model-00001-of-00002.bin",
|
204 |
+
"transformer.layers.22.attention.dense.bias": "pytorch_model-00002-of-00002.bin",
|
205 |
+
"transformer.layers.22.attention.dense.weight": "pytorch_model-00002-of-00002.bin",
|
206 |
+
"transformer.layers.22.attention.query_key_value.bias": "pytorch_model-00002-of-00002.bin",
|
207 |
+
"transformer.layers.22.attention.query_key_value.weight": "pytorch_model-00002-of-00002.bin",
|
208 |
+
"transformer.layers.22.attention.rotary_emb.inv_freq": "pytorch_model-00002-of-00002.bin",
|
209 |
+
"transformer.layers.22.input_layernorm.bias": "pytorch_model-00002-of-00002.bin",
|
210 |
+
"transformer.layers.22.input_layernorm.weight": "pytorch_model-00002-of-00002.bin",
|
211 |
+
"transformer.layers.22.mlp.dense_4h_to_h.bias": "pytorch_model-00002-of-00002.bin",
|
212 |
+
"transformer.layers.22.mlp.dense_4h_to_h.weight": "pytorch_model-00002-of-00002.bin",
|
213 |
+
"transformer.layers.22.mlp.dense_h_to_4h.bias": "pytorch_model-00002-of-00002.bin",
|
214 |
+
"transformer.layers.22.mlp.dense_h_to_4h.weight": "pytorch_model-00002-of-00002.bin",
|
215 |
+
"transformer.layers.22.post_attention_layernorm.bias": "pytorch_model-00002-of-00002.bin",
|
216 |
+
"transformer.layers.22.post_attention_layernorm.weight": "pytorch_model-00002-of-00002.bin",
|
217 |
+
"transformer.layers.23.attention.dense.bias": "pytorch_model-00002-of-00002.bin",
|
218 |
+
"transformer.layers.23.attention.dense.weight": "pytorch_model-00002-of-00002.bin",
|
219 |
+
"transformer.layers.23.attention.query_key_value.bias": "pytorch_model-00002-of-00002.bin",
|
220 |
+
"transformer.layers.23.attention.query_key_value.weight": "pytorch_model-00002-of-00002.bin",
|
221 |
+
"transformer.layers.23.attention.rotary_emb.inv_freq": "pytorch_model-00002-of-00002.bin",
|
222 |
+
"transformer.layers.23.input_layernorm.bias": "pytorch_model-00002-of-00002.bin",
|
223 |
+
"transformer.layers.23.input_layernorm.weight": "pytorch_model-00002-of-00002.bin",
|
224 |
+
"transformer.layers.23.mlp.dense_4h_to_h.bias": "pytorch_model-00002-of-00002.bin",
|
225 |
+
"transformer.layers.23.mlp.dense_4h_to_h.weight": "pytorch_model-00002-of-00002.bin",
|
226 |
+
"transformer.layers.23.mlp.dense_h_to_4h.bias": "pytorch_model-00002-of-00002.bin",
|
227 |
+
"transformer.layers.23.mlp.dense_h_to_4h.weight": "pytorch_model-00002-of-00002.bin",
|
228 |
+
"transformer.layers.23.post_attention_layernorm.bias": "pytorch_model-00002-of-00002.bin",
|
229 |
+
"transformer.layers.23.post_attention_layernorm.weight": "pytorch_model-00002-of-00002.bin",
|
230 |
+
"transformer.layers.24.attention.dense.bias": "pytorch_model-00002-of-00002.bin",
|
231 |
+
"transformer.layers.24.attention.dense.weight": "pytorch_model-00002-of-00002.bin",
|
232 |
+
"transformer.layers.24.attention.query_key_value.bias": "pytorch_model-00002-of-00002.bin",
|
233 |
+
"transformer.layers.24.attention.query_key_value.weight": "pytorch_model-00002-of-00002.bin",
|
234 |
+
"transformer.layers.24.attention.rotary_emb.inv_freq": "pytorch_model-00002-of-00002.bin",
|
235 |
+
"transformer.layers.24.input_layernorm.bias": "pytorch_model-00002-of-00002.bin",
|
236 |
+
"transformer.layers.24.input_layernorm.weight": "pytorch_model-00002-of-00002.bin",
|
237 |
+
"transformer.layers.24.mlp.dense_4h_to_h.bias": "pytorch_model-00002-of-00002.bin",
|
238 |
+
"transformer.layers.24.mlp.dense_4h_to_h.weight": "pytorch_model-00002-of-00002.bin",
|
239 |
+
"transformer.layers.24.mlp.dense_h_to_4h.bias": "pytorch_model-00002-of-00002.bin",
|
240 |
+
"transformer.layers.24.mlp.dense_h_to_4h.weight": "pytorch_model-00002-of-00002.bin",
|
241 |
+
"transformer.layers.24.post_attention_layernorm.bias": "pytorch_model-00002-of-00002.bin",
|
242 |
+
"transformer.layers.24.post_attention_layernorm.weight": "pytorch_model-00002-of-00002.bin",
|
243 |
+
"transformer.layers.25.attention.dense.bias": "pytorch_model-00002-of-00002.bin",
|
244 |
+
"transformer.layers.25.attention.dense.weight": "pytorch_model-00002-of-00002.bin",
|
245 |
+
"transformer.layers.25.attention.query_key_value.bias": "pytorch_model-00002-of-00002.bin",
|
246 |
+
"transformer.layers.25.attention.query_key_value.weight": "pytorch_model-00002-of-00002.bin",
|
247 |
+
"transformer.layers.25.attention.rotary_emb.inv_freq": "pytorch_model-00002-of-00002.bin",
|
248 |
+
"transformer.layers.25.input_layernorm.bias": "pytorch_model-00002-of-00002.bin",
|
249 |
+
"transformer.layers.25.input_layernorm.weight": "pytorch_model-00002-of-00002.bin",
|
250 |
+
"transformer.layers.25.mlp.dense_4h_to_h.bias": "pytorch_model-00002-of-00002.bin",
|
251 |
+
"transformer.layers.25.mlp.dense_4h_to_h.weight": "pytorch_model-00002-of-00002.bin",
|
252 |
+
"transformer.layers.25.mlp.dense_h_to_4h.bias": "pytorch_model-00002-of-00002.bin",
|
253 |
+
"transformer.layers.25.mlp.dense_h_to_4h.weight": "pytorch_model-00002-of-00002.bin",
|
254 |
+
"transformer.layers.25.post_attention_layernorm.bias": "pytorch_model-00002-of-00002.bin",
|
255 |
+
"transformer.layers.25.post_attention_layernorm.weight": "pytorch_model-00002-of-00002.bin",
|
256 |
+
"transformer.layers.26.attention.dense.bias": "pytorch_model-00002-of-00002.bin",
|
257 |
+
"transformer.layers.26.attention.dense.weight": "pytorch_model-00002-of-00002.bin",
|
258 |
+
"transformer.layers.26.attention.query_key_value.bias": "pytorch_model-00002-of-00002.bin",
|
259 |
+
"transformer.layers.26.attention.query_key_value.weight": "pytorch_model-00002-of-00002.bin",
|
260 |
+
"transformer.layers.26.attention.rotary_emb.inv_freq": "pytorch_model-00002-of-00002.bin",
|
261 |
+
"transformer.layers.26.input_layernorm.bias": "pytorch_model-00002-of-00002.bin",
|
262 |
+
"transformer.layers.26.input_layernorm.weight": "pytorch_model-00002-of-00002.bin",
|
263 |
+
"transformer.layers.26.mlp.dense_4h_to_h.bias": "pytorch_model-00002-of-00002.bin",
|
264 |
+
"transformer.layers.26.mlp.dense_4h_to_h.weight": "pytorch_model-00002-of-00002.bin",
|
265 |
+
"transformer.layers.26.mlp.dense_h_to_4h.bias": "pytorch_model-00002-of-00002.bin",
|
266 |
+
"transformer.layers.26.mlp.dense_h_to_4h.weight": "pytorch_model-00002-of-00002.bin",
|
267 |
+
"transformer.layers.26.post_attention_layernorm.bias": "pytorch_model-00002-of-00002.bin",
|
268 |
+
"transformer.layers.26.post_attention_layernorm.weight": "pytorch_model-00002-of-00002.bin",
|
269 |
+
"transformer.layers.27.attention.dense.bias": "pytorch_model-00002-of-00002.bin",
|
270 |
+
"transformer.layers.27.attention.dense.weight": "pytorch_model-00002-of-00002.bin",
|
271 |
+
"transformer.layers.27.attention.query_key_value.bias": "pytorch_model-00002-of-00002.bin",
|
272 |
+
"transformer.layers.27.attention.query_key_value.weight": "pytorch_model-00002-of-00002.bin",
|
273 |
+
"transformer.layers.27.attention.rotary_emb.inv_freq": "pytorch_model-00002-of-00002.bin",
|
274 |
+
"transformer.layers.27.input_layernorm.bias": "pytorch_model-00002-of-00002.bin",
|
275 |
+
"transformer.layers.27.input_layernorm.weight": "pytorch_model-00002-of-00002.bin",
|
276 |
+
"transformer.layers.27.mlp.dense_4h_to_h.bias": "pytorch_model-00002-of-00002.bin",
|
277 |
+
"transformer.layers.27.mlp.dense_4h_to_h.weight": "pytorch_model-00002-of-00002.bin",
|
278 |
+
"transformer.layers.27.mlp.dense_h_to_4h.bias": "pytorch_model-00002-of-00002.bin",
|
279 |
+
"transformer.layers.27.mlp.dense_h_to_4h.weight": "pytorch_model-00002-of-00002.bin",
|
280 |
+
"transformer.layers.27.post_attention_layernorm.bias": "pytorch_model-00002-of-00002.bin",
|
281 |
+
"transformer.layers.27.post_attention_layernorm.weight": "pytorch_model-00002-of-00002.bin",
|
282 |
+
"transformer.layers.3.attention.dense.bias": "pytorch_model-00001-of-00002.bin",
|
283 |
+
"transformer.layers.3.attention.dense.weight": "pytorch_model-00001-of-00002.bin",
|
284 |
+
"transformer.layers.3.attention.query_key_value.bias": "pytorch_model-00001-of-00002.bin",
|
285 |
+
"transformer.layers.3.attention.query_key_value.weight": "pytorch_model-00001-of-00002.bin",
|
286 |
+
"transformer.layers.3.attention.rotary_emb.inv_freq": "pytorch_model-00001-of-00002.bin",
|
287 |
+
"transformer.layers.3.input_layernorm.bias": "pytorch_model-00001-of-00002.bin",
|
288 |
+
"transformer.layers.3.input_layernorm.weight": "pytorch_model-00001-of-00002.bin",
|
289 |
+
"transformer.layers.3.mlp.dense_4h_to_h.bias": "pytorch_model-00001-of-00002.bin",
|
290 |
+
"transformer.layers.3.mlp.dense_4h_to_h.weight": "pytorch_model-00001-of-00002.bin",
|
291 |
+
"transformer.layers.3.mlp.dense_h_to_4h.bias": "pytorch_model-00001-of-00002.bin",
|
292 |
+
"transformer.layers.3.mlp.dense_h_to_4h.weight": "pytorch_model-00001-of-00002.bin",
|
293 |
+
"transformer.layers.3.post_attention_layernorm.bias": "pytorch_model-00001-of-00002.bin",
|
294 |
+
"transformer.layers.3.post_attention_layernorm.weight": "pytorch_model-00001-of-00002.bin",
|
295 |
+
"transformer.layers.4.attention.dense.bias": "pytorch_model-00001-of-00002.bin",
|
296 |
+
"transformer.layers.4.attention.dense.weight": "pytorch_model-00001-of-00002.bin",
|
297 |
+
"transformer.layers.4.attention.query_key_value.bias": "pytorch_model-00001-of-00002.bin",
|
298 |
+
"transformer.layers.4.attention.query_key_value.weight": "pytorch_model-00001-of-00002.bin",
|
299 |
+
"transformer.layers.4.attention.rotary_emb.inv_freq": "pytorch_model-00001-of-00002.bin",
|
300 |
+
"transformer.layers.4.input_layernorm.bias": "pytorch_model-00001-of-00002.bin",
|
301 |
+
"transformer.layers.4.input_layernorm.weight": "pytorch_model-00001-of-00002.bin",
|
302 |
+
"transformer.layers.4.mlp.dense_4h_to_h.bias": "pytorch_model-00001-of-00002.bin",
|
303 |
+
"transformer.layers.4.mlp.dense_4h_to_h.weight": "pytorch_model-00001-of-00002.bin",
|
304 |
+
"transformer.layers.4.mlp.dense_h_to_4h.bias": "pytorch_model-00001-of-00002.bin",
|
305 |
+
"transformer.layers.4.mlp.dense_h_to_4h.weight": "pytorch_model-00001-of-00002.bin",
|
306 |
+
"transformer.layers.4.post_attention_layernorm.bias": "pytorch_model-00001-of-00002.bin",
|
307 |
+
"transformer.layers.4.post_attention_layernorm.weight": "pytorch_model-00001-of-00002.bin",
|
308 |
+
"transformer.layers.5.attention.dense.bias": "pytorch_model-00001-of-00002.bin",
|
309 |
+
"transformer.layers.5.attention.dense.weight": "pytorch_model-00001-of-00002.bin",
|
310 |
+
"transformer.layers.5.attention.query_key_value.bias": "pytorch_model-00001-of-00002.bin",
|
311 |
+
"transformer.layers.5.attention.query_key_value.weight": "pytorch_model-00001-of-00002.bin",
|
312 |
+
"transformer.layers.5.attention.rotary_emb.inv_freq": "pytorch_model-00001-of-00002.bin",
|
313 |
+
"transformer.layers.5.input_layernorm.bias": "pytorch_model-00001-of-00002.bin",
|
314 |
+
"transformer.layers.5.input_layernorm.weight": "pytorch_model-00001-of-00002.bin",
|
315 |
+
"transformer.layers.5.mlp.dense_4h_to_h.bias": "pytorch_model-00001-of-00002.bin",
|
316 |
+
"transformer.layers.5.mlp.dense_4h_to_h.weight": "pytorch_model-00001-of-00002.bin",
|
317 |
+
"transformer.layers.5.mlp.dense_h_to_4h.bias": "pytorch_model-00001-of-00002.bin",
|
318 |
+
"transformer.layers.5.mlp.dense_h_to_4h.weight": "pytorch_model-00001-of-00002.bin",
|
319 |
+
"transformer.layers.5.post_attention_layernorm.bias": "pytorch_model-00001-of-00002.bin",
|
320 |
+
"transformer.layers.5.post_attention_layernorm.weight": "pytorch_model-00001-of-00002.bin",
|
321 |
+
"transformer.layers.6.attention.dense.bias": "pytorch_model-00001-of-00002.bin",
|
322 |
+
"transformer.layers.6.attention.dense.weight": "pytorch_model-00001-of-00002.bin",
|
323 |
+
"transformer.layers.6.attention.query_key_value.bias": "pytorch_model-00001-of-00002.bin",
|
324 |
+
"transformer.layers.6.attention.query_key_value.weight": "pytorch_model-00001-of-00002.bin",
|
325 |
+
"transformer.layers.6.attention.rotary_emb.inv_freq": "pytorch_model-00001-of-00002.bin",
|
326 |
+
"transformer.layers.6.input_layernorm.bias": "pytorch_model-00001-of-00002.bin",
|
327 |
+
"transformer.layers.6.input_layernorm.weight": "pytorch_model-00001-of-00002.bin",
|
328 |
+
"transformer.layers.6.mlp.dense_4h_to_h.bias": "pytorch_model-00001-of-00002.bin",
|
329 |
+
"transformer.layers.6.mlp.dense_4h_to_h.weight": "pytorch_model-00001-of-00002.bin",
|
330 |
+
"transformer.layers.6.mlp.dense_h_to_4h.bias": "pytorch_model-00001-of-00002.bin",
|
331 |
+
"transformer.layers.6.mlp.dense_h_to_4h.weight": "pytorch_model-00001-of-00002.bin",
|
332 |
+
"transformer.layers.6.post_attention_layernorm.bias": "pytorch_model-00001-of-00002.bin",
|
333 |
+
"transformer.layers.6.post_attention_layernorm.weight": "pytorch_model-00001-of-00002.bin",
|
334 |
+
"transformer.layers.7.attention.dense.bias": "pytorch_model-00001-of-00002.bin",
|
335 |
+
"transformer.layers.7.attention.dense.weight": "pytorch_model-00001-of-00002.bin",
|
336 |
+
"transformer.layers.7.attention.query_key_value.bias": "pytorch_model-00001-of-00002.bin",
|
337 |
+
"transformer.layers.7.attention.query_key_value.weight": "pytorch_model-00001-of-00002.bin",
|
338 |
+
"transformer.layers.7.attention.rotary_emb.inv_freq": "pytorch_model-00001-of-00002.bin",
|
339 |
+
"transformer.layers.7.input_layernorm.bias": "pytorch_model-00001-of-00002.bin",
|
340 |
+
"transformer.layers.7.input_layernorm.weight": "pytorch_model-00001-of-00002.bin",
|
341 |
+
"transformer.layers.7.mlp.dense_4h_to_h.bias": "pytorch_model-00001-of-00002.bin",
|
342 |
+
"transformer.layers.7.mlp.dense_4h_to_h.weight": "pytorch_model-00001-of-00002.bin",
|
343 |
+
"transformer.layers.7.mlp.dense_h_to_4h.bias": "pytorch_model-00001-of-00002.bin",
|
344 |
+
"transformer.layers.7.mlp.dense_h_to_4h.weight": "pytorch_model-00001-of-00002.bin",
|
345 |
+
"transformer.layers.7.post_attention_layernorm.bias": "pytorch_model-00001-of-00002.bin",
|
346 |
+
"transformer.layers.7.post_attention_layernorm.weight": "pytorch_model-00001-of-00002.bin",
|
347 |
+
"transformer.layers.8.attention.dense.bias": "pytorch_model-00001-of-00002.bin",
|
348 |
+
"transformer.layers.8.attention.dense.weight": "pytorch_model-00001-of-00002.bin",
|
349 |
+
"transformer.layers.8.attention.query_key_value.bias": "pytorch_model-00001-of-00002.bin",
|
350 |
+
"transformer.layers.8.attention.query_key_value.weight": "pytorch_model-00001-of-00002.bin",
|
351 |
+
"transformer.layers.8.attention.rotary_emb.inv_freq": "pytorch_model-00001-of-00002.bin",
|
352 |
+
"transformer.layers.8.input_layernorm.bias": "pytorch_model-00001-of-00002.bin",
|
353 |
+
"transformer.layers.8.input_layernorm.weight": "pytorch_model-00001-of-00002.bin",
|
354 |
+
"transformer.layers.8.mlp.dense_4h_to_h.bias": "pytorch_model-00001-of-00002.bin",
|
355 |
+
"transformer.layers.8.mlp.dense_4h_to_h.weight": "pytorch_model-00001-of-00002.bin",
|
356 |
+
"transformer.layers.8.mlp.dense_h_to_4h.bias": "pytorch_model-00001-of-00002.bin",
|
357 |
+
"transformer.layers.8.mlp.dense_h_to_4h.weight": "pytorch_model-00001-of-00002.bin",
|
358 |
+
"transformer.layers.8.post_attention_layernorm.bias": "pytorch_model-00001-of-00002.bin",
|
359 |
+
"transformer.layers.8.post_attention_layernorm.weight": "pytorch_model-00001-of-00002.bin",
|
360 |
+
"transformer.layers.9.attention.dense.bias": "pytorch_model-00001-of-00002.bin",
|
361 |
+
"transformer.layers.9.attention.dense.weight": "pytorch_model-00001-of-00002.bin",
|
362 |
+
"transformer.layers.9.attention.query_key_value.bias": "pytorch_model-00001-of-00002.bin",
|
363 |
+
"transformer.layers.9.attention.query_key_value.weight": "pytorch_model-00001-of-00002.bin",
|
364 |
+
"transformer.layers.9.attention.rotary_emb.inv_freq": "pytorch_model-00001-of-00002.bin",
|
365 |
+
"transformer.layers.9.input_layernorm.bias": "pytorch_model-00001-of-00002.bin",
|
366 |
+
"transformer.layers.9.input_layernorm.weight": "pytorch_model-00001-of-00002.bin",
|
367 |
+
"transformer.layers.9.mlp.dense_4h_to_h.bias": "pytorch_model-00001-of-00002.bin",
|
368 |
+
"transformer.layers.9.mlp.dense_4h_to_h.weight": "pytorch_model-00001-of-00002.bin",
|
369 |
+
"transformer.layers.9.mlp.dense_h_to_4h.bias": "pytorch_model-00001-of-00002.bin",
|
370 |
+
"transformer.layers.9.mlp.dense_h_to_4h.weight": "pytorch_model-00001-of-00002.bin",
|
371 |
+
"transformer.layers.9.post_attention_layernorm.bias": "pytorch_model-00001-of-00002.bin",
|
372 |
+
"transformer.layers.9.post_attention_layernorm.weight": "pytorch_model-00001-of-00002.bin",
|
373 |
+
"transformer.word_embeddings.weight": "pytorch_model-00001-of-00002.bin"
|
374 |
+
}
|
375 |
+
}
|
rng_state.pth
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6780eef001b060016bccd68cafdc28de890a53f520d257594e8ecef19f8fba49
|
3 |
+
size 14639
|
scheduler.pt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4c78647fa1a01c6858012789e28ec1886bee43ca1a6383a9f454e3d8ee274221
|
3 |
+
size 627
|
special_tokens_map.json
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": "<sop>",
|
3 |
+
"eos_token": "</s>",
|
4 |
+
"mask_token": "[MASK]",
|
5 |
+
"pad_token": "<pad>",
|
6 |
+
"unk_token": "<unk>"
|
7 |
+
}
|
tokenization_chatglm.py
ADDED
@@ -0,0 +1,346 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"""Tokenization classes for ChatGLM."""
|
2 |
+
import sys
|
3 |
+
import unicodedata
|
4 |
+
from typing import List, Optional, Union
|
5 |
+
from functools import lru_cache
|
6 |
+
import os
|
7 |
+
import collections
|
8 |
+
import re
|
9 |
+
|
10 |
+
from transformers.tokenization_utils import PreTrainedTokenizer
|
11 |
+
from icetk.text_tokenizer import TextTokenizer
|
12 |
+
from icetk.utils import auto_create
|
13 |
+
import icetk.sentencepiece_model_pb2 as sp_model
|
14 |
+
from transformers.utils import logging
|
15 |
+
|
16 |
+
logger = logging.get_logger(__name__)
|
17 |
+
|
18 |
+
PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES = {
|
19 |
+
"THUDM/chatglm-6b": 2048,
|
20 |
+
}
|
21 |
+
|
22 |
+
|
23 |
+
class SPTokenizer:
|
24 |
+
def __init__(
|
25 |
+
self,
|
26 |
+
vocab_file,
|
27 |
+
max_blank_length=80,
|
28 |
+
byte_fallback=True,
|
29 |
+
):
|
30 |
+
assert vocab_file is not None
|
31 |
+
self.vocab_file = vocab_file
|
32 |
+
self.special_tokens = ["[MASK]", "[gMASK]", "[sMASK]", "<unused_0>", "<sop>", "<eop>", "<ENC>", "<dBLOCK>"]
|
33 |
+
self.max_blank_length = max_blank_length
|
34 |
+
self.byte_fallback = byte_fallback
|
35 |
+
self.text_tokenizer = self._build_text_tokenizer(encode_special_tokens=False)
|
36 |
+
self.special_text_tokenizer = self._build_text_tokenizer(encode_special_tokens=True)
|
37 |
+
|
38 |
+
@staticmethod
|
39 |
+
def _configure_tokenizer(
|
40 |
+
text_tokenizer: TextTokenizer,
|
41 |
+
special_tokens: List[str],
|
42 |
+
max_blank_length: int,
|
43 |
+
byte_fallback: bool,
|
44 |
+
encode_special_tokens=False,
|
45 |
+
):
|
46 |
+
# special token
|
47 |
+
special_token_type = 4 if encode_special_tokens else 3 # 3 - CONTROL, 4 - USER_DEFINE
|
48 |
+
for token in special_tokens:
|
49 |
+
text_tokenizer.proto.pieces.append(
|
50 |
+
sp_model.ModelProto.SentencePiece(piece=token, score=0.0, type=special_token_type)
|
51 |
+
)
|
52 |
+
# whitespaces
|
53 |
+
for token in [SPTokenizer.get_tab_token()] + [
|
54 |
+
SPTokenizer.get_blank_token(i) for i in range(2, max_blank_length + 1)
|
55 |
+
]:
|
56 |
+
text_tokenizer.proto.pieces.append(sp_model.ModelProto.SentencePiece(piece=token, score=0.0, type=4))
|
57 |
+
# byte fallback
|
58 |
+
if byte_fallback:
|
59 |
+
text_tokenizer.proto.trainer_spec.byte_fallback = True
|
60 |
+
for i in range(256):
|
61 |
+
text_tokenizer.proto.pieces.append(
|
62 |
+
sp_model.ModelProto.SentencePiece(piece="<0x{:02X}>".format(i), score=0.0, type=6)
|
63 |
+
)
|
64 |
+
text_tokenizer.refresh()
|
65 |
+
|
66 |
+
def _build_text_tokenizer(self, encode_special_tokens=False):
|
67 |
+
tokenizer = TextTokenizer(self.vocab_file)
|
68 |
+
self._configure_tokenizer(
|
69 |
+
tokenizer, self.special_tokens, self.max_blank_length, self.byte_fallback, encode_special_tokens
|
70 |
+
)
|
71 |
+
return tokenizer
|
72 |
+
|
73 |
+
def _get_text_tokenizer(self, encode_special_tokens=False):
|
74 |
+
if encode_special_tokens:
|
75 |
+
return self.special_text_tokenizer
|
76 |
+
else:
|
77 |
+
return self.text_tokenizer
|
78 |
+
|
79 |
+
@staticmethod
|
80 |
+
def get_blank_token(length: int):
|
81 |
+
assert length >= 2
|
82 |
+
return f"<|blank_{length}|>"
|
83 |
+
|
84 |
+
@staticmethod
|
85 |
+
def get_tab_token():
|
86 |
+
return f"<|tab|>"
|
87 |
+
|
88 |
+
@property
|
89 |
+
def num_image_tokens(self):
|
90 |
+
return 20000
|
91 |
+
|
92 |
+
@property
|
93 |
+
def num_text_tokens(self):
|
94 |
+
return self.text_tokenizer.num_tokens
|
95 |
+
|
96 |
+
@property
|
97 |
+
def num_tokens(self):
|
98 |
+
return self.num_image_tokens + self.num_text_tokens
|
99 |
+
|
100 |
+
@staticmethod
|
101 |
+
def _encode_whitespaces(text: str, max_len: int = 80):
|
102 |
+
text = text.replace("\t", SPTokenizer.get_tab_token())
|
103 |
+
for i in range(max_len, 1, -1):
|
104 |
+
text = text.replace(" " * i, SPTokenizer.get_blank_token(i))
|
105 |
+
return text
|
106 |
+
|
107 |
+
def _preprocess(self, text: str, linebreak=True, whitespaces=True):
|
108 |
+
if linebreak:
|
109 |
+
text = text.replace("\n", "<n>")
|
110 |
+
if whitespaces:
|
111 |
+
text = self._encode_whitespaces(text, max_len=self.max_blank_length)
|
112 |
+
return text
|
113 |
+
|
114 |
+
def encode(
|
115 |
+
self, text: str, linebreak=True, whitespaces=True, special_tokens=False, add_dummy_prefix=True
|
116 |
+
) -> List[int]:
|
117 |
+
"""
|
118 |
+
@param text: Text to encode.
|
119 |
+
@param linebreak: Whether to encode newline (\n) in text.
|
120 |
+
@param whitespaces: Whether to encode multiple whitespaces or tab in text, useful for source code encoding.
|
121 |
+
@param special_tokens: Whether to encode special token ([MASK], [gMASK], etc.) in text.
|
122 |
+
@param add_dummy_prefix: Whether to add dummy blank space in the beginning.
|
123 |
+
"""
|
124 |
+
text = self._preprocess(text, linebreak, whitespaces)
|
125 |
+
if not add_dummy_prefix:
|
126 |
+
text = "<n>" + text
|
127 |
+
tmp = self._get_text_tokenizer(encode_special_tokens=special_tokens).encode(text)
|
128 |
+
tokens = [x + self.num_image_tokens for x in tmp]
|
129 |
+
return tokens if add_dummy_prefix else tokens[2:]
|
130 |
+
|
131 |
+
def decode(self, text_ids: List[int], special_tokens=False) -> str:
|
132 |
+
ids = [int(_id) - self.num_image_tokens for _id in text_ids]
|
133 |
+
ids = [_id for _id in ids if _id >= 0]
|
134 |
+
text = self._get_text_tokenizer(encode_special_tokens=special_tokens).decode(ids)
|
135 |
+
text = text.replace("<n>", "\n")
|
136 |
+
text = text.replace(SPTokenizer.get_tab_token(), "\t")
|
137 |
+
for i in range(2, self.max_blank_length + 1):
|
138 |
+
text = text.replace(self.get_blank_token(i), " " * i)
|
139 |
+
return text
|
140 |
+
|
141 |
+
def tokenize(
|
142 |
+
self, text: str, linebreak=True, whitespaces=True, special_tokens=False, add_dummy_prefix=True
|
143 |
+
) -> List[str]:
|
144 |
+
"""
|
145 |
+
@param text: Text to encode.
|
146 |
+
@param linebreak: Whether to encode newline (\n) in text.
|
147 |
+
@param whitespaces: Whether to encode multiple whitespaces or tab in text, useful for source code encoding.
|
148 |
+
@param special_tokens: Whether to encode special token ([MASK], [gMASK], etc.) in text.
|
149 |
+
@param add_dummy_prefix: Whether to add dummy blank space in the beginning.
|
150 |
+
"""
|
151 |
+
text = self._preprocess(text, linebreak, whitespaces)
|
152 |
+
if not add_dummy_prefix:
|
153 |
+
text = "<n>" + text
|
154 |
+
tokens = self._get_text_tokenizer(encode_special_tokens=special_tokens).tokenize(text)
|
155 |
+
return tokens if add_dummy_prefix else tokens[2:]
|
156 |
+
|
157 |
+
def __getitem__(self, x: Union[int, str]):
|
158 |
+
if isinstance(x, int):
|
159 |
+
if x < self.num_image_tokens:
|
160 |
+
return "<image_{}>".format(x)
|
161 |
+
else:
|
162 |
+
return self.text_tokenizer.convert_id_to_token(x - self.num_image_tokens)
|
163 |
+
elif isinstance(x, str):
|
164 |
+
if x.startswith("<image_") and x.endswith(">") and x[7:-1].isdigit():
|
165 |
+
return int(x[7:-1])
|
166 |
+
else:
|
167 |
+
return self.text_tokenizer.convert_token_to_id(x) + self.num_image_tokens
|
168 |
+
else:
|
169 |
+
raise ValueError("The key should be str or int.")
|
170 |
+
|
171 |
+
|
172 |
+
class ChatGLMTokenizer(PreTrainedTokenizer):
|
173 |
+
"""
|
174 |
+
Construct a ChatGLM tokenizer. Based on byte-level Byte-Pair-Encoding.
|
175 |
+
|
176 |
+
Args:
|
177 |
+
vocab_file (`str`):
|
178 |
+
Path to the vocabulary file.
|
179 |
+
"""
|
180 |
+
|
181 |
+
vocab_files_names = {"vocab_file": "ice_text.model"}
|
182 |
+
max_model_input_sizes = PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
|
183 |
+
model_input_names = ["input_ids"]
|
184 |
+
|
185 |
+
def __init__(
|
186 |
+
self,
|
187 |
+
vocab_file,
|
188 |
+
do_lower_case=False,
|
189 |
+
remove_space=False,
|
190 |
+
bos_token='sop',
|
191 |
+
eos_token='eos',
|
192 |
+
eop_token='eop',
|
193 |
+
mask_token='[MASK]',
|
194 |
+
gmask_token='[gMASK]',
|
195 |
+
padding_side="left",
|
196 |
+
**kwargs
|
197 |
+
) -> None:
|
198 |
+
super().__init__(
|
199 |
+
do_lower_case=do_lower_case,
|
200 |
+
remove_space=remove_space,
|
201 |
+
padding_side=padding_side,
|
202 |
+
**kwargs
|
203 |
+
)
|
204 |
+
|
205 |
+
self.do_lower_case = do_lower_case
|
206 |
+
self.remove_space = remove_space
|
207 |
+
self.vocab_file = vocab_file
|
208 |
+
|
209 |
+
self.bos_token = bos_token
|
210 |
+
self.eos_token = eos_token
|
211 |
+
self.eop_token = eop_token
|
212 |
+
self.mask_token = mask_token
|
213 |
+
self.gMASK_token = gmask_token
|
214 |
+
|
215 |
+
self.sp_tokenizer = SPTokenizer(vocab_file)
|
216 |
+
|
217 |
+
""" Initialisation """
|
218 |
+
|
219 |
+
@property
|
220 |
+
def eop_token_id(self) -> Optional[int]:
|
221 |
+
"""
|
222 |
+
`Optional[int]`: Id of the end of sentence token in the vocabulary. Returns `None` if the token has not been
|
223 |
+
set.
|
224 |
+
"""
|
225 |
+
if self.eop_token is None:
|
226 |
+
return None
|
227 |
+
return self.convert_tokens_to_ids(self.eop_token)
|
228 |
+
|
229 |
+
@property
|
230 |
+
def vocab_size(self):
|
231 |
+
""" Returns vocab size """
|
232 |
+
return self.sp_tokenizer.num_tokens
|
233 |
+
|
234 |
+
def get_vocab(self):
|
235 |
+
""" Returns vocab as a dict """
|
236 |
+
vocab = {self._convert_id_to_token(i): i for i in range(self.vocab_size)}
|
237 |
+
vocab.update(self.added_tokens_encoder)
|
238 |
+
return vocab
|
239 |
+
|
240 |
+
def preprocess_text(self, inputs):
|
241 |
+
if self.remove_space:
|
242 |
+
outputs = " ".join(inputs.strip().split())
|
243 |
+
else:
|
244 |
+
outputs = inputs
|
245 |
+
|
246 |
+
if self.do_lower_case:
|
247 |
+
outputs = outputs.lower()
|
248 |
+
|
249 |
+
return outputs
|
250 |
+
|
251 |
+
def _tokenize(self, text, **kwargs):
|
252 |
+
""" Returns a tokenized string. """
|
253 |
+
text = self.preprocess_text(text)
|
254 |
+
|
255 |
+
seq = self.sp_tokenizer.tokenize(text)
|
256 |
+
|
257 |
+
return seq
|
258 |
+
|
259 |
+
def decode(
|
260 |
+
self,
|
261 |
+
token_ids: Union[List[int], List[List[int]]],
|
262 |
+
skip_special_tokens: bool = False,
|
263 |
+
clean_up_tokenization_spaces: bool = True,
|
264 |
+
spaces_between_special_tokens: bool = True,
|
265 |
+
**kwargs
|
266 |
+
) -> str:
|
267 |
+
if isinstance(token_ids[0], list):
|
268 |
+
tokens = []
|
269 |
+
for single_token_ids in token_ids:
|
270 |
+
if self.pad_token_id in single_token_ids: # remove pad
|
271 |
+
single_token_ids = list(filter((self.pad_token_id).__ne__, single_token_ids))
|
272 |
+
tokens.append(self.sp_tokenizer.decode(single_token_ids))
|
273 |
+
return (tokens)
|
274 |
+
else:
|
275 |
+
if self.pad_token_id in token_ids: # remove pad
|
276 |
+
token_ids = list(filter((self.pad_token_id).__ne__, token_ids))
|
277 |
+
return self.sp_tokenizer.decode(token_ids)
|
278 |
+
|
279 |
+
def _convert_token_to_id(self, token):
|
280 |
+
""" Converts a token (str) in an id using the vocab. """
|
281 |
+
return self.sp_tokenizer[token]
|
282 |
+
|
283 |
+
def _convert_id_to_token(self, index):
|
284 |
+
"""Converts an index (integer) in a token (str) using the vocab."""
|
285 |
+
return self.sp_tokenizer[index]
|
286 |
+
|
287 |
+
def save_vocabulary(self, save_directory, filename_prefix=None):
|
288 |
+
"""
|
289 |
+
Save the vocabulary and special tokens file to a directory.
|
290 |
+
|
291 |
+
Args:
|
292 |
+
save_directory (`str`):
|
293 |
+
The directory in which to save the vocabulary.
|
294 |
+
filename_prefix (`str`, *optional*):
|
295 |
+
An optional prefix to add to the named of the saved files.
|
296 |
+
|
297 |
+
Returns:
|
298 |
+
`Tuple(str)`: Paths to the files saved.
|
299 |
+
"""
|
300 |
+
if os.path.isdir(save_directory):
|
301 |
+
vocab_file = os.path.join(
|
302 |
+
save_directory, self.vocab_files_names["vocab_file"]
|
303 |
+
)
|
304 |
+
else:
|
305 |
+
vocab_file = save_directory
|
306 |
+
|
307 |
+
with open(self.vocab_file, 'rb') as fin:
|
308 |
+
proto_str = fin.read()
|
309 |
+
|
310 |
+
with open(vocab_file, "wb") as writer:
|
311 |
+
writer.write(proto_str)
|
312 |
+
|
313 |
+
return (vocab_file,)
|
314 |
+
|
315 |
+
def build_inputs_with_special_tokens(
|
316 |
+
self, token_ids_0: List[int], token_ids_1: Optional[List[int]] = None
|
317 |
+
) -> List[int]:
|
318 |
+
"""
|
319 |
+
Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
|
320 |
+
adding special tokens. A BERT sequence has the following format:
|
321 |
+
|
322 |
+
- single sequence: `[CLS] X [SEP]`
|
323 |
+
- pair of sequences: `[CLS] A [SEP] B [SEP]`
|
324 |
+
|
325 |
+
Args:
|
326 |
+
token_ids_0 (`List[int]`):
|
327 |
+
List of IDs to which the special tokens will be added.
|
328 |
+
token_ids_1 (`List[int]`, *optional*):
|
329 |
+
Optional second list of IDs for sequence pairs.
|
330 |
+
|
331 |
+
Returns:
|
332 |
+
`List[int]`: List of [input IDs](../glossary#input-ids) with the appropriate special tokens.
|
333 |
+
"""
|
334 |
+
if token_ids_1 is not None:
|
335 |
+
token_ids_0 += token_ids_1
|
336 |
+
mask_ids = self.sp_tokenizer[self.mask_token]
|
337 |
+
gmask_ids = self.sp_tokenizer[self.gMASK_token]
|
338 |
+
if mask_ids not in token_ids_0 and gmask_ids not in token_ids_0:
|
339 |
+
token_ids_0 += [gmask_ids]
|
340 |
+
|
341 |
+
if token_ids_0[-1] != mask_ids and token_ids_0[-1] != gmask_ids:
|
342 |
+
token_ids_0 += [self.sp_tokenizer[self.eos_token]]
|
343 |
+
|
344 |
+
token_ids_0 += [self.sp_tokenizer[self.bos_token]]
|
345 |
+
|
346 |
+
return token_ids_0
|
tokenizer_config.json
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"auto_map": {
|
3 |
+
"AutoTokenizer": [
|
4 |
+
"tokenization_chatglm.ChatGLMTokenizer",
|
5 |
+
null
|
6 |
+
]
|
7 |
+
},
|
8 |
+
"do_lower_case": false,
|
9 |
+
"model_max_length": 1000000000000000019884624838656,
|
10 |
+
"pad_token": "<pad>",
|
11 |
+
"padding_side": "left",
|
12 |
+
"remove_space": false,
|
13 |
+
"special_tokens_map_file": null,
|
14 |
+
"tokenizer_class": "ChatGLMTokenizer",
|
15 |
+
"unk_token": "<unk>"
|
16 |
+
}
|
trainer_state.json
ADDED
@@ -0,0 +1,604 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"best_metric": null,
|
3 |
+
"best_model_checkpoint": null,
|
4 |
+
"epoch": 2.0,
|
5 |
+
"global_step": 953,
|
6 |
+
"is_hyper_param_search": false,
|
7 |
+
"is_local_process_zero": true,
|
8 |
+
"is_world_process_zero": true,
|
9 |
+
"log_history": [
|
10 |
+
{
|
11 |
+
"epoch": 0.02,
|
12 |
+
"learning_rate": 3.496503496503497e-06,
|
13 |
+
"loss": 5.6988,
|
14 |
+
"step": 10
|
15 |
+
},
|
16 |
+
{
|
17 |
+
"epoch": 0.04,
|
18 |
+
"learning_rate": 6.993006993006994e-06,
|
19 |
+
"loss": 5.6631,
|
20 |
+
"step": 20
|
21 |
+
},
|
22 |
+
{
|
23 |
+
"epoch": 0.06,
|
24 |
+
"learning_rate": 1.048951048951049e-05,
|
25 |
+
"loss": 5.7268,
|
26 |
+
"step": 30
|
27 |
+
},
|
28 |
+
{
|
29 |
+
"epoch": 0.08,
|
30 |
+
"learning_rate": 1.3986013986013988e-05,
|
31 |
+
"loss": 5.2938,
|
32 |
+
"step": 40
|
33 |
+
},
|
34 |
+
{
|
35 |
+
"epoch": 0.1,
|
36 |
+
"learning_rate": 1.7482517482517483e-05,
|
37 |
+
"loss": 5.0975,
|
38 |
+
"step": 50
|
39 |
+
},
|
40 |
+
{
|
41 |
+
"epoch": 0.13,
|
42 |
+
"learning_rate": 2.097902097902098e-05,
|
43 |
+
"loss": 4.8578,
|
44 |
+
"step": 60
|
45 |
+
},
|
46 |
+
{
|
47 |
+
"epoch": 0.15,
|
48 |
+
"learning_rate": 2.4475524475524478e-05,
|
49 |
+
"loss": 4.3282,
|
50 |
+
"step": 70
|
51 |
+
},
|
52 |
+
{
|
53 |
+
"epoch": 0.17,
|
54 |
+
"learning_rate": 2.7972027972027976e-05,
|
55 |
+
"loss": 4.0068,
|
56 |
+
"step": 80
|
57 |
+
},
|
58 |
+
{
|
59 |
+
"epoch": 0.19,
|
60 |
+
"learning_rate": 3.146853146853147e-05,
|
61 |
+
"loss": 3.7421,
|
62 |
+
"step": 90
|
63 |
+
},
|
64 |
+
{
|
65 |
+
"epoch": 0.21,
|
66 |
+
"learning_rate": 3.4965034965034965e-05,
|
67 |
+
"loss": 3.2654,
|
68 |
+
"step": 100
|
69 |
+
},
|
70 |
+
{
|
71 |
+
"epoch": 0.23,
|
72 |
+
"learning_rate": 3.846153846153846e-05,
|
73 |
+
"loss": 3.0331,
|
74 |
+
"step": 110
|
75 |
+
},
|
76 |
+
{
|
77 |
+
"epoch": 0.25,
|
78 |
+
"learning_rate": 4.195804195804196e-05,
|
79 |
+
"loss": 2.8466,
|
80 |
+
"step": 120
|
81 |
+
},
|
82 |
+
{
|
83 |
+
"epoch": 0.27,
|
84 |
+
"learning_rate": 4.545454545454546e-05,
|
85 |
+
"loss": 2.6892,
|
86 |
+
"step": 130
|
87 |
+
},
|
88 |
+
{
|
89 |
+
"epoch": 0.29,
|
90 |
+
"learning_rate": 4.8951048951048956e-05,
|
91 |
+
"loss": 2.7062,
|
92 |
+
"step": 140
|
93 |
+
},
|
94 |
+
{
|
95 |
+
"epoch": 0.31,
|
96 |
+
"learning_rate": 4.972762645914397e-05,
|
97 |
+
"loss": 2.6551,
|
98 |
+
"step": 150
|
99 |
+
},
|
100 |
+
{
|
101 |
+
"epoch": 0.34,
|
102 |
+
"learning_rate": 4.933852140077821e-05,
|
103 |
+
"loss": 2.6632,
|
104 |
+
"step": 160
|
105 |
+
},
|
106 |
+
{
|
107 |
+
"epoch": 0.36,
|
108 |
+
"learning_rate": 4.894941634241245e-05,
|
109 |
+
"loss": 2.7111,
|
110 |
+
"step": 170
|
111 |
+
},
|
112 |
+
{
|
113 |
+
"epoch": 0.38,
|
114 |
+
"learning_rate": 4.856031128404669e-05,
|
115 |
+
"loss": 2.6711,
|
116 |
+
"step": 180
|
117 |
+
},
|
118 |
+
{
|
119 |
+
"epoch": 0.4,
|
120 |
+
"learning_rate": 4.817120622568094e-05,
|
121 |
+
"loss": 2.562,
|
122 |
+
"step": 190
|
123 |
+
},
|
124 |
+
{
|
125 |
+
"epoch": 0.42,
|
126 |
+
"learning_rate": 4.778210116731518e-05,
|
127 |
+
"loss": 2.543,
|
128 |
+
"step": 200
|
129 |
+
},
|
130 |
+
{
|
131 |
+
"epoch": 0.44,
|
132 |
+
"learning_rate": 4.739299610894942e-05,
|
133 |
+
"loss": 2.5899,
|
134 |
+
"step": 210
|
135 |
+
},
|
136 |
+
{
|
137 |
+
"epoch": 0.46,
|
138 |
+
"learning_rate": 4.700389105058366e-05,
|
139 |
+
"loss": 2.5576,
|
140 |
+
"step": 220
|
141 |
+
},
|
142 |
+
{
|
143 |
+
"epoch": 0.48,
|
144 |
+
"learning_rate": 4.66147859922179e-05,
|
145 |
+
"loss": 2.5863,
|
146 |
+
"step": 230
|
147 |
+
},
|
148 |
+
{
|
149 |
+
"epoch": 0.5,
|
150 |
+
"learning_rate": 4.622568093385214e-05,
|
151 |
+
"loss": 2.4993,
|
152 |
+
"step": 240
|
153 |
+
},
|
154 |
+
{
|
155 |
+
"epoch": 0.52,
|
156 |
+
"learning_rate": 4.583657587548638e-05,
|
157 |
+
"loss": 2.5329,
|
158 |
+
"step": 250
|
159 |
+
},
|
160 |
+
{
|
161 |
+
"epoch": 0.55,
|
162 |
+
"learning_rate": 4.544747081712062e-05,
|
163 |
+
"loss": 2.5328,
|
164 |
+
"step": 260
|
165 |
+
},
|
166 |
+
{
|
167 |
+
"epoch": 0.57,
|
168 |
+
"learning_rate": 4.505836575875487e-05,
|
169 |
+
"loss": 2.5523,
|
170 |
+
"step": 270
|
171 |
+
},
|
172 |
+
{
|
173 |
+
"epoch": 0.59,
|
174 |
+
"learning_rate": 4.466926070038911e-05,
|
175 |
+
"loss": 2.6414,
|
176 |
+
"step": 280
|
177 |
+
},
|
178 |
+
{
|
179 |
+
"epoch": 0.61,
|
180 |
+
"learning_rate": 4.428015564202335e-05,
|
181 |
+
"loss": 2.5356,
|
182 |
+
"step": 290
|
183 |
+
},
|
184 |
+
{
|
185 |
+
"epoch": 0.63,
|
186 |
+
"learning_rate": 4.389105058365759e-05,
|
187 |
+
"loss": 2.5604,
|
188 |
+
"step": 300
|
189 |
+
},
|
190 |
+
{
|
191 |
+
"epoch": 0.65,
|
192 |
+
"learning_rate": 4.3501945525291833e-05,
|
193 |
+
"loss": 2.5026,
|
194 |
+
"step": 310
|
195 |
+
},
|
196 |
+
{
|
197 |
+
"epoch": 0.67,
|
198 |
+
"learning_rate": 4.311284046692607e-05,
|
199 |
+
"loss": 2.5861,
|
200 |
+
"step": 320
|
201 |
+
},
|
202 |
+
{
|
203 |
+
"epoch": 0.69,
|
204 |
+
"learning_rate": 4.272373540856031e-05,
|
205 |
+
"loss": 2.6518,
|
206 |
+
"step": 330
|
207 |
+
},
|
208 |
+
{
|
209 |
+
"epoch": 0.71,
|
210 |
+
"learning_rate": 4.233463035019455e-05,
|
211 |
+
"loss": 2.4669,
|
212 |
+
"step": 340
|
213 |
+
},
|
214 |
+
{
|
215 |
+
"epoch": 0.73,
|
216 |
+
"learning_rate": 4.19455252918288e-05,
|
217 |
+
"loss": 2.4614,
|
218 |
+
"step": 350
|
219 |
+
},
|
220 |
+
{
|
221 |
+
"epoch": 0.76,
|
222 |
+
"learning_rate": 4.155642023346304e-05,
|
223 |
+
"loss": 2.5185,
|
224 |
+
"step": 360
|
225 |
+
},
|
226 |
+
{
|
227 |
+
"epoch": 0.78,
|
228 |
+
"learning_rate": 4.116731517509728e-05,
|
229 |
+
"loss": 2.5792,
|
230 |
+
"step": 370
|
231 |
+
},
|
232 |
+
{
|
233 |
+
"epoch": 0.8,
|
234 |
+
"learning_rate": 4.077821011673152e-05,
|
235 |
+
"loss": 2.4151,
|
236 |
+
"step": 380
|
237 |
+
},
|
238 |
+
{
|
239 |
+
"epoch": 0.82,
|
240 |
+
"learning_rate": 4.0389105058365764e-05,
|
241 |
+
"loss": 2.5522,
|
242 |
+
"step": 390
|
243 |
+
},
|
244 |
+
{
|
245 |
+
"epoch": 0.84,
|
246 |
+
"learning_rate": 4e-05,
|
247 |
+
"loss": 2.5522,
|
248 |
+
"step": 400
|
249 |
+
},
|
250 |
+
{
|
251 |
+
"epoch": 0.86,
|
252 |
+
"learning_rate": 3.961089494163424e-05,
|
253 |
+
"loss": 2.4389,
|
254 |
+
"step": 410
|
255 |
+
},
|
256 |
+
{
|
257 |
+
"epoch": 0.88,
|
258 |
+
"learning_rate": 3.922178988326848e-05,
|
259 |
+
"loss": 2.3915,
|
260 |
+
"step": 420
|
261 |
+
},
|
262 |
+
{
|
263 |
+
"epoch": 0.9,
|
264 |
+
"learning_rate": 3.883268482490273e-05,
|
265 |
+
"loss": 2.4208,
|
266 |
+
"step": 430
|
267 |
+
},
|
268 |
+
{
|
269 |
+
"epoch": 0.92,
|
270 |
+
"learning_rate": 3.844357976653697e-05,
|
271 |
+
"loss": 2.4861,
|
272 |
+
"step": 440
|
273 |
+
},
|
274 |
+
{
|
275 |
+
"epoch": 0.94,
|
276 |
+
"learning_rate": 3.805447470817121e-05,
|
277 |
+
"loss": 2.4987,
|
278 |
+
"step": 450
|
279 |
+
},
|
280 |
+
{
|
281 |
+
"epoch": 0.97,
|
282 |
+
"learning_rate": 3.766536964980545e-05,
|
283 |
+
"loss": 2.5472,
|
284 |
+
"step": 460
|
285 |
+
},
|
286 |
+
{
|
287 |
+
"epoch": 0.99,
|
288 |
+
"learning_rate": 3.7276264591439694e-05,
|
289 |
+
"loss": 2.5182,
|
290 |
+
"step": 470
|
291 |
+
},
|
292 |
+
{
|
293 |
+
"epoch": 1.0,
|
294 |
+
"eval_accuracy": 0.5792096979068868,
|
295 |
+
"eval_loss": 2.443359375,
|
296 |
+
"eval_runtime": 25.0491,
|
297 |
+
"eval_samples_per_second": 76.09,
|
298 |
+
"eval_steps_per_second": 9.541,
|
299 |
+
"step": 476
|
300 |
+
},
|
301 |
+
{
|
302 |
+
"epoch": 1.01,
|
303 |
+
"learning_rate": 3.6887159533073934e-05,
|
304 |
+
"loss": 2.3115,
|
305 |
+
"step": 480
|
306 |
+
},
|
307 |
+
{
|
308 |
+
"epoch": 1.03,
|
309 |
+
"learning_rate": 3.649805447470817e-05,
|
310 |
+
"loss": 2.3429,
|
311 |
+
"step": 490
|
312 |
+
},
|
313 |
+
{
|
314 |
+
"epoch": 1.05,
|
315 |
+
"learning_rate": 3.610894941634241e-05,
|
316 |
+
"loss": 2.4361,
|
317 |
+
"step": 500
|
318 |
+
},
|
319 |
+
{
|
320 |
+
"epoch": 1.07,
|
321 |
+
"learning_rate": 3.571984435797666e-05,
|
322 |
+
"loss": 2.4135,
|
323 |
+
"step": 510
|
324 |
+
},
|
325 |
+
{
|
326 |
+
"epoch": 1.09,
|
327 |
+
"learning_rate": 3.53307392996109e-05,
|
328 |
+
"loss": 2.3602,
|
329 |
+
"step": 520
|
330 |
+
},
|
331 |
+
{
|
332 |
+
"epoch": 1.11,
|
333 |
+
"learning_rate": 3.494163424124514e-05,
|
334 |
+
"loss": 2.4515,
|
335 |
+
"step": 530
|
336 |
+
},
|
337 |
+
{
|
338 |
+
"epoch": 1.13,
|
339 |
+
"learning_rate": 3.455252918287938e-05,
|
340 |
+
"loss": 2.4394,
|
341 |
+
"step": 540
|
342 |
+
},
|
343 |
+
{
|
344 |
+
"epoch": 1.15,
|
345 |
+
"learning_rate": 3.4163424124513624e-05,
|
346 |
+
"loss": 2.4532,
|
347 |
+
"step": 550
|
348 |
+
},
|
349 |
+
{
|
350 |
+
"epoch": 1.18,
|
351 |
+
"learning_rate": 3.3774319066147864e-05,
|
352 |
+
"loss": 2.4665,
|
353 |
+
"step": 560
|
354 |
+
},
|
355 |
+
{
|
356 |
+
"epoch": 1.2,
|
357 |
+
"learning_rate": 3.3385214007782103e-05,
|
358 |
+
"loss": 2.3228,
|
359 |
+
"step": 570
|
360 |
+
},
|
361 |
+
{
|
362 |
+
"epoch": 1.22,
|
363 |
+
"learning_rate": 3.299610894941634e-05,
|
364 |
+
"loss": 2.3944,
|
365 |
+
"step": 580
|
366 |
+
},
|
367 |
+
{
|
368 |
+
"epoch": 1.24,
|
369 |
+
"learning_rate": 3.260700389105058e-05,
|
370 |
+
"loss": 2.4102,
|
371 |
+
"step": 590
|
372 |
+
},
|
373 |
+
{
|
374 |
+
"epoch": 1.26,
|
375 |
+
"learning_rate": 3.221789883268483e-05,
|
376 |
+
"loss": 2.4339,
|
377 |
+
"step": 600
|
378 |
+
},
|
379 |
+
{
|
380 |
+
"epoch": 1.28,
|
381 |
+
"learning_rate": 3.182879377431907e-05,
|
382 |
+
"loss": 2.3893,
|
383 |
+
"step": 610
|
384 |
+
},
|
385 |
+
{
|
386 |
+
"epoch": 1.3,
|
387 |
+
"learning_rate": 3.143968871595331e-05,
|
388 |
+
"loss": 2.3751,
|
389 |
+
"step": 620
|
390 |
+
},
|
391 |
+
{
|
392 |
+
"epoch": 1.32,
|
393 |
+
"learning_rate": 3.105058365758755e-05,
|
394 |
+
"loss": 2.3861,
|
395 |
+
"step": 630
|
396 |
+
},
|
397 |
+
{
|
398 |
+
"epoch": 1.34,
|
399 |
+
"learning_rate": 3.0661478599221794e-05,
|
400 |
+
"loss": 2.4282,
|
401 |
+
"step": 640
|
402 |
+
},
|
403 |
+
{
|
404 |
+
"epoch": 1.36,
|
405 |
+
"learning_rate": 3.027237354085603e-05,
|
406 |
+
"loss": 2.3462,
|
407 |
+
"step": 650
|
408 |
+
},
|
409 |
+
{
|
410 |
+
"epoch": 1.39,
|
411 |
+
"learning_rate": 2.9883268482490273e-05,
|
412 |
+
"loss": 2.3599,
|
413 |
+
"step": 660
|
414 |
+
},
|
415 |
+
{
|
416 |
+
"epoch": 1.41,
|
417 |
+
"learning_rate": 2.9494163424124516e-05,
|
418 |
+
"loss": 2.4088,
|
419 |
+
"step": 670
|
420 |
+
},
|
421 |
+
{
|
422 |
+
"epoch": 1.43,
|
423 |
+
"learning_rate": 2.910505836575876e-05,
|
424 |
+
"loss": 2.3874,
|
425 |
+
"step": 680
|
426 |
+
},
|
427 |
+
{
|
428 |
+
"epoch": 1.45,
|
429 |
+
"learning_rate": 2.8715953307392995e-05,
|
430 |
+
"loss": 2.484,
|
431 |
+
"step": 690
|
432 |
+
},
|
433 |
+
{
|
434 |
+
"epoch": 1.47,
|
435 |
+
"learning_rate": 2.832684824902724e-05,
|
436 |
+
"loss": 2.3859,
|
437 |
+
"step": 700
|
438 |
+
},
|
439 |
+
{
|
440 |
+
"epoch": 1.49,
|
441 |
+
"learning_rate": 2.793774319066148e-05,
|
442 |
+
"loss": 2.3496,
|
443 |
+
"step": 710
|
444 |
+
},
|
445 |
+
{
|
446 |
+
"epoch": 1.51,
|
447 |
+
"learning_rate": 2.7548638132295724e-05,
|
448 |
+
"loss": 2.5695,
|
449 |
+
"step": 720
|
450 |
+
},
|
451 |
+
{
|
452 |
+
"epoch": 1.53,
|
453 |
+
"learning_rate": 2.715953307392996e-05,
|
454 |
+
"loss": 2.3911,
|
455 |
+
"step": 730
|
456 |
+
},
|
457 |
+
{
|
458 |
+
"epoch": 1.55,
|
459 |
+
"learning_rate": 2.6770428015564204e-05,
|
460 |
+
"loss": 2.4357,
|
461 |
+
"step": 740
|
462 |
+
},
|
463 |
+
{
|
464 |
+
"epoch": 1.57,
|
465 |
+
"learning_rate": 2.6381322957198447e-05,
|
466 |
+
"loss": 2.4545,
|
467 |
+
"step": 750
|
468 |
+
},
|
469 |
+
{
|
470 |
+
"epoch": 1.59,
|
471 |
+
"learning_rate": 2.599221789883269e-05,
|
472 |
+
"loss": 2.3346,
|
473 |
+
"step": 760
|
474 |
+
},
|
475 |
+
{
|
476 |
+
"epoch": 1.62,
|
477 |
+
"learning_rate": 2.5603112840466926e-05,
|
478 |
+
"loss": 2.3698,
|
479 |
+
"step": 770
|
480 |
+
},
|
481 |
+
{
|
482 |
+
"epoch": 1.64,
|
483 |
+
"learning_rate": 2.521400778210117e-05,
|
484 |
+
"loss": 2.4074,
|
485 |
+
"step": 780
|
486 |
+
},
|
487 |
+
{
|
488 |
+
"epoch": 1.66,
|
489 |
+
"learning_rate": 2.4824902723735412e-05,
|
490 |
+
"loss": 2.5796,
|
491 |
+
"step": 790
|
492 |
+
},
|
493 |
+
{
|
494 |
+
"epoch": 1.68,
|
495 |
+
"learning_rate": 2.443579766536965e-05,
|
496 |
+
"loss": 2.4123,
|
497 |
+
"step": 800
|
498 |
+
},
|
499 |
+
{
|
500 |
+
"epoch": 1.7,
|
501 |
+
"learning_rate": 2.4046692607003894e-05,
|
502 |
+
"loss": 2.3395,
|
503 |
+
"step": 810
|
504 |
+
},
|
505 |
+
{
|
506 |
+
"epoch": 1.72,
|
507 |
+
"learning_rate": 2.3657587548638134e-05,
|
508 |
+
"loss": 2.3278,
|
509 |
+
"step": 820
|
510 |
+
},
|
511 |
+
{
|
512 |
+
"epoch": 1.74,
|
513 |
+
"learning_rate": 2.3268482490272377e-05,
|
514 |
+
"loss": 2.4002,
|
515 |
+
"step": 830
|
516 |
+
},
|
517 |
+
{
|
518 |
+
"epoch": 1.76,
|
519 |
+
"learning_rate": 2.2879377431906616e-05,
|
520 |
+
"loss": 2.3189,
|
521 |
+
"step": 840
|
522 |
+
},
|
523 |
+
{
|
524 |
+
"epoch": 1.78,
|
525 |
+
"learning_rate": 2.2490272373540856e-05,
|
526 |
+
"loss": 2.4051,
|
527 |
+
"step": 850
|
528 |
+
},
|
529 |
+
{
|
530 |
+
"epoch": 1.8,
|
531 |
+
"learning_rate": 2.21011673151751e-05,
|
532 |
+
"loss": 2.3595,
|
533 |
+
"step": 860
|
534 |
+
},
|
535 |
+
{
|
536 |
+
"epoch": 1.83,
|
537 |
+
"learning_rate": 2.171206225680934e-05,
|
538 |
+
"loss": 2.3412,
|
539 |
+
"step": 870
|
540 |
+
},
|
541 |
+
{
|
542 |
+
"epoch": 1.85,
|
543 |
+
"learning_rate": 2.132295719844358e-05,
|
544 |
+
"loss": 2.3462,
|
545 |
+
"step": 880
|
546 |
+
},
|
547 |
+
{
|
548 |
+
"epoch": 1.87,
|
549 |
+
"learning_rate": 2.093385214007782e-05,
|
550 |
+
"loss": 2.3828,
|
551 |
+
"step": 890
|
552 |
+
},
|
553 |
+
{
|
554 |
+
"epoch": 1.89,
|
555 |
+
"learning_rate": 2.054474708171206e-05,
|
556 |
+
"loss": 2.3796,
|
557 |
+
"step": 900
|
558 |
+
},
|
559 |
+
{
|
560 |
+
"epoch": 1.91,
|
561 |
+
"learning_rate": 2.0155642023346304e-05,
|
562 |
+
"loss": 2.2987,
|
563 |
+
"step": 910
|
564 |
+
},
|
565 |
+
{
|
566 |
+
"epoch": 1.93,
|
567 |
+
"learning_rate": 1.9766536964980543e-05,
|
568 |
+
"loss": 2.3002,
|
569 |
+
"step": 920
|
570 |
+
},
|
571 |
+
{
|
572 |
+
"epoch": 1.95,
|
573 |
+
"learning_rate": 1.9377431906614786e-05,
|
574 |
+
"loss": 2.4586,
|
575 |
+
"step": 930
|
576 |
+
},
|
577 |
+
{
|
578 |
+
"epoch": 1.97,
|
579 |
+
"learning_rate": 1.8988326848249026e-05,
|
580 |
+
"loss": 2.4058,
|
581 |
+
"step": 940
|
582 |
+
},
|
583 |
+
{
|
584 |
+
"epoch": 1.99,
|
585 |
+
"learning_rate": 1.859922178988327e-05,
|
586 |
+
"loss": 2.3934,
|
587 |
+
"step": 950
|
588 |
+
},
|
589 |
+
{
|
590 |
+
"epoch": 2.0,
|
591 |
+
"eval_accuracy": 0.5807643452808307,
|
592 |
+
"eval_loss": 2.384765625,
|
593 |
+
"eval_runtime": 25.0512,
|
594 |
+
"eval_samples_per_second": 76.084,
|
595 |
+
"eval_steps_per_second": 9.54,
|
596 |
+
"step": 953
|
597 |
+
}
|
598 |
+
],
|
599 |
+
"max_steps": 1428,
|
600 |
+
"num_train_epochs": 3,
|
601 |
+
"total_flos": 5.11391603907625e+16,
|
602 |
+
"trial_name": null,
|
603 |
+
"trial_params": null
|
604 |
+
}
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:164c847d97799194aedc004b3e7b6a4da88a9408da16201d2799d8e761fd15e2
|
3 |
+
size 3515
|