Llama Guard or ShieldGemma: which safety filter to pick

Both models do the same thing: check user questions and bot replies for dangerous content against a list of categories, both are in Ollama and both run on a CPU. Neither officially supports Russian, so on a Russian-language project the filter has to be tested on your own examples rather than trusted blindly. Llama Guard spans 1B to 12B, version 4 from 2025-04 also checks images, and the Llama family licenses allow commercial use with restrictions. ShieldGemma runs from 2B to 27B, ShieldGemma 2 from 2025-03 checks generated images before publishing, and the Gemma Terms of Use likewise allow commercial use with restrictions on types of use. If you already build on one of these families, take the filter from the same one.

Comparison based on catalog data

ParameterLlama GuardShieldGemma
CategoryModeration and safetyModeration and safety
DeveloperMeta, USAGoogle, USA
ReleasesDec 2023 – Apr 2025Jul 2024 – Mar 2025
Sizes1B – 12B2B – 27B
HardwareLaptop, 1 GPULaptop, 1 GPU
Commercial useCommercial use with conditionsCommercial use with conditions
LicenseLlama 2, 3.1 and 4 licenses: commercial use allowed with restrictionsGemma Terms of Use: commercial use allowed with restrictions on types of use
RussianNot supportedNot supported
OllamaYesYes
Without GPUYesYes
Tasks
  • Checking user questions to the bot
  • Checking bot replies before sending
  • Reporting which rule category was violated
  • Moderating user messages
  • Checking bot replies
  • Checking generated images before publishing

Choose Llama Guard if

  • You need a very small filter: Llama Guard comes in 1B
  • You already run Llama models and want one family
  • You need a report naming the exact rule category that was violated
Llama Guard

Choose ShieldGemma if

  • You need a large version for demanding moderation: ShieldGemma goes to 27B
  • Your main job is checking generated images before publishing
  • You are already building on Gemma models
ShieldGemma

Other comparisons

Need a model for your task?

An open model can run on your own server: data stays in-house, there is no per-request fee, and the model can be fine-tuned on your documents.

  1. SelectThe model and size for your task and hardware budget
  2. DeployOn your server or in a closed network, with an API
  3. Fine-tuneOn your data, or connect a knowledge base
  4. IntegrateInto your CRM, ERP, bot, website or team chat
Discuss deployment