badaoui HF Staff commited on
Commit
cc92f3a
·
verified ·
1 Parent(s): 0dbbbf9

Adding Neuron-optimized model files

Browse files

🤖 Neuron Export Bot: On behalf of [badaoui](https://huggingface.co/badaoui), adding AWS Neuron-optimized model files.
Neuron-optimized models can achieve high-performance inference on AWS Inferentia and Trainium chips. Learn more:
- [AWS Neuron Documentation](https://awsdocs-neuron.readthedocs-hosted.com)
- [🤗 Optimum Neuron Guide](https://huggingface.co/docs/optimum-neuron/index)

.gitattributes CHANGED
@@ -7,3 +7,4 @@
7
  *.ot filter=lfs diff=lfs merge=lfs -text
8
  *.onnx filter=lfs diff=lfs merge=lfs -text
9
  *.msgpack filter=lfs diff=lfs merge=lfs -text
 
 
7
  *.ot filter=lfs diff=lfs merge=lfs -text
8
  *.onnx filter=lfs diff=lfs merge=lfs -text
9
  *.msgpack filter=lfs diff=lfs merge=lfs -text
10
+ neuron/model.neuron filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -1,8 +1,9 @@
1
  ---
2
  language: en
3
  thumbnail: https://huggingface.co/front/thumbnails/google.png
4
-
5
  license: apache-2.0
 
 
6
  ---
7
 
8
  **WARNING**: This is the official generator checkpoint as in the [ELECTRA original codebase](https://github.com/google-research/electra). However, this model is not scaled properly for pre-training with [google/electra-small-discriminator](https://huggingface.co/google/electra-small-discriminator). The paper recommends a hyperparameter multiplier of 1/4 between the discriminator and generator for this given model to avoid training instabilities. This would not be the case when using `google/electra-small-generator` and `google/electra-small-discriminator`, which are similar in size.
 
1
  ---
2
  language: en
3
  thumbnail: https://huggingface.co/front/thumbnails/google.png
 
4
  license: apache-2.0
5
+ tags:
6
+ - neuron
7
  ---
8
 
9
  **WARNING**: This is the official generator checkpoint as in the [ELECTRA original codebase](https://github.com/google-research/electra). However, this model is not scaled properly for pre-training with [google/electra-small-discriminator](https://huggingface.co/google/electra-small-discriminator). The paper recommends a hyperparameter multiplier of 1/4 between the discriminator and generator for this given model to avoid training instabilities. This would not be the case when using `google/electra-small-generator` and `google/electra-small-discriminator`, which are similar in size.
neuron/config.json ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_attn_implementation_autoset": true,
3
+ "_name_or_path": "/tmp/tmpc0qb1ezb",
4
+ "architectures": [
5
+ "ElectraForMaskedLM"
6
+ ],
7
+ "attention_probs_dropout_prob": 0.1,
8
+ "classifier_dropout": null,
9
+ "embedding_size": 128,
10
+ "hidden_act": "gelu",
11
+ "hidden_dropout_prob": 0.1,
12
+ "hidden_size": 256,
13
+ "initializer_range": 0.02,
14
+ "intermediate_size": 1024,
15
+ "layer_norm_eps": 1e-12,
16
+ "max_position_embeddings": 512,
17
+ "model_type": "electra",
18
+ "neuron": {
19
+ "auto_cast": null,
20
+ "auto_cast_type": null,
21
+ "compiler_type": "neuronx-cc",
22
+ "compiler_version": "2.15.143.0+e39249ad",
23
+ "disable_fallback": false,
24
+ "disable_fast_relayout": false,
25
+ "dynamic_batch_size": false,
26
+ "inline_weights_to_neff": true,
27
+ "input_names": [
28
+ "input_ids",
29
+ "attention_mask",
30
+ "token_type_ids"
31
+ ],
32
+ "model_type": "electra",
33
+ "optlevel": "2",
34
+ "output_attentions": false,
35
+ "output_hidden_states": false,
36
+ "output_names": [
37
+ "logits"
38
+ ],
39
+ "static_batch_size": 1,
40
+ "static_sequence_length": 128,
41
+ "tensor_parallel_size": 1
42
+ },
43
+ "num_attention_heads": 4,
44
+ "num_hidden_layers": 12,
45
+ "pad_token_id": 0,
46
+ "position_embedding_type": "absolute",
47
+ "summary_activation": "gelu",
48
+ "summary_last_dropout": 0.1,
49
+ "summary_type": "first",
50
+ "summary_use_proj": true,
51
+ "task": "fill-mask",
52
+ "torchscript": true,
53
+ "transformers_version": "4.48.3",
54
+ "type_vocab_size": 2,
55
+ "use_cache": true,
56
+ "vocab_size": 30522
57
+ }
neuron/model.neuron ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f300b48964395ea9f73f80a4e18755f338d2946e2266d48e78a68951c6bd104b
3
+ size 64937981
neuron/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
+ }
neuron/tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
neuron/tokenizer_config.json ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "[PAD]",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "100": {
12
+ "content": "[UNK]",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "101": {
20
+ "content": "[CLS]",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "102": {
28
+ "content": "[SEP]",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "103": {
36
+ "content": "[MASK]",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ }
43
+ },
44
+ "clean_up_tokenization_spaces": false,
45
+ "cls_token": "[CLS]",
46
+ "do_lower_case": true,
47
+ "extra_special_tokens": {},
48
+ "mask_token": "[MASK]",
49
+ "model_max_length": 512,
50
+ "pad_token": "[PAD]",
51
+ "sep_token": "[SEP]",
52
+ "strip_accents": null,
53
+ "tokenize_chinese_chars": true,
54
+ "tokenizer_class": "ElectraTokenizer",
55
+ "unk_token": "[UNK]"
56
+ }
neuron/vocab.txt ADDED
The diff for this file is too large to render. See raw diff