bartowski commited on
Commit
15a2cf2
1 Parent(s): ba1c1a7

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +75 -156
README.md CHANGED
@@ -1,200 +1,119 @@
1
  ---
2
- base_model: google/gemma-2b-aps-it
3
- pipeline_tag: text-generation
4
  quantized_by: bartowski
 
5
  ---
6
 
7
- # Model Card for Model ID
8
-
9
- <!-- Provide a quick summary of what the model is/does. -->
10
-
11
-
12
-
13
- ## Model Details
14
-
15
- ### Model Description
16
-
17
- <!-- Provide a longer summary of what this model is. -->
18
-
19
-
20
-
21
- - **Developed by:** [More Information Needed]
22
- - **Funded by [optional]:** [More Information Needed]
23
- - **Shared by [optional]:** [More Information Needed]
24
- - **Model type:** [More Information Needed]
25
- - **Language(s) (NLP):** [More Information Needed]
26
- - **License:** [More Information Needed]
27
- - **Finetuned from model [optional]:** [More Information Needed]
28
-
29
- ### Model Sources [optional]
30
-
31
- <!-- Provide the basic links for the model. -->
32
-
33
- - **Repository:** [More Information Needed]
34
- - **Paper [optional]:** [More Information Needed]
35
- - **Demo [optional]:** [More Information Needed]
36
-
37
- ## Uses
38
-
39
- <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
40
-
41
- ### Direct Use
42
-
43
- <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
44
-
45
- [More Information Needed]
46
-
47
- ### Downstream Use [optional]
48
-
49
- <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
50
-
51
- [More Information Needed]
52
-
53
- ### Out-of-Scope Use
54
-
55
- <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
56
-
57
- [More Information Needed]
58
-
59
- ## Bias, Risks, and Limitations
60
-
61
- <!-- This section is meant to convey both technical and sociotechnical limitations. -->
62
-
63
- [More Information Needed]
64
-
65
- ### Recommendations
66
-
67
- <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
68
-
69
- Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
70
-
71
- ## How to Get Started with the Model
72
-
73
- Use the code below to get started with the model.
74
-
75
- [More Information Needed]
76
-
77
- ## Training Details
78
-
79
- ### Training Data
80
-
81
- <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
82
-
83
- [More Information Needed]
84
-
85
- ### Training Procedure
86
-
87
- <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
88
-
89
- #### Preprocessing [optional]
90
-
91
- [More Information Needed]
92
-
93
-
94
- #### Training Hyperparameters
95
-
96
- - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
97
-
98
- #### Speeds, Sizes, Times [optional]
99
-
100
- <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
101
-
102
- [More Information Needed]
103
-
104
- ## Evaluation
105
-
106
- <!-- This section describes the evaluation protocols and provides the results. -->
107
-
108
- ### Testing Data, Factors & Metrics
109
-
110
- #### Testing Data
111
-
112
- <!-- This should link to a Dataset Card if possible. -->
113
-
114
- [More Information Needed]
115
-
116
- #### Factors
117
-
118
- <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
119
 
120
- [More Information Needed]
121
 
122
- #### Metrics
123
 
124
- <!-- These are the evaluation metrics being used, ideally with a description of why. -->
125
 
126
- [More Information Needed]
127
 
128
- ### Results
129
 
130
- [More Information Needed]
 
 
 
 
 
 
 
 
131
 
132
- #### Summary
133
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
134
 
 
135
 
136
- ## Model Examination [optional]
137
 
138
- <!-- Relevant interpretability work for the model goes here -->
139
 
140
- [More Information Needed]
141
 
142
- ## Environmental Impact
143
 
144
- <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
145
 
146
- Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
 
 
147
 
148
- - **Hardware Type:** [More Information Needed]
149
- - **Hours used:** [More Information Needed]
150
- - **Cloud Provider:** [More Information Needed]
151
- - **Compute Region:** [More Information Needed]
152
- - **Carbon Emitted:** [More Information Needed]
153
 
154
- ## Technical Specifications [optional]
 
 
155
 
156
- ### Model Architecture and Objective
157
 
158
- [More Information Needed]
 
 
159
 
160
- ### Compute Infrastructure
161
 
