TensorRT-LLM icon indicating copy to clipboard operation
TensorRT-LLM copied to clipboard

convert_checkpoint qwen1.5 error

Open diandianliu opened this issue 1 year ago • 0 comments

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'

diandianliu avatar May 25 '24 15:05 diandianliu