evangineer / alpaca-roleplay-discordbot

A discord bot that roleplays!
MIT License
1 stars 0 forks source link

ImportError: cannot import name 'AutoTokenizer' from 'ctransformers' #5

Closed evangineer closed 1 year ago

evangineer commented 1 year ago

On following instructions for Windows:

D:\Repos\alpaca-roleplay-discordbot>py roleplay-bot.py
Traceback (most recent call last):
  File "D:\Repos\alpaca-roleplay-discordbot\roleplay-bot.py", line 4, in <module>
    from ctransformers import AutoTokenizer, AutoModelForCausalLM
ImportError: cannot import name 'AutoTokenizer' from 'ctransformers' (C:\Users\mamad\AppData\Local\Programs\Python\Python310\lib\site-packages\ctransformers\__init__.py)
evangineer commented 1 year ago

Must be a problem either with the build or the path.

Possibly the underlying CUDA driver. Need to investigate.

evangineer commented 1 year ago

Okay, my bad.

AutoTokenizer isn't supported by ctransformers.

Need to dump that and change all references to chatbot.tokenizer to chatbot.tokenize as per https://github.com/marella/ctransformers#method-llmtokenize