MaziyarPanahi commited on
Commit
7094ef1
1 Parent(s): 7b13c0f

Upload folder using huggingface_hub

Browse files
README.md ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - finetuned
5
+ - quantized
6
+ - 4-bit
7
+ - gptq
8
+ - transformers
9
+ - safetensors
10
+ - llama
11
+ - text-generation
12
+ - dataset:ai2_arc
13
+ - dataset:unalignment/spicy-3.1
14
+ - dataset:codeparrot/apps
15
+ - dataset:facebook/belebele
16
+ - dataset:boolq
17
+ - dataset:jondurbin/cinematika-v0.1
18
+ - dataset:drop
19
+ - dataset:lmsys/lmsys-chat-1m
20
+ - dataset:TIGER-Lab/MathInstruct
21
+ - dataset:cais/mmlu
22
+ - dataset:Muennighoff/natural-instructions
23
+ - dataset:openbookqa
24
+ - dataset:piqa
25
+ - dataset:Vezora/Tested-22k-Python-Alpaca
26
+ - dataset:cakiki/rosetta-code
27
+ - dataset:Open-Orca/SlimOrca
28
+ - dataset:spider
29
+ - dataset:squad_v2
30
+ - dataset:migtissera/Synthia-v1.3
31
+ - dataset:datasets/winogrande
32
+ - dataset:nvidia/HelpSteer
33
+ - dataset:Intel/orca_dpo_pairs
34
+ - dataset:unalignment/toxic-dpo-v0.1
35
+ - dataset:jondurbin/truthy-dpo-v0.1
36
+ - dataset:allenai/ultrafeedback_binarized_cleaned
37
+ - dataset:Squish42/bluemoon-fandom-1-1-rp-cleaned
38
+ - dataset:LDJnr/Capybara
39
+ - dataset:JULIELab/EmoBank
40
+ - dataset:kingbri/PIPPA-shareGPT
41
+ - license:other
42
+ - autotrain_compatible
43
+ - endpoints_compatible
44
+ - text-generation-inference
45
+ - region:us
46
+ - has_space
47
+ model_name: UNA-34Beagles-32K-bf16-v1-GPTQ
48
+ base_model: one-man-army/UNA-34Beagles-32K-bf16-v1
49
+ inference: false
50
+ model_creator: one-man-army
51
+ pipeline_tag: text-generation
52
+ quantized_by: MaziyarPanahi
53
+ ---
54
+ # Description
55
+ [MaziyarPanahi/UNA-34Beagles-32K-bf16-v1-GPTQ](https://huggingface.co/MaziyarPanahi/UNA-34Beagles-32K-bf16-v1-GPTQ) is a quantized (GPTQ) version of [one-man-army/UNA-34Beagles-32K-bf16-v1](https://huggingface.co/one-man-army/UNA-34Beagles-32K-bf16-v1)
56
+
57
+ ## How to use
58
+ ### Install the necessary packages
59
+
60
+ ```
61
+ pip install --upgrade accelerate auto-gptq transformers
62
+ ```
63
+
64
+ ### Example Python code
65
+
66
+
67
+ ```python
68
+ from transformers import AutoTokenizer, pipeline
69
+ from auto_gptq import AutoGPTQForCausalLM, BaseQuantizeConfig
70
+ import torch
71
+
72
+ model_id = "MaziyarPanahi/UNA-34Beagles-32K-bf16-v1-GPTQ"
73
+
74
+ quantize_config = BaseQuantizeConfig(
75
+ bits=4,
76
+ group_size=128,
77
+ desc_act=False
78
+ )
79
+
80
+ model = AutoGPTQForCausalLM.from_quantized(
81
+ model_id,
82
+ use_safetensors=True,
83
+ device="cuda:0",
84
+ quantize_config=quantize_config)
85
+
86
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
87
+
88
+ pipe = pipeline(
89
+ "text-generation",
90
+ model=model,
91
+ tokenizer=tokenizer,
92
+ max_new_tokens=512,
93
+ temperature=0.7,
94
+ top_p=0.95,
95
+ repetition_penalty=1.1
96
+ )
97
+
98
+ outputs = pipe("What is a large language model?")
99
+ print(outputs[0]["generated_text"])
100
+ ```
config.json ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "one-man-army/UNA-34Beagles-32K-bf16-v1",
3
+ "architectures": [
4
+ "LlamaForCausalLM"
5
+ ],
6
+ "attention_bias": false,
7
+ "attention_dropout": 0.0,
8
+ "bos_token_id": 1,
9
+ "eos_token_id": 2,
10
+ "hidden_act": "silu",
11
+ "hidden_size": 7168,
12
+ "initializer_range": 0.02,
13
+ "intermediate_size": 20480,
14
+ "max_position_embeddings": 32768,
15
+ "model_type": "llama",
16
+ "num_attention_heads": 56,
17
+ "num_hidden_layers": 60,
18
+ "num_key_value_heads": 8,
19
+ "pad_token_id": 1,
20
+ "pretraining_tp": 1,
21
+ "rms_norm_eps": 1e-05,
22
+ "rope_scaling": null,
23
+ "rope_theta": 5000000.0,
24
+ "tie_word_embeddings": false,
25
+ "torch_dtype": "float16",
26
+ "transformers_version": "4.36.2",
27
+ "use_cache": true,
28
+ "vocab_size": 64000
29
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2148e4c1d8590731fbd8d153aec95e8e712550cef51d62fa1b4766f1e28d5f70
3
+ size 19248968072
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,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "pad_token": {
17
+ "content": "<s>",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "unk_token": {
24
+ "content": "<unk>",
25
+ "lstrip": false,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ }
30
+ }
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:386c49cf943d71aa110361135338c50e38beeff0a66593480421f37b319e1a39
3
+ size 1033105
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
+ "bos_token": "<s>",
31
+ "chat_template": "{%- for idx in range(0, messages|length) -%}\n{%- if messages[idx]['role'] == 'user' -%}\n{%- if idx > 1 -%}\n{{- bos_token + '[INST] ' + messages[idx]['content'] + ' [/INST]' -}}\n{%- else -%}\n{{- messages[idx]['content'] + ' [/INST]' -}}\n{%- endif -%}\n{% elif messages[idx]['role'] == 'system' %}\n{{- '[INST] <<SYS>>\\n' + messages[idx]['content'] + '\\n<</SYS>>\\n\\n' -}}\n{%- elif messages[idx]['role'] == 'assistant' -%}\n{{- ' ' + messages[idx]['content'] + ' ' + eos_token -}}\n{% endif %}\n{% endfor %}",
32
+ "clean_up_tokenization_spaces": false,
33
+ "eos_token": "</s>",
34
+ "legacy": true,
35
+ "model_max_length": 32768,
36
+ "pad_token": "<s>",
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
+ }