Skip to content

Conversation

@majiayu000
Copy link

Summary

  • Add sentencepiece to the transformers optional dependencies in pyproject.toml
  • This fixes Undeclared dependency on sentencepiece #1475 where users installing outlines[transformers] encounter ModuleNotFoundError: No module named 'sentencepiece' when using models that rely on LlamaTokenizer

Changes

  • Modified pyproject.toml to include sentencepiece in the transformers optional dependency group

Test plan

  • Install outlines[transformers] and verify sentencepiece is included
  • Import LlamaTokenizer from transformers without additional installs

When using Outlines with transformers for models that use LlamaTokenizer,
the sentencepiece library is required but was not declared as a dependency.
This caused runtime errors when users installed outlines[transformers].

Fixes dottxt-ai#1475

Signed-off-by: majiayu000 <1835304752@qq.com>
@RobinPicard
Copy link
Contributor

Hi @majiayu000! Thanks for opening a PR! I think we should also update the uv.lock such that it corresponds to the dependencies listed in the pyproject.toml.

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.

Undeclared dependency on sentencepiece

2 participants