gliner-haystack
Serve GLiNER2.5 with vLLM Factory using Docker Compose. GPU and CPU images are available:
| Image | Example Compose file | Requirements |
|---|---|---|
ghcr.io/maxdswain/vllm-gliner:latest (GPU) |
compose.yaml | NVIDIA GPU and NVIDIA Container Toolkit |
ghcr.io/maxdswain/vllm-gliner:latest-cpu (x86-64 CPU) |
compose.cpu.yaml | x86-64 CPU |
Haystack components
Install with uv sync --group dev --group test. The text component returns labeled entity spans;
the document component stores them in copied documents' meta["entities"]:
from haystack import Document
from haystack_integrations.components.extractors.gliner import GLiNERDocumentExtractor, GLiNERTextExtractor
labels = ["person", "organization", "location"]
text_extractor = GLiNERTextExtractor(api_base_url="http://localhost:8000", http_client_kwargs={"timeout": 30.0})
document_extractor = GLiNERDocumentExtractor(max_concurrency=5)
try:
entities = text_extractor.run("Alice works at Acme in Paris.", labels)["entities"]
documents = document_extractor.run([Document(content="Alice works at Acme in Paris.")], labels)["documents"]
finally:
text_extractor.close()
document_extractor.close()
Both components support run_async via Haystack 3's Pipeline.run_async. Document run_async sends requests
concurrently, with a semaphore enforcing max_concurrency; synchronous run processes documents sequentially.
Call warm_up() / warm_up_async() to prepare reusable HTTP clients if desired (runs also warm up lazily).
Call close() / close_async() to release them when done. HTTP client options such as timeout can be passed
via http_client_kwargs in either constructor.
Offline tests, lint, formatting and type checks: uv run --group dev --group test poe check.
To run tests against a live server:
GLINER_INTEGRATION_URL=http://localhost:8000 uv run --group dev --group test poe test-integration.
Integration tests skip when the variable is unset.
Python package releases
.github/workflows/publish-package.yml runs offline checks on pull requests and pushes to main
(Python 3.11 and 3.13). After successful checks on main, git-cliff finds releasable
Conventional Commits (feat, fix, perf, or breaking changes). If there are any, the
workflow updates pyproject.toml and uv.lock, builds distributions, commits the version,
creates a vX.Y.Z tag and GitHub Release with generated notes, then publishes those
artifacts to PyPI using the pypi GitHub environment and PyPI Trusted Publishing. The
initial release is v0.1.0; Docker-scoped commits do not release the Python package.
The release job needs permission to push its version commit and tag to main (check branch
protection rules). GitHub's GITHUB_TOKEN does not trigger another workflow when it creates
a release, so the PyPI publish job runs in the same workflow after the release job succeeds.
Quick start
Install Docker with Compose, then:
git clone https://github.com/maxdswain/gliner-haystack.git
cd gliner-haystack
# GPU (default)
docker compose up
# Or CPU
docker compose -f compose.cpu.yaml up
The first start downloads the model. Once the server is ready, try:
curl http://localhost:8000/pooling \
-H 'Content-Type: application/json' \
-d '{"model":"/models/current","data":{"text":"Alice works at Acme in Paris.","schema":{"entities":{"person":"","organization":"","location":""}},"runtime":"classic","include_spans":true}}'
Metadata
Release files for gliner-haystack 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gliner_haystack-0.1.0.tar.gz | 4.4 kB | With provenance | Details for gliner_haystack-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gliner_haystack-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for gliner_haystack-0.1.0-py3-none-any.whl |
Total release size: 10.2 kB
Release files / gliner_haystack-0.1.0.tar.gz
| Download URL | gliner_haystack-0.1.0.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8a3ac1760462a9c53580a195ed6a64d5df33262a3dd2575d624f445d1c2aeafd
|
|
BLAKE2b-256 checksum How to use checksums |
415d03e6dc1ab3ebc3ae04c8f1b3625c5a4de325b45295947c18ab825de60d5f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.
Transparency logRelease files / gliner_haystack-0.1.0-py3-none-any.whl
| Download URL | gliner_haystack-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c690a9d5b5855b2a0aa83e904b90bab045252fd6ef7075ae08e2946b20e04ec8
|
|
BLAKE2b-256 checksum How to use checksums |
6cd617b40e3abd68085ada230b61ef3e9bba63173a03ec27953bb7220a5b460e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.
Transparency logSecurity for gliner-haystack 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for gliner_haystack-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.