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

加载llama3 70B模型时, AutoTokenizer 报错 #3348

Closed
1 task done
ArcherShirou opened this issue Apr 19, 2024 · 8 comments
Closed
1 task done

加载llama3 70B模型时, AutoTokenizer 报错 #3348

ArcherShirou opened this issue Apr 19, 2024 · 8 comments
Labels
solved This problem has been already solved

Comments

@ArcherShirou
Copy link

Reminder

  • I have read the README and searched the existing issues.

Reproduction

image
请问如何解决

Expected behavior

No response

System Info

No response

Others

No response

@ArcherShirou ArcherShirou changed the title 加载llama3 70B模型时, Autotokenizer 报错 加载llama3 70B模型时, AutoTokenizer 报错 Apr 19, 2024
@hiyouga
Copy link
Owner

hiyouga commented Apr 19, 2024

报错信息不全

@hiyouga hiyouga added the pending This problem is yet to be addressed label Apr 19, 2024
@ArcherShirou
Copy link
Author

您好,以下是完整的报错信息:
image
tokenizers 0.19.1
torch 2.2.2
transformers 4.40.0
加载 vllm 推理时:
export CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7
API_PORT=8000 python src/api_demo.py
--model_name_or_path Meta-Llama-3-70B-Instruct
--template llama3
--infer_backend vllm
--vllm_enforce_eager
出现相同的错误:
image

@hiyouga
Copy link
Owner

hiyouga commented Apr 19, 2024

模型文件不全

@hiyouga hiyouga added solved This problem has been already solved and removed pending This problem is yet to be addressed labels Apr 19, 2024
@hiyouga hiyouga closed this as completed Apr 19, 2024
@ArcherShirou
Copy link
Author

您好,模型文件没有缺失,用官方的vllm可以推理:
image

@hiyouga
Copy link
Owner

hiyouga commented Apr 19, 2024

更新llamafactory代码

hiyouga added a commit that referenced this issue Apr 20, 2024
@ArcherShirou
Copy link
Author

ArcherShirou commented Apr 22, 2024

找到真正的问题所在了,是官方上传的模型文件不全,缺少tokenizer_config.json文件,需要把llama-8b-instruct中的tokenizer_config.json复制到llama-70b-instruct中,就可以解决tokenizer报错的问题

@luolanfeixue
Copy link

找到真正的问题所在了,是官方上传的模型文件不全,缺少tokenizer_config.json文件,需要把llama-8b-instruct中的tokenizer_config.json复制到llama-70b-instruct中,就可以解决tokenizer报错的问题

不需要这么做,更新transformers库到4.41.0就可以

@luolanfeixue
Copy link

LlamaTokenizer.from_pretrained(model_name_or_path,**tokenizer_kwargs)
改为
AutoTokenizer.from_pretrained(model_name_or_path,**tokenizer_kwargs)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solved This problem has been already solved
Projects
None yet
Development

No branches or pull requests

3 participants