--- id: gliner version: "0.2.28" license: Apache-2.0 license_treatment: permissive maintenance: active --- # gliner — Generalist model for NER (Extract any entity types from texts) License: permissive · Maintenance: active · Downloads: 788.2K/mo ## What it is and what it does GLiNER is a named entity recognition framework designed to extract entity types from text without requiring labeled training data. It uses a bi-encoder architecture that pre-computes label embeddings, enabling zero-shot recognition across many entity types. The framework is optimized for deployment on CPUs and consumer hardware through quantization and torch.compile, and includes support for streaming NER, joint entity-relation extraction, and multilingual PII detection across 100+ languages. The package provides both inference and fine-tuning capabilities. For production workloads, it offers Ray Serve integration for high-throughput serving with dynamic batching and horizontal scaling. Pre-trained models are available via Hugging Face Hub, and the framework supports multiple architectures (uni-encoder, bi-encoder, RelEx, decoder, streaming) tailored to different use cases. Training on custom data is supported through JSON-based datasets and programmatic APIs. Use it for: - Extract personal identifiable information (SSN, credit cards, emails) from documents for compliance and redaction workflows. - Build knowledge graphs by jointly extracting entities and relations from unstructured text in a single pass. - Tag millions of documents against hundreds of entity types in production pipelines using the bi-encoder architecture. - Fine-tune on domain-specific corpora (biomedical, legal, financial) with minimal labeled examples. - Parse queries and documents in 100+ languages to extract structured data for multilingual applications. - Serve NER models at scale with automatic batching and memory-aware GPU allocation via Ray Serve. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. GLiNER is a lightweight framework for named entity recognition that can extract any entity type from text without labeled training data, and also supports relation extraction, PII detection, and token classification tasks. Yes. GLiNER is actively maintained, has no known vulnerabilities, and offers a practical solution for zero-shot entity extraction without labeled data. The permissive Apache-2.0 license and low install friction make it accessible. Install it if you need flexible NER without task-specific training, or if you want to experiment with entity extraction on diverse entity types. The Ray Serve integration and quantization support make it viable for production, though you should verify performance on your specific hardware and entity types before deploying. ## Install pip install gliner uv add gliner poetry add gliner ## Installing gliner Before you install: Installation is straightforward with low friction; the package depends on torch, transformers, huggingface_hub, tqdm, onnxruntime, and sentencepiece. The project is actively maintained with a recent release and 3537 GitHub stars, indicating solid community adoption and ongoing development. License in practice: Apache-2.0 is a permissive license, allowing commercial use, modification, and redistribution with minimal restrictions—suitable for most production and research contexts. Quickstart: pip install gliner from gliner import GLiNER model = GLiNER.from_pretrained("gliner-community/gliner_small-v2.5") entities = model.predict_entities("John works at Google", ["person", "organization"]) Requires Python 3.10 or later; torch and transformers must be installed and compatible with your hardware (CPU or GPU). Verify before relying: - Whether pre-trained models are automatically downloaded on first use or require manual setup. - Specific performance benchmarks comparing GLiNER to ChatGPT or UniNER on standard NER datasets. - Memory footprint and inference latency on typical consumer hardware (e.g., CPU-only, 8GB RAM). - Compatibility and performance with ONNX export on edge devices. ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 788.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags zero-shot named entity recognition, NER without labeled data, entity extraction lightweight model, relation extraction framework, PII detection multilingual, token classification transformers, information extraction CPU, streaming NER, named-entity-recognition, zero-shot-learning, information-extraction [View on SkillFed](https://skillfed.io/packages/gliner) · [View on PyPI](https://pypi.org/project/gliner/)