MaziyarPanahi commited on
Commit
7751a55
1 Parent(s): 0d72a9c

Upload folder using huggingface_hub

Browse files
README.md ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - finetuned
5
+ - quantized
6
+ - 4-bit
7
+ - gptq
8
+ - transformers
9
+ - safetensors
10
+ - mistral
11
+ - text-generation
12
+ - distilabel
13
+ - dpo
14
+ - rlaif
15
+ - rlhf
16
+ - en
17
+ - dataset:argilla/distilabel-intel-orca-dpo-pairs
18
+ - license:apache-2.0
19
+ - autotrain_compatible
20
+ - endpoints_compatible
21
+ - has_space
22
+ - text-generation-inference
23
+ - region:us
24
+ model_name: distilabeled-Hermes-2.5-Mistral-7B-GPTQ
25
+ base_model: argilla/distilabeled-Hermes-2.5-Mistral-7B
26
+ inference: false
27
+ model_creator: argilla
28
+ pipeline_tag: text-generation
29
+ quantized_by: MaziyarPanahi
30
+ ---
31
+ # Description
32
+ [MaziyarPanahi/distilabeled-Hermes-2.5-Mistral-7B-GPTQ](https://huggingface.co/MaziyarPanahi/distilabeled-Hermes-2.5-Mistral-7B-GPTQ) is a quantized (GPTQ) version of [argilla/distilabeled-Hermes-2.5-Mistral-7B](https://huggingface.co/argilla/distilabeled-Hermes-2.5-Mistral-7B)
33
+
34
+ ## How to use
35
+ ### Install the necessary packages
36
+
37
+ ```
38
+ pip install --upgrade accelerate auto-gptq transformers
39
+ ```
40
+
41
+ ### Example Python code
42
+
43
+
44
+ ```python
45
+ from transformers import AutoTokenizer, pipeline
46
+ from auto_gptq import AutoGPTQForCausalLM, BaseQuantizeConfig
47
+ import torch
48
+
49
+ model_id = "MaziyarPanahi/distilabeled-Hermes-2.5-Mistral-7B-GPTQ"
50
+
51
+ quantize_config = BaseQuantizeConfig(
52
+ bits=4,
53
+ group_size=128,
54
+ desc_act=False
55
+ )
56
+
57
+ model = AutoGPTQForCausalLM.from_quantized(
58
+ model_id,
59
+ use_safetensors=True,
60
+ device="cuda:0",
61
+ quantize_config=quantize_config)
62
+
63
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
64
+
65
+ pipe = pipeline(
66
+ "text-generation",
67
+ model=model,
68
+ tokenizer=tokenizer,
69
+ max_new_tokens=512,
70
+ temperature=0.7,
71
+ top_p=0.95,
72
+ repetition_penalty=1.1
73
+ )
74
+
75
+ outputs = pipe("What is a large language model?")
76
+ print(outputs[0]["generated_text"])
77
+ ```
config.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "argilla/distilabeled-Hermes-2.5-Mistral-7B",
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
+ "rms_norm_eps": 1e-05,
19
+ "rope_theta": 10000.0,
20
+ "sliding_window": 4096,
21
+ "tie_word_embeddings": false,
22
+ "torch_dtype": "float16",
23
+ "transformers_version": "4.36.2",
24
+ "use_cache": false,
25
+ "vocab_size": 32002
26
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:31152c5a8da86ad4e4333b9664941b74e52f7a0adb526e37727a9dc723f584d2
3
+ size 4158694976
quantize_config.json ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
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
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": "<|im_end|>",
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
+ }
23
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": true
44
+ }
45
+ },
46
+ "additional_special_tokens": [],
47
+ "bos_token": "<s>",
48
+ "chat_template": "{% for message in messages %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}",
49
+ "clean_up_tokenization_spaces": false,
50
+ "eos_token": "<|im_end|>",
51
+ "legacy": true,
52
+ "model_max_length": 1000000000000000019884624838656,
53
+ "pad_token": null,
54
+ "sp_model_kwargs": {},
55
+ "spaces_between_special_tokens": false,
56
+ "tokenizer_class": "LlamaTokenizer",
57
+ "trust_remote_code": false,
58
+ "unk_token": "<unk>",
59
+ "use_default_system_prompt": true,
60
+ "use_fast": true
61
+ }