Skip to content

[Bug]: MTP logic is unaware of Transformers' layer renaming and quantizes the entire model again #2324

Description

@wenhuach21

Problem Description

auto-round ./ --eval --eval_bs 16 --tasks lambada_openai

1 unexpected keys

]
[transformers] NemotronHForCausalLM LOAD REPORT from: ./
Key | Status | Details
-----------------------------------------+------------+--------
model.layers.{1...51}.mixer.gate.qzeros | UNEXPECTED |
model.layers.{1...51}.mixer.gate.qweight | UNEXPECTED |
model.layers.{1...51}.mixer.gate.scales | UNEXPECTED |

2 gate_proj issue

File "/home/wenhuach/miniforge3/envs/autoround/lib/python3.13/site-packages/auto_round/modeling/fused_moe/moe_experts_interface.py", line 302, in linear_loop_experts_forward
final_hidden_states = _run_experts_with_routes(top_k_index, top_k_weights)
File "/home/wenhuach/miniforge3/envs/autoround/lib/python3.13/site-packages/auto_round/modeling/fused_moe/moe_experts_interface.py", line 279, in _run_experts_with_routes
gate_out = expert.gate_proj(expert_input) # (num_samples, intermediate_dim)
^^^^^^^^^^^^^^^^
File "/home/wenhuach/miniforge3/envs/autoround/lib/python3.13/site-packages/torch/nn/modules/module.py", line 1972, in getattr
raise AttributeError(
f"'{type(self).name}' object has no attribute '{name}'"
)
AttributeError: '_ExpertContainer' object has no attribute 'gate_proj'

Reproduction Steps

~

Environment Information

No response

Error Logs

Additional Context

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions