badaoui HF Staff commited on
Commit
62f282f
·
verified ·
1 Parent(s): d085e27

Add Neuron-optimized files for DAMO-NLP-SG/zero-shot-classify-SSTuning-ALBERT

Browse files

🤖 Neuron Export Bot: Adding AWS Neuron-optimized model files.

Original model: [DAMO-NLP-SG/zero-shot-classify-SSTuning-ALBERT](https://huggingface.co/DAMO-NLP-SG/zero-shot-classify-SSTuning-ALBERT)
Task: text-classification
Generated by: [badaoui](https://huggingface.co/badaoui)
Generated using: [Optimum Neuron Compiler Space](https://huggingface.co/spaces/optimum/neuron-export)

These files have been pre-compiled for AWS Neuron devices (Inferentia/Trainium) and should provide improved inference performance.

Files changed (7) hide show
  1. .gitattributes +1 -0
  2. README.md +38 -0
  3. config.json +100 -0
  4. model.neuron +3 -0
  5. special_tokens_map.json +51 -0
  6. tokenizer.json +0 -0
  7. tokenizer_config.json +58 -0
.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
+ model.neuron filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - neuron
4
+ - optimized
5
+ - aws-neuron
6
+ - text-classification
7
+ base_model: DAMO-NLP-SG/zero-shot-classify-SSTuning-ALBERT
8
+ ---
9
+
10
+ # Neuron-Optimized DAMO-NLP-SG/zero-shot-classify-SSTuning-ALBERT
11
+
12
+ This repository contains AWS Neuron-optimized files for [DAMO-NLP-SG/zero-shot-classify-SSTuning-ALBERT](https://huggingface.co/DAMO-NLP-SG/zero-shot-classify-SSTuning-ALBERT).
13
+
14
+ ## Model Details
15
+
16
+ - **Base Model**: [DAMO-NLP-SG/zero-shot-classify-SSTuning-ALBERT](https://huggingface.co/DAMO-NLP-SG/zero-shot-classify-SSTuning-ALBERT)
17
+ - **Task**: text-classification
18
+ - **Optimization**: AWS Neuron compilation
19
+ - **Generated by**: [badaoui](https://huggingface.co/badaoui)
20
+ - **Generated using**: [Optimum Neuron Compiler Space](https://huggingface.co/spaces/optimum/neuron-export)
21
+
22
+ ## Usage
23
+
24
+ This model has been optimized for AWS Neuron devices (Inferentia/Trainium). To use it:
25
+
26
+ ```python
27
+ from optimum.neuron import NeuronModelForSequenceClassification
28
+
29
+ model = NeuronModelForSequenceClassification.from_pretrained("badaoui/DAMO-NLP-SG-zero-shot-classify-SSTuning-ALBERT-neuron")
30
+ ```
31
+
32
+ ## Performance
33
+
34
+ These files are pre-compiled for AWS Neuron devices and should provide improved inference performance compared to the original model when deployed on Inferentia or Trainium instances.
35
+
36
+ ## Original Model
37
+
38
+ For the original model, training details, and more information, please visit: [DAMO-NLP-SG/zero-shot-classify-SSTuning-ALBERT](https://huggingface.co/DAMO-NLP-SG/zero-shot-classify-SSTuning-ALBERT)
config.json ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "AlbertForSequenceClassification"
4
+ ],
5
+ "attention_probs_dropout_prob": 0,
6
+ "bos_token_id": 2,
7
+ "classifier_dropout_prob": 0.1,
8
+ "down_scale_factor": 1,
9
+ "embedding_size": 128,
10
+ "eos_token_id": 3,
11
+ "gap_size": 0,
12
+ "hidden_act": "gelu_new",
13
+ "hidden_dropout_prob": 0,
14
+ "hidden_size": 4096,
15
+ "id2label": {
16
+ "0": "LABEL_0",
17
+ "1": "LABEL_1",
18
+ "2": "LABEL_2",
19
+ "3": "LABEL_3",
20
+ "4": "LABEL_4",
21
+ "5": "LABEL_5",
22
+ "6": "LABEL_6",
23
+ "7": "LABEL_7",
24
+ "8": "LABEL_8",
25
+ "9": "LABEL_9",
26
+ "10": "LABEL_10",
27
+ "11": "LABEL_11",
28
+ "12": "LABEL_12",
29
+ "13": "LABEL_13",
30
+ "14": "LABEL_14",
31
+ "15": "LABEL_15",
32
+ "16": "LABEL_16",
33
+ "17": "LABEL_17",
34
+ "18": "LABEL_18",
35
+ "19": "LABEL_19"
36
+ },
37
+ "initializer_range": 0.02,
38
+ "inner_group_num": 1,
39
+ "intermediate_size": 16384,
40
+ "label2id": {
41
+ "LABEL_0": 0,
42
+ "LABEL_1": 1,
43
+ "LABEL_10": 10,
44
+ "LABEL_11": 11,
45
+ "LABEL_12": 12,
46
+ "LABEL_13": 13,
47
+ "LABEL_14": 14,
48
+ "LABEL_15": 15,
49
+ "LABEL_16": 16,
50
+ "LABEL_17": 17,
51
+ "LABEL_18": 18,
52
+ "LABEL_19": 19,
53
+ "LABEL_2": 2,
54
+ "LABEL_3": 3,
55
+ "LABEL_4": 4,
56
+ "LABEL_5": 5,
57
+ "LABEL_6": 6,
58
+ "LABEL_7": 7,
59
+ "LABEL_8": 8,
60
+ "LABEL_9": 9
61
+ },
62
+ "layer_norm_eps": 1e-12,
63
+ "layers_to_keep": [],
64
+ "max_position_embeddings": 512,
65
+ "model_type": "albert",
66
+ "net_structure_type": 0,
67
+ "neuron": {
68
+ "auto_cast": "matmul",
69
+ "auto_cast_type": "bf16",
70
+ "compiler_type": "neuronx-cc",
71
+ "compiler_version": "2.21.18209.0+043b1bf7",
72
+ "disable_fallback": false,
73
+ "disable_fast_relayout": false,
74
+ "dynamic_batch_size": false,
75
+ "float_dtype": "fp32",
76
+ "inline_weights_to_neff": true,
77
+ "instance_type": "inf2",
78
+ "int_dtype": "int64",
79
+ "model_type": "albert",
80
+ "optlevel": "2",
81
+ "output_attentions": false,
82
+ "output_hidden_states": false,
83
+ "static_batch_size": 1,
84
+ "static_sequence_length": 128,
85
+ "task": "text-classification",
86
+ "tensor_parallel_size": 1
87
+ },
88
+ "num_attention_heads": 64,
89
+ "num_hidden_groups": 1,
90
+ "num_hidden_layers": 12,
91
+ "num_memory_blocks": 0,
92
+ "pad_token_id": 0,
93
+ "position_embedding_type": "absolute",
94
+ "problem_type": "single_label_classification",
95
+ "torch_dtype": "float32",
96
+ "torchscript": true,
97
+ "transformers_version": "4.55.4",
98
+ "type_vocab_size": 2,
99
+ "vocab_size": 30000
100
+ }
model.neuron ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6147aa43a1083e5fdd433d3253d85c430bac39776ca7374d97a657a4846a8e9b
3
+ size 399035069
special_tokens_map.json ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "[CLS]",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "cls_token": {
10
+ "content": "[CLS]",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "eos_token": {
17
+ "content": "[SEP]",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "mask_token": {
24
+ "content": "[MASK]",
25
+ "lstrip": true,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ },
30
+ "pad_token": {
31
+ "content": "<pad>",
32
+ "lstrip": false,
33
+ "normalized": false,
34
+ "rstrip": false,
35
+ "single_word": false
36
+ },
37
+ "sep_token": {
38
+ "content": "[SEP]",
39
+ "lstrip": false,
40
+ "normalized": false,
41
+ "rstrip": false,
42
+ "single_word": false
43
+ },
44
+ "unk_token": {
45
+ "content": "<unk>",
46
+ "lstrip": false,
47
+ "normalized": false,
48
+ "rstrip": false,
49
+ "single_word": false
50
+ }
51
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "1": {
12
+ "content": "<unk>",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "2": {
20
+ "content": "[CLS]",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "3": {
28
+ "content": "[SEP]",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "4": {
36
+ "content": "[MASK]",
37
+ "lstrip": true,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ }
43
+ },
44
+ "bos_token": "[CLS]",
45
+ "clean_up_tokenization_spaces": false,
46
+ "cls_token": "[CLS]",
47
+ "do_lower_case": true,
48
+ "eos_token": "[SEP]",
49
+ "extra_special_tokens": {},
50
+ "keep_accents": false,
51
+ "mask_token": "[MASK]",
52
+ "model_max_length": 512,
53
+ "pad_token": "<pad>",
54
+ "remove_space": true,
55
+ "sep_token": "[SEP]",
56
+ "tokenizer_class": "AlbertTokenizerFast",
57
+ "unk_token": "<unk>"
58
+ }