CoolFace
Modelpublic

CharlieBonito/clarity-guard-gemma4-7b

sourceHugging Faceapache-2.0updated 4mo agoView on Hugging Face
1likes66downloads
Model Card

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

PropertyValue
Base ModelGemma 4 E4B (4-bit quantized)
Fine-tuningUnsloth Studio
QuantizationQ4KM
Training Max Sequence Length4096 tokens
Recommended llama.cpp Context16384 tokens
MultimodalYes (via mmproj)
Training Checkpoint750

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

python
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

bash
# 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.

HyperparameterValue
Adapter configurationQLoRA adapter via Unsloth Studio; exact final r/alpha not independently verified
Load in 4-bitTrue
Max sequence length4096
Micro-batch / gradient accumulation1 / 4
Learning rate1.5e-4
Optimizeradamw_8bit
Precisionbf16
Training MetricValue
Initial loss9.49
Final loss0.72
Minimum loss0.64 at step 364
Loss reduction92.4%
Active checkpoint750

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

FactorWhat It Detects
ContextUndeclared context or hidden assumptions
FramingUndefined terms or missing criteria
ResponsibilityGhost "we" or unclear ownership
ValidationApproval conditioned on not asking
AmbiguityJargon, 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