bartowski commited on
Commit
fea565d
1 Parent(s): ff12ab4

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +46 -90
README.md CHANGED
@@ -1,120 +1,76 @@
1
  ---
2
- base_model: google/gemma-2-2b-it
3
- library_name: transformers
4
  license: gemma
 
5
  pipeline_tag: text-generation
6
- tags:
7
- - conversational
8
- quantized_by: bartowski
9
  extra_gated_heading: Access Gemma on Hugging Face
10
- extra_gated_prompt: To access Gemma on Hugging Face, you’re required to review and
11
- agree to Google’s usage license. To do this, please ensure you’re logged in to Hugging
 
12
  Face and click below. Requests are processed immediately.
13
  extra_gated_button_content: Acknowledge license
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  ---
15
 
16
- ## Llamacpp imatrix Quantizations of gemma-2-2b-it
17
-
18
- Using <a href="https://github.com/ggerganov/llama.cpp/">llama.cpp</a> release <a href="https://github.com/ggerganov/llama.cpp/releases/tag/b3496">b3496</a> for quantization.
19
 
20
- Original model: https://huggingface.co/google/gemma-2-2b-it
21
 
22
- All quants made using imatrix option with dataset from [here](https://gist.github.com/bartowski1182/eb213dccb3571f863da82e99418f81e8)
23
-
24
- Run them in [LM Studio](https://lmstudio.ai/)
25
-
26
- ## Prompt format
27
-
28
- ```
29
- <bos><start_of_turn>user
30
- {prompt}<end_of_turn>
31
- <start_of_turn>model
32
- <end_of_turn>
33
- <start_of_turn>model
34
-
35
- ```
36
-
37
- Note that this model does not support a System prompt.
38
 
39
- ## Download a file (not the whole branch) from below:
40
 
41
- | Filename | Quant type | File Size | Split | Description |
42
- | -------- | ---------- | --------- | ----- | ----------- |
43
- ## Download a file (not the whole branch) from below:
44
 
45
- | Filename | Quant type | File Size | Split | Description |
46
- | -------- | ---------- | --------- | ----- | ----------- |
47
- | [gemma-2-2b-it-f32.gguf](https://huggingface.co/bartowski/gemma-2-2b-it-GGUF/blob/main/gemma-2-2b-it-f32.gguf) | f32 | 10.46GB | false | Full F32 weights. |
48
- | [gemma-2-2b-it-Q8_0.gguf](https://huggingface.co/bartowski/gemma-2-2b-it-GGUF/blob/main/gemma-2-2b-it-Q8_0.gguf) | Q8_0 | 2.78GB | false | Extremely high quality, generally unneeded but max available quant. |
49
- | [gemma-2-2b-it-Q6_K_L.gguf](https://huggingface.co/bartowski/gemma-2-2b-it-GGUF/blob/main/gemma-2-2b-it-Q6_K_L.gguf) | Q6_K_L | 2.29GB | false | Uses Q8_0 for embed and output weights. Very high quality, near perfect, *recommended*. |
50
- | [gemma-2-2b-it-Q6_K.gguf](https://huggingface.co/bartowski/gemma-2-2b-it-GGUF/blob/main/gemma-2-2b-it-Q6_K.gguf) | Q6_K | 2.15GB | false | Very high quality, near perfect, *recommended*. |
51
- | [gemma-2-2b-it-Q5_K_M.gguf](https://huggingface.co/bartowski/gemma-2-2b-it-GGUF/blob/main/gemma-2-2b-it-Q5_K_M.gguf) | Q5_K_M | 1.92GB | false | High quality, *recommended*. |
52
- | [gemma-2-2b-it-Q5_K_S.gguf](https://huggingface.co/bartowski/gemma-2-2b-it-GGUF/blob/main/gemma-2-2b-it-Q5_K_S.gguf) | Q5_K_S | 1.88GB | false | High quality, *recommended*. |
53
- | [gemma-2-2b-it-Q4_K_M.gguf](https://huggingface.co/bartowski/gemma-2-2b-it-GGUF/blob/main/gemma-2-2b-it-Q4_K_M.gguf) | Q4_K_M | 1.71GB | false | Good quality, default size for must use cases, *recommended*. |
54
- | [gemma-2-2b-it-Q4_K_S.gguf](https://huggingface.co/bartowski/gemma-2-2b-it-GGUF/blob/main/gemma-2-2b-it-Q4_K_S.gguf) | Q4_K_S | 1.64GB | false | Slightly lower quality with more space savings, *recommended*. |
55
- | [gemma-2-2b-it-IQ4_XS.gguf](https://huggingface.co/bartowski/gemma-2-2b-it-GGUF/blob/main/gemma-2-2b-it-IQ4_XS.gguf) | IQ4_XS | 1.57GB | false | Decent quality, smaller than Q4_K_S with similar performance, *recommended*. |
56
- | [gemma-2-2b-it-Q3_K_L.gguf](https://huggingface.co/bartowski/gemma-2-2b-it-GGUF/blob/main/gemma-2-2b-it-Q3_K_L.gguf) | Q3_K_L | 1.55GB | false | Lower quality but usable, good for low RAM availability. |
57
- | [gemma-2-2b-it-IQ3_M.gguf](https://huggingface.co/bartowski/gemma-2-2b-it-GGUF/blob/main/gemma-2-2b-it-IQ3_M.gguf) | IQ3_M | 1.39GB | false | Medium-low quality, new method with decent performance comparable to Q3_K_M. |
58
 
59
- ## Embed/output weights
60
 
61
- 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.
62
 
63
- 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.
64
 
65
- Thanks!
66
-
67
- ## Credits
68
-
69
- Thank you kalomaze and Dampf for assistance in creating the imatrix calibration dataset
70
-
71
- Thank you ZeroWw for the inspiration to experiment with embed/output
72
-
73
- ## Downloading using huggingface-cli
74
-
75
- First, make sure you have hugginface-cli installed:
76
-
77
- ```
78
- pip install -U "huggingface_hub[cli]"
79
- ```
80
-
81
- Then, you can target the specific file you want:
82
-
83
- ```
84
- huggingface-cli download bartowski/gemma-2-2b-it-GGUF --include "gemma-2-2b-it-Q4_K_M.gguf" --local-dir ./
85
  ```
86
-
87
- 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:
88
-
89
- ```
90
- huggingface-cli download bartowski/gemma-2-2b-it-GGUF --include "gemma-2-2b-it-Q8_0/*" --local-dir ./
91
  ```
92
 
93
- You can either specify a new local-dir (gemma-2-2b-it-Q8_0) or download them all in place (./)
94
-
95
- ## Which file should I choose?
96
-
97
- A great write up with charts showing various performances is provided by Artefact2 [here](https://gist.github.com/Artefact2/b5f810600771265fc1e39442288e8ec9)
98
-
99
- 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.
100
-
101
- 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.
102
 
103
- 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.
104
 
105
- Next, you'll need to decide if you want to use an 'I-quant' or a 'K-quant'.
106
 
107
- 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.
108
 
109
- If you want to get more into the weeds, you can check out this extremely useful feature chart:
 
 
110
 
111
- [llama.cpp feature matrix](https://github.com/ggerganov/llama.cpp/wiki/Feature-matrix)
112
 
113
- 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.
114
 
115
- 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.
116
 
117
- 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.
118
 
119
- Want to support my work? Visit my ko-fi page here: https://ko-fi.com/bartowski
120
 
 
 
1
  ---
 
 
2
  license: gemma
3
+ library_name: transformers
4
  pipeline_tag: text-generation
 
 
 
5
  extra_gated_heading: Access Gemma on Hugging Face
6
+ extra_gated_prompt: >-
7
+ To access Gemma on Hugging Face, you’re required to review and agree to
8
+ Google’s usage license. To do this, please ensure you’re logged in to Hugging
9
  Face and click below. Requests are processed immediately.
10
  extra_gated_button_content: Acknowledge license
11
+ tags:
12
+ - conversational
13
+ quantized_by: bartowski
14
+ lm_studio:
15
+ param_count: 2b
16
+ use_case: general
17
+ release_date: 27-06-2024
18
+ model_creator: google
19
+ prompt_template: Google Gemma Instruct
20
+ system_prompt: none
21
+ base_model: gemma
22
+ original_repo: google/gemma-2-2b-it
23
+ base_model: google/gemma-2-2b-it
24
  ---
25
 
26
+ ## 💫 Community Model> Gemma 2 2b Instruct by Google
 
 
27
 
28
+ *👾 [LM Studio](https://lmstudio.ai) Community models highlights program. Highlighting new & noteworthy models by the community. Join the conversation on [Discord](https://discord.gg/aPQfnNkxGC)*.
29
 
30
+ **Model creator:** [Google](https://huggingface.co/google)<br>
31
+ **Original model**: [gemma-2-2b-it](https://huggingface.co/google/gemma-2-2b-it)<br>
32
+ **GGUF quantization:** provided by [bartowski](https://huggingface.co/bartowski) based on `llama.cpp` release [b3496](https://github.com/ggerganov/llama.cpp/releases/tag/b3496)<br>
 
 
 
 
 
 
 
 
 
 
 
 
 
33
 
34
+ ## Model Settings:
35
 
36
+ Requires LM Studio 0.2.27, update can be downloaded from here: https://lmstudio.ai
 
 
37
 
38
+ ## Model Summary:
39
+ Gemma 2 instruct is a a brand new model from Google in the Gemma family based on the technology from Gemini. Trained on a combination of web documents, code, and mathematics, this model should excel at anything you throw at it.<br>
40
+ At only 2b parameters, this is a great size for those with limited VRAM or RAM, while still performing very well.
 
 
 
 
 
 
 
 
 
 
41
 
42
+ ## Prompt Template:
43
 
44
+ Choose the 'Google Gemma Instruct' preset in your LM Studio.
45
 
46
+ Under the hood, the model will see a prompt that's formatted like so:
47
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
  ```
49
+ <start_of_turn>user
50
+ {prompt}<end_of_turn>
51
+ <start_of_turn>model
 
 
52
  ```
53
 
54
+ Note that this model does not support a System prompt.
 
 
 
 
 
 
 
 
55
 
56
+ ## Technical Details
57
 
58
+ Gemma 2 features the same extremely large vocabulary from release 1.1, which tends to help with multilingual and coding proficiency.
59
 
60
+ Gemma 2 2b was trained on a wide dataset of 2 trillion tokens, which is an incredible ratio of training tokens to model parameters.
61
 
62
+ - Web Documents: A diverse collection of web text ensures the model is exposed to a broad range of linguistic styles, topics, and vocabulary. Primarily English-language content.
63
+ - Code: Exposing the model to code helps it to learn the syntax and patterns of programming languages, which improves its ability to generate code or understand code-related questions.
64
+ - Mathematics: Training on mathematical text helps the model learn logical reasoning, symbolic representation, and to address mathematical queries.
65
 
66
+ For more details check out their blog post here: https://huggingface.co/blog/gemma2
67
 
68
+ ## Special thanks
69
 
70
+ 🙏 Special thanks to [Georgi Gerganov](https://github.com/ggerganov) and the whole team working on [llama.cpp](https://github.com/ggerganov/llama.cpp/) for making all of this possible.
71
 
72
+ 🙏 Special thanks to [Kalomaze](https://github.com/kalomaze) and [Dampf](https://github.com/Dampfinchen) for their work on the dataset (linked [here](https://gist.github.com/bartowski1182/eb213dccb3571f863da82e99418f81e8)) that was used for calculating the imatrix for all sizes.
73
 
74
+ ## Disclaimers
75
 
76
+ LM Studio is not the creator, originator, or owner of any Model featured in the Community Model Program. Each Community Model is created and provided by third parties. LM Studio does not endorse, support, represent or guarantee the completeness, truthfulness, accuracy, or reliability of any Community Model. You understand that Community Models can produce content that might be offensive, harmful, inaccurate or otherwise inappropriate, or deceptive. Each Community Model is the sole responsibility of the person or entity who originated such Model. LM Studio may not monitor or control the Community Models and cannot, and does not, take responsibility for any such Model. LM Studio disclaims all warranties or guarantees about the accuracy, reliability or benefits of the Community Models. LM Studio further disclaims any warranty that the Community Model will meet your requirements, be secure, uninterrupted or available at any time or location, or error-free, viruses-free, or that any errors will be corrected, or otherwise. You will be solely responsible for any damage resulting from your use of or access to the Community Models, your downloading of any Community Model, or use of any other Community Model provided by or through LM Studio.