MaziyarPanahi commited on
Commit
e5141ca
1 Parent(s): 2b6c097

Upload folder using huggingface_hub

Browse files
README.md ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ - arxiv:2309.12284
16
+ - license:apache-2.0
17
+ - model-index
18
+ - autotrain_compatible
19
+ - endpoints_compatible
20
+ - text-generation-inference
21
+ - region:us
22
+ model_name: neural-chat-7b-v3-3-GPTQ
23
+ base_model: Intel/neural-chat-7b-v3-3
24
+ inference: false
25
+ model_creator: Intel
26
+ pipeline_tag: text-generation
27
+ quantized_by: MaziyarPanahi
28
+ ---
29
+ # Description
30
+ [MaziyarPanahi/neural-chat-7b-v3-3-GPTQ](https://huggingface.co/MaziyarPanahi/neural-chat-7b-v3-3-GPTQ) is a quantized (GPTQ) version of [Intel/neural-chat-7b-v3-3](https://huggingface.co/Intel/neural-chat-7b-v3-3)
31
+
32
+ ## How to use
33
+ ### Install the necessary packages
34
+
35
+ ```
36
+ pip install --upgrade accelerate auto-gptq transformers
37
+ ```
38
+
39
+ ### Example Python code
40
+
41
+
42
+ ```python
43
+ from transformers import AutoTokenizer, pipeline
44
+ from auto_gptq import AutoGPTQForCausalLM, BaseQuantizeConfig
45
+ import torch
46
+
47
+ model_id = "MaziyarPanahi/neural-chat-7b-v3-3-GPTQ"
48
+
49
+ quantize_config = BaseQuantizeConfig(
50
+ bits=4,
51
+ group_size=128,
52
+ desc_act=False
53
+ )
54
+
55
+ model = AutoGPTQForCausalLM.from_quantized(
56
+ model_id,
57
+ use_safetensors=True,
58
+ device="cuda:0",
59
+ quantize_config=quantize_config)
60
+
61
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
62
+
63
+ pipe = pipeline(
64
+ "text-generation",
65
+ model=model,
66
+ tokenizer=tokenizer,
67
+ max_new_tokens=512,
68
+ temperature=0.7,
69
+ top_p=0.95,
70
+ repetition_penalty=1.1
71
+ )
72
+
73
+ outputs = pipe("What is a large language model?")
74
+ print(outputs[0]["generated_text"])
75
+ ```
config.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "Intel/neural-chat-7b-v3-3",
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:b4f5d60ccc274bd115f66caae6154dff4585764325a9827205928af687dd063e
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,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "unk_token": {
22
+ "content": "<unk>",
23
+ "lstrip": false,
24
+ "normalized": false,
25
+ "rstrip": false,
26
+ "single_word": false
27
+ }
28
+ }
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,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "model_max_length": 1000000000000000019884624838656,
40
+ "pad_token": null,
41
+ "sp_model_kwargs": {},
42
+ "spaces_between_special_tokens": false,
43
+ "tokenizer_class": "LlamaTokenizer",
44
+ "unk_token": "<unk>",
45
+ "use_default_system_prompt": true
46
+ }