badaoui HF Staff commited on
Commit
45b2f6a
·
verified ·
1 Parent(s): f57d92a

Add Neuron-optimized files for oxyapi/albert-moderation-001

Browse files

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

Original model: [oxyapi/albert-moderation-001](https://huggingface.co/oxyapi/albert-moderation-001)
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 (8) hide show
  1. .gitattributes +1 -0
  2. README.md +38 -0
  3. config.json +72 -0
  4. model.neuron +3 -0
  5. special_tokens_map.json +37 -0
  6. tokenizer.json +0 -0
  7. tokenizer_config.json +56 -0
  8. vocab.txt +0 -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: oxyapi/albert-moderation-001
8
+ ---
9
+
10
+ # Neuron-Optimized oxyapi/albert-moderation-001
11
+
12
+ This repository contains AWS Neuron-optimized files for [oxyapi/albert-moderation-001](https://huggingface.co/oxyapi/albert-moderation-001).
13
+
14
+ ## Model Details
15
+
16
+ - **Base Model**: [oxyapi/albert-moderation-001](https://huggingface.co/oxyapi/albert-moderation-001)
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/oxyapi-albert-moderation-001-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: [oxyapi/albert-moderation-001](https://huggingface.co/oxyapi/albert-moderation-001)
config.json ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "activation": "gelu",
3
+ "architectures": [
4
+ "DistilBertForSequenceClassification"
5
+ ],
6
+ "attention_dropout": 0.1,
7
+ "dim": 768,
8
+ "dropout": 0.1,
9
+ "hidden_dim": 3072,
10
+ "id2label": {
11
+ "0": "harassment",
12
+ "1": "harassment/threatening",
13
+ "2": "sexual",
14
+ "3": "hate",
15
+ "4": "hate/threatening",
16
+ "5": "self-harm/intent",
17
+ "6": "self-harm/instructions",
18
+ "7": "self-harm",
19
+ "8": "sexual/minors",
20
+ "9": "violence",
21
+ "10": "violence/graphic"
22
+ },
23
+ "initializer_range": 0.02,
24
+ "label2id": {
25
+ "harassment": 0,
26
+ "harassment/threatening": 1,
27
+ "hate": 3,
28
+ "hate/threatening": 4,
29
+ "self-harm": 7,
30
+ "self-harm/instructions": 6,
31
+ "self-harm/intent": 5,
32
+ "sexual": 2,
33
+ "sexual/minors": 8,
34
+ "violence": 9,
35
+ "violence/graphic": 10
36
+ },
37
+ "max_position_embeddings": 512,
38
+ "model_type": "distilbert",
39
+ "n_heads": 12,
40
+ "n_layers": 6,
41
+ "neuron": {
42
+ "auto_cast": "matmul",
43
+ "auto_cast_type": "bf16",
44
+ "compiler_type": "neuronx-cc",
45
+ "compiler_version": "2.21.18209.0+043b1bf7",
46
+ "disable_fallback": false,
47
+ "disable_fast_relayout": false,
48
+ "dynamic_batch_size": false,
49
+ "float_dtype": "fp32",
50
+ "inline_weights_to_neff": true,
51
+ "instance_type": "inf2",
52
+ "int_dtype": "int64",
53
+ "model_type": "distilbert",
54
+ "optlevel": "2",
55
+ "output_attentions": false,
56
+ "output_hidden_states": false,
57
+ "static_batch_size": 1,
58
+ "static_sequence_length": 128,
59
+ "task": "text-classification",
60
+ "tensor_parallel_size": 1
61
+ },
62
+ "pad_token_id": 0,
63
+ "problem_type": "multi_label_classification",
64
+ "qa_dropout": 0.1,
65
+ "seq_classif_dropout": 0.2,
66
+ "sinusoidal_pos_embds": false,
67
+ "tie_weights_": true,
68
+ "torch_dtype": "float32",
69
+ "torchscript": true,
70
+ "transformers_version": "4.55.4",
71
+ "vocab_size": 30522
72
+ }
model.neuron ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:363316bf8b4145995026da7cfed48c78b855d5a4647f38e3037f5e352a78db9b
3
+ size 156251194
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
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
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": "DistilBertTokenizer",
55
+ "unk_token": "[UNK]"
56
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff