jncraton / languagemodels

Explore large language models in 512MB of RAM
https://jncraton.github.io/languagemodels/
MIT License
1.18k stars 78 forks source link

AttributeError: module 'languagemodels' has no attribute 'chat' #29

Closed NormVg closed 8 months ago

NormVg commented 8 months ago

Been trying to run this lib in termux and it just keep showing this msgs Screenshot_20240213-122241 Screenshot_20240213-122318

jncraton commented 8 months ago

Thanks for taking the time to share your issue. I would expect your example to work generally, but this package is not well supported currently in termux. In my very brief testing, I was not able to successfully install CTranslate2 using termux on my device, which is the backend needed for LLM inference in this package. For me, the languagemodels package installed with pip in termux ends up being a very old version that did not have the chat endpoint.

jncraton commented 8 months ago

Could you confirm if your device (and termux) is running on ARMv7 (32-bit) or ARM64? There's no support for 32-bit devices in this package at the moment. If this package is working at all for you on a 32-bit device, it is likely using a very old version of the package.