O ShieldGemma é um conjunto de classificadores de segurança de pesos prontos, ajustados por instruções e abertos
criados com base na família de modelos Gemma para determinar
se o texto ou as imagens violam uma política de segurança na entrada e na saída.
O ShieldGemma é treinado para identificar os principais danos em diferentes modelos. Consulte
os cards de modelos para mais informações.
ShieldGemma 2 para moderação de conteúdo de imagem: disponível na versão 4B. Consulte o card de modelo para mais detalhes.
ShieldGemma 1 para moderação de conteúdo de texto: disponível nas versões 2B, 9B e 27B, permitindo que você equilibre velocidade, desempenho e generalização para atender às suas necessidades em qualquer implantação. Consulte o card de modelo para mais detalhes.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Não contém as informações de que eu preciso","missingTheInformationINeed","thumb-down"],["Muito complicado / etapas demais","tooComplicatedTooManySteps","thumb-down"],["Desatualizado","outOfDate","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Problema com as amostras / o código","samplesCodeIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-03-24 UTC."],[],[],null,["# ShieldGemma\n\n\u003cbr /\u003e\n\n[ShieldGemma](/gemma/docs/shieldgemma) is a set of ready-made, instruction-tuned, open\nweights safety classifiers built on the Gemma family of models to determine\nwhether text or images violate a safety policy across input and output.\nShieldGemma is trained to identify across key harms across different models, see\nthe model cards for more information.\n\n- ShieldGemma 2 for image content moderation: Available in 4B. See the [model card](/gemma/docs/shieldgemma/model_card_2) for more details.\n- ShieldGemma 1 for text content moderation: Available in 2B, 9B, and 27B---allowing you to balance speed, performance, and generalizability to suit your needs across any deployment. See the [model card](/gemma/docs/shieldgemma/model_card) for more details.\n\n| **Note:** While ShieldGemma is trained on key harms, it may be generalizable to other harms related to your use case. It's important to experiment and regularly assess how well ShieldGemma fits your needs.\n\n**Safeguard your models with ShieldGemma**\n\n|---|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| | [Image moderation: ShieldGemma 2 in Transformers](https://colab.research.google.com/github/google/generative-ai-docs/blob/main/site/en/responsible/docs/safeguards/shieldgemma2_on_huggingface.ipynb) | [Text moderation: ShieldGemma in Transformers](https://colab.research.google.com/github/google/generative-ai-docs/blob/main/site/en/responsible/docs/safeguards/shieldgemma_on_huggingface.ipynb) | [Text moderation: ShieldGemma in Keras](https://colab.research.google.com/github/google/generative-ai-docs/blob/main/site/en/responsible/docs/safeguards/shieldgemma_on_keras.ipynb) |\n\n\u003cbr /\u003e\n\nYou can use ShieldGemma models in the following frameworks.\n\n- [KerasNLP](https://keras.io/keras_nlp/), with model checkpoints available from [Kaggle](https://www.kaggle.com/search?q=shieldgemma+in%3Amodels).\n- [Hugging Face Transformers](https://github.com/huggingface/transformers), with model checkpoints available from [Hugging Face Hub](https://huggingface.co/collections/google/shieldgemma-release-66a20efe3c10ef2bd5808c79)."]]