DPOLens is an open-source MCP server that gives AI assistants the text of privacy law. Its search runs on the CPU, so it needs no GPU.
The usual way to run an embedding model in Python is sentence-transformers . DPOLens doesn't use it: with PyTorch's CPU build it installs about 1 GB, against about 200 MB for ONNX Runtime , the tokenizers library and NumPy. So DPOLens calls the model through ONNX Runtime directly, and does the tokenising and pooling itself, in about forty lines.
Those forty lines did their job. What they didn't do was what the library does without being asked. When a new instance starts for the first time, it embeds every clause of the law it carries , and while load-testing the community version , I found that this was the heaviest thing DPOLens ever did. In a container limited to 1.5 CPUs, about what a small server offers, it took nearly 23 minutes and peaked at 3.4 GB.
Two fixes made it 5.1× faster with 65% less memory, and the vectors came out the same.…