Instructions to use mradermacher/shieldgemma-9b-i1-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mradermacher/shieldgemma-9b-i1-GGUF with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("mradermacher/shieldgemma-9b-i1-GGUF", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use mradermacher/shieldgemma-9b-i1-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf mradermacher/shieldgemma-9b-i1-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf mradermacher/shieldgemma-9b-i1-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf mradermacher/shieldgemma-9b-i1-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf mradermacher/shieldgemma-9b-i1-GGUF:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf mradermacher/shieldgemma-9b-i1-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf mradermacher/shieldgemma-9b-i1-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf mradermacher/shieldgemma-9b-i1-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf mradermacher/shieldgemma-9b-i1-GGUF:Q4_K_M
Use Docker
docker model run hf.co/mradermacher/shieldgemma-9b-i1-GGUF:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use mradermacher/shieldgemma-9b-i1-GGUF with Ollama:
ollama run hf.co/mradermacher/shieldgemma-9b-i1-GGUF:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use mradermacher/shieldgemma-9b-i1-GGUF with Docker Model Runner:
docker model run hf.co/mradermacher/shieldgemma-9b-i1-GGUF:Q4_K_M
- Lemonade
How to use mradermacher/shieldgemma-9b-i1-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull mradermacher/shieldgemma-9b-i1-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.shieldgemma-9b-i1-GGUF-Q4_K_M
List all available models
lemonade list
- Atomic Chat
File size: 5,155 Bytes
ba367a0 53fcf77 ba367a0 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | ---
base_model: google/shieldgemma-9b
extra_gated_button_content: Acknowledge license
extra_gated_heading: Access Gemma on Hugging Face
extra_gated_prompt: To access Gemma on Hugging Face, you’re required to review and
agree to Google’s usage license. To do this, please ensure you’re logged in to Hugging
Face and click below. Requests are processed immediately.
language:
- en
library_name: transformers
license: gemma
quantized_by: mradermacher
---
## About
<!-- ### quantize_version: 2 -->
<!-- ### output_tensor_quantised: 1 -->
<!-- ### convert_type: hf -->
<!-- ### vocab_type: -->
<!-- ### tags: nicoboss -->
weighted/imatrix quants of https://huggingface.co/google/shieldgemma-9b
<!-- provided-files -->
static quants are available at https://huggingface.co/mradermacher/shieldgemma-9b-GGUF
## Usage
If you are unsure how to use GGUF files, refer to one of [TheBloke's
READMEs](https://huggingface.co/TheBloke/KafkaLM-70B-German-V0.1-GGUF) for
more details, including on how to concatenate multi-part files.
## Provided Quants
(sorted by size, not necessarily quality. IQ-quants are often preferable over similar sized non-IQ quants)
| Link | Type | Size/GB | Notes |
|:-----|:-----|--------:|:------|
| [GGUF](https://huggingface.co/mradermacher/shieldgemma-9b-i1-GGUF/resolve/main/shieldgemma-9b.i1-IQ1_S.gguf) | i1-IQ1_S | 2.5 | for the desperate |
| [GGUF](https://huggingface.co/mradermacher/shieldgemma-9b-i1-GGUF/resolve/main/shieldgemma-9b.i1-IQ1_M.gguf) | i1-IQ1_M | 2.6 | mostly desperate |
| [GGUF](https://huggingface.co/mradermacher/shieldgemma-9b-i1-GGUF/resolve/main/shieldgemma-9b.i1-IQ2_XXS.gguf) | i1-IQ2_XXS | 2.9 | |
| [GGUF](https://huggingface.co/mradermacher/shieldgemma-9b-i1-GGUF/resolve/main/shieldgemma-9b.i1-IQ2_XS.gguf) | i1-IQ2_XS | 3.2 | |
| [GGUF](https://huggingface.co/mradermacher/shieldgemma-9b-i1-GGUF/resolve/main/shieldgemma-9b.i1-IQ2_S.gguf) | i1-IQ2_S | 3.3 | |
| [GGUF](https://huggingface.co/mradermacher/shieldgemma-9b-i1-GGUF/resolve/main/shieldgemma-9b.i1-IQ2_M.gguf) | i1-IQ2_M | 3.5 | |
| [GGUF](https://huggingface.co/mradermacher/shieldgemma-9b-i1-GGUF/resolve/main/shieldgemma-9b.i1-IQ3_XXS.gguf) | i1-IQ3_XXS | 3.9 | lower quality |
| [GGUF](https://huggingface.co/mradermacher/shieldgemma-9b-i1-GGUF/resolve/main/shieldgemma-9b.i1-Q2_K.gguf) | i1-Q2_K | 3.9 | IQ3_XXS probably better |
| [GGUF](https://huggingface.co/mradermacher/shieldgemma-9b-i1-GGUF/resolve/main/shieldgemma-9b.i1-IQ3_XS.gguf) | i1-IQ3_XS | 4.2 | |
| [GGUF](https://huggingface.co/mradermacher/shieldgemma-9b-i1-GGUF/resolve/main/shieldgemma-9b.i1-IQ3_S.gguf) | i1-IQ3_S | 4.4 | beats Q3_K* |
| [GGUF](https://huggingface.co/mradermacher/shieldgemma-9b-i1-GGUF/resolve/main/shieldgemma-9b.i1-Q3_K_S.gguf) | i1-Q3_K_S | 4.4 | IQ3_XS probably better |
| [GGUF](https://huggingface.co/mradermacher/shieldgemma-9b-i1-GGUF/resolve/main/shieldgemma-9b.i1-IQ3_M.gguf) | i1-IQ3_M | 4.6 | |
| [GGUF](https://huggingface.co/mradermacher/shieldgemma-9b-i1-GGUF/resolve/main/shieldgemma-9b.i1-Q3_K_M.gguf) | i1-Q3_K_M | 4.9 | IQ3_S probably better |
| [GGUF](https://huggingface.co/mradermacher/shieldgemma-9b-i1-GGUF/resolve/main/shieldgemma-9b.i1-Q3_K_L.gguf) | i1-Q3_K_L | 5.2 | IQ3_M probably better |
| [GGUF](https://huggingface.co/mradermacher/shieldgemma-9b-i1-GGUF/resolve/main/shieldgemma-9b.i1-IQ4_XS.gguf) | i1-IQ4_XS | 5.3 | |
| [GGUF](https://huggingface.co/mradermacher/shieldgemma-9b-i1-GGUF/resolve/main/shieldgemma-9b.i1-Q4_0.gguf) | i1-Q4_0 | 5.6 | fast, low quality |
| [GGUF](https://huggingface.co/mradermacher/shieldgemma-9b-i1-GGUF/resolve/main/shieldgemma-9b.i1-Q4_K_S.gguf) | i1-Q4_K_S | 5.6 | optimal size/speed/quality |
| [GGUF](https://huggingface.co/mradermacher/shieldgemma-9b-i1-GGUF/resolve/main/shieldgemma-9b.i1-Q4_K_M.gguf) | i1-Q4_K_M | 5.9 | fast, recommended |
| [GGUF](https://huggingface.co/mradermacher/shieldgemma-9b-i1-GGUF/resolve/main/shieldgemma-9b.i1-Q5_K_S.gguf) | i1-Q5_K_S | 6.6 | |
| [GGUF](https://huggingface.co/mradermacher/shieldgemma-9b-i1-GGUF/resolve/main/shieldgemma-9b.i1-Q5_K_M.gguf) | i1-Q5_K_M | 6.7 | |
| [GGUF](https://huggingface.co/mradermacher/shieldgemma-9b-i1-GGUF/resolve/main/shieldgemma-9b.i1-Q6_K.gguf) | i1-Q6_K | 7.7 | practically like static Q6_K |
Here is a handy graph by ikawrakow comparing some lower-quality quant
types (lower is better):

And here are Artefact2's thoughts on the matter:
https://gist.github.com/Artefact2/b5f810600771265fc1e39442288e8ec9
## FAQ / Model Request
See https://huggingface.co/mradermacher/model_requests for some answers to
questions you might have and/or if you want some other model quantized.
## Thanks
I thank my company, [nethype GmbH](https://www.nethype.de/), for letting
me use its servers and providing upgrades to my workstation to enable
this work in my free time. Additional thanks to [@nicoboss](https://huggingface.co/nicoboss) for giving me access to his private supercomputer, enabling me to provide many more imatrix quants, at much higher quality, than I would otherwise be able to.
<!-- end -->
|