Instructions to use CharlieBonito/clarity-guard-gemma4-7b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use CharlieBonito/clarity-guard-gemma4-7b with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="CharlieBonito/clarity-guard-gemma4-7b", filename="ClarityGuard-v2.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use CharlieBonito/clarity-guard-gemma4-7b with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf CharlieBonito/clarity-guard-gemma4-7b # Run inference directly in the terminal: llama-cli -hf CharlieBonito/clarity-guard-gemma4-7b
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf CharlieBonito/clarity-guard-gemma4-7b # Run inference directly in the terminal: llama-cli -hf CharlieBonito/clarity-guard-gemma4-7b
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 CharlieBonito/clarity-guard-gemma4-7b # Run inference directly in the terminal: ./llama-cli -hf CharlieBonito/clarity-guard-gemma4-7b
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 CharlieBonito/clarity-guard-gemma4-7b # Run inference directly in the terminal: ./build/bin/llama-cli -hf CharlieBonito/clarity-guard-gemma4-7b
Use Docker
docker model run hf.co/CharlieBonito/clarity-guard-gemma4-7b
- LM Studio
- Jan
- Ollama
How to use CharlieBonito/clarity-guard-gemma4-7b with Ollama:
ollama run hf.co/CharlieBonito/clarity-guard-gemma4-7b
- Unsloth Studio
How to use CharlieBonito/clarity-guard-gemma4-7b 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 CharlieBonito/clarity-guard-gemma4-7b 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 CharlieBonito/clarity-guard-gemma4-7b to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for CharlieBonito/clarity-guard-gemma4-7b to start chatting
- Pi
How to use CharlieBonito/clarity-guard-gemma4-7b with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf CharlieBonito/clarity-guard-gemma4-7b
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": "CharlieBonito/clarity-guard-gemma4-7b" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use CharlieBonito/clarity-guard-gemma4-7b with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf CharlieBonito/clarity-guard-gemma4-7b
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 CharlieBonito/clarity-guard-gemma4-7b
Run Hermes
hermes
- Docker Model Runner
How to use CharlieBonito/clarity-guard-gemma4-7b with Docker Model Runner:
docker model run hf.co/CharlieBonito/clarity-guard-gemma4-7b
- Lemonade
How to use CharlieBonito/clarity-guard-gemma4-7b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull CharlieBonito/clarity-guard-gemma4-7b
Run and chat with the model
lemonade run user.clarity-guard-gemma4-7b-{{QUANT_TAG}}List all available models
lemonade list
ClarityGuard Gemma 4 E4B
Fine-tuned Gemma 4 E4B model for ClarityGuard - a neuro-inclusive communication assistant that helps decode ambiguous workplace and personal messages.
Model Details
| Property | Value |
|---|---|
| Base Model | Gemma 4 E4B (4-bit quantized) |
| Fine-tuning | Unsloth Studio |
| Quantization | Q4_K_M |
| Training Max Sequence Length | 4096 tokens |
| Recommended llama.cpp Context | 16384 tokens |
| Multimodal | Yes (via mmproj) |
| Training Checkpoint | 750 |
Files
ClarityGuard-v2.gguf- Main model (~5GB)mmproj-ClarityGuard-v2.gguf- Multimodal projection (~1GB)
Older checkpoint 375 GGUF names may appear in historical notes or previous demos. The active production files for this submission are the v2 files listed above.
Usage
With llama.cpp
from llama_cpp import Llama
llm = Llama(
model_path="ClarityGuard-v2.gguf",
mmproj="mmproj-ClarityGuard-v2.gguf",
n_ctx=16384,
n_gpu_layers=-1, # Use all GPU layers
)
response = llm.create_chat_completion(
messages=[
{"role": "system", "content": "You are ClarityGuard..."},
{"role": "user", "content": "Analyze this message: 'We need to fix that soon'"}
]
)
With Ollama
# Create Modelfile
echo 'FROM ./ClarityGuard-v2.gguf' > Modelfile
ollama create clarity-guard -f Modelfile
ollama run clarity-guard
Training Details
This model was fine-tuned using Unsloth QLoRA 4-bit on a local Linux/KachiOS workstation with an RTX 5070 Ti 16 GB GPU. The micro-batch was kept at 1 to avoid VRAM spikes, with 4 gradient accumulation steps.
| Hyperparameter | Value |
|---|---|
| Adapter configuration | QLoRA adapter via Unsloth Studio; exact final r/alpha not independently verified |
| Load in 4-bit | True |
| Max sequence length | 4096 |
| Micro-batch / gradient accumulation | 1 / 4 |
| Learning rate | 1.5e-4 |
| Optimizer | adamw_8bit |
| Precision | bf16 |
| Training Metric | Value |
|---|---|
| Initial loss | 9.49 |
| Final loss | 0.72 |
| Minimum loss | 0.64 at step 364 |
| Loss reduction | 92.4% |
| Active checkpoint | 750 |
The custom dataset was designed for:
- Communication clarity analysis using the C.F.R.V.A. framework
- Neurodivergent-friendly explanations
- Workplace message decoding
- Recognizing manipulation patterns and structural ambiguity
C.F.R.V.A. Framework
| Factor | What It Detects |
|---|---|
| Context | Undeclared context or hidden assumptions |
| Framing | Undefined terms or missing criteria |
| Responsibility | Ghost "we" or unclear ownership |
| Validation | Approval conditioned on not asking |
| Ambiguity | Jargon, metaphors, or unwritten support |
Intended Use
ClarityGuard helps neurodivergent individuals (autistic, ADHD, dyslexic) decode ambiguous workplace and personal messages by analyzing message structure - not the user's ability to understand.
Core principle: When a message lacks a clear subject, deadline, or measurable criterion, confusion is the logical response to incomplete input - not a cognitive error.
Competition
Built for the Gemma 4 Good Hackathon 2026:
- Digital Equity & Inclusivity Track
- Safety & Trust Track
- Unsloth Special Track
- llama.cpp Special Track
License
Apache 2.0
Acknowledgments
- Google DeepMind for Gemma 4
- Unsloth for fine-tuning tools
- Hugging Face for model hosting
Built with ❤️ for the neurodivergent community
- Downloads last month
- 392
We're not able to determine the quantization variants.