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 +1 -0
- README.md +1 -0
- neuron/config.json +51 -0
- neuron/model.neuron +3 -0
- neuron/special_tokens_map.json +51 -0
- neuron/tokenizer.json +0 -0
- neuron/tokenizer_config.json +73 -0
- neuron/vocab.txt +0 -0
.gitattributes
CHANGED
|
@@ -26,3 +26,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 26 |
*.zstandard filter=lfs diff=lfs merge=lfs -text
|
| 27 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
model.safetensors filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 26 |
*.zstandard filter=lfs diff=lfs merge=lfs -text
|
| 27 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
model.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 29 |
+
neuron/model.neuron filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
|
@@ -7,6 +7,7 @@ tags:
|
|
| 7 |
- feature-extraction
|
| 8 |
- sentence-similarity
|
| 9 |
- transformers
|
|
|
|
| 10 |
datasets:
|
| 11 |
- s2orc
|
| 12 |
- flax-sentence-embeddings/stackexchange_xml
|
|
|
|
| 7 |
- feature-extraction
|
| 8 |
- sentence-similarity
|
| 9 |
- transformers
|
| 10 |
+
- neuron
|
| 11 |
datasets:
|
| 12 |
- s2orc
|
| 13 |
- flax-sentence-embeddings/stackexchange_xml
|
neuron/config.json
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_attn_implementation_autoset": true,
|
| 3 |
+
"_name_or_path": "/tmp/tmpdemcaf9_",
|
| 4 |
+
"architectures": [
|
| 5 |
+
"MPNetForMaskedLM"
|
| 6 |
+
],
|
| 7 |
+
"attention_probs_dropout_prob": 0.1,
|
| 8 |
+
"bos_token_id": 0,
|
| 9 |
+
"eos_token_id": 2,
|
| 10 |
+
"hidden_act": "gelu",
|
| 11 |
+
"hidden_dropout_prob": 0.1,
|
| 12 |
+
"hidden_size": 768,
|
| 13 |
+
"initializer_range": 0.02,
|
| 14 |
+
"intermediate_size": 3072,
|
| 15 |
+
"layer_norm_eps": 1e-05,
|
| 16 |
+
"max_position_embeddings": 514,
|
| 17 |
+
"model_type": "mpnet",
|
| 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 |
+
],
|
| 31 |
+
"model_type": "mpnet",
|
| 32 |
+
"optlevel": "2",
|
| 33 |
+
"output_attentions": false,
|
| 34 |
+
"output_hidden_states": false,
|
| 35 |
+
"output_names": [
|
| 36 |
+
"last_hidden_state",
|
| 37 |
+
"pooler_output"
|
| 38 |
+
],
|
| 39 |
+
"static_batch_size": 1,
|
| 40 |
+
"static_sequence_length": 128,
|
| 41 |
+
"tensor_parallel_size": 1
|
| 42 |
+
},
|
| 43 |
+
"num_attention_heads": 12,
|
| 44 |
+
"num_hidden_layers": 12,
|
| 45 |
+
"pad_token_id": 1,
|
| 46 |
+
"relative_attention_num_buckets": 32,
|
| 47 |
+
"task": "feature-extraction",
|
| 48 |
+
"torchscript": true,
|
| 49 |
+
"transformers_version": "4.48.3",
|
| 50 |
+
"vocab_size": 30527
|
| 51 |
+
}
|
neuron/model.neuron
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6bb406d6fb6f0c596e7984a55e413f4eecf71b9ff9fef26f60ebab11f3df2d2c
|
| 3 |
+
size 484665146
|
neuron/special_tokens_map.json
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token": {
|
| 3 |
+
"content": "<s>",
|
| 4 |
+
"lstrip": false,
|
| 5 |
+
"normalized": false,
|
| 6 |
+
"rstrip": false,
|
| 7 |
+
"single_word": false
|
| 8 |
+
},
|
| 9 |
+
"cls_token": {
|
| 10 |
+
"content": "<s>",
|
| 11 |
+
"lstrip": false,
|
| 12 |
+
"normalized": false,
|
| 13 |
+
"rstrip": false,
|
| 14 |
+
"single_word": false
|
| 15 |
+
},
|
| 16 |
+
"eos_token": {
|
| 17 |
+
"content": "</s>",
|
| 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": "</s>",
|
| 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 |
+
}
|
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,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"added_tokens_decoder": {
|
| 3 |
+
"0": {
|
| 4 |
+
"content": "<s>",
|
| 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>",
|
| 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": true,
|
| 31 |
+
"rstrip": false,
|
| 32 |
+
"single_word": false,
|
| 33 |
+
"special": true
|
| 34 |
+
},
|
| 35 |
+
"104": {
|
| 36 |
+
"content": "[UNK]",
|
| 37 |
+
"lstrip": false,
|
| 38 |
+
"normalized": false,
|
| 39 |
+
"rstrip": false,
|
| 40 |
+
"single_word": false,
|
| 41 |
+
"special": true
|
| 42 |
+
},
|
| 43 |
+
"30526": {
|
| 44 |
+
"content": "<mask>",
|
| 45 |
+
"lstrip": true,
|
| 46 |
+
"normalized": false,
|
| 47 |
+
"rstrip": false,
|
| 48 |
+
"single_word": false,
|
| 49 |
+
"special": true
|
| 50 |
+
}
|
| 51 |
+
},
|
| 52 |
+
"bos_token": "<s>",
|
| 53 |
+
"clean_up_tokenization_spaces": false,
|
| 54 |
+
"cls_token": "<s>",
|
| 55 |
+
"do_lower_case": true,
|
| 56 |
+
"eos_token": "</s>",
|
| 57 |
+
"extra_special_tokens": {},
|
| 58 |
+
"mask_token": "<mask>",
|
| 59 |
+
"max_length": 128,
|
| 60 |
+
"model_max_length": 512,
|
| 61 |
+
"pad_to_multiple_of": null,
|
| 62 |
+
"pad_token": "<pad>",
|
| 63 |
+
"pad_token_type_id": 0,
|
| 64 |
+
"padding_side": "right",
|
| 65 |
+
"sep_token": "</s>",
|
| 66 |
+
"stride": 0,
|
| 67 |
+
"strip_accents": null,
|
| 68 |
+
"tokenize_chinese_chars": true,
|
| 69 |
+
"tokenizer_class": "MPNetTokenizer",
|
| 70 |
+
"truncation_side": "right",
|
| 71 |
+
"truncation_strategy": "longest_first",
|
| 72 |
+
"unk_token": "[UNK]"
|
| 73 |
+
}
|
neuron/vocab.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|