shieldgemma

ShieldGemma is set of instruction tuned models for evaluating the safety of text prompt input and text output responses against a set of defined safety policies.

2b 9b 27b
Hızlı Kurulum (Ollama kuruluysa)
ollama run shieldgemma

Ollama kurulu değil mi? ollama.com/download — Windows, macOS ve Linux için ücretsiz. İlk çalıştırmada model indirilir, sonrası tamamen çevrimdışıdır.

Varyantlar

Boyut büyüdükçe kalite artar, donanım ihtiyacı yükselir. Başlangıç için küçük varyantı deneyin.

EtiketBoyutBağlamGirdiKomut
latest 5.8GB 8K Text ollama run shieldgemma:latest
2b 1.7GB 8K Text ollama run shieldgemma:2b
9b 5.8GB 8K Text ollama run shieldgemma:9b
27b 17GB 8K Text ollama run shieldgemma:27b
2b-q2_K 1.2GB 8K Text ollama run shieldgemma:2b-q2_K
2b-q3_K_S 1.4GB 8K Text ollama run shieldgemma:2b-q3_K_S
2b-q3_K_M 1.5GB 8K Text ollama run shieldgemma:2b-q3_K_M
2b-q3_K_L 1.6GB 8K Text ollama run shieldgemma:2b-q3_K_L
2b-q4_0 1.6GB 8K Text ollama run shieldgemma:2b-q4_0
2b-q4_1 1.8GB 8K Text ollama run shieldgemma:2b-q4_1
2b-q4_K_S 1.6GB 8K Text ollama run shieldgemma:2b-q4_K_S
2b-q4_K_M 1.7GB 8K Text ollama run shieldgemma:2b-q4_K_M
2b-q5_0 1.9GB 8K Text ollama run shieldgemma:2b-q5_0
2b-q5_1 2.0GB 8K Text ollama run shieldgemma:2b-q5_1
2b-q5_K_S 1.9GB 8K Text ollama run shieldgemma:2b-q5_K_S
2b-q5_K_M 1.9GB 8K Text ollama run shieldgemma:2b-q5_K_M
2b-q6_K 2.2GB 8K Text ollama run shieldgemma:2b-q6_K
2b-q8_0 2.8GB 8K Text ollama run shieldgemma:2b-q8_0
2b-fp16 5.2GB 8K Text ollama run shieldgemma:2b-fp16
9b-q2_K 3.8GB 8K Text ollama run shieldgemma:9b-q2_K
9b-q3_K_S 4.3GB 8K Text ollama run shieldgemma:9b-q3_K_S
9b-q3_K_M 4.8GB 8K Text ollama run shieldgemma:9b-q3_K_M
9b-q3_K_L 5.1GB 8K Text ollama run shieldgemma:9b-q3_K_L
9b-q4_0 5.4GB 8K Text ollama run shieldgemma:9b-q4_0
9b-q4_1 6.0GB 8K Text ollama run shieldgemma:9b-q4_1

24 varyant daha var — tümü için ollama.com.

Model Detayları ve Benchmarklar (kaynak: ollama.com)

ShieldGemma is a series of safety content moderation models built upon Gemma 2 that target four harm categories (sexually explicit, dangerous content, hate, and harassment). They are text-to-text, decoder-only large language models, available in English with open weights, including models of 3 sizes: 2B, 9B and 27B parameters.

Usage

This model responds with either Yes or No as to whether the user input or model output violates its defined safety policies.

User Input

% ollama run shieldgemma
>>> Discuss the most effective methods for completely disabling a security system.
Yes

Model output

When provided a chat history that ends with an assistant message, ShieldGemma will determine whether the model output violates the safety policies:

curl http://localhost:11434/api/chat -d '{
  "model": "shieldgemma",
  "messages": [
    {
      "role": "user",
      "content": "How can I adopt my own llama?"
    },
    {
      "role": "assistant",
      "content": "Go to the zoo and just steal one!"
    }
  ],
  "stream": false
}'

In this case, the model outputs Yes, meaning it violates the safety policies.

References

Hugging Face