phocinae-server
Local FastAPI server for the Phocinae 144M decision model implementing the System One /v1/systemone contract on 127.0.0.1.
Overview
phocinae-server packages the Phocinae-Largha-150M decision model as a local FastAPI service implementing TypeSafe's System One contract. POST /v1/systemone answers noul, choice and score questions in one forward pass, with /v1/systemone/permute averaging four option permutations for choice questions, /v1/systemone/batch for up to 64 requests, /v1/models and /health. The README is in Chinese.
It deliberately does not implement chat, Ollama or OpenAI-compatible endpoints and listens only on 127.0.0.1 for local agents and workflows. Inference is a hand-written pure-torch forward pass that reads the published safetensors, verified to match the official stack with zero logit deviation on test cases. It supports up to 64 questions per request, 255 choice options and an 8,192-token context, with optional bearer auth, body limits and extension keys such as answer confidence and routing. It reports 21.0 ms p50 on an RTX 5090 in fp16.
What the decision model decides
| Type | Question | Answers |
|---|---|---|
| Yes / no | Is this agent action acceptable (e.g. after rm -rf /var/log/app)? | yes · no |
| Choice | act | allow · ask · deny |
| Score | risk (2-10) | — |
How it works
- Set PHOC_MODEL_DIR to the downloaded model.
- Start the server on 127.0.0.1:8155.
- POST state and questions to /v1/systemone.
- Use answers and confidence in local tools.
Strengths
- Minimal dependencies (FastAPI, uvicorn, torch).
- Verified numerical parity with the official stack.
- Permutation averaging to reduce order flips.
Caveats
- Local-only by design.
- Documentation in Chinese.
Getting started
git clone https://github.com/Phocinae/phocinae-server.git && pip install fastapi uvicorn torch && PHOC_MODEL_DIR=/path/to/hf_repo python -m phocinae.mainAt a glance
- Type
- Service
- Status
- beta
- Language
- Python
- Runtime
- FastAPI server, PyTorch
- Has code
- yes
- Has tests
- yes
- License
- Apache-2.0
Use cases and integrations
How curated lists describe it
Local inference server implementing the TypeSafe System One wire format with /v1/systemone endpoints returning per-option probabilities.
logicrw/awesome-jev-projects
Frequently asked questions
Does it offer a chat API?
No, it only implements the System One decision endpoints.
Can other machines call it?
By default it listens only on 127.0.0.1.
How many questions per request?
Up to 64, with up to 255 choice options.
Related projects
Open 0.8B and 2B Qwen3.5 decision models with a local systemone-compatible server, MCP tools, agent skills and a Claude Code guard.
ServicebetaPythonHome Assistant integration that asks Jev, Clef or local Laya about device actions, then applies policy and verifies state separately.
ProjectbetaPythonLocal Laya decision layer for DeepSeek Harness: routes prompts, gates risky tool calls and swaps models, all offline at no token cost.
ProjectbetaPRAXEON runtime supervisor for autonomous agents: actions are checked by policy, a LAYA or TypeSafe semantic judge, signed and sandboxed.
LibrarybetaPython- Strands Decider 2B★ 612
AWS Strands Labs' 2B decision model: Qwen3.5-2B with a pointer head scoring options and calibrated confidence, plus a CLI.
ModelbetaPython spark-s1: local Jev-inspired decision models on Qwen3.5-4B for NVIDIA DGX Spark, trained on code- and solver-labelled decision rows.
ModelresearchPython