lm-sys / lm-sys/FastChat

KeyError: 'yi' on mtbench

Open
#2,877 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
39.5k
Forks
4.8k
PR merge metrics
No merged PRs in 30d

Description

I was trying to mtbench Nous-Capybara-34B-GGUF which has the following config.json:

{
    "model_type": "yi"
}

and I get the following error:

Traceback (most recent call last):
  File "/workspace/FastChat/fastchat/llm_judge/gen_model_answer.py", line 288, in <module>
    run_eval(
  File "/workspace/FastChat/fastchat/llm_judge/gen_model_answer.py", line 55, in run_eval
    get_answers_func(
  File "/workspace/venv_fastchat/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "/workspace/FastChat/fastchat/llm_judge/gen_model_answer.py", line 86, in get_model_answers
    model, tokenizer = load_model(
  File "/workspace/FastChat/fastchat/model/model_adapter.py", line 337, in load_model
    model, tokenizer = adapter.load_model(model_path, kwargs)
  File "/workspace/FastChat/fastchat/model/model_adapter.py", line 73, in load_model
    tokenizer = AutoTokenizer.from_pretrained(
  File "/workspace/venv_fastchat/lib/python3.10/site-packages/transformers/models/auto/tokenization_auto.py", line 752, in from_pretrained
    config = AutoConfig.from_pretrained(
  File "/workspace/venv_fastchat/lib/python3.10/site-packages/transformers/models/auto/configuration_auto.py", line 1098, in from_pretrained
    config_class = CONFIG_MAPPING[config_dict["model_type"]]
  File "/workspace/venv_fastchat/lib/python3.10/site-packages/transformers/models/auto/configuration_auto.py", line 795, in __getitem__
    raise KeyError(key)
KeyError: 'yi'

which points towards:

https://github.com/huggingface/transformers/blob/3cefac1d974db5e2825a0cb2b842883a628be7a0/src/transformers/models/auto/configuration_auto.py#L30

being the issue, so is this a transformers upstream issue or can yi be mtbenched even with no upstream support? thanks

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with the linked Yi model and trace the loading path through fastchat/llm_judge/gen_model_answer.py:55-86 and fastchat/model/model_adapter.py:73,337, using the transformers traceback as the entry point. Confirm whether the failure is confined to the model_type lookup; done means the issue is either routed upstream with evidence or Yi loads for mtbench without this KeyError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.