badaoui HF Staff commited on
Commit
036a025
·
verified ·
1 Parent(s): 335ddca

Add Neuron-optimized files for Jean-Baptiste/camembert-ner

Browse files

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

Original model: [Jean-Baptiste/camembert-ner](https://huggingface.co/Jean-Baptiste/camembert-ner)
Task: token-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.

.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
+ - token-classification
7
+ base_model: Jean-Baptiste/camembert-ner
8
+ ---
9
+
10
+ # Neuron-Optimized Jean-Baptiste/camembert-ner
11
+
12
+ This repository contains AWS Neuron-optimized files for [Jean-Baptiste/camembert-ner](https://huggingface.co/Jean-Baptiste/camembert-ner).
13
+
14
+ ## Model Details
15
+
16
+ - **Base Model**: [Jean-Baptiste/camembert-ner](https://huggingface.co/Jean-Baptiste/camembert-ner)
17
+ - **Task**: token-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 NeuronModelForTokenClassification
28
+
29
+ model = NeuronModelForTokenClassification.from_pretrained("badaoui/Jean-Baptiste-camembert-ner-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: [Jean-Baptiste/camembert-ner](https://huggingface.co/Jean-Baptiste/camembert-ner)
config.json ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "CamembertForTokenClassification"
4
+ ],
5
+ "attention_probs_dropout_prob": 0.1,
6
+ "bos_token_id": 5,
7
+ "classifier_dropout": null,
8
+ "eos_token_id": 6,
9
+ "gradient_checkpointing": false,
10
+ "hidden_act": "gelu",
11
+ "hidden_dropout_prob": 0.1,
12
+ "hidden_size": 768,
13
+ "id2label": {
14
+ "0": "O",
15
+ "1": "I-LOC",
16
+ "2": "I-PER",
17
+ "3": "I-MISC",
18
+ "4": "I-ORG"
19
+ },
20
+ "initializer_range": 0.02,
21
+ "intermediate_size": 3072,
22
+ "label2id": {
23
+ "I-LOC": 1,
24
+ "I-MISC": 3,
25
+ "I-ORG": 4,
26
+ "I-PER": 2,
27
+ "O": 0
28
+ },
29
+ "layer_norm_eps": 1e-05,
30
+ "max_position_embeddings": 514,
31
+ "model_type": "camembert",
32
+ "neuron": {
33
+ "compiler_type": "neuronx-cc",
34
+ "compiler_version": "2.21.18209.0+043b1bf7",
35
+ "dynamic_batch_size": false,
36
+ "float_dtype": "fp32",
37
+ "inline_weights_to_neff": true,
38
+ "int_dtype": "int64",
39
+ "model_type": "camembert",
40
+ "optlevel": "2",
41
+ "output_attentions": false,
42
+ "output_hidden_states": false,
43
+ "static_batch_size": 1,
44
+ "static_sequence_length": 128,
45
+ "task": "token-classification",
46
+ "tensor_parallel_size": 1
47
+ },
48
+ "num_attention_heads": 12,
49
+ "num_hidden_layers": 12,
50
+ "output_past": true,
51
+ "pad_token_id": 1,
52
+ "position_embedding_type": "absolute",
53
+ "torch_dtype": "float32",
54
+ "torchscript": true,
55
+ "transformers_version": "4.55.4",
56
+ "type_vocab_size": 1,
57
+ "use_cache": true,
58
+ "vocab_size": 32005
59
+ }
model.neuron ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a011514eaa20a8bab2d1b6508fdaef2dc364cdf2fa2b6e19f5926eda6fc0f2f7
3
+ size 410345146
sentencepiece.bpe.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:988bc5a00281c6d210a5d34bd143d0363741a432fefe741bf71e61b1869d4314
3
+ size 810912
special_tokens_map.json ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<s>NOTUSED",
4
+ "</s>NOTUSED"
5
+ ],
6
+ "bos_token": "<s>",
7
+ "cls_token": "<s>",
8
+ "eos_token": "</s>",
9
+ "mask_token": {
10
+ "content": "<mask>",
11
+ "lstrip": true,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": "<pad>",
17
+ "sep_token": "</s>",
18
+ "unk_token": "<unk>"
19
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "<s>NOTUSED",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "1": {
12
+ "content": "<pad>",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "2": {
20
+ "content": "</s>NOTUSED",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "3": {
28
+ "content": "<unk>",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "5": {
36
+ "content": "<s>",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ },
43
+ "6": {
44
+ "content": "</s>",
45
+ "lstrip": false,
46
+ "normalized": false,
47
+ "rstrip": false,
48
+ "single_word": false,
49
+ "special": true
50
+ },
51
+ "32004": {
52
+ "content": "<mask>",
53
+ "lstrip": true,
54
+ "normalized": false,
55
+ "rstrip": false,
56
+ "single_word": false,
57
+ "special": true
58
+ }
59
+ },
60
+ "additional_special_tokens": [
61
+ "<s>NOTUSED",
62
+ "</s>NOTUSED"
63
+ ],
64
+ "bos_token": "<s>",
65
+ "clean_up_tokenization_spaces": false,
66
+ "cls_token": "<s>",
67
+ "eos_token": "</s>",
68
+ "extra_special_tokens": {},
69
+ "mask_token": "<mask>",
70
+ "model_max_length": 512,
71
+ "pad_token": "<pad>",
72
+ "sep_token": "</s>",
73
+ "sp_model_kwargs": {},
74
+ "tokenizer_class": "CamembertTokenizer",
75
+ "unk_token": "<unk>"
76
+ }