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

convert_checkpoint qwen1.5 error #1675

Closed
diandianliu opened this issue May 25, 2024 · 2 comments
Closed

convert_checkpoint qwen1.5 error #1675

diandianliu opened this issue May 25, 2024 · 2 comments
Assignees
Labels
bug Something isn't working Merged triaged Issue has been triaged by maintainers

Comments

@diandianliu
Copy link

Hi, I am facing an error when trying to convert_checkpoint qwen1.5

**model: **
https://huggingface.co/Qwen/Qwen1.5-0.5B-Chat
error:
python convert_checkpoint.py --qwen_type qwen2 --model_dir /workspace/triton/models/qwen/Qwen1.5-0.5B-Chat/ --output_dir /workspace/triton/models/qwen/trt_ckpt_Qwen1.5-0.5B-Chat_fp16_1gpu
[TensorRT-LLM] TensorRT-LLM version: 0.11.0.dev2024052100
0.11.0.dev2024052100
Traceback (most recent call last):
File "/workspace/triton/tensorrtllm_backend/tensorrt_llm/examples/qwen/convert_checkpoint.py", line 369, in
main()
File "/workspace/triton/tensorrtllm_backend/tensorrt_llm/examples/qwen/convert_checkpoint.py", line 361, in main
convert_and_save_hf(args)
File "/workspace/triton/tensorrtllm_backend/tensorrt_llm/examples/qwen/convert_checkpoint.py", line 323, in convert_and_save_hf
execute(args.workers, [convert_and_save_rank] * world_size, args)
File "/workspace/triton/tensorrtllm_backend/tensorrt_llm/examples/qwen/convert_checkpoint.py", line 329, in execute
f(args, rank)
File "/workspace/triton/tensorrtllm_backend/tensorrt_llm/examples/qwen/convert_checkpoint.py", line 309, in convert_and_save_rank
qwen = from_hugging_face(
File "/usr/local/lib/python3.10/dist-packages/tensorrt_llm/models/qwen/convert.py", line 1087, in from_hugging_face
weights = load_weights_from_hf(config=config,
File "/usr/local/lib/python3.10/dist-packages/tensorrt_llm/models/qwen/convert.py", line 1193, in load_weights_from_hf
weights = convert_hf_qwen(
File "/usr/local/lib/python3.10/dist-packages/tensorrt_llm/models/qwen/convert.py", line 931, in convert_hf_qwen
lm_head_weights = get_weight(model_params, 'lm_head', dtype)
File "/usr/local/lib/python3.10/dist-packages/tensorrt_llm/models/qwen/convert.py", line 455, in get_weight
if config[prefix + '.weight'].dtype != dtype:
KeyError: 'lm_head.weight'

@byshiue
Copy link
Collaborator

byshiue commented May 29, 2024

Thank you for the report. It is a bug of Qwen convert when tie_word_embeddings is True. We will fix it in next update.

@byshiue byshiue self-assigned this May 29, 2024
@byshiue byshiue added bug Something isn't working triaged Issue has been triaged by maintainers labels May 29, 2024
@nv-guomingz
Copy link
Collaborator

Hi @diandianliu , thanks for your contributing. We've merged your contribution into code base and will add you into contributor list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Merged triaged Issue has been triaged by maintainers
Projects
None yet
Development

No branches or pull requests

3 participants