Instructions to use SandLogicTechnologies/granite-guardian-4.1-8b-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use SandLogicTechnologies/granite-guardian-4.1-8b-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="SandLogicTechnologies/granite-guardian-4.1-8b-GGUF", filename="granite-guardian-4.1-8b_IQ3_M.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use SandLogicTechnologies/granite-guardian-4.1-8b-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf SandLogicTechnologies/granite-guardian-4.1-8b-GGUF:IQ3_M # Run inference directly in the terminal: llama-cli -hf SandLogicTechnologies/granite-guardian-4.1-8b-GGUF:IQ3_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf SandLogicTechnologies/granite-guardian-4.1-8b-GGUF:IQ3_M # Run inference directly in the terminal: llama-cli -hf SandLogicTechnologies/granite-guardian-4.1-8b-GGUF:IQ3_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf SandLogicTechnologies/granite-guardian-4.1-8b-GGUF:IQ3_M # Run inference directly in the terminal: ./llama-cli -hf SandLogicTechnologies/granite-guardian-4.1-8b-GGUF:IQ3_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf SandLogicTechnologies/granite-guardian-4.1-8b-GGUF:IQ3_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf SandLogicTechnologies/granite-guardian-4.1-8b-GGUF:IQ3_M
Use Docker
docker model run hf.co/SandLogicTechnologies/granite-guardian-4.1-8b-GGUF:IQ3_M
- LM Studio
- Jan
- vLLM
How to use SandLogicTechnologies/granite-guardian-4.1-8b-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "SandLogicTechnologies/granite-guardian-4.1-8b-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SandLogicTechnologies/granite-guardian-4.1-8b-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/SandLogicTechnologies/granite-guardian-4.1-8b-GGUF:IQ3_M
- Ollama
How to use SandLogicTechnologies/granite-guardian-4.1-8b-GGUF with Ollama:
ollama run hf.co/SandLogicTechnologies/granite-guardian-4.1-8b-GGUF:IQ3_M
- Unsloth Studio
How to use SandLogicTechnologies/granite-guardian-4.1-8b-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for SandLogicTechnologies/granite-guardian-4.1-8b-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for SandLogicTechnologies/granite-guardian-4.1-8b-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for SandLogicTechnologies/granite-guardian-4.1-8b-GGUF to start chatting
- Pi
How to use SandLogicTechnologies/granite-guardian-4.1-8b-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf SandLogicTechnologies/granite-guardian-4.1-8b-GGUF:IQ3_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "SandLogicTechnologies/granite-guardian-4.1-8b-GGUF:IQ3_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use SandLogicTechnologies/granite-guardian-4.1-8b-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf SandLogicTechnologies/granite-guardian-4.1-8b-GGUF:IQ3_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default SandLogicTechnologies/granite-guardian-4.1-8b-GGUF:IQ3_M
Run Hermes
hermes
- Docker Model Runner
How to use SandLogicTechnologies/granite-guardian-4.1-8b-GGUF with Docker Model Runner:
docker model run hf.co/SandLogicTechnologies/granite-guardian-4.1-8b-GGUF:IQ3_M
- Lemonade
How to use SandLogicTechnologies/granite-guardian-4.1-8b-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull SandLogicTechnologies/granite-guardian-4.1-8b-GGUF:IQ3_M
Run and chat with the model
lemonade run user.granite-guardian-4.1-8b-GGUF-IQ3_M
List all available models
lemonade list
Granite-Guardian-4.1-8B
Granite-Guardian-4.1-8B is a safety-focused large language model developed for content moderation, policy evaluation, risk detection, and safe conversational workflows. This repository contains GGUF quantized variants of the model optimized for efficient local inference using llama.cpp.
The quantized formats significantly reduce memory requirements while preserving strong classification and moderation performance, enabling practical deployment on consumer hardware and edge environments.
Model Overview
- Model Name: Granite-Guardian-4.1-8B
- Base Model: ibm-granite/granite-guardian-4.1-8b
- Architecture: Decoder-only Transformer
- Parameter Count: 8 Billion
- Modalities: Text
- Primary Languages: English
- Developer: IBM Granite
- License: Apache 2.0
Quantization Formats
This repository provides various GGUF quantized versions of the Granite-Guardian-4.1-8B model, optimized for efficient local inference using llama.cpp. Below are the details of the available I-Matrix (IQ) formats.
IQ3_M
- Size reduction of approx 76.68% (3.64 GB) compared to 16-bit (15.61 GB)
- Aggressive 3-bit quantization optimized for maximum memory reduction
- Suitable for low-memory systems and CPU-based inference
- Maintains lightweight deployment capability for moderation pipelines
- Output quality may degrade on nuanced reasoning or complex safety classification tasks
IQ4_NL
- Size reduction of approx 70.92% (4.54 GB) compared to 16-bit (15.61 GB)
- Advanced 4-bit non-linear quantization designed to better preserve output quality
- More suitable for structured moderation workflows and detailed classification tasks
- Typically provides stronger consistency compared to lower-bit formats
- Slightly increased computational overhead during inference
IQ4_XS
- Size reduction of approx 72.33% (4.32 GB) compared to 16-bit (15.61 GB)
- Balanced 4-bit quantization focused on efficiency and stable inference performance
- Good trade-off between model size, speed, and moderation quality
- Suitable for general-purpose deployment across constrained hardware
- Maintains reliable generation and classification behavior for most practical workloads
Training Background (Original Model)
Granite-Guardian-4.1-8B is trained with an emphasis on AI safety, risk evaluation, and policy-aware conversational analysis.
Pretraining
- Large-scale language pretraining across diverse textual domains
- Focus on contextual understanding and robust text representations
- Optimized for downstream moderation and classification workflows
Alignment and Safety Tuning
- Refined using safety-focused datasets and moderation objectives
- Enhanced for harmful content detection and policy evaluation
- Improved reliability for instruction compliance and risk-aware outputs
Key Capabilities
Content Moderation Detects unsafe, harmful, or policy-violating content across diverse inputs.
Risk and Safety Evaluation Supports moderation pipelines and conversational safety workflows.
Instruction Understanding Handles structured prompts and classification-oriented tasks effectively.
Efficient Local Deployment Quantized variants enable practical offline inference on consumer hardware.
Reliable Text Classification Suitable for filtering, moderation, and safety-oriented NLP applications.
Usage Example
Using llama.cpp
./llama-cli \
-m SandlogicTechnologies/granite-guardian-4.1-8b_IQ4_NL.gguf \
-p "Explain the concept of knowledge distillation in detail"
Recommended Usecases
AI Safety and Moderation Systems Build local moderation and filtering pipelines without cloud dependencies.
Risk Classification Workflows Analyze prompts and outputs for harmful or unsafe content patterns.
Enterprise Safety Layers Integrate guardrails into conversational AI systems and assistants.
Research and Evaluation Study model alignment, moderation behavior, and safety-focused prompting strategies.
Acknowledgments
These quantized models are based on the original work by the IBM Granite development team.
Special thanks to:
The IBM Granite team for developing and releasing the Granite-Guardian-4.1-8B model.
Georgi Gerganov and the
llama.cppopen-source community for enabling efficient quantization and inference via the GGUF format.
Contact
For questions, feedback, or support, please reach out at support@sandlogic.com or visit https://www.sandlogic.com/
- Downloads last month
- 381
3-bit
4-bit
Model tree for SandLogicTechnologies/granite-guardian-4.1-8b-GGUF
Base model
ibm-granite/granite-4.1-8b