Library / SDK
urchade/GLiNER avatar
urchade/GLiNER

gliner's two dependency files disagree about transformers, and int8 costs accuracy unless the model was trained for it

Generalist and Lightweight Model for Named Entity Recognition (Extract any entity types from texts)

4,287 stars327 forksPythonApache-2.0

At a glance

What is it?
A small zero-shot named entity recognition model and training framework in Python, with streaming, relation extraction, ONNX export and a Ray serving layer. The performance claim at the top of the README cites no benchmark, the extras list contains one named after something it does not install, and the container configuration serves a different model from the quickstart.
Who is it for?
GLiNER is a good fit if you want named entity recognition you can run on a CPU or a consumer GPU and retrain on your own labels in minutes, because the model is small, the install is one line, and the fine-tuning path is a single function call with a config file beside it. Four things to check before you rely on it.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 11 days ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 22, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • urchade/GLiNER4,287 ★ · +352
Star history
Repository2026-09-242026-11-22
urchade/GLiNER3.9k4.3k

352 Stars in the last 59 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

Two dependency files, two different ceilings

The packaging manifest asks for the transformers library from a specific minimum release up to but not including a later one, so the package declares both a floor and a ceiling. The plain requirements file asks for a higher floor and no ceiling at all. The file most people reach for when they want a working environment therefore removes the upper bound the package author set, and the two floors disagree by several releases besides. That requirements file also lists five packages where the manifest lists eight, leaving out a numerical library, a packaging helper and a tensor serialisation library. So installing from it does not reproduce what the package says it needs, and it can install a transformers release the author has deliberately excluded. The manifest also builds with a plain setuptools backend rather than a newer one, discovers packages by prefix, and reads its version from an attribute inside the package rather than repeating it, so the version cannot drift out of step with the code.

The extra called tokenizers contains no tokenizer

One of the install extras is named for the thing you would expect it to bring, and contains something else: a language detection library, language-specific analysers for Korean, Japanese, Chinese, Arabic and Indic scripts, and two multilingual natural language toolkits. A reader who installs it expecting the obvious library gets eight packages and a surprise. Two of those eight, stanza and langdetect, also make up a second extra named stanza, so the two lists overlap, and the training extra contains a single package.

Int8 works on any checkpoint and costs accuracy on any but the right one

This is the section of the README with real numbers in it, and they are hedged appropriately. Compiling the model fuses operations and removes interpreter overhead for up to about one and a half times. Half precision halves model memory and speeds up matrix operations, and combined with compilation gives up to about one point nine times faster GPU inference. Then the caveat, in the same bullet: int8 cuts memory by a further factor of two and is supported out of the box, however models need to have been trained with quantization-aware training to preserve accuracy at that precision. So the conversion works on any checkpoint you have and quietly costs quality unless that checkpoint was trained for it. The README's loader example uses `quantize=True`, which it describes as FP16 quantization, together with compilation:

python
model = GLiNER.from_pretrained(
    "gliner-community/gliner_small-v2.5",
    map_location="cuda",
    quantize=True,
    compile_torch_model=True,
)

Competitive with much larger models, with no benchmark named

The opening paragraph makes the strongest claim in the file: performance competitive with large language models several times its size, naming two of them. There is no number, no benchmark name, no dataset and no task in that sentence. The repository does carry a benchmarks directory and an evaluation script at its root, but the README does not point at them from the sentence that makes the claim. Set that beside the optimisation section, which does give figures and does hedge them: those are about throughput and memory, while the competitive claim is about output quality. The feature table is more careful. It says the label embedding mechanism scales to a hundred or more entity types without degradation, and calls the multilingual personally identifiable information models state of the art.

The container configuration wants a GPU and a different model

