Skip to content

[Bug] AttributeError: 'dict' object has no attribute 'model_type' #76

@GaoHuaZhang

Description

@GaoHuaZhang

操作系统及版本

Ubuntu22.04

安装工具的python环境

在anaconda/miniconda创建的python虚拟环境

python版本

3.10

AISBench工具版本

3.0.20250824

AISBench执行命令

ais_bench --models vllm_api_stream_chat --datasets synthetic_gen --mode perf

模型配置文件或自定义配置文件内容

vllm_api_general_chat

预期行为

No response

实际行为

Traceback (most recent call last):
File "/home/***/benchmark/ais_bench/benchmark/utils/file/load_tokenizer.py", line 35, in load_tokenizer
tokenizer = AutoTokenizer.from_pretrained(tokenizer_path)
File "/root/miniconda3/envs/ais_bench_py310/lib/python3.10/site-packages/transformers/models/auto/tokenization_auto.py", line 1156, in from_pretrained
return tokenizer_class.from_pretrained(pretrained_model_name_or_path, *inputs, **kwargs)
File "/root/miniconda3/envs/ais_bench_py310/lib/python3.10/site-packages/transformers/tokenization_utils_base.py", line 2112, in from_pretrained
return cls._from_pretrained(
File "/root/miniconda3/envs/ais_bench_py310/lib/python3.10/site-packages/transformers/tokenization_utils_base.py", line 2419, in _from_pretrained
if _is_local and _config.model_type not in [
AttributeError: 'dict' object has no attribute 'model_type'

前置检查

  • 我已读懂主页文档的快速入门,无法解决问题
  • 我已检索过FAQ,无重复问题
  • 我已搜索过现有Issue,无重复问题
  • 我已更新到最新版本,问题仍存在

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcontent_check_failedissue content check failed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions