Skip to content

Conversation

Ahajha
Copy link
Contributor

@Ahajha Ahajha commented Jun 15, 2025

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

Tiktoken hasn't caused any particular issues, but I'm including it because it's used in the same capacity here.

Both dependencies are only actually used if users are, so it seems pointless to depend on them directly. This updates the support to silently skip over them if they are not installed.

@Ahajha Ahajha force-pushed the trotta/optional-deps branch from 762f64b to 2fa4881 Compare June 15, 2025 17:37
Copy link
Collaborator

@Ubospica Ubospica left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution @Ahajha!

Both dependencies are only actually used if users are, so it seems pointless to depend on them directly

This argument makes sense to me. May I ask if you have encountered any specific problems with the current dependencies?

@Ahajha
Copy link
Contributor Author

Ahajha commented Jun 16, 2025

@Ubospica Yes, we (Modular) got this user report: modular/modular#4509. We don't use the dependency directly.

@Ahajha
Copy link
Contributor Author

Ahajha commented Jun 16, 2025

Dependencies in general, worth noting is triton and pytorch, but those are likely difficult to get rid of. We are (in an extremely simplified sense) competing with pytorch, so not depending on them is an ideal goal for us, though we use it in other places in our stack so I wouldn't sweat trying to get rid of it.

@Ubospica Ubospica merged commit e7a1dea into mlc-ai:main Jun 16, 2025
38 checks passed
modularbot pushed a commit to modular/modular that referenced this pull request Jun 20, 2025
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants