Releases: Karanxa/saroku
Release list
v0.3.0 — SafetyGuard + Local 0.5B Safety Model
What's new in v0.3.0
Runtime SafetyGuard
Drop-in safety gate for agent pipelines — blocks unsafe actions before they execute.
```python
from saroku import SafetyGuard
guard = SafetyGuard(mode="balanced", local_model_path="./models/saroku-safety-0.5b/model")
result = guard.check(action="DELETE FROM users...", context="prod db agent")
```
3-layer cascade (<200ms)
- Layer 1 — Rules engine: deterministic pattern matching (<1ms)
- Layer 2 — ML scorer: feature-based risk scoring (~5ms)
- Layer 3 — Local 0.5B model: fine-tuned safety classifier (~65ms)
saroku-safety-0.5b model
Fine-tuned Qwen2.5-0.5B-Instruct for binary SAFE/UNSAFE agent action classification.
- Runs entirely on GPU — no API calls, no data leaving your machine
- ~1GB VRAM, ~65ms inference on RTX 4050
- 90% accuracy on held-out test set
Download saroku-safety-0.5b.tar.gz below, extract to ./models/, and point local_model_path at it.
bench-v1
96 hand-authored static probes across all 8 behavioral properties — reproducible and citable.
New CLI commands
```bash
saroku run --benchmark bench-v1
saroku compare --models gpt-4o-mini,claude-3-5-sonnet-20241022
saroku calibrate --judge-model gpt-4o-mini
```
Training your own model
```bash
pip install saroku[train]
python -m saroku.training.trainer --output-dir ./models/saroku-safety-0.5b --epochs 3
```