badaoui HF Staff commited on
Commit
13c3373
·
verified ·
1 Parent(s): 5e62df0

Add Neuron-optimized files for urduhack/roberta-urdu-small

Browse files

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

Original model: [urduhack/roberta-urdu-small](https://huggingface.co/urduhack/roberta-urdu-small)
Task: auto
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 (9) hide show
  1. .gitattributes +1 -0
  2. README.md +38 -0
  3. config.json +54 -0
  4. merges.txt +0 -0
  5. model.neuron +3 -0
  6. special_tokens_map.json +51 -0
  7. tokenizer.json +0 -0
  8. tokenizer_config.json +59 -0
  9. vocab.json +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
+ - auto
7
+ base_model: urduhack/roberta-urdu-small
8
+ ---
9
+
10
+ # Neuron-Optimized urduhack/roberta-urdu-small
11
+
12
+ This repository contains AWS Neuron-optimized files for [urduhack/roberta-urdu-small](https://huggingface.co/urduhack/roberta-urdu-small).
13
+
14
+ ## Model Details
15
+
16
+ - **Base Model**: [urduhack/roberta-urdu-small](https://huggingface.co/urduhack/roberta-urdu-small)
17
+ - **Task**: auto
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 NeuronModelForAuto
28
+
29
+ model = NeuronModelForAuto.from_pretrained("badaoui/urduhack-roberta-urdu-small-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: [urduhack/roberta-urdu-small](https://huggingface.co/urduhack/roberta-urdu-small)
config.json ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_attn_implementation_autoset": true,
3
+ "architectures": [
4
+ "RobertaForMaskedLM"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "bos_token_id": 0,
8
+ "classifier_dropout": null,
9
+ "eos_token_id": 2,
10
+ "gradient_checkpointing": false,
11
+ "hidden_act": "gelu",
12
+ "hidden_dropout_prob": 0.1,
13
+ "hidden_size": 768,
14
+ "initializer_range": 0.02,
15
+ "intermediate_size": 3072,
16
+ "layer_norm_eps": 1e-05,
17
+ "max_position_embeddings": 514,
18
+ "model_type": "roberta",
19
+ "neuron": {
20
+ "auto_cast": null,
21
+ "auto_cast_type": null,
22
+ "compiler_type": "neuronx-cc",
23
+ "compiler_version": "2.19.8089.0+8ab9f450",
24
+ "disable_fallback": false,
25
+ "disable_fast_relayout": false,
26
+ "dynamic_batch_size": false,
27
+ "inline_weights_to_neff": true,
28
+ "input_names": [
29
+ "input_ids",
30
+ "attention_mask"
31
+ ],
32
+ "model_type": "roberta",
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
+ "task": "fill-mask",
42
+ "tensor_parallel_size": 1
43
+ },
44
+ "num_attention_heads": 12,
45
+ "num_hidden_layers": 12,
46
+ "pad_token_id": 1,
47
+ "position_embedding_type": "absolute",
48
+ "torch_dtype": "float32",
49
+ "torchscript": true,
50
+ "transformers_version": "4.51.3",
51
+ "type_vocab_size": 1,
52
+ "use_cache": true,
53
+ "vocab_size": 52000
54
+ }
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
model.neuron ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:befa992c20aa617f0328c69151abc0f6f3727d463e4346923933eb3468fbf00d
3
+ size 619524410
special_tokens_map.json ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": true,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "cls_token": {
10
+ "content": "<s>",
11
+ "lstrip": false,
12
+ "normalized": true,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "eos_token": {
17
+ "content": "</s>",
18
+ "lstrip": false,
19
+ "normalized": true,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "mask_token": {
24
+ "content": "<mask>",
25
+ "lstrip": true,
26
+ "normalized": true,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ },
30
+ "pad_token": {
31
+ "content": "<pad>",
32
+ "lstrip": false,
33
+ "normalized": true,
34
+ "rstrip": false,
35
+ "single_word": false
36
+ },
37
+ "sep_token": {
38
+ "content": "</s>",
39
+ "lstrip": false,
40
+ "normalized": true,
41
+ "rstrip": false,
42
+ "single_word": false
43
+ },
44
+ "unk_token": {
45
+ "content": "<unk>",
46
+ "lstrip": false,
47
+ "normalized": true,
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,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "added_tokens_decoder": {
4
+ "0": {
5
+ "content": "<s>",
6
+ "lstrip": false,
7
+ "normalized": true,
8
+ "rstrip": false,
9
+ "single_word": false,
10
+ "special": true
11
+ },
12
+ "1": {
13
+ "content": "<pad>",
14
+ "lstrip": false,
15
+ "normalized": true,
16
+ "rstrip": false,
17
+ "single_word": false,
18
+ "special": true
19
+ },
20
+ "2": {
21
+ "content": "</s>",
22
+ "lstrip": false,
23
+ "normalized": true,
24
+ "rstrip": false,
25
+ "single_word": false,
26
+ "special": true
27
+ },
28
+ "3": {
29
+ "content": "<unk>",
30
+ "lstrip": false,
31
+ "normalized": true,
32
+ "rstrip": false,
33
+ "single_word": false,
34
+ "special": true
35
+ },
36
+ "4": {
37
+ "content": "<mask>",
38
+ "lstrip": true,
39
+ "normalized": true,
40
+ "rstrip": false,
41
+ "single_word": false,
42
+ "special": true
43
+ }
44
+ },
45
+ "bos_token": "<s>",
46
+ "clean_up_tokenization_spaces": false,
47
+ "cls_token": "<s>",
48
+ "eos_token": "</s>",
49
+ "errors": "replace",
50
+ "extra_special_tokens": {},
51
+ "full_tokenizer_file": null,
52
+ "mask_token": "<mask>",
53
+ "model_max_length": 1000000000000000019884624838656,
54
+ "pad_token": "<pad>",
55
+ "sep_token": "</s>",
56
+ "tokenizer_class": "RobertaTokenizer",
57
+ "trim_offsets": true,
58
+ "unk_token": "<unk>"
59
+ }
vocab.json ADDED
The diff for this file is too large to render. See raw diff