Text Generation
Transformers
ONNX
llama
sparse
chat
deepsparse
conversational
mgoin commited on
Commit
4f40d3b
1 Parent(s): c8d0346

Upload folder using huggingface_hub

Browse files
.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.data filter=lfs diff=lfs merge=lfs -text
config.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "LlamaForCausalLM"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": 1,
8
+ "eos_token_id": 2,
9
+ "hidden_act": "silu",
10
+ "hidden_size": 4096,
11
+ "initializer_range": 0.02,
12
+ "intermediate_size": 11008,
13
+ "max_position_embeddings": 4096,
14
+ "model_type": "llama",
15
+ "num_attention_heads": 32,
16
+ "num_hidden_layers": 32,
17
+ "num_key_value_heads": 32,
18
+ "pretraining_tp": 1,
19
+ "rms_norm_eps": 1e-05,
20
+ "rope_scaling": null,
21
+ "rope_theta": 10000.0,
22
+ "tie_word_embeddings": false,
23
+ "tokenizer_class": "LlamaTokenizerFast",
24
+ "torch_dtype": "float32",
25
+ "transformers_version": "1.7.0.20240312",
26
+ "use_cache": true,
27
+ "vocab_size": 32000
28
+ }
model-orig.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:15deac35bb5596eb7c92735bce8fbabbb079700713c9cfc491a952de6298714d
3
+ size 1155608
model.data ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a0863dec1fa3e9ed00db5c91362e49c6bcc3b11b16f331b6e03df03264982cdd
3
+ size 7440968704
model.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:342a2d20f92381ea3492b254c5993429b68f5c9ee7872f23d03774067de845dd
3
+ size 1140553
recipe.yaml ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ test_stage:
2
+ obcq_modifiers:
3
+ SmoothQuantModifier:
4
+ smoothing_strength: 0.7
5
+ mappings:
6
+ - - ['re:.*q_proj', 're:.*k_proj', 're:.*v_proj']
7
+ - re:.*input_layernorm
8
+ - - ['re:.*gate_proj', 're:.*up_proj']
9
+ - re:.*post_attention_layernorm
10
+ - - ['re:.*down_proj']
11
+ - re:.*up_proj
12
+ QuantizationModifier:
13
+ ignore: [LlamaRotaryEmbedding, LlamaRMSNorm, SiLUActivation, model.layers.0.self_attn.q_proj,
14
+ model.layers.0.self_attn.k_proj, model.layers.0.self_attn.v_proj, model.layers.1.mlp.down_proj,
15
+ model.layers.30.mlp.down_proj, model.layers.0.mlp.down_proj, model.layers.4.mlp.down_proj,
16
+ MatMulOutput_QK, MatMulOutput_PV]
17
+ post_oneshot_calibration: true
18
+ scheme_overrides:
19
+ Linear:
20
+ weights: {num_bits: 8, symmetric: true, strategy: channel}
21
+ MatMulLeftInput_QK:
22
+ input_activations: {num_bits: 8, symmetric: true}
23
+ Embedding:
24
+ input_activations: null
25
+ weights: {num_bits: 8, symmetric: false}
26
+ SparseGPTModifier:
27
+ sparsity: 0.0
28
+ block_size: 128
29
+ sequential_update: false
30
+ quantize: true
31
+ percdamp: 0.01
32
+ prunen: 0
33
+ prunem: 0
34
+ targets: [model.layers.0, model.layers.1, model.layers.2, model.layers.3, model.layers.4,
35
+ model.layers.5, model.layers.6, model.layers.7, model.layers.8, model.layers.9, model.layers.10,
36
+ model.layers.11, model.layers.12, model.layers.13, model.layers.14, model.layers.15,
37
+ model.layers.16, model.layers.17, model.layers.18, model.layers.19, model.layers.20,
38
+ model.layers.21, model.layers.22, model.layers.23, model.layers.24, model.layers.25,
39
+ model.layers.26, model.layers.27, model.layers.28, model.layers.29, model.layers.30,
40
+ model.layers.31, lm_head]
special_tokens_map.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "eos_token": {
10
+ "content": "</s>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": "</s>",
17
+ "unk_token": {
18
+ "content": "<unk>",
19
+ "lstrip": false,
20
+ "normalized": false,
21
+ "rstrip": false,
22
+ "single_word": false
23
+ }
24
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347
3
+ size 499723
tokenizer_config.json ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "<unk>",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "1": {
12
+ "content": "<s>",
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
+ },
28
+ "bos_token": "<s>",
29
+ "chat_template": "{% for message in messages %}\n{% if message['role'] == 'user' %}\n{{ '<|user|>\n' + message['content'] + eos_token }}\n{% elif message['role'] == 'system' %}\n{{ '<|system|>\n' + message['content'] + eos_token }}\n{% elif message['role'] == 'assistant' %}\n{{ '<|assistant|>\n' + message['content'] + eos_token }}\n{% endif %}\n{% if loop.last and add_generation_prompt %}\n{{ '<|assistant|>' }}\n{% endif %}\n{% endfor %}",
30
+ "clean_up_tokenization_spaces": false,
31
+ "eos_token": "</s>",
32
+ "legacy": false,
33
+ "model_max_length": 1000000000000000019884624838656,
34
+ "pad_token": "</s>",
35
+ "padding_side": "right",
36
+ "sp_model_kwargs": {},
37
+ "tokenizer_class": "LlamaTokenizer",
38
+ "unk_token": "<unk>",
39
+ "use_default_system_prompt": false
40
+ }