Text Generation Web UI でモデルロード時に KeyError:「mistral」 が発生する

Text Generation Web UI でモデルロード時に KeyError:「mistral」 が発生する現象と対処法を紹介します。

現象の確認

Text Generation Web UI でモデルロード時に次のエラーが発生します。

エラーメッセージ
Traceback (most recent call last):

File “(Text-Generation-WebUIの配置パス)\text-generation-webui\modules\ui_model_menu.py”, line 194, in load_model_wrapper

shared.model, shared.tokenizer = load_model(shared.model_name, loader)
File “(Text-Generation-WebUIの配置パス)\text-generation-webui\modules\models.py”, line 76, in load_model

output = load_func_map[loader](model_name)
File “(Text-Generation-WebUIの配置パス)\text-generation-webui\modules\models.py”, line 121, in huggingface_loader

config = AutoConfig.from_pretrained(path_to_model, trust_remote_code=shared.args.trust_remote_code)
File “(Text-Generation-WebUIの配置パス)\text-generation-webui\installer_files\env\lib\site-packages\transformers\models\auto\configuration_auto.py”, line 1039, in from_pretrained

config_class = CONFIG_MAPPING[config_dict["model_type"]]
File “(Text-Generation-WebUIの配置パス)\text-generation-webui\installer_files\env\lib\site-packages\transformers\models\auto\configuration_auto.py”, line 734, in getitem

raise KeyError(key)
KeyError: ‘mistral’

Text Generation Web UI でモデルロード時に KeyError:「mistral」 が発生する:画像1

原因

Text Generation Web UI のバージョンが古い可能性があります。

対処法1

Text Generation Web UI をアップデートします。アップデートはWindowsを利用している場合は、update_windows.bat を実行します。

対処法2

Text Generation Web UI を再インストールします。

GitHubから最新のText Generation Web UI をクローンする方法がおすすめです。

コマンド例
git clone https://github.com/oobabooga/text-generation-webui.git


インストール手順はこちらの記事を参照してください。

AuthorPortraitAlt
著者
iPentecの企画・分析担当。口が悪いのでなるべく寡黙でありたいと思っている。が、ついついしゃべってしまい、毎回墓穴を掘っている。
作成日: 2024-02-08