-
Notifications
You must be signed in to change notification settings - Fork 12.1k
gguf-py: Make sentencepiece optional #14200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Are there alternatives to sentencepiece? If it is no longer maintained, it will always be broken. (I met this issue since Python 3.13) |
Not that I'm aware of, but I'm not that knowledgeable about these things. I'm coming at this from a pure packaging perspective. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sentencepiece
is also used in convert_hf_to_gguf.py
, might be relevant to add similar changes in a follow-up PR, or here.
Co-authored-by: compilade <[email protected]>
ggml-org/llama.cpp#14200 mlc-ai/xgrammar#337 gguf immediately released a new version, waiting on xgrammar. In the meantime though, bump gguf and remove the explicit sentencepiece dependency, it isn't used anywhere. This should automatically propagate up towards users, no need to bump minimum required versions. MODULAR_ORIG_COMMIT_REV_ID: 27aa8a6ece6f56d253875294f8ae9988eecc8cc1
* mamba2-sync: (24 commits) sync : ggml Add `ggml_roll` (ggml/1274) docs : fix the link to llama.h (ggml-org#14293) CUDA: add conv_2d_transpose (ggml-org#14287) lint : remove trailing whitepace (ggml-org#14304) vocab : prevent tokenizer overflow (ggml-org#14301) sycl: add usage of enqueue_functions extension (ggml-org#14244) Implement GGML_CPU_ALL_VARIANTS for PowerPC (ggml-org#14286) llama : improve sep token handling (ggml-org#14272) cuda : synchronize graph capture and cublas handle destruction (ggml-org#14288) ggml : fix repack work size for mul_mat_id (ggml-org#14292) ggml: Update KleidiAI to v1.9.0 (ggml-org#14277) model : more uniform output id handling (ggml-org#14275) ubatch : new splitting logic (ggml-org#14217) CUDA: add conv_2d_dw (ggml-org#14265) ggml-cpu : remove unnecesary arm feature detection (ggml-org#14281) gguf-py : make sentencepiece optional (ggml-org#14200) server : add server parameters for draft model cache type (ggml-org#13782) build : suppress gcc15 compile warnings (ggml-org#14261) sycl: Cleanup codepaths in Get Rows in sycl backend (ggml-org#14215) ...
Sentencepiece has not had a new release in over a year, and users are running into easily fixable install issues like CMake minimum versions, missing headers, and missing wheels for newer python versions. See recent issues: https://github.com/google/sentencepiece/issues, like this one for example: google/sentencepiece#1113
Sentencepiece is only actually used if users are already using it, so it seems pointless to depend on it directly. This updates the support to raise an error if sentencepiece isn't installed.