Sub-3 millisecond named entity recognition (NER) inference
Apr 6, 2026
Summary
This post details the technical optimizations made to Baseten Embeddings Inference (BEI) to achieve sub-3 millisecond inference for Named Entity Recognition (NER) models. Key contributions include: a Rust-based web server and tokenizer to minimize per-request overhead, Nginx configuration for a memory-backed and lightweight request path, HTTP/2 connection pooling in the Baseten Performance Client to reuse connections, and the introduction of a `/predict_tokens` default route for NER models. It also provides an example YAML configuration for deploying a BERT-family NER model and a Python script for retrieving token-level predictions.
More from the Baseten AI Model Deployment and Serving Platform trail
- LangChain trains custom models for LangSmith Engine with Baseten Loops
- DeepSeek-V4.1-Flash: more efficient prefill for coding agents
- Blaxel is joining Baseten to build the future of agentic infrastructure
- How Baseten makes pyannote’s diarization models 9.6x faster
- Optimizing delta weight syncs for managed rollouts