MaziyarPanahi commited on
Commit
6dbc3e6
1 Parent(s): 4a145e2

Upload folder using huggingface_hub

Browse files
README.md ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - finetuned
4
+ - quantized
5
+ - 4-bit
6
+ - AWQ
7
+ - transformers
8
+ - pytorch
9
+ - mistral
10
+ - text-generation
11
+ - conversational
12
+ - dataset:cognitivecomputations/samantha-data
13
+ - license:apache-2.0
14
+ - autotrain_compatible
15
+ - endpoints_compatible
16
+ - text-generation-inference
17
+ - region:us
18
+ model_name: samantha-1.1-westlake-7b-AWQ
19
+ base_model: cognitivecomputations/samantha-1.1-westlake-7b
20
+ inference: false
21
+ model_creator: cognitivecomputations
22
+ pipeline_tag: text-generation
23
+ quantized_by: MaziyarPanahi
24
+ ---
25
+ # Description
26
+ [MaziyarPanahi/samantha-1.1-westlake-7b-AWQ](https://huggingface.co/MaziyarPanahi/samantha-1.1-westlake-7b-AWQ) is a quantized (AWQ) version of [cognitivecomputations/samantha-1.1-westlake-7b](https://huggingface.co/cognitivecomputations/samantha-1.1-westlake-7b)
27
+
28
+ ## How to use
29
+ ### Install the necessary packages
30
+
31
+ ```
32
+ pip install --upgrade accelerate autoawq transformers
33
+ ```
34
+
35
+ ### Example Python code
36
+
37
+
38
+ ```python
39
+ from transformers import AutoTokenizer, AutoModelForCausalLM
40
+
41
+ model_id = "MaziyarPanahi/samantha-1.1-westlake-7b-AWQ"
42
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
43
+ model = AutoModelForCausalLM.from_pretrained(model_id).to(0)
44
+
45
+ text = "User:\nHello can you provide me with top-3 cool places to visit in Paris?\n\nAssistant:\n"
46
+ inputs = tokenizer(text, return_tensors="pt").to(0)
47
+
48
+ out = model.generate(**inputs, max_new_tokens=300)
49
+ print(tokenizer.decode(out[0], skip_special_tokens=True))
50
+ ```
51
+
52
+ Results:
53
+ ```
54
+ User:
55
+ Hello can you provide me with top-3 cool places to visit in Paris?
56
+
57
+ Assistant:
58
+ Absolutely, here are my top-3 recommendations for must-see places in Paris:
59
+
60
+ 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.
61
+
62
+ 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.
63
+
64
+ 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.
65
+
66
+ I hope you find these recommendations helpful and that they make for an enjoyable and memorable trip to Paris. Safe travels!
67
+ ```
added_tokens.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "<|im_end|>": 32000,
3
+ "<|im_start|>": 32001
4
+ }
config.json ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "/home/maziyar/.cache/huggingface/hub/models--cognitivecomputations--samantha-1.1-westlake-7b/snapshots/f2a80c3c8f7a3a88971b78756a351fdca6c64373",
3
+ "architectures": [
4
+ "MistralForCausalLM"
5
+ ],
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": 1,
8
+ "eos_token_id": 32000,
9
+ "hidden_act": "silu",
10
+ "hidden_size": 4096,
11
+ "initializer_range": 0.02,
12
+ "intermediate_size": 14336,
13
+ "max_position_embeddings": 32768,
14
+ "model_type": "mistral",
15
+ "num_attention_heads": 32,
16
+ "num_hidden_layers": 32,
17
+ "num_key_value_heads": 8,
18
+ "pad_token_id": 2,
19
+ "quantization_config": {
20
+ "bits": 4,
21
+ "group_size": 128,
22
+ "modules_to_not_convert": null,
23
+ "quant_method": "awq",
24
+ "version": "gemm",
25
+ "zero_point": true
26
+ },
27
+ "rms_norm_eps": 1e-05,
28
+ "rope_theta": 10000.0,
29
+ "sliding_window": 4096,
30
+ "tie_word_embeddings": false,
31
+ "torch_dtype": "float16",
32
+ "transformers_version": "4.38.0.dev0",
33
+ "unsloth_version": "2024.1",
34
+ "use_cache": false,
35
+ "vocab_size": 32002
36
+ }
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.0.dev0"
7
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bb9dcce7f8c28546f7169cb42e66b49515a153e44851f3c8a140fd0e3aaec041
3
+ size 4150913000
quant_config.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "zero_point": true,
3
+ "q_group_size": 128,
4
+ "w_bit": 4,
5
+ "version": "GEMM",
6
+ "modules_to_not_convert": null
7
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<unk>",
4
+ "<s>",
5
+ "</s>"
6
+ ],
7
+ "bos_token": {
8
+ "content": "<s>",
9
+ "lstrip": false,
10
+ "normalized": false,
11
+ "rstrip": false,
12
+ "single_word": false
13
+ },
14
+ "eos_token": {
15
+ "content": "<|im_end|>",
16
+ "lstrip": false,
17
+ "normalized": false,
18
+ "rstrip": false,
19
+ "single_word": false
20
+ },
21
+ "pad_token": {
22
+ "content": "<unk>",
23
+ "lstrip": false,
24
+ "normalized": false,
25
+ "rstrip": false,
26
+ "single_word": false
27
+ },
28
+ "unk_token": {
29
+ "content": "<unk>",
30
+ "lstrip": false,
31
+ "normalized": false,
32
+ "rstrip": false,
33
+ "single_word": false
34
+ }
35
+ }
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,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": true,
3
+ "add_eos_token": false,
4
+ "added_tokens_decoder": {
5
+ "0": {
6
+ "content": "<unk>",
7
+ "lstrip": false,
8
+ "normalized": false,
9
+ "rstrip": false,
10
+ "single_word": false,
11
+ "special": true
12
+ },
13
+ "1": {
14
+ "content": "<s>",
15
+ "lstrip": false,
16
+ "normalized": false,
17
+ "rstrip": false,
18
+ "single_word": false,
19
+ "special": true
20
+ },
21
+ "2": {
22
+ "content": "</s>",
23
+ "lstrip": false,
24
+ "normalized": false,
25
+ "rstrip": false,
26
+ "single_word": false,
27
+ "special": true
28
+ },
29
+ "32000": {
30
+ "content": "<|im_end|>",
31
+ "lstrip": false,
32
+ "normalized": false,
33
+ "rstrip": false,
34
+ "single_word": false,
35
+ "special": true
36
+ },
37
+ "32001": {
38
+ "content": "<|im_start|>",
39
+ "lstrip": false,
40
+ "normalized": false,
41
+ "rstrip": false,
42
+ "single_word": false,
43
+ "special": false
44
+ }
45
+ },
46
+ "additional_special_tokens": [
47
+ "<unk>",
48
+ "<s>",
49
+ "</s>"
50
+ ],
51
+ "bos_token": "<s>",
52
+ "chat_template": "{% if not add_generation_prompt is defined %}{% set add_generation_prompt = false %}{% endif %}{% for message in messages %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}",
53
+ "clean_up_tokenization_spaces": false,
54
+ "eos_token": "<|im_end|>",
55
+ "legacy": true,
56
+ "model_max_length": 255,
57
+ "pad_token": "<unk>",
58
+ "padding_side": "right",
59
+ "sp_model_kwargs": {},
60
+ "spaces_between_special_tokens": false,
61
+ "tokenizer_class": "LlamaTokenizer",
62
+ "trust_remote_code": false,
63
+ "unk_token": "<unk>",
64
+ "use_default_system_prompt": true,
65
+ "use_fast": true
66
+ }