CoolFace
Modelpublic

legraphista/shieldgemma-2b-IMat-GGUF

sourceHugging Facegemmaupdated 2y agoView on Hugging Face
0likes2.3kdownloads
Model Card

shieldgemma-2b-IMat-GGUF

Llama.cpp imatrix quantization of google/shieldgemma-2b

Original Model: google/shieldgemma-2b Original dtype: BF16 (bfloat16) Quantized by: llama.cpp b3525 IMatrix dataset: here


Files

IMatrix

Status: ✅ Available Link: here

Common Quants

FilenameQuant typeFile SizeStatusUses IMatrixIs Split
shieldgemma-2b.Q8_0.ggufQ8_02.78GB✅ Available⚪ Static📦 No
shieldgemma-2b.Q6_K.ggufQ6_K2.15GB✅ Available⚪ Static📦 No
shieldgemma-2b.Q4_K.ggufQ4_K1.71GB✅ Available🟢 IMatrix📦 No
shieldgemma-2b.Q3_K.ggufQ3_K1.46GB✅ Available🟢 IMatrix📦 No
shieldgemma-2b.Q2_K.ggufQ2_K1.23GB✅ Available🟢 IMatrix📦 No

All Quants

FilenameQuant typeFile SizeStatusUses IMatrixIs Split
shieldgemma-2b.BF16.ggufBF165.24GB✅ Available⚪ Static📦 No
shieldgemma-2b.FP16.ggufF165.24GB✅ Available⚪ Static📦 No
shieldgemma-2b.Q8_0.ggufQ8_02.78GB✅ Available⚪ Static📦 No
shieldgemma-2b.Q6_K.ggufQ6_K2.15GB✅ Available⚪ Static📦 No
shieldgemma-2b.Q5_K.ggufQ5_K1.92GB✅ Available⚪ Static📦 No
shieldgemma-2b.Q5_K_S.ggufQ5KS1.88GB✅ Available⚪ Static📦 No
shieldgemma-2b.Q4_K.ggufQ4_K1.71GB✅ Available🟢 IMatrix📦 No
shieldgemma-2b.Q4_K_S.ggufQ4KS1.64GB✅ Available🟢 IMatrix📦 No
shieldgemma-2b.IQ4_NL.ggufIQ4_NL1.63GB✅ Available🟢 IMatrix📦 No
shieldgemma-2b.IQ4_XS.ggufIQ4_XS1.57GB✅ Available🟢 IMatrix📦 No
shieldgemma-2b.Q3_K.ggufQ3_K1.46GB✅ Available🟢 IMatrix📦 No
shieldgemma-2b.Q3_K_L.ggufQ3KL1.55GB✅ Available🟢 IMatrix📦 No
shieldgemma-2b.Q3_K_S.ggufQ3KS1.36GB✅ Available🟢 IMatrix📦 No
shieldgemma-2b.IQ3_M.ggufIQ3_M1.39GB✅ Available🟢 IMatrix📦 No
shieldgemma-2b.IQ3_S.ggufIQ3_S1.36GB✅ Available🟢 IMatrix📦 No
shieldgemma-2b.IQ3_XS.ggufIQ3_XS1.31GB✅ Available🟢 IMatrix📦 No
shieldgemma-2b.IQ3_XXS.ggufIQ3_XXS1.18GB✅ Available🟢 IMatrix📦 No
shieldgemma-2b.Q2_K.ggufQ2_K1.23GB✅ Available🟢 IMatrix📦 No
shieldgemma-2b.Q2_K_S.ggufQ2KS1.17GB✅ Available🟢 IMatrix📦 No
shieldgemma-2b.IQ2_M.ggufIQ2_M1.09GB✅ Available🟢 IMatrix📦 No
shieldgemma-2b.IQ2_S.ggufIQ2_S1.03GB✅ Available🟢 IMatrix📦 No
shieldgemma-2b.IQ2_XS.ggufIQ2_XS1.00GB✅ Available🟢 IMatrix📦 No
shieldgemma-2b.IQ2_XXS.ggufIQ2_XXS943.19MB✅ Available🟢 IMatrix📦 No
shieldgemma-2b.IQ1_M.ggufIQ1_M873.80MB✅ Available🟢 IMatrix📦 No
shieldgemma-2b.IQ1_S.ggufIQ1_S832.16MB✅ Available🟢 IMatrix📦 No

Downloading using huggingface-cli

If you do not have hugginface-cli installed:

pip install -U "huggingface_hub[cli]"

Download the specific file you want:

huggingface-cli download legraphista/shieldgemma-2b-IMat-GGUF --include "shieldgemma-2b.Q8_0.gguf" --local-dir ./

If the model file is big, it has been split into multiple files. In order to download them all to a local folder, run:

huggingface-cli download legraphista/shieldgemma-2b-IMat-GGUF --include "shieldgemma-2b.Q8_0/*" --local-dir ./
# see FAQ for merging GGUF's

Inference

Simple chat template

<bos>You are a policy expert trying to help determine whether a user prompt is in violation of the defined safety policies.

<start_of_turn>
Human Question: {next_user_prompt}
<end_of_turn>

Our safety principle is defined in the below:

* {guideline}

===

Does the human question violate the above principle? Your answer must start with 'Yes' or 'No'. And then walk through step by step to be sure we answer correctly.

Llama.cpp

llama.cpp/main -m shieldgemma-2b.Q8_0.gguf --color -i -p "prompt here (according to the chat template)"

FAQ

Why is the IMatrix not applied everywhere?

According to this investigation, it appears that lower quantizations are the only ones that benefit from the imatrix input (as per hellaswag results).

How do I merge a split GGUF?

  1. 1.Make sure you have gguf-split available
  2. 2.To get hold of gguf-split, navigate to https://github.com/ggerganov/llama.cpp/releases
  3. 3.Download the appropriate zip for your system from the latest release
  4. 4.Unzip the archive and you should be able to find gguf-split
  5. 5.Locate your GGUF chunks folder (ex: shieldgemma-2b.Q8_0)
  6. 6.Run gguf-split --merge shieldgemma-2b.Q8_0/shieldgemma-2b.Q8_0-00001-of-XXXXX.gguf shieldgemma-2b.Q8_0.gguf
  7. 7.Make sure to point gguf-split to the first chunk of the split.

Got a suggestion? Ping me @legraphista!