Add Neuron-optimized files for almanach/camembert-base
Browse files🤖 Neuron Export Bot: Adding AWS Neuron-optimized model files.
Original model: [almanach/camembert-base](https://huggingface.co/almanach/camembert-base)
Task: fill-mask
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 +1 -0
- README.md +38 -0
- added_tokens.json +3 -0
- config.json +54 -0
- model.neuron +3 -0
- sentencepiece.bpe.model +3 -0
- special_tokens_map.json +56 -0
- tokenizer.json +0 -0
- tokenizer_config.json +84 -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 |
+
- fill-mask
|
| 7 |
+
base_model: almanach/camembert-base
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
+
# Neuron-Optimized almanach/camembert-base
|
| 11 |
+
|
| 12 |
+
This repository contains AWS Neuron-optimized files for [almanach/camembert-base](https://huggingface.co/almanach/camembert-base).
|
| 13 |
+
|
| 14 |
+
## Model Details
|
| 15 |
+
|
| 16 |
+
- **Base Model**: [almanach/camembert-base](https://huggingface.co/almanach/camembert-base)
|
| 17 |
+
- **Task**: fill-mask
|
| 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 NeuronModelForMaskedLM
|
| 28 |
+
|
| 29 |
+
model = NeuronModelForMaskedLM.from_pretrained("badaoui/almanach-camembert-base-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: [almanach/camembert-base](https://huggingface.co/almanach/camembert-base)
|
added_tokens.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"<unk>NOTUSED": 32005
|
| 3 |
+
}
|
config.json
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_attn_implementation_autoset": true,
|
| 3 |
+
"architectures": [
|
| 4 |
+
"CamembertForMaskedLM"
|
| 5 |
+
],
|
| 6 |
+
"attention_probs_dropout_prob": 0.1,
|
| 7 |
+
"bos_token_id": 5,
|
| 8 |
+
"classifier_dropout": null,
|
| 9 |
+
"eos_token_id": 6,
|
| 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": "camembert",
|
| 18 |
+
"neuron": {
|
| 19 |
+
"auto_cast": null,
|
| 20 |
+
"auto_cast_type": null,
|
| 21 |
+
"compiler_type": "neuronx-cc",
|
| 22 |
+
"compiler_version": "2.19.8089.0+8ab9f450",
|
| 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": "camembert",
|
| 32 |
+
"optlevel": "2",
|
| 33 |
+
"output_attentions": false,
|
| 34 |
+
"output_hidden_states": false,
|
| 35 |
+
"output_names": [
|
| 36 |
+
"logits"
|
| 37 |
+
],
|
| 38 |
+
"static_batch_size": 1,
|
| 39 |
+
"static_sequence_length": 128,
|
| 40 |
+
"task": "fill-mask",
|
| 41 |
+
"tensor_parallel_size": 1
|
| 42 |
+
},
|
| 43 |
+
"num_attention_heads": 12,
|
| 44 |
+
"num_hidden_layers": 12,
|
| 45 |
+
"output_past": true,
|
| 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": 32005
|
| 54 |
+
}
|
model.neuron
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ee3423642da692f11edf14caec861343785311a714c3d44ad9344b90f15bcf43
|
| 3 |
+
size 341540144
|
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,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"additional_special_tokens": [
|
| 3 |
+
"<s>NOTUSED",
|
| 4 |
+
"</s>NOTUSED",
|
| 5 |
+
"<unk>NOTUSED"
|
| 6 |
+
],
|
| 7 |
+
"bos_token": {
|
| 8 |
+
"content": "<s>",
|
| 9 |
+
"lstrip": false,
|
| 10 |
+
"normalized": false,
|
| 11 |
+
"rstrip": false,
|
| 12 |
+
"single_word": false
|
| 13 |
+
},
|
| 14 |
+
"cls_token": {
|
| 15 |
+
"content": "<s>",
|
| 16 |
+
"lstrip": false,
|
| 17 |
+
"normalized": false,
|
| 18 |
+
"rstrip": false,
|
| 19 |
+
"single_word": false
|
| 20 |
+
},
|
| 21 |
+
"eos_token": {
|
| 22 |
+
"content": "</s>",
|
| 23 |
+
"lstrip": false,
|
| 24 |
+
"normalized": false,
|
| 25 |
+
"rstrip": false,
|
| 26 |
+
"single_word": false
|
| 27 |
+
},
|
| 28 |
+
"mask_token": {
|
| 29 |
+
"content": "<mask>",
|
| 30 |
+
"lstrip": true,
|
| 31 |
+
"normalized": false,
|
| 32 |
+
"rstrip": false,
|
| 33 |
+
"single_word": false
|
| 34 |
+
},
|
| 35 |
+
"pad_token": {
|
| 36 |
+
"content": "<pad>",
|
| 37 |
+
"lstrip": false,
|
| 38 |
+
"normalized": false,
|
| 39 |
+
"rstrip": false,
|
| 40 |
+
"single_word": false
|
| 41 |
+
},
|
| 42 |
+
"sep_token": {
|
| 43 |
+
"content": "</s>",
|
| 44 |
+
"lstrip": false,
|
| 45 |
+
"normalized": false,
|
| 46 |
+
"rstrip": false,
|
| 47 |
+
"single_word": false
|
| 48 |
+
},
|
| 49 |
+
"unk_token": {
|
| 50 |
+
"content": "<unk>",
|
| 51 |
+
"lstrip": false,
|
| 52 |
+
"normalized": false,
|
| 53 |
+
"rstrip": false,
|
| 54 |
+
"single_word": false
|
| 55 |
+
}
|
| 56 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
"4": {
|
| 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 |
+
"32005": {
|
| 60 |
+
"content": "<unk>NOTUSED",
|
| 61 |
+
"lstrip": false,
|
| 62 |
+
"normalized": false,
|
| 63 |
+
"rstrip": false,
|
| 64 |
+
"single_word": false,
|
| 65 |
+
"special": true
|
| 66 |
+
}
|
| 67 |
+
},
|
| 68 |
+
"additional_special_tokens": [
|
| 69 |
+
"<s>NOTUSED",
|
| 70 |
+
"</s>NOTUSED",
|
| 71 |
+
"<unk>NOTUSED"
|
| 72 |
+
],
|
| 73 |
+
"bos_token": "<s>",
|
| 74 |
+
"clean_up_tokenization_spaces": false,
|
| 75 |
+
"cls_token": "<s>",
|
| 76 |
+
"eos_token": "</s>",
|
| 77 |
+
"extra_special_tokens": {},
|
| 78 |
+
"mask_token": "<mask>",
|
| 79 |
+
"model_max_length": 512,
|
| 80 |
+
"pad_token": "<pad>",
|
| 81 |
+
"sep_token": "</s>",
|
| 82 |
+
"tokenizer_class": "CamembertTokenizer",
|
| 83 |
+
"unk_token": "<unk>"
|
| 84 |
+
}
|