35.3K Downloads Updated 9 months ago
Updated 9 months ago
9 months ago
ba81a177bd23 · 2.7GB
The IBM Granite Guardian 3.0 2B and 8B models are designed to detect risks in prompts and/or responses. They can help with risk detection along many key dimensions catalogued in the IBM AI Risk Atlas. They are trained on unique data comprising human annotations and synthetic data informed by internal red-teaming, and they outperform other open-source models in the same space on standard benchmarks.
The model will produce a single output token, either Yes
or No
. By default, the general-purpose harm
category is used, but other categories can be selected by setting the system prompt.
2B:
ollama run granite3-guardian:2b
>>> /set system profanity
8B:
ollama run granite3-guardian:8b
>>> /set system violence
Risk detection in prompt text or model response (i.e. as guardrails), such as:
harm
): content considered generally harmfulsocial_bias
): prejudice based on identity or characteristicsjailbreak
): deliberate instances of manipulating AI to generate harmful, undesired, or inappropriate contentviolence
): content promoting physical, mental, or sexual harmprofanity
): use of offensive language or insultssexual_content
): explicit or suggestive material of a sexual natureunethical_behavior
): actions that violate moral or legal standardsRAG (retrieval-augmented generation) to assess:
relevance
): whether the retrieved context is relevant to the querygroundedness
): whether the response is accurate and faithful to the provided contextanswer_relevance
): whether the response directly addresses the user’s queryThe Granite dense models are available in 2B and 8B parameter sizes designed to support tool-based use cases and for retrieval augmented generation (RAG), streamlining code generation, translation and bug fixing.
The Granite MoE models are available in 1B and 3B parameter sizes designed for low latency usage and to support deployment in on-device applications or situations requiring instantaneous inference.