Anonymizer
Anonymizer copied to clipboard
feat(dev): add managed local model serving tool
Task Summary
Add a source-tree developer tool that deploys and manages local models through one managed local-process lifecycle. The tool lets contributors run Anonymizer against pinned generation models (vLLM) and the native GLiNER2 detector on a GPU host or inside the supplied container.
Technical Details & Implementation Plan
- Compile pinned TOML profiles into digest-protected plans. A profile selects a
backend(vllmorgliner2) plus bind address, timeouts and API-key source. - Provide
compile,validate,launch,probe,status, andstop. - Serve stock Hugging Face generation models through vLLM and GLiNER2 through Anonymizer's native server.
- Preserve process identity with launch receipts, PID start markers, and launch-token ownership checks for process groups whose leader has exited.
- Probe backend-specific behavior rather than treating a listening port as readiness.
- Bound termination and cleanup so failed or stale processes cannot hang the tool.
Acceptance criteria:
- Compilation is pure and produces deterministic, digest-protected plans; loading a plan verifies that recompiling its spec reproduces it.
- Plan digests are documented as accidental-corruption detection, not authentication.
- Generation and GLiNER2 profiles share one lifecycle implementation.
- Probes validate chat completions, or GLiNER2 dynamic labels, offsets, and scores.
- Status and stop reject stale or reused process identities and never signal a process group whose ownership cannot be verified.
- Cleanup is bounded and reports whether it completed.
- Tests cover lifecycle behavior against real processes.
- Documentation covers direct GPU-host deployment and the supplied container.
- A full Anonymizer dataset run succeeds with locally hosted GLiNER2 and a generation model, and both services clean up.
Out of scope:
- Public package APIs for deployment.
- Remote compute orchestration or attachment to existing endpoints.
- vLLM Factory and GLiNER (v1) /
nvidia/gliner-piiserving. - Model-cache discovery.
- Cryptographic authentication of plans.
Implementation is tracked in PR #212.