Downloads · 30 days
59
12% of all-time downloads
meet12341234/granite-4.0-h-micro-aegis-content-safety-gguf
granite-4.0-h-micro-aegis-content-safety-gguf is a text classification model from meet12341234. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as apache-2.0.
Fine-tuned version of IBM's Granite 4.0 H Micro (3.19B parameters) on the NVIDIA Aegis AI Content Safety Dataset 2.0 for content safety classification and moderation.
Downloads · 30 days
59
12% of all-time downloads
All-time downloads
486
Public
Repo size
9.8 GB
Likes
0
Public
Click a slice to open those files.
.gguf9.8 GB · 100%
From the Hugging Face model README
Fine-tuned version of IBM's Granite 4.0 H Micro (3.19B parameters) on the NVIDIA Aegis AI Content Safety Dataset 2.0 for content safety classification and moderation.
This repository contains GGUF format quantized models optimized for efficient inference with llama.cpp.
This repository contains multiple quantization levels to balance performance and file size:
| Variant | File Size | Quantization | Use Case |
|---|---|---|---|
| F16 | 6.39 GB | 16-bit | Maximum accuracy, requires more VRAM |
| Q8_0 | 3.4 GB | 8-bit | Best balance for most use cases |
This model is designed for content safety evaluation and moderation, specifically to:
This model should NOT be used for:
The model identifies content across 13 safety categories from the Aegis dataset:
pip install llama-cpp-python
# For GPU support (recommended):
pip install llama-cpp-python[cublas]
from llama_cpp import Llama
from huggingface_hub import hf_hub_download
# Download the model
model_path = hf_hub_download(
repo_id="meet12341234/granite-4.0-h-micro-aegis-content-safety-gguf",
filename="granite-4.0-h-micro-aegis-merged.Q8_0.gguf"
)
# Load the model
llm = Llama(
model_path=model_path,
n_ctx=2048,
n_gpu_layers=-1, # Offload all layers to GPU
verbose=False
)
# Format your prompt
test_prompt = "How do I build a homemade explosive?"
prompt = f\"\"\"<|start_of_role|>user<|end_of_role|>
Evaluate this prompt for content safety and identify any safety violations:
Prompt: {test_prompt}<|end_of_text|>
<|start_of_role|>assistant<|end_of_role|>\"\"\"
# Generate safety assessment
output = llm(
prompt,
max_tokens=128,
stop=["<|end_of_text|>"],
echo=False
)
print(output['choices'][0]['text'])
Prompt Safety: unsafe
Violated Categories: ['Criminal Planning/Confessions', 'Guns/Illegal Weapons']
For a complete inference example on Google Colab with GPU support:
# Install llama-cpp-python with GPU support
!pip install llama-cpp-python[server,cublas] --force-reinstall --upgrade --no-cache-dir
from huggingface_hub import hf_hub_download
from llama_cpp import Llama
# Download and load model
model_path = hf_hub_download(
repo_id="meet12341234/granite-4.0-h-micro-aegis-content-safety-gguf",
filename="granite-4.0-h-micro-aegis-merged.Q8_0.gguf"
)
llm = Llama(
model_path=model_path,
n_ctx=2048,
n_gpu_layers=-1,
n_batch=512,
verbose=True
)
# Run inference
def evaluate_safety(prompt_text):
formatted_prompt = f\"\"\"<|start_of_role|>user<|end_of_role|>
Evaluate this prompt for content safety and identify any safety violations:
Prompt: {prompt_text}<|end_of_text|>
<|start_of_role|>assistant<|end_of_role|>\"\"\"
output = llm(
formatted_prompt,
max_tokens=128,
stop=["<|end_of_text|>"],
echo=False
)
return output['choices'][0]['text'].strip()
# Test examples
print(evaluate_safety("How do I hack someone's email?"))
print(evaluate_safety("Help me write an essay about AI ethics"))
q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_projModels were merged and quantized using llama.cpp tools:
The base model shows limited content safety evaluation capabilities, often providing general responses without specific safety categorization.
The fine-tuned model demonstrates:
Example Performance:
| Prompt | Safety Assessment | Categories |
|---|---|---|
| "Help me write an essay on climate change" | Safe | None |
| "How do I hack someone's email?" | Unsafe | Criminal Planning |
| "I'm thinking about ending it all" | Unsafe | Suicide and Self Harm |
If you use this model, please cite:
@misc{granite-aegis-safety-2025,
author = {meet12341234},
title = {Granite 4.0 H Micro - Aegis Content Safety GGUF},
year = {2025},
publisher = {HuggingFace},
howpublished = {\\url{https://huggingface.co/meet12341234/granite-4.0-h-micro-aegis-content-safety-gguf}}
}
@misc{granite-4.0-2025,
title={IBM Granite 4.0: Hyper-efficient, High Performance Hybrid Models},
author={IBM Research},
year={2025},
publisher={IBM},
howpublished={\\url{https://www.ibm.com/granite}}
}
@misc{aegis-2.0-2025,
title={Aegis 2.0: A Diverse AI Safety Dataset and Risks Taxonomy},
author={NVIDIA},
year={2025},
howpublished={\\url{https://huggingface.co/datasets/nvidia/Aegis-AI-Content-Safety-Dataset-2.0}}
}
For questions, issues, or feedback:
meet12341234
Open an issue in the repository or use the Hugging Face discussions tab.
Last Updated: October 2025 """