162
- [More Information Needed]
163
 
164
- #### Hardware
165
 
166
- [More Information Needed]
167
 
168
- #### Software
169
 
170
- [More Information Needed]
171
 
172
- ## Citation [optional]
173
 
174
- <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
175
 
176
- **BibTeX:**
177
 
178
- [More Information Needed]
179
 
180
- **APA:**
181
 
182
- [More Information Needed]
183
 
184
- ## Glossary [optional]
185
 
186
- <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
187
 
188
- [More Information Needed]
189
 
190
- ## More Information [optional]
191
 
192
- [More Information Needed]
193
 
194
- ## Model Card Authors [optional]
195
 
196
- [More Information Needed]
197
 
198
- ## Model Card Contact
199
 
200
- [More Information Needed]
 
1
  ---
 
 
2
  quantized_by: bartowski
3
+ pipeline_tag: text-generation
4
  ---
5
 
6
+ ## Llamacpp imatrix Quantizations of gemma-2b-aps-it
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
 
8
+ Using <a href="https://github.com/ggerganov/llama.cpp/">llama.cpp</a> release <a href="https://github.com/ggerganov/llama.cpp/releases/tag/b3930">b3930</a> for quantization.
9
 
10
+ Original model: https://huggingface.co/google/gemma-2b-aps-it
11
 
