CoolFace
Modelpublic

tensorblock/shieldgemma-2b-GGUF

sourceHugging Facegemmaupdated 8mo agoView on Hugging Face
0likes27downloads
README.md157 linesDownload Raw Back to root
1---2license: gemma3library_name: transformers4pipeline_tag: text-generation5extra_gated_heading: Access Gemma on Hugging Face6extra_gated_prompt: To access Gemma on Hugging Face, you’re required to review and7  agree to Google’s usage license. To do this, please ensure you’re logged in to Hugging8  Face and click below. Requests are processed immediately.9extra_gated_button_content: Acknowledge license10base_model: google/shieldgemma-2b11tags:12- TensorBlock13- GGUF14---15 16<div style="width: auto; margin-left: auto; margin-right: auto">17<img src="https://i.imgur.com/jC7kdl8.jpeg" alt="TensorBlock" style="width: 100%; min-width: 400px; display: block; margin: auto;">18</div>19 20[![Website](https://img.shields.io/badge/Website-tensorblock.co-blue?logo=google-chrome&logoColor=white)](https://tensorblock.co)21[![Twitter](https://img.shields.io/twitter/follow/tensorblock_aoi?style=social)](https://twitter.com/tensorblock_aoi)22[![Discord](https://img.shields.io/badge/Discord-Join%20Us-5865F2?logo=discord&logoColor=white)](https://discord.gg/Ej5NmeHFf2)23[![GitHub](https://img.shields.io/badge/GitHub-TensorBlock-black?logo=github&logoColor=white)](https://github.com/TensorBlock)24[![Telegram](https://img.shields.io/badge/Telegram-Group-blue?logo=telegram)](https://t.me/TensorBlock)25 26 27## google/shieldgemma-2b - GGUF28 29This repo contains GGUF format model files for [google/shieldgemma-2b](https://huggingface.co/google/shieldgemma-2b).30 31The files were quantized using machines provided by [TensorBlock](https://tensorblock.co/), and they are compatible with llama.cpp as of [commit b4011](https://github.com/ggerganov/llama.cpp/commit/a6744e43e80f4be6398fc7733a01642c846dce1d).32 33## Our projects34<table border="1" cellspacing="0" cellpadding="10">35  <tr>36    <th colspan="2" style="font-size: 25px;">Forge</th>37  </tr>38  <tr>39    <th colspan="2">40      <img src="https://imgur.com/faI5UKh.jpeg" alt="Forge Project" width="900"/>41    </th>42  </tr>43  <tr>44    <th colspan="2">An OpenAI-compatible multi-provider routing layer.</th>45  </tr>46  <tr>47    <th colspan="2">48      <a href="https://github.com/TensorBlock/forge" target="_blank" style="49        display: inline-block;50        padding: 8px 16px;51        background-color: #FF7F50;52        color: white;53        text-decoration: none;54        border-radius: 6px;55        font-weight: bold;56        font-family: sans-serif;57      ">🚀 Try it now! 🚀</a>58    </th>59  </tr>60 61  <tr>62    <th style="font-size: 25px;">Awesome MCP Servers</th>63    <th style="font-size: 25px;">TensorBlock Studio</th>64  </tr>65  <tr>66    <th><img src="https://imgur.com/2Xov7B7.jpeg" alt="MCP Servers" width="450"/></th>67    <th><img src="https://imgur.com/pJcmF5u.jpeg" alt="Studio" width="450"/></th>68  </tr>69  <tr>70    <th>A comprehensive collection of Model Context Protocol (MCP) servers.</th>71    <th>A lightweight, open, and extensible multi-LLM interaction studio.</th>72  </tr>73  <tr>74    <th>75      <a href="https://github.com/TensorBlock/awesome-mcp-servers" target="_blank" style="76        display: inline-block;77        padding: 8px 16px;78        background-color: #FF7F50;79        color: white;80        text-decoration: none;81        border-radius: 6px;82        font-weight: bold;83        font-family: sans-serif;84      ">👀 See what we built 👀</a>85    </th>86    <th>87      <a href="https://github.com/TensorBlock/TensorBlock-Studio" target="_blank" style="88        display: inline-block;89        padding: 8px 16px;90        background-color: #FF7F50;91        color: white;92        text-decoration: none;93        border-radius: 6px;94        font-weight: bold;95        font-family: sans-serif;96      ">👀 See what we built 👀</a>97    </th>98  </tr>99</table>100## Prompt template101 102```103<bos>You are a policy expert trying to help determine whether a user prompt is in violation of the defined safety policies.104 105<start_of_turn>106Human Question: {prompt}107<end_of_turn>108 109Our safety principle is defined in the below:110 111* {system_prompt}112 113===114 115Does 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.116```117 118## Model file specification119 120| Filename | Quant type | File Size | Description |121| -------- | ---------- | --------- | ----------- |122| [shieldgemma-2b-Q2_K.gguf](https://huggingface.co/tensorblock/shieldgemma-2b-GGUF/blob/main/shieldgemma-2b-Q2_K.gguf) | Q2_K | 1.230 GB | smallest, significant quality loss - not recommended for most purposes |123| [shieldgemma-2b-Q3_K_S.gguf](https://huggingface.co/tensorblock/shieldgemma-2b-GGUF/blob/main/shieldgemma-2b-Q3_K_S.gguf) | Q3_K_S | 1.361 GB | very small, high quality loss |124| [shieldgemma-2b-Q3_K_M.gguf](https://huggingface.co/tensorblock/shieldgemma-2b-GGUF/blob/main/shieldgemma-2b-Q3_K_M.gguf) | Q3_K_M | 1.462 GB | very small, high quality loss |125| [shieldgemma-2b-Q3_K_L.gguf](https://huggingface.co/tensorblock/shieldgemma-2b-GGUF/blob/main/shieldgemma-2b-Q3_K_L.gguf) | Q3_K_L | 1.550 GB | small, substantial quality loss |126| [shieldgemma-2b-Q4_0.gguf](https://huggingface.co/tensorblock/shieldgemma-2b-GGUF/blob/main/shieldgemma-2b-Q4_0.gguf) | Q4_0 | 1.630 GB | legacy; small, very high quality loss - prefer using Q3_K_M |127| [shieldgemma-2b-Q4_K_S.gguf](https://huggingface.co/tensorblock/shieldgemma-2b-GGUF/blob/main/shieldgemma-2b-Q4_K_S.gguf) | Q4_K_S | 1.639 GB | small, greater quality loss |128| [shieldgemma-2b-Q4_K_M.gguf](https://huggingface.co/tensorblock/shieldgemma-2b-GGUF/blob/main/shieldgemma-2b-Q4_K_M.gguf) | Q4_K_M | 1.709 GB | medium, balanced quality - recommended |129| [shieldgemma-2b-Q5_0.gguf](https://huggingface.co/tensorblock/shieldgemma-2b-GGUF/blob/main/shieldgemma-2b-Q5_0.gguf) | Q5_0 | 1.883 GB | legacy; medium, balanced quality - prefer using Q4_K_M |130| [shieldgemma-2b-Q5_K_S.gguf](https://huggingface.co/tensorblock/shieldgemma-2b-GGUF/blob/main/shieldgemma-2b-Q5_K_S.gguf) | Q5_K_S | 1.883 GB | large, low quality loss - recommended |131| [shieldgemma-2b-Q5_K_M.gguf](https://huggingface.co/tensorblock/shieldgemma-2b-GGUF/blob/main/shieldgemma-2b-Q5_K_M.gguf) | Q5_K_M | 1.923 GB | large, very low quality loss - recommended |132| [shieldgemma-2b-Q6_K.gguf](https://huggingface.co/tensorblock/shieldgemma-2b-GGUF/blob/main/shieldgemma-2b-Q6_K.gguf) | Q6_K | 2.151 GB | very large, extremely low quality loss |133| [shieldgemma-2b-Q8_0.gguf](https://huggingface.co/tensorblock/shieldgemma-2b-GGUF/blob/main/shieldgemma-2b-Q8_0.gguf) | Q8_0 | 2.784 GB | very large, extremely low quality loss - not recommended |134 135 136## Downloading instruction137 138### Command line139 140Firstly, install Huggingface Client141 142```shell143pip install -U "huggingface_hub[cli]"144```145 146Then, downoad the individual model file the a local directory147 148```shell149huggingface-cli download tensorblock/shieldgemma-2b-GGUF --include "shieldgemma-2b-Q2_K.gguf" --local-dir MY_LOCAL_DIR150```151 152If you wanna download multiple model files with a pattern (e.g., `*Q4_K*gguf`), you can try:153 154```shell155huggingface-cli download tensorblock/shieldgemma-2b-GGUF --local-dir MY_LOCAL_DIR --local-dir-use-symlinks False --include='*Q4_K*gguf'156```157