michaelfeil commited on
Commit
c38c2d1
1 Parent(s): af02daa

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

Browse files
README.md CHANGED
@@ -28,7 +28,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-hf](https://huggingface.co/meta-llama/Llama-2-7b-hf)
30
  ```bash
31
- pip install hf-hub-ctranslate2>=2.12.0 ctranslate2>=3.16.0
32
  ```
33
 
34
  ```python
@@ -52,12 +52,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 +100,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
 
 
28
 
29
  quantized version of [meta-llama/Llama-2-7b-hf](https://huggingface.co/meta-llama/Llama-2-7b-hf)
30
  ```bash
31
+ pip install hf-hub-ctranslate2>=2.12.0 ctranslate2>=3.17.1
32
  ```
33
 
34
  ```python
 
52
  print(outputs)
53
  ```
54
 
55
+ Checkpoint compatible to [ctranslate2>=3.17.1](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-21 using
61
  ```
62
  LLama-2 -> removed <pad> token.
63
  ```
 
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
+ **Research Paper** ["Llama-2: Open Foundation and Fine-tuned Chat Models"](arxiv.org/abs/2307.09288)
104
+
105
  ## Intended Use
106
  **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.
107
 
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,
@@ -24,6 +26,6 @@
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-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,
 
26
  "vocab_size": 32000,
27
  "bos_token": "<s>",
28
  "eos_token": "</s>",
29
+ "layer_norm_epsilon": 1e-05,
30
  "unk_token": "<unk>"
31
  }
generation_config.json CHANGED
@@ -2,7 +2,7 @@
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"
 
2
  "_from_model_config": true,
3
  "bos_token_id": 1,
4
  "eos_token_id": 2,
5
+ "pad_token_id": 0,
6
  "temperature": 0.9,
7
  "top_p": 0.6,
8
  "transformers_version": "4.31.0.dev0"
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,7 +27,7 @@
27
  "__type": "AddedToken",
28
  "content": "<unk>",
29
  "lstrip": false,
30
- "normalized": true,
31
  "rstrip": false,
32
  "single_word": false
33
  }
 
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
  }