MaziyarPanahi
commited on
Commit
•
10e66bb
1
Parent(s):
e9fb918
Upload folder using huggingface_hub (#4)
Browse files- d077d91bda27407fa9ef94e6cf0a088ea145e7a826fd68c4c8e329703a16d4e9 (3899f837fd8413b982cf0acba472c27e2147f589)
- README.md +57 -0
- config.json +41 -0
- generation_config.json +7 -0
- model.safetensors.index.json +0 -0
- special_tokens_map.json +30 -0
- tokenizer.json +0 -0
- tokenizer.model +3 -0
- tokenizer_config.json +44 -0
README.md
ADDED
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
tags:
|
3 |
+
- finetuned
|
4 |
+
- quantized
|
5 |
+
- 4-bit
|
6 |
+
- AWQ
|
7 |
+
- text-generation
|
8 |
+
- mixtral
|
9 |
+
model_name: WizardLM-2-8x22B-AWQ
|
10 |
+
base_model: microsoft/WizardLM-2-8x22B
|
11 |
+
inference: false
|
12 |
+
pipeline_tag: text-generation
|
13 |
+
quantized_by: MaziyarPanahi
|
14 |
+
---
|
15 |
+
# Description
|
16 |
+
[MaziyarPanahi/home-AWQ](https://huggingface.co/MaziyarPanahi/home-AWQ) is a quantized (AWQ) version of [microsoft/WizardLM-2-8x22B](https://huggingface.co/microsoft/WizardLM-2-8x22B)
|
17 |
+
|
18 |
+
## How to use
|
19 |
+
### Install the necessary packages
|
20 |
+
|
21 |
+
```
|
22 |
+
pip install --upgrade accelerate autoawq transformers
|
23 |
+
```
|
24 |
+
|
25 |
+
### Example Python code
|
26 |
+
|
27 |
+
|
28 |
+
```python
|
29 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
30 |
+
|
31 |
+
model_id = "MaziyarPanahi/home-AWQ"
|
32 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
33 |
+
model = AutoModelForCausalLM.from_pretrained(model_id).to(0)
|
34 |
+
|
35 |
+
text = "User:\nHello can you provide me with top-3 cool places to visit in Paris?\n\nAssistant:\n"
|
36 |
+
inputs = tokenizer(text, return_tensors="pt").to(0)
|
37 |
+
|
38 |
+
out = model.generate(**inputs, max_new_tokens=300)
|
39 |
+
print(tokenizer.decode(out[0], skip_special_tokens=True))
|
40 |
+
```
|
41 |
+
|
42 |
+
Results:
|
43 |
+
```
|
44 |
+
User:
|
45 |
+
Hello can you provide me with top-3 cool places to visit in Paris?
|
46 |
+
|
47 |
+
Assistant:
|
48 |
+
Absolutely, here are my top-3 recommendations for must-see places in Paris:
|
49 |
+
|
50 |
+
1. The Eiffel Tower: An icon of Paris, this wrought-iron lattice tower is a global cultural icon of France and is among the most recognizable structures in the world. Climbing up to the top offers breathtaking views of the city.
|
51 |
+
|
52 |
+
2. The Louvre Museum: Home to thousands of works of art, the Louvre is the world's largest art museum and a historic monument in Paris. Must-see pieces include the Mona Lisa, the Winged Victory of Samothrace, and the Venus de Milo.
|
53 |
+
|
54 |
+
3. Notre-Dame Cathedral: This cathedral is a masterpiece of French Gothic architecture and is famous for its intricate stone carvings, beautiful stained glass, and its iconic twin towers. Be sure to spend some time exploring its history and learning about the fascinating restoration efforts post the 2019 fire.
|
55 |
+
|
56 |
+
I hope you find these recommendations helpful and that they make for an enjoyable and memorable trip to Paris. Safe travels!
|
57 |
+
```
|
config.json
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "/home/maziyar/.cache/huggingface/hub/models--microsoft--WizardLM-2-8x22B/",
|
3 |
+
"architectures": [
|
4 |
+
"MixtralForCausalLM"
|
5 |
+
],
|
6 |
+
"attention_dropout": 0.0,
|
7 |
+
"bos_token_id": 1,
|
8 |
+
"eos_token_id": 2,
|
9 |
+
"hidden_act": "silu",
|
10 |
+
"hidden_size": 6144,
|
11 |
+
"initializer_range": 0.02,
|
12 |
+
"intermediate_size": 16384,
|
13 |
+
"max_position_embeddings": 65536,
|
14 |
+
"model_type": "mixtral",
|
15 |
+
"num_attention_heads": 48,
|
16 |
+
"num_experts_per_tok": 2,
|
17 |
+
"num_hidden_layers": 56,
|
18 |
+
"num_key_value_heads": 8,
|
19 |
+
"num_local_experts": 8,
|
20 |
+
"output_router_logits": false,
|
21 |
+
"quantization_config": {
|
22 |
+
"bits": 4,
|
23 |
+
"group_size": 128,
|
24 |
+
"modules_to_not_convert": [
|
25 |
+
"gate"
|
26 |
+
],
|
27 |
+
"quant_method": "awq",
|
28 |
+
"version": "gemm",
|
29 |
+
"zero_point": true
|
30 |
+
},
|
31 |
+
"rms_norm_eps": 1e-05,
|
32 |
+
"rope_theta": 1000000,
|
33 |
+
"router_aux_loss_coef": 0.001,
|
34 |
+
"router_jitter_noise": 0.0,
|
35 |
+
"sliding_window": null,
|
36 |
+
"tie_word_embeddings": false,
|
37 |
+
"torch_dtype": "float16",
|
38 |
+
"transformers_version": "4.38.2",
|
39 |
+
"use_cache": false,
|
40 |
+
"vocab_size": 32000
|
41 |
+
}
|
generation_config.json
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_from_model_config": true,
|
3 |
+
"bos_token_id": 1,
|
4 |
+
"do_sample": true,
|
5 |
+
"eos_token_id": 2,
|
6 |
+
"transformers_version": "4.38.2"
|
7 |
+
}
|
model.safetensors.index.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
special_tokens_map.json
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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": {
|
17 |
+
"content": "<unk>",
|
18 |
+
"lstrip": false,
|
19 |
+
"normalized": false,
|
20 |
+
"rstrip": false,
|
21 |
+
"single_word": false
|
22 |
+
},
|
23 |
+
"unk_token": {
|
24 |
+
"content": "<unk>",
|
25 |
+
"lstrip": false,
|
26 |
+
"normalized": false,
|
27 |
+
"rstrip": false,
|
28 |
+
"single_word": false
|
29 |
+
}
|
30 |
+
}
|
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:dadfd56d766715c61d2ef780a525ab43b8e6da4de6865bda3d95fdef5e134055
|
3 |
+
size 493443
|
tokenizer_config.json
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"add_bos_token": true,
|
3 |
+
"add_eos_token": false,
|
4 |
+
"add_prefix_space": true,
|
5 |
+
"added_tokens_decoder": {
|
6 |
+
"0": {
|
7 |
+
"content": "<unk>",
|
8 |
+
"lstrip": false,
|
9 |
+
"normalized": false,
|
10 |
+
"rstrip": false,
|
11 |
+
"single_word": false,
|
12 |
+
"special": true
|
13 |
+
},
|
14 |
+
"1": {
|
15 |
+
"content": "<s>",
|
16 |
+
"lstrip": false,
|
17 |
+
"normalized": false,
|
18 |
+
"rstrip": false,
|
19 |
+
"single_word": false,
|
20 |
+
"special": true
|
21 |
+
},
|
22 |
+
"2": {
|
23 |
+
"content": "</s>",
|
24 |
+
"lstrip": false,
|
25 |
+
"normalized": false,
|
26 |
+
"rstrip": false,
|
27 |
+
"single_word": false,
|
28 |
+
"special": true
|
29 |
+
}
|
30 |
+
},
|
31 |
+
"additional_special_tokens": [],
|
32 |
+
"bos_token": "<s>",
|
33 |
+
"clean_up_tokenization_spaces": false,
|
34 |
+
"eos_token": "</s>",
|
35 |
+
"legacy": true,
|
36 |
+
"model_max_length": 1000000000000000019884624838656,
|
37 |
+
"pad_token": "<unk>",
|
38 |
+
"padding_side": "right",
|
39 |
+
"sp_model_kwargs": {},
|
40 |
+
"spaces_between_special_tokens": false,
|
41 |
+
"tokenizer_class": "LlamaTokenizer",
|
42 |
+
"unk_token": "<unk>",
|
43 |
+
"use_default_system_prompt": false
|
44 |
+
}
|