henk717 / KoboldAI

KoboldAI is generative AI software optimized for fictional use, but capable of much more!
http://koboldai.com
GNU Affero General Public License v3.0
371 stars 132 forks source link

KeyError: 'mistral' #512

Closed j2wx closed 8 months ago

j2wx commented 8 months ago

I tried to load a model and receive this error message:

INIT       | Starting   | Flask
INIT       | OK         | Flask
INIT       | Starting   | Webserver
INIT       | Starting   | LUA bridge
INIT       | OK         | LUA bridge
INIT       | Starting   | LUA Scripts
INIT       | OK         | LUA Scripts
INIT       | OK         | Webserver
MESSAGE    | Webserver started! You may now connect with a browser at http://127.0.0.1:5000
Gtk-Message: 20:21:54.641: Failed to load module "xapp-gtk3-module"
INFO       | __main__:do_connect:3545 - Client connected!
Traceback (most recent call last):
  File "/home/admin/koboldai-client/runtime/envs/koboldai/lib/python3.8/site-packages/eventlet/hubs/hub.py", line 476, in fire_timers
    timer()
  File "/home/admin/koboldai-client/runtime/envs/koboldai/lib/python3.8/site-packages/eventlet/hubs/timer.py", line 59, in __call__
    cb(*args, **kw)
  File "/home/admin/koboldai-client/runtime/envs/koboldai/lib/python3.8/site-packages/eventlet/greenthread.py", line 221, in main
    result = function(*args, **kwargs)
  File "/home/admin/koboldai-client/runtime/envs/koboldai/lib/python3.8/site-packages/socketio/server.py", line 731, in _handle_event_internal
    r = server._trigger_event(data[0], namespace, sid, *data[1:])
  File "/home/admin/koboldai-client/runtime/envs/koboldai/lib/python3.8/site-packages/socketio/server.py", line 756, in _trigger_event
    return self.handlers[namespace][event](*args)
  File "/home/admin/koboldai-client/runtime/envs/koboldai/lib/python3.8/site-packages/flask_socketio/__init__.py", line 282, in _handler
    return self._handle_event(handler, message, namespace, sid,
  File "/home/admin/koboldai-client/runtime/envs/koboldai/lib/python3.8/site-packages/flask_socketio/__init__.py", line 828, in _handle_event
    ret = handler(*args)
  File "aiserver.py", line 469, in g
    return f(*a, **k)
  File "aiserver.py", line 3955, in get_message
    get_model_info(msg['data'], directory=msg['path'])
  File "aiserver.py", line 1550, in get_model_info
    layer_count = get_layer_count(model, directory=directory)
  File "aiserver.py", line 1600, in get_layer_count
    model_config = AutoConfig.from_pretrained(directory, revision=args.revision, cache_dir="cache")
  File "/home/admin/koboldai-client/runtime/envs/koboldai/lib/python3.8/site-packages/transformers/models/auto/configuration_auto.py", line 796, in from_pretrained
    config_class = CONFIG_MAPPING[config_dict["model_type"]]
  File "/home/admin/koboldai-client/runtime/envs/koboldai/lib/python3.8/site-packages/transformers/models/auto/configuration_auto.py", line 503, in __getitem__
    raise KeyError(key)
KeyError: 'mistral'
Traceback (most recent call last):
  File "/home/admin/koboldai-client/runtime/envs/koboldai/lib/python3.8/site-packages/eventlet/hubs/hub.py", line 476, in fire_timers
    timer()
  File "/home/admin/koboldai-client/runtime/envs/koboldai/lib/python3.8/site-packages/eventlet/hubs/timer.py", line 59, in __call__
    cb(*args, **kw)
  File "/home/admin/koboldai-client/runtime/envs/koboldai/lib/python3.8/site-packages/eventlet/greenthread.py", line 221, in main
    result = function(*args, **kwargs)
  File "/home/admin/koboldai-client/runtime/envs/koboldai/lib/python3.8/site-packages/socketio/server.py", line 731, in _handle_event_internal
    r = server._trigger_event(data[0], namespace, sid, *data[1:])
  File "/home/admin/koboldai-client/runtime/envs/koboldai/lib/python3.8/site-packages/socketio/server.py", line 756, in _trigger_event
    return self.handlers[namespace][event](*args)
  File "/home/admin/koboldai-client/runtime/envs/koboldai/lib/python3.8/site-packages/flask_socketio/__init__.py", line 282, in _handler
    return self._handle_event(handler, message, namespace, sid,
  File "/home/admin/koboldai-client/runtime/envs/koboldai/lib/python3.8/site-packages/flask_socketio/__init__.py", line 828, in _handle_event
    ret = handler(*args)
  File "aiserver.py", line 469, in g
    return f(*a, **k)
  File "aiserver.py", line 3918, in get_message
    load_model(use_gpu=msg['use_gpu'], gpu_layers=msg['gpu_layers'], disk_layers=msg['disk_layers'], online_model=msg['online_model'])
  File "aiserver.py", line 2250, in load_model
    model_config = AutoConfig.from_pretrained(vars.custmodpth, revision=args.revision, cache_dir="cache")
  File "/home/admin/koboldai-client/runtime/envs/koboldai/lib/python3.8/site-packages/transformers/models/auto/configuration_auto.py", line 796, in from_pretrained
    config_class = CONFIG_MAPPING[config_dict["model_type"]]
  File "/home/admin/koboldai-client/runtime/envs/koboldai/lib/python3.8/site-packages/transformers/models/auto/configuration_auto.py", line 503, in __getitem__
    raise KeyError(key)
KeyError: 'mistral'
henk717 commented 8 months ago

Are you sure you are on the KoboldAI version of this repo?

j2wx commented 8 months ago

Ah, I cloned the wrong one and though I installed this one. I copied the command in the description:

  1. Clone the URL of this Github repository (For example git clone https://github.com/koboldai/koboldai-client )

The right command is git clone https://github.com/henk717/KoboldAI.