Nijam LLM

Nijam ("truth" in Tamil/Telugu) is a free, multilingual scam-defence service for India by Riven (RivenDevs). Nijam LLM is a small model that reads one forwarded message and returns a JSON verdict (risk, scam type, reasons, a safe next step) in the language the user asks for.

It is one stage of the Nijam pipeline. Rule checks run first and can only raise the risk the model gives, never lower it. Don't use it on its own as a safety guarantee.

Files

file what
nijam-llm-q4_k_m.gguf Fused model, llama.cpp Q4_K_M (398 MB).
adapter/ MLX LoRA adapter (rank 8, 12 layers), for use on top of the base model.

Training (v2, 2026-10-24)

LoRA on Qwen/Qwen2.5-0.5B-Instruct (Apache-2.0): rank 8, 12 layers, 1,100 iters, batch 4, lr 1e-4, MLX on Apple silicon. The data is 5,605 supervised verdicts: Nijam's labelled corpus (public SMS-spam datasets, MIT / CC BY 4.0, plus hand-written Indic templates) and newly written genuine bank alerts, service notices (e-challan, electricity bills, LPG, FASTag, insurance, EPFO) and promos in 12 languages, each next to look-alike scams. Eval sets were never used in training; anything close to an eval message was removed.

Evaluation (model alone, no rules)

Each message gets a reply language picked at random from ta, te, kn, ml, hi, bn, en.

set n valid JSON scams caught false alarms reply language followed
golden 72 72/72 50/58 0/14 72/72
hard negatives (genuine bank alerts, bills, promos) 51 51/51 – 0/51 51/51
red team (prompt injection) 22 22/22 17/22 – 22/22

These are the Q4_K_M numbers (llama-server, CPU). The unquantised adapter catches a few more (54/58, 19/22) with the same 0 false alarms.

With Nijam's rules on top, the full pipeline scores macro-F1 1.00 on golden and red team with 0/14 and 0/51 false alarms, and 0 false alarms on three blind sets (1.00 / 0.98 / 0.99 F1). v1 (2026-10-19) flagged 4 genuine messages (bank alert, e-challan, electricity bill); v2 flags none.

Limits

  • The eval sets are small (289 hand-written messages). The model sometimes names the wrong scam type when rules already caught the scam. Indic training text is templated and still needs review by native speakers.
  • India-specific. The model never says a message is 100% safe. Forwarded text is data, not instructions, but the model can still be fooled; the rules floor exists for that reason.
  • Redact personal data (phone numbers, UPI IDs, account numbers) before sending text to any hosted copy.

Serve

llama-server -m nijam-llm-q4_k_m.gguf --jinja --alias nijam-llm -c 4096

This gives an OpenAI-compatible API at /v1/chat/completions. Use Nijam's system prompt from packages/engine/src/nijam_engine/prompt.py.

Made by Riven · RivenDevs. Cared for by Riven. Riven is for you.

Downloads last month
48
GGUF
Model size
0.5B params
Architecture
qwen2
Hardware compatibility
Log In to add your hardware

4-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for johnbosco-j/nijam-llm

Adapter
(908)
this model