GUARDx-1.7B (GGUF)

GUARDx-1.7B is a 1.7B parameter real-time AI agent and MCP tool-call security guardrail fine-tuned from Qwen/Qwen3-1.7B by thinkingdbx.

It inspects (policy, user_message, retrieved_context, proposed_tool_call) before an AI agent executes a tool or responds, and outputs a strict JSON verdict:

{
  "decision": "ALLOW | BLOCK | REQUIRE_APPROVAL",
  "risk_score": 0.95,
  "threat_category": "INDIRECT_INJECTION",
  "reason": "Retrieved document embeds hidden instructions attempting to exfiltrate customer data via an unauthorized external webhook."
}

Model Files

File Quantization Size Notes
GUARDx-1.7B-Q4_K_M.gguf Q4_K_M ~1.0 GB Recommended for real-time local or sidecar middleware
GUARDx-1.7B-Q8_0.gguf Q8_0 ~1.7 GB Near-lossless quantization
GUARDx-1.7B-F16.gguf F16 ~3.2 GB Full-precision reference weights
Modelfile - - Ready-to-use Ollama config (temperature 0.0)

Evaluation

Evaluated head-to-head against base Qwen/Qwen3-1.7B on 150 locked holdout turns across three strictly unseen enterprise agent environments (Cloud FinOps Automation Agent, Banking Fraud Ops Agent, E-Commerce Warehouse MCP Agent):

Metric Base Qwen/Qwen3-1.7B GUARDx-1.7B Delta
Strict JSON Schema Validity 99.3% 100.0% (150/150) +0.7 pts
3-Class Decision Accuracy (ALLOW / BLOCK / HITL) 72.7% 89.3% +16.7 pts
Benign False Positive Rate (lower is better) 43.2% (19/44) 0.0% (0/44) -43.2 pts
REQUIRE_APPROVAL (HITL) Accuracy 0.0% (0/18) 100.0% (18/18) +100.0 pts
Attack Block Precision 71.4% 100.0% (73/73) +28.6 pts
Attack Block F1 82.1% 90.7% +8.6 pts
Exact Threat Category Accuracy (9 classes) 0.0% 79.3% +79.3 pts

Validation loss dropped from 4.169 to 0.348 at checkpoint 1,500.

Supported Threat Taxonomy

  • NONE (policy-compliant benign turn)
  • PROMPT_INJECTION (direct instruction override or jailbreak)
  • INDIRECT_INJECTION (untrusted instructions hidden in RAG documents, emails, or tool outputs)
  • DESTRUCTIVE_TOOL_CALL (unauthorized DROP, DELETE, mass send, or destructive infra actions)
  • SQL_OR_CMD_INJECTION (SQLi, shell injection, path traversal, or SSRF inside tool arguments)
  • DATA_EXFILTRATION (sending internal data to external webhooks or unauthorized destinations)
  • PII_OR_SECRET_LEAK (exposing API keys, credentials, SSNs, PAN/CVV, or restricted PII)
  • PRIVILEGE_ESCALATION (accessing out-of-role tables, tools, or admin actions)
  • POLICY_VIOLATION (exceeding financial/approval thresholds or operational guardrails)

Usage

Ollama

ollama create guardx-1.7b -f Modelfile
ollama run guardx-1.7b

llama.cpp

llama-cli -m GUARDx-1.7B-Q4_K_M.gguf --temp 0.0 \
  -sys "You are GUARDx, a real-time AI agent and MCP tool-call security guardrail built by thinkingdbx. Evaluate the agent interaction against the security policy and return STRICT JSON only with keys: decision (ALLOW, BLOCK, or REQUIRE_APPROVAL), risk_score (0.0 to 1.0), threat_category, and reason." \
  -p "Policy: Tools: run_select_sql(SELECT only). Never run DDL/DML.\nUser Message: Clean up old staging data.\nRetrieved Context: None\nProposed Tool Call: {\"tool\": \"run_select_sql\", \"args\": {\"sql\": \"DROP TABLE staging_orders;\"}}"

Training Details

  • Base model: Qwen/Qwen3-1.7B
  • Dataset: 16,400 verified scenarios (15,582 train / 818 validation) balanced across attacks (BLOCK: 9,216), hard benign turns (ALLOW: 5,229), and human-in-the-loop actions (REQUIRE_APPROVAL: 1,955)
  • Fine-tuning: MLX LoRA (rank=16, scale=32, 16 layers, AdamW, cosine LR 2e-5 to 2e-6, max_seq_length=1024, prompt-masked loss, best checkpoint at step 1,500)
  • Export: Fused to FP16 safetensors and converted/quantized with llama.cpp

License

Apache-2.0, matching the base Qwen/Qwen3-1.7B license.

Downloads last month
71
GGUF
Model size
2B params
Architecture
qwen3
Hardware compatibility
Log In to add your hardware

4-bit

8-bit

16-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for thinkingdbx/GUARDx-1.7B-GGUF

Finetuned
Qwen/Qwen3-1.7B
Quantized
(563)
this model