Skip to content
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

No module named 'sentencepiece' when following install instructions #200

Open
drdozer opened this issue Nov 3, 2024 · 1 comment
Open

Comments

@drdozer
Copy link

drdozer commented Nov 3, 2024

I made a venv, pip installed airllm and then bitsandbytes within that venv, and then copypasted the example python code into testme.py. It bailed with the output below:

$ python testme.py
>>>> bitsandbytes installed
>>>> cache_utils installed
Traceback (most recent call last):
  File "/home/nmrp3/devel/oss/airllm/testme.py", line 1, in <module>
    from airllm import AutoModel
  File "/home/nmrp3/devel/oss/airllm/venv/lib/python3.12/site-packages/airllm/__init__.py", line 16, in <module>
    from .airllm_baichuan import AirLLMBaichuan
  File "/home/nmrp3/devel/oss/airllm/venv/lib/python3.12/site-packages/airllm/airllm_baichuan.py", line 4, in <module>
    from .tokenization_baichuan import BaichuanTokenizer
  File "/home/nmrp3/devel/oss/airllm/venv/lib/python3.12/site-packages/airllm/tokenization_baichuan.py", line 26, in <module>
    import sentencepiece as spm
ModuleNotFoundError: No module named 'sentencepiece'
$ uname -a
Linux persephone 6.8.0-48-generic #48-Ubuntu SMP PREEMPT_DYNAMIC Fri Sep 27 14:04:52 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
$ python --version
Python 3.12.3

@drdozer
Copy link
Author

drdozer commented Nov 3, 2024

Was fixed with

pip install sentencepiece

Not sure why this wasn't pulled in as a dependency of airllm?

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

No branches or pull requests

1 participant