mlc-ai / mlc-llm

Universal LLM Deployment Engine with ML Compilation
https://llm.mlc.ai/
Apache License 2.0
19.12k stars 1.57k forks source link

[Bug] Unused External Parameters when quantizing Command-R-Plus #2866

Open TNT3530 opened 2 months ago

TNT3530 commented 2 months ago

🐛 Bug

image

To Reproduce

Steps to reproduce the behavior:

  1. Download Command-R-Plus (either variant)
  2. Attempt to quantize with convert_weight
  3. Get above warning

Expected behavior

Should load and quantize the weights like normal

Environment

image image image

Additional context

Normal Command-R works, only Plus has the warning

MasterJH5574 commented 2 months ago

@TNT3530 Thank you for reporting this. Looks like the q_norm/k_norm is yet to be supported.

MasterJH5574 commented 2 months ago

@tlopex Hi Shushi, I wonder if you have bandwidth to look into this? We already have the Cohere model in https://github.com/mlc-ai/mlc-llm/blob/main/python/mlc_llm/model/cohere/cohere_model.py but it doesn't support the q_norm and k_norm in attention when a config value use_qk_norm is true. So likely it's only the matter of supporting this.

Reference:

tlopex commented 2 months ago

@MasterJH5574 Okay! I'll try to support this later.