Targeted Agent SLMs · 3B–4B Bilingual Local Suite

Local-First Small Language Models for Real Agent Workflows

Designed and trained by xiain for deterministic GraphRAG Cypher queries, ShellCheck-verified Linux commands, and multi-dialect SQL generation — with strict JSON contracts, anti-hallucination refusal, and ready-to-run GGUF + LoRA weights.

SwiftCypher-4B (Text-to-Cypher)
70.83% Live EX
79.17% Chinese GraphRAG EX · 88.0% Refusal F1 vs 0.0% on Neo4j Gemma-3-4B · 2.33 GB Q4_K_M
SafeShell-3B-v4 (Linux Bash)
98.7% ALFA Clean
96.0% Missing-Info Refusal vs 0%–12% peers · 477.3 ms p50 · 1.80 GB Q4_K_M
SwiftSQL-3B (Multi-Dialect SQL)
98.77% Refusal F1
70.15% Holdout EX (+10.73pp) · 4.6× faster & 13.8× higher QPS than 7B CoT · 1.80 GB Q4_K_M

SwiftCypher-4B · Bilingual Text-to-Cypher & GraphRAG

Evaluated on SwiftCypher-Kuzu-Live-300 (150 EN + 150 ZH live Kuzu graphs with 60 asymmetric direction traps & 60 contrastive missing-schema refusals) and neo4j/text2cypher-2025v1 on A100-SXM4-80GB (bf16, 0 leak).

Chinese GraphRAG Execution Accuracy (%) — SwiftCypher-Kuzu-Live-300
SwiftCypher-4B (+Guardrail+1Shot)
79.17%
Neo4j-Gemma-3-4B-2025.04 (Official)
76.67%
Qwen3-4B-Instruct-2507 (Base)
56.67%
Qwen2.5-Coder-3B-Instruct
49.17%
Rank System Kuzu Live EX EN EX ZH EX Direction Trap EX Refusal F1 2025v1 Schema+Dir p95 Latency
#1 SwiftCypher-4B (+Guardrail+1Shot) 70.83% 62.50% 79.17% 60.00% 88.00% 95.40% 2,105 ms
#2 SwiftCypher-4B (Standalone) 70.83% 62.50% 79.17% 60.00% 87.10% 95.40% 2,105 ms
#3 Neo4j-Gemma-3-4B-2025.04 (Official) 70.42% 64.17% 76.67% 50.00% 0.00% 94.80% 4,080.7 ms
#4 Qwen2.5-Coder-3B-Instruct 51.67% 54.17% 49.17% 41.67% 78.79% 55.60% 1,440.5 ms
#5 Qwen3-4B-Instruct-2507 (Base) 51.67% 46.67% 56.67% 38.33% 88.89% 65.40% 3,134.8 ms

SafeShell-3B-v4 · Hallucination-Resistant, ShellCheck-Verified Bash Copilot

Zero-leakage evaluation on NL2SH-ALFA (300), nl2bash (606), and 5 unseen adversarial & bilingual suites (122 cases including missing-info refusal, safety refusal, boundary compliance, and 1-shot ShellCheck repair).

Missing-Info Refusal Recall (%) — Refusing to Fabricate Missing Files, Hosts & IDs
SafeShell-3B-v4 (+Guardrail+1Shot)
96.0%
SafeShell-3B-v4 (Model-Only)
88.0%
Qwen2.5-Coder-3B-NL2SH (3B)
12.0%
Nemotron-Terminal-8B (8B)
8.0%
Phi-4-mini-instruct (3.8B)
4.0%
Qwen3-4B / Qwen2.5-Coder-7B / Llama-3.2-3B
0.0%
Model Track ALFA Clean ALFA Util nl2bash Clean SafeRec (25) MissRec (25) BoundOK (30) ZH Clean (30) p50 (ms)
SafeShell-3B-v4 (+Guardrail+1Shot) System 98.7% 73.7% 92.4% 92.0% 96.0% 100.0% 93.3% n/a
SafeShell-3B-v4 JSON 98.0% 74.0% 92.2% 76.0% 88.0% 100.0% 93.3% 477.3
SafeShell-3B-v3 (+Guardrail+1Shot) System 98.0% 75.5% 90.6% 96.0% 68.0% 100.0% 96.7% n/a
Qwen2.5-Coder-3B-NL2SH (3B) NativeRaw 91.7% 75.4% 93.7% 64.0% 12.0% 93.3% 100.0% 512.5
Nemotron-Terminal-8B (8B) NativeRaw 94.7% 75.8% 90.1% 84.0% 8.0% 96.7% 96.7% 831.2
Qwen3-4B (4B) JSON 89.7% 77.3% 88.1% 72.0% 0.0% 100.0% 100.0% 555.0
Qwen2.5-Coder-7B-Base (7B) +fence 93.3% 74.3% 84.3% 64.0% 0.0% 96.7% 96.7% 768.1
Phi-4-mini-instruct (3.8B) +fence 79.3% 66.5% 79.4% 84.0% 4.0% 86.7% 83.3% 1,853.7
Llama-3.2-3B-Instruct (3B) JSON 81.7% 63.0% 80.5% 20.0% 0.0% 90.0% 76.7% 428.7

SwiftSQL-3B · Bilingual Multi-Dialect Text-to-SQL (PostgreSQL / MySQL / SQLite)

Evaluated on 300 bilingual multi-dialect + missing-column refusal holdout cases and a head-to-head L4 GPU comparison against Base-3B, XiYanSQL-3B, and Arctic-R1-7B.

Public Head-to-Head Anti-Hallucination Refusal F1 (%) — Identical L4 GPU Test
SwiftSQL-3B
98.77%
Base-3B (Qwen2.5-Coder-3B-Instruct)
67.69%
XiYanSQL-3B
9.52%
Arctic-R1-7B (7B CoT)
0.00%
Benchmark Suite & Metric SwiftSQL-3B (+Repair) SwiftSQL-3B (Standalone) Base-3B XiYanSQL-3B Arctic-R1-7B (7B)
Holdout (300): Execution Accuracy (EX) 70.15% 69.15% 59.42% — —
Holdout (300): Refusal F1 90.41% 90.41% 0.00% — —
Holdout (300): Strict JSON / Syntax Valid 100% / 97.38% 100% / 97.38% 100% / 99.63% — —
Public L4 Eval: Refusal F1 — 98.77% 67.69% 9.52% 0.00%
Public L4 Eval: BIRD Truncated Schema EX* — 4.32% 3.09% 3.70% 8.02%
Public L4 Eval: Avg Tokens / Latency / QPS — 98.9 / 2,981.7 ms / 1.10 81.5 / 2,364.5 ms / 1.48 74.0 / 2,068.4 ms / 1.53 566.3 / 13,694.1 ms / 0.08
*Methodology Note: The head-to-head BIRD evaluation capped per-question schema context at 5,500 characters (~2,560 tokens), whereas full BIRD schemas often reach 15,000–35,000 characters. Because truncated schemas hide required tables/columns from every model equally, absolute EX scores are compressed across all systems; within this 3B class SwiftSQL-3B ranks #1 while delivering 98.77% refusal F1 and 13.8× higher QPS than Arctic-R1-7B.

30-Second Local Quick-Start Generator

Run any model locally on macOS, Linux, or Windows — zero API keys, full data privacy.