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

Llama-3.2 SmoothQuant convert checkpoint error #2677

Open
1 of 4 tasks
lyffly opened this issue Jan 10, 2025 · 0 comments
Open
1 of 4 tasks

Llama-3.2 SmoothQuant convert checkpoint error #2677

lyffly opened this issue Jan 10, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@lyffly
Copy link

lyffly commented Jan 10, 2025

System Info

x86_64, ubuntu, A100

Who can help?

No response

Information

  • The official example scripts
  • My own modified scripts

Tasks

  • An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
  • My own task or dataset (give details below)

Reproduction

python3 convert_checkpoint.py --model_dir ./Llama-3.2-3B-Instruct/  \
                    --output_dir tllm_checkpoint_1gpu_sq \
                    --dtype float16 \
                    --smoothquant 0.5

Expected behavior

no error

actual behavior

  File "/usr/local/lib/python3.10/dist-packages/tensorrt_llm/models/llama/model.py", line 529, in quantize
    convert.quantize(hf_model_dir,
  File "/usr/local/lib/python3.10/dist-packages/tensorrt_llm/models/llama/convert.py", line 1146, in quantize
    weights = load_weights_from_hf_model(
  File "/usr/local/lib/python3.10/dist-packages/tensorrt_llm/models/llama/convert.py", line 1059, in load_weights_from_hf_model
    lm_head_weights = get_weight(model_params, param_name_map["lm_head"], dtype)
  File "/usr/local/lib/python3.10/dist-packages/tensorrt_llm/models/llama/convert.py", line 211, in get_weight
    if named_params[prefix + '.weight'].dtype != dtype:
KeyError: 'lm_head.weight'

additional notes

using pdb , shows model_params ,many value is none, for example

'model.layers.0.mlp.gate_proj.weight': None, 'model.layers.0.mlp.up_proj.weight': None, 'model.layers.0.mlp.down_proj.weight': None, 'model.layers.0.input_layernorm.weight': None, 'model.layers.0.post_attention_layernorm.weight': None, 'model.layers.1.self_attn.q_proj.weight': None, 'model.layers.1.self_attn.k_proj.weight': None, 'model.layers.1.self_attn.v_proj.weight': None, 'model.layers.1.self_attn.o_proj.weight': None, 'model.layers.1.mlp.gate_proj.weight': None, 'model.layers.1.mlp.up_proj.weight': None, 'model.layers.1.mlp.down_proj.weight': None, 'model.layers.1.input_layernorm.weight': None, 'model.layers.1.post_attention_layernorm.weight': None, 'model.layers.2.self_attn.q_proj.weight': None, 'model.layers.2.self_attn.k_proj.weight': None, 'model.layers.2.self_attn.v_proj.weight': None, 'model.layers.2.self_attn.o_proj.weight': None, 'model.layers.2.mlp.gate_proj.weight': None,
@lyffly lyffly added the bug Something isn't working label Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant