MaziyarPanahi commited on
Commit
baf6cef
·
verified ·
1 Parent(s): 1960df1

Upload folder using huggingface_hub

Browse files
README.md ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - finetuned
4
+ - quantized
5
+ - 4-bit
6
+ - AWQ
7
+ - transformers
8
+ - safetensors
9
+ - mixtral
10
+ - text-generation
11
+ - moe
12
+ - DPO
13
+ - RL-TUNED
14
+ - license:mit
15
+ - autotrain_compatible
16
+ - endpoints_compatible
17
+ - has_space
18
+ - text-generation-inference
19
+ - region:us
20
+ model_name: Truthful_DPO_TomGrc_FusionNet_7Bx2_MoE_13B-AWQ
21
+ base_model: yunconglong/Truthful_DPO_TomGrc_FusionNet_7Bx2_MoE_13B
22
+ inference: false
23
+ model_creator: yunconglong
24
+ pipeline_tag: text-generation
25
+ quantized_by: MaziyarPanahi
26
+ ---
27
+ # Description
28
+ [MaziyarPanahi/Truthful_DPO_TomGrc_FusionNet_7Bx2_MoE_13B-AWQ](https://huggingface.co/MaziyarPanahi/Truthful_DPO_TomGrc_FusionNet_7Bx2_MoE_13B-AWQ) is a quantized (AWQ) version of [yunconglong/Truthful_DPO_TomGrc_FusionNet_7Bx2_MoE_13B](https://huggingface.co/yunconglong/Truthful_DPO_TomGrc_FusionNet_7Bx2_MoE_13B)
29
+
30
+ ## How to use
31
+ ### Install the necessary packages
32
+
33
+ ```
34
+ pip install --upgrade accelerate autoawq transformers
35
+ ```
36
+
37
+ ### Example Python code
38
+
39
+
40
+ ```python
41
+ from transformers import AutoTokenizer, AutoModelForCausalLM
42
+
43
+ model_id = "MaziyarPanahi/Truthful_DPO_TomGrc_FusionNet_7Bx2_MoE_13B-AWQ"
44
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
45
+ model = AutoModelForCausalLM.from_pretrained(model_id).to(0)
46
+
47
+ text = "User:\nHello can you provide me with top-3 cool places to visit in Paris?\n\nAssistant:\n"
48
+ inputs = tokenizer(text, return_tensors="pt").to(0)
49
+
50
+ out = model.generate(**inputs, max_new_tokens=300)
51
+ print(tokenizer.decode(out[0], skip_special_tokens=True))
52
+ ```
53
+
54
+ Results:
55
+ ```
56
+ User:
57
+ Hello can you provide me with top-3 cool places to visit in Paris?
58
+
59
+ Assistant:
60
+ Absolutely, here are my top-3 recommendations for must-see places in Paris:
61
+
62
+ 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.
63
+
64
+ 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.
65
+
66
+ 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.
67
+
68
+ I hope you find these recommendations helpful and that they make for an enjoyable and memorable trip to Paris. Safe travels!
69
+ ```
config.json ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "/home/maziyar/.cache/huggingface/hub/models--yunconglong--Truthful_DPO_TomGrc_FusionNet_7Bx2_MoE_13B/snapshots/dd66c98fa56ab95e321e591f123081ab4296a032",
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": 4096,
11
+ "initializer_range": 0.02,
12
+ "intermediate_size": 14336,
13
+ "max_position_embeddings": 32768,
14
+ "model_type": "mixtral",
15
+ "num_attention_heads": 32,
16
+ "num_experts_per_tok": 2,
17
+ "num_hidden_layers": 32,
18
+ "num_key_value_heads": 8,
19
+ "num_local_experts": 2,
20
+ "output_router_logits": false,
21
+ "pad_token_id": 2,
22
+ "quantization_config": {
23
+ "bits": 4,
24
+ "group_size": 128,
25
+ "modules_to_not_convert": [
26
+ "gate"
27
+ ],
28
+ "quant_method": "awq",
29
+ "version": "gemm",
30
+ "zero_point": true
31
+ },
32
+ "rms_norm_eps": 1e-05,
33
+ "rope_theta": 10000.0,
34
+ "router_aux_loss_coef": 0.001,
35
+ "sliding_window": null,
36
+ "tie_word_embeddings": false,
37
+ "torch_dtype": "float16",
38
+ "transformers_version": "4.38.2",
39
+ "unsloth_version": "2024.1",
40
+ "use_cache": true,
41
+ "vocab_size": 32000
42
+ }
generation_config.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 1,
4
+ "do_sample": true,
5
+ "eos_token_id": 2,
6
+ "pad_token_id": 2,
7
+ "transformers_version": "4.38.2"
8
+ }
model-00001-of-00002.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2d1b0b299ec22ee5bac148a07855755657c6451b51f6222ea7ef84bc8ae505d1
3
+ size 4995952960
model-00002-of-00002.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:725e182c277ae00f15c60a595acccb150cda8656ff28ba15c58de62c1fe6185a
3
+ size 2084169992
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,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": "</s>",
16
+ "lstrip": false,
17
+ "normalized": false,
18
+ "rstrip": false,
19
+ "single_word": false
20
+ },
21
+ "pad_token": {
22
+ "content": "<s>",
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,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ },
30
+ "additional_special_tokens": [
31
+ "<unk>",
32
+ "<s>",
33
+ "</s>"
34
+ ],
35
+ "bos_token": "<s>",
36
+ "clean_up_tokenization_spaces": false,
37
+ "eos_token": "</s>",
38
+ "legacy": true,
39
+ "max_length": null,
40
+ "model_max_length": 255,
41
+ "pad_to_multiple_of": null,
42
+ "pad_token": "<s>",
43
+ "pad_token_type_id": 0,
44
+ "padding_side": "left",
45
+ "sp_model_kwargs": {},
46
+ "spaces_between_special_tokens": false,
47
+ "tokenizer_class": "LlamaTokenizer",
48
+ "unk_token": "<unk>",
49
+ "use_default_system_prompt": false
50
+ }