MaziyarPanahi commited on
Commit
7495531
1 Parent(s): 1bdcec8

Upload folder using huggingface_hub

Browse files
README.md ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - finetuned
5
+ - quantized
6
+ - 4-bit
7
+ - gptq
8
+ - transformers
9
+ - pytorch
10
+ - mistral
11
+ - text-generation
12
+ - LLMs
13
+ - math
14
+ - Intel
15
+ - en
16
+ - dataset:meta-math/MetaMathQA
17
+ - dataset:Intel/orca_dpo_pairs
18
+ - arxiv:2309.12284
19
+ - base_model:meta-math/MetaMath-Mistral-7B
20
+ - license:apache-2.0
21
+ - autotrain_compatible
22
+ - endpoints_compatible
23
+ - has_space
24
+ - text-generation-inference
25
+ - region:us
26
+ model_name: neural-chat-7b-v3-3-Slerp-GPTQ
27
+ base_model: Intel/neural-chat-7b-v3-3-Slerp
28
+ inference: false
29
+ model_creator: Intel
30
+ pipeline_tag: text-generation
31
+ quantized_by: MaziyarPanahi
32
+ ---
33
+ # Description
34
+ [MaziyarPanahi/neural-chat-7b-v3-3-Slerp-GPTQ](https://huggingface.co/MaziyarPanahi/neural-chat-7b-v3-3-Slerp-GPTQ) is a quantized (GPTQ) version of [Intel/neural-chat-7b-v3-3-Slerp](https://huggingface.co/Intel/neural-chat-7b-v3-3-Slerp)
35
+
36
+ ## How to use
37
+ ### Install the necessary packages
38
+
39
+ ```
40
+ pip install --upgrade accelerate auto-gptq transformers
41
+ ```
42
+
43
+ ### Example Python code
44
+
45
+
46
+ ```python
47
+ from transformers import AutoTokenizer, pipeline
48
+ from auto_gptq import AutoGPTQForCausalLM, BaseQuantizeConfig
49
+ import torch
50
+
51
+ model_id = "MaziyarPanahi/neural-chat-7b-v3-3-Slerp-GPTQ"
52
+
53
+ quantize_config = BaseQuantizeConfig(
54
+ bits=4,
55
+ group_size=128,
56
+ desc_act=False
57
+ )
58
+
59
+ model = AutoGPTQForCausalLM.from_quantized(
60
+ model_id,
61
+ use_safetensors=True,
62
+ device="cuda:0",
63
+ quantize_config=quantize_config)
64
+
65
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
66
+
67
+ pipe = pipeline(
68
+ "text-generation",
69
+ model=model,
70
+ tokenizer=tokenizer,
71
+ max_new_tokens=512,
72
+ temperature=0.7,
73
+ top_p=0.95,
74
+ repetition_penalty=1.1
75
+ )
76
+
77
+ outputs = pipe("What is a large language model?")
78
+ print(outputs[0]["generated_text"])
79
+ ```
config.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "Intel/neural-chat-7b-v3-3-Slerp",
3
+ "architectures": [
4
+ "MistralForCausalLM"
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": "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": true,
25
+ "vocab_size": 32000
26
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a98993f6bcfe78d0dbcc8fe4cea8e00162fcc15d7dc24f7cf104163ec94e3002
3
+ size 4158662208
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": "</s>",
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.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,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "bos_token": "<s>",
32
+ "clean_up_tokenization_spaces": false,
33
+ "eos_token": "</s>",
34
+ "legacy": true,
35
+ "model_max_length": 1000000000000000019884624838656,
36
+ "pad_token": null,
37
+ "sp_model_kwargs": {},
38
+ "spaces_between_special_tokens": false,
39
+ "tokenizer_class": "LlamaTokenizer",
40
+ "unk_token": "<unk>",
41
+ "use_default_system_prompt": true
42
+ }