michaelfeil commited on
Commit
5129c67
1 Parent(s): d0f986d

Upload meta-llama/Llama-2-7b-chat-hf ctranslate fp16 weights

Browse files
README.md CHANGED
@@ -13,6 +13,7 @@ language:
13
  - en
14
  pipeline_tag: text-generation
15
  inference: false
 
16
  tags:
17
  - ctranslate2
18
  - int8
@@ -28,7 +29,7 @@ Speedup inference while reducing memory by 2x-4x using int8 inference in C++ on
28
 
29
  quantized version of [meta-llama/Llama-2-7b-chat-hf](https://huggingface.co/meta-llama/Llama-2-7b-chat-hf)
30
  ```bash
31
- pip install hf-hub-ctranslate2>=2.12.0 ctranslate2>=3.16.0
32
  ```
33
 
34
  ```python
@@ -52,12 +53,12 @@ outputs = model.generate(
52
  print(outputs)
53
  ```
54
 
55
- Checkpoint compatible to [ctranslate2>=3.16.0](https://github.com/OpenNMT/CTranslate2)
56
  and [hf-hub-ctranslate2>=2.12.0](https://github.com/michaelfeil/hf-hub-ctranslate2)
57
  - `compute_type=int8_float16` for `device="cuda"`
58
  - `compute_type=int8` for `device="cpu"`
59
 
60
- Converted on 2023-07-19 using
61
  ```
62
  LLama-2 -> removed <pad> token.
63
  ```
@@ -100,6 +101,8 @@ Meta developed and publicly released the Llama 2 family of large language models
100
 
101
  **License** A custom commercial license is available at: [https://ai.meta.com/resources/models-and-libraries/llama-downloads/](https://ai.meta.com/resources/models-and-libraries/llama-downloads/)
102
 
 
 
103
  ## Intended Use
104
  **Intended Use Cases** Llama 2 is intended for commercial and research use in English. Tuned models are intended for assistant-like chat, whereas pretrained models can be adapted for a variety of natural language generation tasks.
105
 
 
13
  - en
14
  pipeline_tag: text-generation
15
  inference: false
16
+ arxiv: 2307.09288
17
  tags:
18
  - ctranslate2
19
  - int8
 
29
 
30
  quantized version of [meta-llama/Llama-2-7b-chat-hf](https://huggingface.co/meta-llama/Llama-2-7b-chat-hf)
31
  ```bash
32
+ pip install hf-hub-ctranslate2>=2.12.0 ctranslate2>=3.17.1
33
  ```
34
 
35
  ```python
 
53
  print(outputs)
54
  ```
55
 
56
+ Checkpoint compatible to [ctranslate2>=3.17.1](https://github.com/OpenNMT/CTranslate2)
57
  and [hf-hub-ctranslate2>=2.12.0](https://github.com/michaelfeil/hf-hub-ctranslate2)
58
  - `compute_type=int8_float16` for `device="cuda"`
59
  - `compute_type=int8` for `device="cpu"`
60
 
61
+ Converted on 2023-07-21 using
62
  ```
63
  LLama-2 -> removed <pad> token.
64
  ```
 
101
 
102
  **License** A custom commercial license is available at: [https://ai.meta.com/resources/models-and-libraries/llama-downloads/](https://ai.meta.com/resources/models-and-libraries/llama-downloads/)
103
 
104
+ **Research Paper** ["Llama-2: Open Foundation and Fine-tuned Chat Models"](arxiv.org/abs/2307.09288)
105
+
106
  ## Intended Use
107
  **Intended Use Cases** Llama 2 is intended for commercial and research use in English. Tuned models are intended for assistant-like chat, whereas pretrained models can be adapted for a variety of natural language generation tasks.
108
 
config.json CHANGED
@@ -1,4 +1,5 @@
1
  {
 
2
  "architectures": [
3
  "LlamaForCausalLM"
4
  ],
@@ -8,6 +9,7 @@
8
  "hidden_size": 4096,
9
  "initializer_range": 0.02,
10
  "intermediate_size": 11008,
 
11
  "max_position_embeddings": 2048,
12
  "model_type": "llama",
13
  "num_attention_heads": 32,
@@ -15,15 +17,15 @@
15
  "num_key_value_heads": 32,
16
  "pad_token_id": 0,
17
  "pretraining_tp": 1,
18
- "rms_norm_eps": 1e-05,
19
  "rope_scaling": null,
20
  "tie_word_embeddings": false,
21
  "torch_dtype": "float16",
22
- "transformers_version": "4.31.0.dev0",
23
  "use_cache": true,
24
  "vocab_size": 32000,
25
  "bos_token": "<s>",
26
  "eos_token": "</s>",
27
- "layer_norm_epsilon": null,
28
  "unk_token": "<unk>"
29
  }
 
1
  {
2
+ "_name_or_path": "meta-llama/Llama-2-7b-chat-hf",
3
  "architectures": [
4
  "LlamaForCausalLM"
5
  ],
 
9
  "hidden_size": 4096,
10
  "initializer_range": 0.02,
11
  "intermediate_size": 11008,
12
+ "max_length": 4096,
13
  "max_position_embeddings": 2048,
14
  "model_type": "llama",
15
  "num_attention_heads": 32,
 
17
  "num_key_value_heads": 32,
18
  "pad_token_id": 0,
19
  "pretraining_tp": 1,
20
+ "rms_norm_eps": 1e-06,
21
  "rope_scaling": null,
22
  "tie_word_embeddings": false,
23
  "torch_dtype": "float16",
24
+ "transformers_version": "4.32.0.dev0",
25
  "use_cache": true,
26
  "vocab_size": 32000,
27
  "bos_token": "<s>",
28
  "eos_token": "</s>",
29
+ "layer_norm_epsilon": 1e-06,
30
  "unk_token": "<unk>"
31
  }
generation_config.json CHANGED
@@ -2,8 +2,9 @@
2
  "_from_model_config": true,
3
  "bos_token_id": 1,
4
  "eos_token_id": 2,
5
- "pad_token_id": 32000,
 
6
  "temperature": 0.9,
7
  "top_p": 0.6,
8
- "transformers_version": "4.31.0.dev0"
9
  }
 
2
  "_from_model_config": true,
3
  "bos_token_id": 1,
4
  "eos_token_id": 2,
5
+ "max_length": 4096,
6
+ "pad_token_id": 0,
7
  "temperature": 0.9,
8
  "top_p": 0.6,
9
+ "transformers_version": "4.32.0.dev0"
10
  }
special_tokens_map.json CHANGED
@@ -2,22 +2,21 @@
2
  "bos_token": {
3
  "content": "<s>",
4
  "lstrip": false,
5
- "normalized": true,
6
  "rstrip": false,
7
  "single_word": false
8
  },
9
  "eos_token": {
10
  "content": "</s>",
11
  "lstrip": false,
12
- "normalized": true,
13
  "rstrip": false,
14
  "single_word": false
15
  },
16
- "pad_token": "<unk>",
17
  "unk_token": {
18
  "content": "<unk>",
19
  "lstrip": false,
20
- "normalized": true,
21
  "rstrip": false,
22
  "single_word": false
23
  }
 
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
  "unk_token": {
17
  "content": "<unk>",
18
  "lstrip": false,
19
+ "normalized": false,
20
  "rstrip": false,
21
  "single_word": false
22
  }
tokenizer.json CHANGED
@@ -9,7 +9,7 @@
9
  "single_word": false,
10
  "lstrip": false,
11
  "rstrip": false,
12
- "normalized": true,
13
  "special": true
14
  },
15
  {
@@ -18,7 +18,7 @@
18
  "single_word": false,
19
  "lstrip": false,
20
  "rstrip": false,
21
- "normalized": true,
22
  "special": true
23
  },
24
  {
@@ -27,7 +27,7 @@
27
  "single_word": false,
28
  "lstrip": false,
29
  "rstrip": false,
30
- "normalized": true,
31
  "special": true
32
  }
33
  ],
 
9
  "single_word": false,
10
  "lstrip": false,
11
  "rstrip": false,
12
+ "normalized": false,
13
  "special": true
14
  },
15
  {
 
18
  "single_word": false,
19
  "lstrip": false,
20
  "rstrip": false,
21
+ "normalized": false,
22
  "special": true
23
  },
24
  {
 
27
  "single_word": false,
28
  "lstrip": false,
29
  "rstrip": false,
30
+ "normalized": false,
31
  "special": true
32
  }
33
  ],
tokenizer_config.json CHANGED
@@ -5,7 +5,7 @@
5
  "__type": "AddedToken",
6
  "content": "<s>",
7
  "lstrip": false,
8
- "normalized": true,
9
  "rstrip": false,
10
  "single_word": false
11
  },
@@ -14,7 +14,7 @@
14
  "__type": "AddedToken",
15
  "content": "</s>",
16
  "lstrip": false,
17
- "normalized": true,
18
  "rstrip": false,
19
  "single_word": false
20
  },
@@ -27,8 +27,9 @@
27
  "__type": "AddedToken",
28
  "content": "<unk>",
29
  "lstrip": false,
30
- "normalized": true,
31
  "rstrip": false,
32
  "single_word": false
33
- }
 
34
  }
 
5
  "__type": "AddedToken",
6
  "content": "<s>",
7
  "lstrip": false,
8
+ "normalized": false,
9
  "rstrip": false,
10
  "single_word": false
11
  },
 
14
  "__type": "AddedToken",
15
  "content": "</s>",
16
  "lstrip": false,
17
+ "normalized": false,
18
  "rstrip": false,
19
  "single_word": false
20
  },
 
27
  "__type": "AddedToken",
28
  "content": "<unk>",
29
  "lstrip": false,
30
+ "normalized": false,
31
  "rstrip": false,
32
  "single_word": false
33
+ },
34
+ "use_fast": false
35
  }