PII Redaction API
Three DeBERTa-v3 models (base, small, xsmall) fine-tuned on 27 PII entity types, served as a FastAPI service on AWS ECS Fargate with a custom domain, Cloudflare TLS, and a GitHub Actions pipeline that lints, type-checks, tests, builds and deploys every push.
- Custom
WeightedTokenClassificationTrainerwith class-balanced cross-entropy for severe O-token imbalance; two-phase training (frozen backbone → full fine-tune) in bf16. - Overlapping token chunking with sentence-aware boundary alignment and max-confidence overlap resolution, exposed through both a CLI and Pydantic-typed endpoints.
- API-key-authenticated endpoint plus a rate-limited public demo, with secrets in SSM Parameter Store.
- All three checkpoints published to the Hugging Face Hub with model cards covering per-entity F1, GPU latency and distribution-shift behavior.