Files
6krrt/tests
adlee-was-taken 9a3926544a feat(local-encoder): swap from NLI cross-encoding to embedding+centroid classification
Replace transformers.pipeline('zero-shot-classification', bart-large-mnli)
with AutoModel/AutoTokenizer + mean-pool + L2-normalize + cosine
similarity + softmax (BAAI/bge-large-en-v1.5). One forward pass for the
input, cost independent of category count.

Preserves the exact public interface (ensure_available, classify_zero_shot)
— dispatcher.py needs zero changes.

Also updates LocalEncoderConfig's default model and class docstring in
config.py, and rewrites test_local_encoder.py with 13 offline tests
mocking both transformers and torch.

This is Phase 1 of Wave 5.1 in plans/token-waste-waves.md — implementation
only. Phase 2 (re-tuning confidence_threshold against real traffic) and
Phase 3 (delta-detector) are not included.
2026-09-18 01:50:37 -04:00
..