MaziyarPanahi commited on
Commit
91651cd
1 Parent(s): 49ec412

Upload folder using huggingface_hub

Browse files
README.md ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - finetuned
5
+ - quantized
6
+ - 4-bit
7
+ - gptq
8
+ - transformers
9
+ - safetensors
10
+ - mixtral
11
+ - text-generation
12
+ - moe
13
+ - DPO
14
+ - RL-TUNED
15
+ - license:mit
16
+ - autotrain_compatible
17
+ - endpoints_compatible
18
+ - has_space
19
+ - text-generation-inference
20
+ - region:us
21
+ model_name: Truthful_DPO_TomGrc_FusionNet_7Bx2_MoE_13B-GPTQ
22
+ base_model: yunconglong/Truthful_DPO_TomGrc_FusionNet_7Bx2_MoE_13B
23
+ inference: false
24
+ model_creator: yunconglong
25
+ pipeline_tag: text-generation
26
+ quantized_by: MaziyarPanahi
27
+ ---
28
+ # Description
29
+ [MaziyarPanahi/Truthful_DPO_TomGrc_FusionNet_7Bx2_MoE_13B-GPTQ](https://huggingface.co/MaziyarPanahi/Truthful_DPO_TomGrc_FusionNet_7Bx2_MoE_13B-GPTQ) is a quantized (GPTQ) version of [yunconglong/Truthful_DPO_TomGrc_FusionNet_7Bx2_MoE_13B](https://huggingface.co/yunconglong/Truthful_DPO_TomGrc_FusionNet_7Bx2_MoE_13B)
30
+
31
+ ## How to use
32
+ ### Install the necessary packages
33
+
34
+ ```
35
+ pip install --upgrade accelerate auto-gptq transformers
36
+ ```
37
+
38
+ ### Example Python code
39
+
40
+
41
+ ```python
42
+ from transformers import AutoTokenizer, pipeline
43
+ from auto_gptq import AutoGPTQForCausalLM, BaseQuantizeConfig
44
+ import torch
45
+
46
+ model_id = "MaziyarPanahi/Truthful_DPO_TomGrc_FusionNet_7Bx2_MoE_13B-GPTQ"
47
+
48
+ quantize_config = BaseQuantizeConfig(
49
+ bits=4,
50
+ group_size=128,
51
+ desc_act=False
52
+ )
53
+
54
+ model = AutoGPTQForCausalLM.from_quantized(
55
+ model_id,
56
+ use_safetensors=True,
57
+ device="cuda:0",
58
+ quantize_config=quantize_config)
59
+
60
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
61
+
62
+ pipe = pipeline(
63
+ "text-generation",
64
+ model=model,
65
+ tokenizer=tokenizer,
66
+ max_new_tokens=512,
67
+ temperature=0.7,
68
+ top_p=0.95,
69
+ repetition_penalty=1.1
70
+ )
71
+
72
+ outputs = pipe("What is a large language model?")
73
+ print(outputs[0]["generated_text"])
74
+ ```
config.json ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "yunconglong/Truthful_DPO_TomGrc_FusionNet_7Bx2_MoE_13B",
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
+ "checkpoint_format": "gptq",
25
+ "damp_percent": 0.1,
26
+ "desc_act": false,
27
+ "group_size": 128,
28
+ "model_file_base_name": null,
29
+ "model_name_or_path": null,
30
+ "quant_method": "gptq",
31
+ "static_groups": false,
32
+ "sym": true,
33
+ "true_sequential": true
34
+ },
35
+ "rms_norm_eps": 1e-05,
36
+ "rope_theta": 10000.0,
37
+ "router_aux_loss_coef": 0.001,
38
+ "sliding_window": null,
39
+ "tie_word_embeddings": false,
40
+ "torch_dtype": "float16",
41
+ "transformers_version": "4.39.2",
42
+ "unsloth_version": "2024.1",
43
+ "use_cache": true,
44
+ "vocab_size": 32000
45
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b9764acc844975d52eab03d68e0d27385460d4bff158e7e118eac4c348dda61a
3
+ size 7088025472
quantize_config.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bits": 4,
3
+ "group_size": 128,
4
+ "damp_percent": 0.1,
5
+ "desc_act": false,
6
+ "static_groups": false,
7
+ "sym": true,
8
+ "true_sequential": true,
9
+ "model_name_or_path": null,
10
+ "model_file_base_name": null,
11
+ "quant_method": "gptq",
12
+ "checkpoint_format": "gptq"
13
+ }
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
+ }