IEIT-Yuan commited on
Commit
63bd5df
1 Parent(s): be589a2

update model

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ *.pt* filter=lfs diff=lfs merge=lfs -text
config.json ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "architectures": [
4
+ "YuanForCausalLM"
5
+ ],
6
+ "auto_map": {
7
+ "AutoConfig": "configuration_yuan.YuanConfig",
8
+ "AutoModelForCausalLM": "yuan_hf_model.YuanForCausalLM"
9
+ },
10
+ "bos_token_id": 77185,
11
+ "causal_mask": true,
12
+ "dropout": 0.1,
13
+ "eod_token": 77185,
14
+ "eod_token_id": 77185,
15
+ "eos_token_id": 77185,
16
+ "hidden_act": "silu",
17
+ "hidden_size": 8192,
18
+ "initializer_range": 0.02,
19
+ "intermediate_size": 32768,
20
+ "mask_token_id": 77185,
21
+ "max_position_embeddings": 4096,
22
+ "model_max_length": 4096,
23
+ "model_type": "yuan",
24
+ "num_attention_heads": 64,
25
+ "num_hidden_layers": 84,
26
+ "pad_token_id": 77185,
27
+ "reset_attention_mask": true,
28
+ "reset_position_ids": true,
29
+ "rms_norm_eps": 1e-06,
30
+ "sep_token": 77187,
31
+ "sep_token_id": 77185,
32
+ "tokenizer_class": "YuanTokenizer",
33
+ "torch_dtype": "bfloat16",
34
+ "transformers_version": "4.30.2",
35
+ "use_cache": true,
36
+ "use_flash_attention": true,
37
+ "use_loss_mask": false,
38
+ "vocab_size": 135040
39
+ }
configuration_yuan.py ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ from transformers.configuration_utils import PretrainedConfig
3
+
4
+
5
+ class YuanConfig(PretrainedConfig):
6
+ model_type = "yuan"
7
+ keys_to_ignore_at_inference = ["past_key_values"]
8
+
9
+ def __init__(
10
+ self,
11
+ vocab_size=135040,
12
+ hidden_size=8192,
13
+ intermediate_size=32768,
14
+ num_hidden_layers=84,
15
+ num_attention_heads=64,
16
+ hidden_act="silu",
17
+ model_max_length=4096,
18
+ initializer_range=0.02,
19
+ rms_norm_eps=1e-6,
20
+ use_cache=True,
21
+ pad_token_id=77185,
22
+ bos_token_id=77185,
23
+ eos_token_id=77185,
24
+ tie_word_embeddings=True,
25
+ **kwargs,
26
+ ):
27
+ self.vocab_size = vocab_size
28
+ self.model_max_length = model_max_length
29
+ self.hidden_size = hidden_size
30
+ self.intermediate_size = intermediate_size
31
+ self.num_hidden_layers = num_hidden_layers
32
+ self.num_attention_heads = num_attention_heads
33
+ self.hidden_act = hidden_act
34
+ self.initializer_range = initializer_range
35
+ self.rms_norm_eps = rms_norm_eps
36
+ self.use_cache = use_cache
37
+ super().__init__(
38
+ pad_token_id=pad_token_id,
39
+ bos_token_id=bos_token_id,
40
+ eos_token_id=eos_token_id,
41
+ tie_word_embeddings=tie_word_embeddings,
42
+ **kwargs,
43
+ )
pytorch_model-00001-of-00022.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ccbf83913739a8b1c5eeed7760375dbfb4e40386c7482846c69f4f43323dff49
3
+ size 9997406611