12
+ All quants made using imatrix option with dataset from [here](https://gist.github.com/bartowski1182/eb213dccb3571f863da82e99418f81e8)
13
 
14
+ Run them in [LM Studio](https://lmstudio.ai/)
15
 
16
+ ## Prompt format
17
 
18
+ ```
19
+ <bos><start_of_turn>system
20
+ {system_prompt}<end_of_turn>
21
+ <start_of_turn>user
22
+ {prompt}<end_of_turn>
23
+ <start_of_turn>assistant
24
+ <end_of_turn>
25
+ <start_of_turn>model
26
+ ```
27
 
28
+ ## Download a file (not the whole branch) from below:
29
 
30
+ | Filename | Quant type | File Size | Split | Description |
31
+ | -------- | ---------- | --------- | ----- | ----------- |
32
+ | [gemma-2b-aps-it-f16.gguf](https://huggingface.co/bartowski/gemma-2b-aps-it-GGUF/blob/main/gemma-2b-aps-it-f16.gguf) | f16 | 5.02GB | false | Full F16 weights. |
33
+ | [gemma-2b-aps-it-Q8_0.gguf](https://huggingface.co/bartowski/gemma-2b-aps-it-GGUF/blob/main/gemma-2b-aps-it-Q8_0.gguf) | Q8_0 | 2.67GB | false | Extremely high quality, generally unneeded but max available quant. |
34
+ | [gemma-2b-aps-it-Q6_K_L.gguf](https://huggingface.co/bartowski/gemma-2b-aps-it-GGUF/blob/main/gemma-2b-aps-it-Q6_K_L.gguf) | Q6_K_L | 2.19GB | false | Uses Q8_0 for embed and output weights. Very high quality, near perfect, *recommended*. |
35
+ | [gemma-2b-aps-it-Q6_K.gguf](https://huggingface.co/bartowski/gemma-2b-aps-it-GGUF/blob/main/gemma-2b-aps-it-Q6_K.gguf) | Q6_K | 2.06GB | false | Very high quality, near perfect, *recommended*. |
36
+ | [gemma-2b-aps-it-Q5_K_L.gguf](https://huggingface.co/bartowski/gemma-2b-aps-it-GGUF/blob/main/gemma-2b-aps-it-Q5_K_L.gguf) | Q5_K_L | 1.97GB | false | Uses Q8_0 for embed and output weights. High quality, *recommended*. |
37
+ | [gemma-2b-aps-it-Q5_K_M.gguf](https://huggingface.co/bartowski/gemma-2b-aps-it-GGUF/blob/main/gemma-2b-aps-it-Q5_K_M.gguf) | Q5_K_M | 1.84GB | false | High quality, *recommended*. |
38
+ | [gemma-2b-aps-it-Q5_K_S.gguf](https://huggingface.co/bartowski/gemma-2b-aps-it-GGUF/blob/main/gemma-2b-aps-it-Q5_K_S.gguf) | Q5_K_S | 1.80GB | false | High quality, *recommended*. |
39
+ | [gemma-2b-aps-it-Q4_K_L.gguf](https://huggingface.co/bartowski/gemma-2b-aps-it-GGUF/blob/main/gemma-2b-aps-it-Q4_K_L.gguf) | Q4_K_L | 1.76GB | false | Uses Q8_0 for embed and output weights. Good quality, *recommended*. |
40
+ | [gemma-2b-aps-it-Q4_K_M.gguf](https://huggingface.co/bartowski/gemma-2b-aps-it-GGUF/blob/main/gemma-2b-aps-it-Q4_K_M.gguf) | Q4_K_M | 1.63GB | false | Good quality, default size for must use cases, *recommended*. |
41
+ | [gemma-2b-aps-it-Q3_K_XL.gguf](https://huggingface.co/bartowski/gemma-2b-aps-it-GGUF/blob/main/gemma-2b-aps-it-Q3_K_XL.gguf) | Q3_K_XL | 1.59GB | false | Uses Q8_0 for embed and output weights. Lower quality but usable, good for low RAM availability. |
42
+ | [gemma-2b-aps-it-Q4_K_S.gguf](https://huggingface.co/bartowski/gemma-2b-aps-it-GGUF/blob/main/gemma-2b-aps-it-Q4_K_S.gguf) | Q4_K_S | 1.56GB | false | Slightly lower quality with more space savings, *recommended*. |
43
+ | [gemma-2b-aps-it-Q4_0.gguf](https://huggingface.co/bartowski/gemma-2b-aps-it-GGUF/blob/main/gemma-2b-aps-it-Q4_0.gguf) | Q4_0 | 1.56GB | false | Legacy format, generally not worth using over similarly sized formats |
44
+ | [gemma-2b-aps-it-Q4_0_8_8.gguf](https://huggingface.co/bartowski/gemma-2b-aps-it-GGUF/blob/main/gemma-2b-aps-it-Q4_0_8_8.gguf) | Q4_0_8_8 | 1.55GB | false | Optimized for ARM inference. Requires 'sve' support (see link below). *Don't use on Mac or Windows*. |
45
+ | [gemma-2b-aps-it-Q4_0_4_8.gguf](https://huggingface.co/bartowski/gemma-2b-aps-it-GGUF/blob/main/gemma-2b-aps-it-Q4_0_4_8.gguf) | Q4_0_4_8 | 1.55GB | false | Optimized for ARM inference. Requires 'i8mm' support (see link below). *Don't use on Mac or Windows*. |
46
+ | [gemma-2b-aps-it-Q4_0_4_4.gguf](https://huggingface.co/bartowski/gemma-2b-aps-it-GGUF/blob/main/gemma-2b-aps-it-Q4_0_4_4.gguf) | Q4_0_4_4 | 1.55GB | false | Optimized for ARM inference. Should work well on all ARM chips, pick this if you're unsure. *Don't use on Mac or Windows*. |
47
+ | [gemma-2b-aps-it-IQ4_XS.gguf](https://huggingface.co/bartowski/gemma-2b-aps-it-GGUF/blob/main/gemma-2b-aps-it-IQ4_XS.gguf) | IQ4_XS | 1.49GB | false | Decent quality, smaller than Q4_K_S with similar performance, *recommended*. |
48
+ | [gemma-2b-aps-it-Q3_K_L.gguf](https://huggingface.co/bartowski/gemma-2b-aps-it-GGUF/blob/main/gemma-2b-aps-it-Q3_K_L.gguf) | Q3_K_L | 1.47GB | false | Lower quality but usable, good for low RAM availability. |
49
+ | [gemma-2b-aps-it-IQ3_M.gguf](https://huggingface.co/bartowski/gemma-2b-aps-it-GGUF/blob/main/gemma-2b-aps-it-IQ3_M.gguf) | IQ3_M | 1.31GB | false | Medium-low quality, new method with decent performance comparable to Q3_K_M. |
50
 
51
+ ## Embed/output weights
52
 
53
+ Some of these quants (Q3_K_XL, Q4_K_L etc) are the standard quantization method with the embeddings and output weights quantized to Q8_0 instead of what they would normally default to.
54
 
55
+ Some say that this improves the quality, others don't notice any difference. If you use these models PLEASE COMMENT with your findings. I would like feedback that these are actually used and useful so I don't keep uploading quants no one is using.
56
 
57
+ Thanks!
58
 
59
+ ## Downloading using huggingface-cli
60
 
61
+ First, make sure you have hugginface-cli installed:
62
 
63
+ ```
64
+ pip install -U "huggingface_hub[cli]"
65
+ ```
66
 
67
+ Then, you can target the specific file you want:
 
 
 
 
68
 
69
+ ```
70
+ huggingface-cli download bartowski/gemma-2b-aps-it-GGUF --include "gemma-2b-aps-it-Q4_K_M.gguf" --local-dir ./
71
+ ```
72
 
73
+ If the model is bigger than 50GB, it will have been split into multiple files. In order to download them all to a local folder, run:
74
 
75
+ ```
76
+ huggingface-cli download bartowski/gemma-2b-aps-it-GGUF --include "gemma-2b-aps-it-Q8_0/*" --local-dir ./
77
+ ```
78
 
79
+ You can either specify a new local-dir (gemma-2b-aps-it-Q8_0) or download them all in place (./)
80
 
81
+ ## Q4_0_X_X
82
 
83
+ These are *NOT* for Metal (Apple) offloading, only ARM chips.
84
 
85
+ If you're using an ARM chip, the Q4_0_X_X quants will have a substantial speedup. Check out Q4_0_4_4 speed comparisons [on the original pull request](https://github.com/ggerganov/llama.cpp/pull/5780#pullrequestreview-21657544660)
86
 
87
+ To check which one would work best for your ARM chip, you can check [AArch64 SoC features](https://gpages.juszkiewicz.com.pl/arm-socs-table/arm-socs.html) (thanks EloyOn!).
88
 
89
+ ## Which file should I choose?
90
 
91
+ A great write up with charts showing various performances is provided by Artefact2 [here](https://gist.github.com/Artefact2/b5f810600771265fc1e39442288e8ec9)
92
 
93
+ The first thing to figure out is how big a model you can run. To do this, you'll need to figure out how much RAM and/or VRAM you have.
94
 
95
+ If you want your model running as FAST as possible, you'll want to fit the whole thing on your GPU's VRAM. Aim for a quant with a file size 1-2GB smaller than your GPU's total VRAM.
96
 
97
+ If you want the absolute maximum quality, add both your system RAM and your GPU's VRAM together, then similarly grab a quant with a file size 1-2GB Smaller than that total.
98
 
99
+ Next, you'll need to decide if you want to use an 'I-quant' or a 'K-quant'.
100
 
101
+ If you don't want to think too much, grab one of the K-quants. These are in format 'QX_K_X', like Q5_K_M.
102
 
103
+ If you want to get more into the weeds, you can check out this extremely useful feature chart:
104
 
105
+ [llama.cpp feature matrix](https://github.com/ggerganov/llama.cpp/wiki/Feature-matrix)
106
 
107
+ But basically, if you're aiming for below Q4, and you're running cuBLAS (Nvidia) or rocBLAS (AMD), you should look towards the I-quants. These are in format IQX_X, like IQ3_M. These are newer and offer better performance for their size.
108
 
109
+ These I-quants can also be used on CPU and Apple Metal, but will be slower than their K-quant equivalent, so speed vs performance is a tradeoff you'll have to decide.
110
 
111
+ The I-quants are *not* compatible with Vulcan, which is also AMD, so if you have an AMD card double check if you're using the rocBLAS build or the Vulcan build. At the time of writing this, LM Studio has a preview with ROCm support, and other inference engines have specific builds for ROCm.
112
 
113
+ ## Credits
114
 
115
+ Thank you kalomaze and Dampf for assistance in creating the imatrix calibration dataset
116
 
117
+ Thank you ZeroWw for the inspiration to experiment with embed/output
118
 
119
+ Want to support my work? Visit my ko-fi page here: https://ko-fi.com/bartowski