Instructions to use Noman33/hifazat-edge with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Noman33/hifazat-edge with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf Noman33/hifazat-edge # Run inference directly in the terminal: llama cli -hf Noman33/hifazat-edge
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Noman33/hifazat-edge # Run inference directly in the terminal: llama cli -hf Noman33/hifazat-edge
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 Noman33/hifazat-edge # Run inference directly in the terminal: ./llama-cli -hf Noman33/hifazat-edge
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 Noman33/hifazat-edge # Run inference directly in the terminal: ./build/bin/llama-cli -hf Noman33/hifazat-edge
Use Docker
docker model run hf.co/Noman33/hifazat-edge
- LM Studio
- Jan
- Ollama
How to use Noman33/hifazat-edge with Ollama:
ollama run hf.co/Noman33/hifazat-edge
- Unsloth Desktop
- Pi
How to use Noman33/hifazat-edge with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Noman33/hifazat-edge
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "Noman33/hifazat-edge" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use Noman33/hifazat-edge with Docker Model Runner:
docker model run hf.co/Noman33/hifazat-edge
- Lemonade
How to use Noman33/hifazat-edge with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Noman33/hifazat-edge
Run and chat with the model
lemonade run user.hifazat-edge-{{QUANT_TAG}}List all available models
lemonade list
- Hermes Agent
How to use Noman33/hifazat-edge with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Noman33/hifazat-edge
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 Noman33/hifazat-edge
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use Noman33/hifazat-edge with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Noman33/hifazat-edge
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "Noman33/hifazat-edge" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
hifazat-edge โ the offline brain behind Safe Pakistan
Hey ๐ I'm Noman. This is the small model inside Safe Pakistan (Hifazat = ุญูุงุธุช = "protection"), our open-source scam shield for Pakistani SMS and WhatsApp users.
Why this model exists
Most scam detectors assume stable internet and English. Pakistan has neither luxury everywhere. So we trained a tiny model that runs locally, offline, on cheap hardware โ because a grandmother on a 2G connection in rural Punjab deserves the same protection as a developer in Lahore.
hifazat-edge is Layer 1 of our inference cascade, not a standalone product:
- L0 โ sender-reputation prior (never a bypass, only a prior)
- L1 โ this model (fast, free, local)
- L2 โ gated cloud escalation (Qwen-Max) for borderline confidence only
- L3 โ deterministic rules floor that still answers when every AI layer is down
The specs
- Base model: Qwen/Qwen2.5-1.5B-Instruct
- Fine-tuning: LoRA via Unsloth, single Tesla T4 (yes, really โ one GPU, one student budget)
- Format: Q4_K_M GGUF, served through Ollama (OpenAI-compatible
/v1endpoint) - Languages: English, Roman Urdu, Urdu (Nastaliq input)
- Speed: ~2.3s on CPU, sub-second on GPU
- Inference params:
temperature 0.1,max_tokens 220,format: json
Output schema
One message in, one strict JSON out: {"verdict":"scam|suspicious|safe","score":0-100,"confidence":0-100,"type":"","redFlags":[],"explanation_en":"","explanation_roman_ur":"","explanation_urdu":""}
The trilingual explanations matter as much as the verdict โ a warning nobody can read protects nobody.
Training data (the honest version)
- Real scam typologies reconstructed from NCCIA advisories, SBP fraud alerts and community reports (BISP 8171 fraud, EasyPaisa/JazzCash smishing, CNIC/OTP harvesting). No private user SMS, ever.
- ~1,500 synthetic samples from a Colab permutation pipeline (sender prefixes ร PKR amounts ร malicious links).
- A deliberately adversarial "suspicious" class: legit messages with exactly one social-engineering tactic injected, to teach the boundary instead of the extremes.
- Roman Urdu templates refined with Kimi, because generic LLMs write Roman Urdu like a robot reading a dictionary.
Numbers we'll defend
155-message blind hold-out, 3 runs:
- Full cascade: 74.8โ77.4% vs 46.5% single-model baseline
- Offline-only floor (L1+L3, no cloud): 58.7โ61.9%
Eval harness ships in the repo (
eval-holdout.js). Ranges, not point claims โ that's our Honesty Doctrine.
Limitations (we say these out loud)
- It is a classifier, not a wall. ~1 in 4 scams can still slip at L1; the family-alert layer and L3 exist because we know this.
- Nastaliq screenshot OCR is still weak (Phase 2).
- L3's English coverage is deliberately conservative to avoid crying wolf on real bank SMS.
- Live-call detection is not here yet.
Run it
ollama run hf.co/Noman33/hifazat-edge
Where the whole system lives
App, backend, cascade, evals: https://github.com/cyberNoman/Safe-Pakistan PRs, issues and Roman Urdu samples very welcome. If this model stops even one fake BISP message from emptying one pensioner's account โ it did its job. ๐ต
- Downloads last month
- 17
We're not able to determine the quantization variants.