xusenlinzy/api-for-open-llm

运行internlm2时报错找不到权重文件,这些文件模型并不提供

760485464 opened this issue · 3 comments

提交前必须检查以下项目 | The following items must be checked before submission

  • 请确保使用的是仓库最新代码(git pull),一些问题已被解决和修复。 | Make sure you are using the latest code from the repository (git pull), some issues have already been addressed and fixed.
  • 我已阅读项目文档FAQ章节并且已在Issue中对问题进行了搜索,没有找到相似问题和解决方案 | I have searched the existing issues / discussions

问题类型 | Type of problem

启动命令 | Startup command

操作系统 | Operating system

Linux

详细描述问题 | Detailed description of the problem

image

Dependencies

运行internlm2时报错找不到权重文件,这些文件模型并不提供

运行日志或截图 | Runtime logs or screenshots

2024-04-17 18:24:27.957 | DEBUG | api.config::338 - SETTINGS: {
"model_name": "internlm2",
"model_path": "models/internlm2-chat-20b",
"dtype": "half",
"load_in_8bit": false,
"load_in_4bit": false,
"context_length": -1,
"chat_template": null,
"rope_scaling": null,
"flash_attn": false,
"use_streamer_v2": false,
"interrupt_requests": true,
"host": "0.0.0.0",
"port": 6006,
"api_prefix": "/v1",
"engine": "default",
"tasks": [
"llm"
],
"device_map": "auto",
"gpus": "1,2",
"num_gpus": 2,
"activate_inference": true,
"model_names": [
"internlm2"
],
"api_keys": null
}
Traceback (most recent call last):
File "/home/ai-service/projects/api-llm2/api-for-open-llm/server.py", line 2, in
from api.models import (
File "/home/ai-service/projects/api-llm2/api-for-open-llm/api/models.py", line 197, in
LLM_ENGINE = create_hf_llm()
File "/home/ai-service/projects/api-llm2/api-for-open-llm/api/models.py", line 77, in create_hf_llm
model, tokenizer = load_model_and_tokenizer(
File "/home/ai-service/projects/api-llm2/api-for-open-llm/api/adapter/loader.py", line 64, in load_model_and_tokenizer
model = AutoModelForCausalLM.from_pretrained(
File "/root/anaconda3/envs/internlm2/lib/python3.9/site-packages/transformers/models/auto/auto_factory.py", line 558, in from_pretrained
return model_class.from_pretrained(
File "/root/anaconda3/envs/internlm2/lib/python3.9/site-packages/transformers/modeling_utils.py", line 3144, in from_pretrained
raise EnvironmentError(
OSError: Error no file named pytorch_model.bin, tf_model.h5, model.ckpt.index or flax_model.msgpack found in directory models/internlm2-chat-20b.

少文件了吗?

没有少,排查 了很多遍

官方也不存在这些问题呢