MaziyarPanahi
commited on
Commit
•
86cd7cc
1
Parent(s):
c6afebe
Upload folder using huggingface_hub
Browse files- README.md +79 -0
- config.json +28 -0
- model.safetensors +3 -0
- quantize_config.json +11 -0
- special_tokens_map.json +35 -0
- tokenizer.json +0 -0
- tokenizer.model +3 -0
- tokenizer_config.json +47 -0
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 |
+
- safetensors
|
10 |
+
- mistral
|
11 |
+
- text-generation
|
12 |
+
- mlabonne/NeuralMarcoro14-7B
|
13 |
+
- dpo
|
14 |
+
- 7B
|
15 |
+
- winograd
|
16 |
+
- mmlu_abstract_algebra
|
17 |
+
- dataset:hromi/winograd_dpo_basic
|
18 |
+
- base_model:mlabonne/NeuralMarcoro14-7B
|
19 |
+
- doi:10.57967/hf/1611
|
20 |
+
- license:apache-2.0
|
21 |
+
- autotrain_compatible
|
22 |
+
- endpoints_compatible
|
23 |
+
- text-generation-inference
|
24 |
+
- region:us
|
25 |
+
- has_space
|
26 |
+
model_name: Turdus-GPTQ
|
27 |
+
base_model: udkai/Turdus
|
28 |
+
inference: false
|
29 |
+
model_creator: udkai
|
30 |
+
pipeline_tag: text-generation
|
31 |
+
quantized_by: MaziyarPanahi
|
32 |
+
---
|
33 |
+
# Description
|
34 |
+
[MaziyarPanahi/Turdus-GPTQ](https://huggingface.co/MaziyarPanahi/Turdus-GPTQ) is a quantized (GPTQ) version of [udkai/Turdus](https://huggingface.co/udkai/Turdus)
|
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/Turdus-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,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "udkai/Turdus",
|
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 |
+
"pad_token_id": 2,
|
19 |
+
"rms_norm_eps": 1e-05,
|
20 |
+
"rope_theta": 10000.0,
|
21 |
+
"sliding_window": 4096,
|
22 |
+
"tie_word_embeddings": false,
|
23 |
+
"torch_dtype": "float16",
|
24 |
+
"transformers_version": "4.36.2",
|
25 |
+
"unsloth_version": "2024.1",
|
26 |
+
"use_cache": true,
|
27 |
+
"vocab_size": 32000
|
28 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:fa81764fa57cef73e1f1b3ee17b2f7568c67a3aa14da23e100242a523ea9a848
|
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,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": "<unk>",
|
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,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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": 255,
|
40 |
+
"pad_token": "<unk>",
|
41 |
+
"padding_side": "right",
|
42 |
+
"sp_model_kwargs": {},
|
43 |
+
"spaces_between_special_tokens": false,
|
44 |
+
"tokenizer_class": "LlamaTokenizer",
|
45 |
+
"unk_token": "<unk>",
|
46 |
+
"use_default_system_prompt": true
|
47 |
+
}
|