Skip to main content
Named entity recognition (NER) classifies each token in an input string into entity categories such as person (PER), organization (ORG), location (LOC), and miscellaneous (MISC). NER models use the ForTokenClassification architecture and the /predict_tokens endpoint. NER requires BEI-Bert (base_model: encoder_bert), which produces token-level outputs.
  • dslim/bert-base-NER-uncased: fast, compact NER for English. (Truss example)
  • tanaos/tanaos-NER-v1: general-purpose NER.

Configuration

Add to config.yaml:

Request format

Response format

With aggregation_strategy: "max" (recommended for production):
With aggregation_strategy: "none" and raw_scores: true (token-level with BIO labels):
Token-level labels follow the BIO tagging scheme: B- marks the beginning of an entity, I- marks a continuation, and O means outside any entity.

Python example

Using the Baseten Performance Client:
NER models do not expose an OpenAI-compatible endpoint. Call /predict_tokens directly. The route also supports async inference.