Gliner Results in 300+ times slower speed in CPU #13839
Unanswered
oberoi-gaurav
asked this question in
Help: Coding & Implementations
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
📌 Description of the Setup and Performance Bottleneck
I'm integrating
gliner-spacy
into a document scanning pipeline where we require accurate and efficient extraction of entities such aspeople
,company
,location
, and other PII types. Our pipeline uses:urchade/gliner_multi_pii-v1
gliner-spacy
via a custom config250
to512
⚙️ Configuration
🐢 Problem: Slow Batch Processing
We process text in batches (25 chunks at a time from a pool of 1937). With
chunk_size=384
, performance is still extremely slow:nlp.pipe
withgliner-spacy
takes ~6.5 minutes for 25 chunksThis suggests GLiNER is the bottleneck, even when using the ONNX variant, which was expected to improve inference time.
💥 Tried and Failed:
Increasing chunk size to 512 (slight gain, but memory limits hit)
Reducing batch size (didn’t help, just split the same cost)
Using multiprocessing: leads to
PicklingError: [E112] Pickling a span is not supported
Warnings from GLiNER:
✅ Looking for Guidance On:
gliner-spacy
Beta Was this translation helpful? Give feedback.
All reactions