The Compose file at the root builds from a container file inside the package, publishes one port, and sets four environment variables: which model to load, which device, which data type, and a maximum batch size. The device is set to cuda, the data type to a bfloat format, and the file reserves a graphics card explicitly with a count of one and a capability list. That is a perfectly good serving configuration and it is the opposite of the run-anywhere claim two sections above, which leads with a CPU. It also names an older small checkpoint in a different account namespace from the one every example in the file uses, which is a newer small checkpoint from the community namespace. Compose copies follow the file, so the container quietly serves a different model from the quickstart, and it cannot start on a machine without a graphics card.

Four authors, one maintainer

The manifest credits four people as authors and one as a maintainer, and the maintainer is the first author. That is the normal shape for a research project with people behind it and worth stating plainly rather than reading twice, because the four-name credit is what anyone installing the package sees first and the single-maintainer field is what they will not see unless they open the manifest. The rest of the metadata is conventional: an eight keyword list, a minimum Python version, a permissive licence written as text rather than as an identifier, and a version read from an attribute in the package rather than repeated in the manifest, which means the version lives in exactly one place.

A usage dashboard as a readme badge

The badge row at the top is not only the paper, the documentation and a chat server. It also includes a public dashboard of usage statistics served from somebody else's hosted database, a subreddit, a hosted demo space, and a model listing filtered by this library and sorted by trending. Publishing usage counts in a badge is a choice about what a project treats as evidence, and the one number in the file a reader could compare against anything else lives in a database the project does not control. The repository root also holds a release notes file, a data directory, a demo script, an evaluation script and a lock file. The example notebooks, by contrast, are linked, and they include the ONNX conversion and a spaCy integration.

Editorial conclusion

GLiNER is a good fit if you want named entity recognition you can run on a CPU or a consumer GPU and retrain on your own labels in minutes, because the model is small, the install is one line, and the fine-tuning path is a single function call with a config file beside it. Four things to check before you rely on it. If you quantize an existing checkpoint to eight bits, expect to lose accuracy unless that checkpoint was trained with quantization-aware training. Install from the packaging manifest rather than from the plain requirements file, because the two disagree about which versions of the transformers library are acceptable. Treat the claim of competing with much larger models as the project's own, since the sentence carries no benchmark. And if you serve it from the container configuration in the repository, expect a different checkpoint from the one in the quickstart, and expect it to need a GPU. Licence terms are Apache-2.0 and the last push is dated 2026-10-31.

Frequently asked questions

How do I install gliner?

With `pip install gliner` or `uv pip install gliner`. Serving support is an extra: `uv pip install gliner[serve]`, or install the package together with the serving extra of the Ray project. Other extras cover the ONNX runtime, its GPU variant, OpenVINO, language-specific word segmentation and training.

What is GLiNER?

A framework for training and deploying small named entity recognition models with zero-shot capability. Beyond standard NER it supports incremental streaming NER, joint entity and relation extraction, and multi-task token classification, and it is fine-tunable and optimised to run on CPUs and consumer hardware.

What is the difference between the GLiNER architectures?

The table describes a uni-encoder as the original architecture, with strong zero-shot capability and support for up to about fifty entity types, and a bi-encoder that pre-computes label embeddings so it scales to a hundred or more entity types without degradation. The architecture table is where the two are compared directly.

Does GLiNER need a GPU?

No. The features table leads with running on a CPU, and the model is small enough for consumer hardware, with half precision, int8 and compilation available as options. The container configuration shipped in the repository is the exception: it reserves a graphics card explicitly and sets the device to cuda.

What is the int8 caveat in GLiNER?

Int8 quantization is supported out of the box and cuts memory by about a further factor of two on top of half precision, but models need to have been trained with quantization-aware training to preserve accuracy at that precision. Half precision combined with compilation is quoted at up to about one point nine times faster GPU inference with virtually no quality loss.

Official sources

  1. License: Apache-2.0
  2. Project website
  3. README
  4. Releases
  5. urchade/GLiNER on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/urchade-gliner.svg)](https://hysenlabs.com/projects/urchade-gliner)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/urchade-gliner.svg)](https://hysenlabs.com/projects/urchade-gliner)

Was this useful?