Commit History
27 days ago
-
Add structured policy rules with per-rule PolicyLM scoring
Author policies as discrete rules (flag / don't-flag / exception) that map 1:1 onto PolicyLM's Category(violation_rule, not_violation_rule, exception_override). Rules are sent to PolicyLM natively for one score per rule, and rendered to plain text for the other models so every model is judged on the identical policy. Adds a live 16-category / 1,662-token limit warning. Requires redeploying the PolicyLM endpoint with the updated handler. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>5c92085
-
Add Shieldstral, PolicyLM, and CoPE-B classifier models
These three models aren't served by the HF Inference Router, so each runs on its own dedicated HF Inference Endpoint with endpoint URL + token read from Space secrets. Each has a special-case branch in model_interface.run_test: - Shieldstral-1.0-3B: vLLM chat completions, softmax yes/no logprobs -> score - PolicyLM-1.7B: custom-handler endpoint (policylm_handler.py) returning JSON - CoPE-B-A4B: vLLM, COPE prompt, "0"/"1" answer + softmaxed logprob score Classifiers surface their violation probability in the Reasoning Trace panel (is_classifier flag suppresses the "no reasoning traces" note). README documents recommended GPU tier, required secrets, and per-minute billing / teardown. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>846e72b