Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'ModelType' has no attribute 'llama3_8b_instruct' #904

Closed
zzisbeauty opened this issue May 10, 2024 · 5 comments
Closed

'ModelType' has no attribute 'llama3_8b_instruct' #904

zzisbeauty opened this issue May 10, 2024 · 5 comments

Comments

@zzisbeauty
Copy link

zzisbeauty commented May 10, 2024

Describe the bug
What the bug is, and how to reproduce, better with screenshots(描述bug以及复现过程,最好有截图)

请问老师:

  • 我就是简单的想先测试一下 LLaMa3 8b-instruction 的效果。
  • 所以我分别采用 《LLM推理文档》 以及 《VLLM推理加速与部署》 中的代码直接先用LLama3推理一下。
  • 但是很奇怪,直接就出现这样的错误:

638941CB-7CDA-4fa8-B77F-F3F767D4279C

  • 我看到 ModelType 中有配置该模型啊,为什么会爆出上面的错误呢? 我不知道是什么原因。

image

Your hardware and system info
Write your system info like CUDA version/system/GPU/torch version here(在这里给出硬件信息和系统信息,如CUDA版本,系统,GPU型号和torch版本等)

【env】使用的是 docker 镜像,容器中基于源码进行推理测试。

Additional context
Add any other context about the problem here(在这里补充其他信息)

  • 期待得到老师的答复。
  • 感恩!

@Jintao-Huang

@hjh0119
Copy link
Collaborator

hjh0119 commented May 11, 2024

llama3-8b-instruct

@zzisbeauty
Copy link
Author

llama3-8b-instruct

我即使在代码里指定这个信息也是不对的,爆出同样的错误

image

@hjh0119
Copy link
Collaborator

hjh0119 commented May 11, 2024

应该是版本太久了
pip install -U ms-swift

@zzisbeauty
Copy link
Author

zzisbeauty commented May 16, 2024

应该是版本太久了 pip install -U ms-swift

感谢老师的答复。

我今天安装后再次运行。 确实可以运行。但是我有个问题请教:

  • 首先,我是在官方提供的容器中运行;
  • 我采用的是debug源码方式的运行,而不是在终端直接输入的命令行运行的 llama3 的 sft;
  • 但是我出现了一个疑问:

我明明是源码运行,但是程序为什么会执行到安装的 swift 模块中呢?比如下图,很明显代码报错位置不在源码中(这个图的异常是我加载的本地 llama3,而没有指定 model_type导致的报错)

image

我debug运行的入口在这里:

image

那么我一开始设想的,代码应该执行到我的源码的位置:
image

但是很明显如第一张图,代码运行到第一张图安装的 swift 模块中报错了

请问老师这是什么问题呢? 期待得到老师的答复。!感恩! @hjh0119 @Jintao-Huang @tastelikefeet

@hjh0119
Copy link
Collaborator

hjh0119 commented May 16, 2024

@zzisbeauty 你可以到源码目录下 pip install -e .将源码作为环境,或者在launch.json中指定PYTHONPATH到源码

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants