Views
No views yet
collection.router policy using an LLM as the router (routing.router.type: "llm") rather than a dedicated classifier model: the router LLM reads each prompt and decides, via a system-prompt instruction, whether to route it to a local/private candidate or a cloud candidate.| File | Router / local candidate |
|---|---|
pii_policy_llm_classifier_9b.json | Qwen3.5-9B-GGUF |
pii_policy_llm_classifier_2b.json | Qwen3.5-2B-GGUF |
pii_policy_llm_classifier_0.8b.json | Qwen3.5-0.8B-GGUF |
fireworks.kimi-k2p6 as the cloud candidate, and default to the local candidate when the router is uncertain (privacy-first default - the opposite convention from a classifier-based policy, where the default is normally cloud and PII detection is what moves traffic local).| Metric | Qwen3.5-9B | Qwen3.5-2B | Qwen3.5-0.8B |
|---|---|---|---|
| Leak rate (PII → cloud) | 6.16% (154/2,500) | 3.28% (82/2,500) | 2.84% (71/2,500) |
| Recall | 93.84% | 96.72% | 97.16% |
| Rationale behind routing | 99.5% | 59.4% | 18.30% |
| Prompt misses (of leaks) | 129/153 (84%) | 61/82 (74%) | 40/71 (56%) |
| Genuine misses (of leaks) | 24/153 (16%) | 21/82 (26%) | 31/71 (44%) |
| Missed categories | not recorded | not recorded | not recorded |
| E2E runtime (full corpus) | 6hrs | 2.5hrs | 2.1hrs |
| Routing time | not recorded | 2.28hrs | 1.5hrs |
| Prompt processing time | not recorded | 21mins | 18mins |
Missed categories and the 9B row's timing breakdown weren't recorded for this run.lemonade-sdk/pii_policy_openmed-privacy-filter-multilingual-v2-onnx and lemonade-sdk/pii_policy_mmbert32k-pii-detector-merged-onnx) - leak rates aren't directly comparable across the two corpus sizes.1hf download lemonade-sdk/pii_policy_llm_classifier --local-dir .
2curl -X POST http://localhost:13305/v1/pull -H "Content-Type: application/json" \
3 --data-binary @pii_policy_llm_classifier_2b.jsonmodel_name (e.g. "model": "user.PII-LLM-Router-2B") and the server routes each request per its system prompt's instructions.prompt field is the entire routing logic for an LLM-router policy - edit it to change what counts as sensitive, add categories, or adjust the privacy-first default described there. routing.candidates, default_model, and router.model need to stay in sync with whatever local/cloud models you actually have registered.lemonade-router-builder skill - it turns a natural-language description of routing intent into a valid collection.router policy JSON.