GLiNER

A local entity extraction framework with zero-shot recognition, multilingual PII detection and CPU support. Open source under Apache 2.0.

Screenshot of GLiNER website

GLiNER is a Python framework for extracting named entities from text using small models that run locally on CPUs and consumer hardware. It's for developers building document processing, personal data detection or search systems who need to choose their own entity types without training a model for each task.

Its zero-shot models recognize user-defined labels without labeled examples. You can also fine-tune models on a small dataset for specialized material, such as legal, financial or biomedical documents. This gives teams a smaller alternative to using a general-purpose LLM for entity extraction.

Beyond finding names and other text spans, GLiNER supports several related workloads:

  • Multilingual PII models detect personal information for redaction and compliance pipelines.
  • Joint entity and relation extraction identifies entities and their connections in one pass for knowledge graphs.
  • Streaming NER updates predictions as text arrives, rather than requiring a complete document.
  • Multi-task token classification supports additional labeling tasks within the framework.

The bi-encoder architecture handles large sets of entity types by encoding text and labels separately. For deployment, GLiNER supports ONNX export, OpenVINO inference and quantization to reduce memory use. Its Ray Serve integration provides an HTTP API, request batching and scaling across multiple GPUs for self-hosted services.

GLiNER is open source under the Apache 2.0 license. The framework includes tools for training custom models and deploying them on your own hardware.

Similar to GLiNER