You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working with the GLiNER library and noticed it lists sentencepiece as a dependency.
However, after searching through the codebase, I can't find any place where sentencepiece is actually imported or used.
This is a problem because sentencepiece is basically unmaintained at this point and has multiple open issues with compatibility on recent Python versions and various operating systems (see google/sentencepiece).
Specifically, I want to upgrade my project to Python 3.13, but sentencepiece currently doesn't work with this version and is blocking the upgrade.
Question:
Is sentencepiece still required for GLiNER to function, or can it be removed from the dependencies? If it’s not strictly needed anymore, it would be better to drop it to avoid downstream breakage and allow users to upgrade Python safely.
Let me know if you need logs or further info.
Reacted by paco xander nathan and Rajesh Koilpillai
Activity
freinold commentedon Jul 13, 2025
Sentencepiece is not a hard dependency of transformers any more as I just found out, see huggingface/transformers#39091
ceteri commentedon Aug 4, 2025
This has become a show stopper for trying to install on later versions of Python, e.g., using
poetry, etc.[-]Incompability to Python3.13 due to `sentencepiece` dependency[/-][+]Incompability to Python3.13[/+]freinold commentedon Aug 15, 2025
sentencepieceis now available for Python 3.13.But the dependency
python-mecab-kofrom the extratokenizerscurrently doesn't build on 3.13 on my system (Win10/x64)@Ingvarstep are you generally tackling 3.13 soon as you're currently doing a lot of changes to the project?
Ingvarstep commentedon Sep 5, 2026
Alternatively, python-mecab-ko stanza can be used; it works with newer versions of Python.