lrl-modelcloud commited on
Commit
90537f1
β€’
1 Parent(s): 62c1b05

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +139 -0
README.md ADDED
@@ -0,0 +1,139 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - gptq
4
+ - 4bit
5
+ - int4
6
+ - gptqmodel
7
+ - modelcloud
8
+ ---
9
+ This model has been quantized using [GPTQModel](https://github.com/ModelCloud/GPTQModel).
10
+
11
+ - **bits**: 4
12
+ - **group_size**: 128
13
+ - **desc_act**: true
14
+ - **static_groups**: false
15
+ - **sym**: false
16
+ - **lm_head**: false
17
+ - **damp_percent**: 0.0025
18
+ - **damp_auto_increment**: 0.0015
19
+ - **true_sequential**: true
20
+ - **model_name_or_path**: ""
21
+ - **model_file_base_name**: "model"
22
+ - **quant_method**: "gptq"
23
+ - **checkpoint_format**: "gptq"
24
+ - **meta**:
25
+ - **quantizer**: "gptqmodel:1.0.3-dev0"
26
+
27
+ ## Example:
28
+ ```python
29
+ from transformers import AutoTokenizer
30
+ from gptqmodel import GPTQModel
31
+
32
+ model_name = "ModelCloud/GRIN-MoE-gptq-4bit"
33
+
34
+ prompt = [
35
+ {"role": "system",
36
+ "content": "You are GRIN-MoE model from microsoft, a helpful assistant."},
37
+ {"role": "user", "content": "I am in Shanghai, preparing to visit the natural history museum. Can you tell me the best way to"}
38
+ ]
39
+
40
+ tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
41
+
42
+ model = GPTQModel.from_quantized(model_name, trust_remote_code=True)
43
+
44
+ input_tensor = tokenizer.apply_chat_template(prompt, add_generation_prompt=True, return_tensors="pt")
45
+ outputs = model.generate(input_ids=input_tensor.to(model.device), max_new_tokens=100)
46
+ result = tokenizer.decode(outputs[0][input_tensor.shape[1]:], skip_special_tokens=True)
47
+
48
+ print(result)
49
+ ```
50
+
51
+ ## Lm_eval result:
52
+
53
+ | Tasks | Metric | | GRIN-MoE | GRIN-MoE-gptq-4bit |
54
+ | ------------------------------------- | ---------- | --- | -------- | ------------------ |
55
+ | arc_challenge | acc | ↑ | 0.6408 | 0.6425 |
56
+ | | acc_norm | ↑ | 0.6561 | 0.6587 |
57
+ | arc_easy | acc | ↑ | 0.8645 | 0.8683 |
58
+ | | acc_norm | ↑ | 0.8422 | 0.846 |
59
+ | boolq | acc | ↑ | 0.8820 | 0.8765 |
60
+ | hellaswag | acc | ↑ | 0.6972 | 0.6891 |
61
+ | | acc_norm | ↑ | 0.8518 | 0.8486 |
62
+ | lambada_openai | acc | ↑ | 0.7058 | 0.7068 |
63
+ | | perplexity | ↓ | 3.4568 | 3.5732 |
64
+ | mmlu | acc | ↑ | 0.7751 | 0.7706 |
65
+ | - humanities | acc | ↑ | 0.7394 | 0.7384 |
66
+ | - formal_logic | acc | ↑ | 0.6429 | 0.6746 |
67
+ | - high_school_european_history | acc | ↑ | 0.8606 | 0.8364 |
68
+ | - high_school_us_history | acc | ↑ | 0.9118 | 0.902 |
69
+ | - high_school_world_history | acc | ↑ | 0.8903 | 0.8734 |
70
+ | - international_law | acc | ↑ | 0.9256 | 0.9091 |
71
+ | - jurisprudence | acc | ↑ | 0.8426 | 0.8519 |
72
+ | - logical_fallacies | acc | ↑ | 0.8344 | 0.8528 |
73
+ | - moral_disputes | acc | ↑ | 0.7977 | 0.8208 |
74
+ | - moral_scenarios | acc | ↑ | 0.6961 | 0.6849 |
75
+ | - philosophy | acc | ↑ | 0.8199 | 0.8071 |
76
+ | - prehistory | acc | ↑ | 0.8457 | 0.8426 |
77
+ | - professional_law | acc | ↑ | 0.6173 | 0.6193 |
78
+ | - world_religions | acc | ↑ | 0.8480 | 0.8655 |
79
+ | - other | acc | ↑ | 0.8130 | 0.805 |
80
+ | - business_ethics | acc | ↑ | 0.8100 | 0.78 |
81
+ | - clinical_knowledge | acc | ↑ | 0.8415 | 0.8302 |
82
+ | - college_medicine | acc | ↑ | 0.7514 | 0.7457 |
83
+ | - global_facts | acc | ↑ | 0.5700 | 0.54 |
84
+ | - human_aging | acc | ↑ | 0.7803 | 0.7668 |
85
+ | - management | acc | ↑ | 0.8447 | 0.8447 |
86
+ | - marketing | acc | ↑ | 0.9145 | 0.9103 |
87
+ | - medical_genetics | acc | ↑ | 0.9200 | 0.89 |
88
+ | - miscellaneous | acc | ↑ | 0.8966 | 0.8927 |
89
+ | - nutrition | acc | ↑ | 0.8333 | 0.8268 |
90
+ | - professional_accounting | acc | ↑ | 0.6489 | 0.656 |
91
+ | - professional_medicine | acc | ↑ | 0.8750 | 0.8603 |
92
+ | - virology | acc | ↑ | 0.5422 | 0.5361 |
93
+ | - social sciences | acc | ↑ | 0.8638 | 0.8544 |
94
+ | - econometrics | acc | ↑ | 0.5789 | 0.5789 |
95
+ | - high_school_geography | acc | ↑ | 0.9091 | 0.8788 |
96
+ | - high_school_government_and_politics | acc | ↑ | 0.9585 | 0.943 |
97
+ | - high_school_macroeconomics | acc | ↑ | 0.8308 | 0.8103 |
98
+ | - high_school_microeconomics | acc | ↑ | 0.9328 | 0.9286 |
99
+ | - high_school_psychology | acc | ↑ | 0.9321 | 0.9303 |
100
+ | - human_sexuality | acc | ↑ | 0.8779 | 0.8626 |
101
+ | - professional_psychology | acc | ↑ | 0.8382 | 0.8219 |
102
+ | - public_relations | acc | ↑ | 0.7545 | 0.7727 |
103
+ | - security_studies | acc | ↑ | 0.7878 | 0.7918 |
104
+ | - sociology | acc | ↑ | 0.8905 | 0.8955 |
105
+ | - us_foreign_policy | acc | ↑ | 0.9000 | 0.88 |
106
+ | - stem | acc | ↑ | 0.7044 | 0.7031 |
107
+ | - abstract_algebra | acc | ↑ | 0.5000 | 0.45 |
108
+ | - anatomy | acc | ↑ | 0.7407 | 0.7481 |
109
+ | - astronomy | acc | ↑ | 0.8618 | 0.8618 |
110
+ | - college_biology | acc | ↑ | 0.8889 | 0.875 |
111
+ | - college_chemistry | acc | ↑ | 0.6100 | 0.59 |
112
+ | - college_computer_science | acc | ↑ | 0.7100 | 0.67 |
113
+ | - college_mathematics | acc | ↑ | 0.5100 | 0.58 |
114
+ | - college_physics | acc | ↑ | 0.4608 | 0.4608 |
115
+ | - computer_security | acc | ↑ | 0.8200 | 0.82 |
116
+ | - conceptual_physics | acc | ↑ | 0.7787 | 0.766 |
117
+ | - electrical_engineering | acc | ↑ | 0.6828 | 0.6828 |
118
+ | - elementary_mathematics | acc | ↑ | 0.7566 | 0.7593 |
119
+ | - high_school_biology | acc | ↑ | 0.9000 | 0.9097 |
120
+ | - high_school_chemistry | acc | ↑ | 0.6650 | 0.665 |
121
+ | - high_school_computer_science | acc | ↑ | 0.8700 | 0.86 |
122
+ | - high_school_mathematics | acc | ↑ | 0.4370 | 0.4296 |
123
+ | - high_school_physics | acc | ↑ | 0.5960 | 0.5894 |
124
+ | - high_school_statistics | acc | ↑ | 0.7176 | 0.7222 |
125
+ | - machine_learning | acc | ↑ | 0.6071 | 0.6339 |
126
+ | openbookqa | acc | ↑ | 0.3920 | 0.386 |
127
+ | | acc_norm | ↑ | 0.4900 | 0.486 |
128
+ | piqa | acc | ↑ | 0.8183 | 0.8166 |
129
+ | | acc_norm | ↑ | 0.8205 | 0.8177 |
130
+ | rte | acc | ↑ | 0.8014 | 0.7834 |
131
+ | truthfulqa_mc1 | acc | ↑ | 0.3880 | 0.399 |
132
+ | winogrande | acc | ↑ | 0.7940 | 0.768 |
133
+ | | | | | |
134
+ | Groups | Metric | | Value | Value |
135
+ | mmlu | acc | ↑ | 0.7751 | 0.7706 |
136
+ | - humanities | acc | ↑ | 0.7394 | 0.7384 |
137
+ | - other | acc | ↑ | 0.8130 | 0.805 |
138
+ | - social sciences | acc | ↑ | 0.8638 | 0.8544 |
139
+ | - stem | acc | ↑ | 0.7044 | 0.7031 |