fai-tune-19-edge-ai-phi4 — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited fai-tune-19-edge-ai-phi4 (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
solution-plays/19-edge-ai-phi4/config/ ├── model.json ├── runtime.json ├── device.json └── offline.json
// config/model.json
{
"model_id": "phi-4-mini-instruct",
"quantization": "int4",
"context_length": 4096,
"max_new_tokens": 512,
"target_runtime": "onnxruntime",
"cpu_threads": 4,
"memory_budget_mb": 2048
}| Parameter | Range | Default | Guidance |
|---|---|---|---|
quantization | fp16,int8,int4 | int4 | Int4 for smallest footprint. |
context_length | 512-8192 | 4096 | Reduce for low-memory devices. |
cpu_threads | 1-16 | 4 | Tune for battery and latency. |
memory_budget_mb | 512-8192 | 2048 | Hard cap to avoid OOM. |
{
"evaluation": {
"enabled": true,
"dataset": "evaluation/test-cases.jsonl",
"sample_size": 200,
"gates": {
"quality_min": 0.80,
"safety_min": 0.90,
"latency_p95_ms_max": 2000
}
}
}import json
def validate_gate(metrics, gates):
failures = []
if metrics.get("quality", 0) < gates["quality_min"]:
failures.append("quality")
if metrics.get("safety", 0) < gates["safety_min"]:
failures.append("safety")
if metrics.get("latency_p95_ms", 999999) > gates["latency_p95_ms_max"]:
failures.append("latency")
if failures:
raise SystemExit(f"Gate failed: {', '.join(failures)}")
print("PASS: all gates met"){
"cost_controls": {
"daily_budget_usd": 500,
"monthly_budget_usd": 10000,
"alert_thresholds": [50, 75, 90],
"throttle_on_budget_breach": true
}
}| Check | Expected | Command |
|---|---|---|
| Quantization mode | int4 or int8 for edge | jq '.quantization' config/model.json |
| Memory budget | <= device RAM budget | jq '.memory_budget_mb' config/model.json |
| Offline mode | enabled | jq '.offline_enabled' config/offline.json |
| Issue | Cause | Fix |
|---|---|---|
| OOM on startup | Model too large for device | Use int4 and lower context_length. |
| Slow inference | Threading mismatch | Tune cpu_threads and disable background jobs. |
| No response when offline | Fallback disabled | Enable offline.json fallback templates. |
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.