mlc-ai / mlc-llm

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

[Bug] ValueError: Unknown model type: rwkv #2963

Open haohenggang opened 1 month ago

haohenggang commented 1 month ago

🐛 Bug

To Reproduce

Steps to reproduce the behavior:

(mlc-chat-venv) hhg@dell:~/mlc-llm$ mlc_llm convert_weight ./dist/models/music-4-rwkv-converted/ --quantization q4f16_1 --source-format huggingface-torch --output dist/music-4-rwkv-converted-q4f16_1-MLC [2024-10-07 15:21:02] INFO auto_config.py:116: Found model configuration: dist/models/music-4-rwkv-converted/config.json [2024-10-07 15:21:03] INFO auto_device.py:80: Found device: cuda:0 [2024-10-07 15:21:04] INFO auto_device.py:89: Not found device: rocm:0 [2024-10-07 15:21:05] INFO auto_device.py:89: Not found device: metal:0 [2024-10-07 15:21:06] INFO auto_device.py:89: Not found device: vulkan:0 [2024-10-07 15:21:07] INFO auto_device.py:89: Not found device: opencl:0 [2024-10-07 15:21:07] INFO auto_device.py:35: Using device: cuda:0 [2024-10-07 15:21:07] INFO auto_weight.py:71: Finding weights in: dist/models/music-4-rwkv-converted [2024-10-07 15:21:07] INFO auto_weight.py:121: Found source weight format: huggingface-torch. Source configuration: dist/models/music-4-rwkv-converted/pytorch_model.bin.index.json [2024-10-07 15:21:07] INFO auto_config.py:154: Found model type: rwkv. Use --model-type to override. Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/home/hhg/mlc-llm/python/mlc_llm/main.py", line 64, in main() File "/home/hhg/mlc-llm/python/mlc_llm/main.py", line 37, in main cli.main(sys.argv[2:]) File "/home/hhg/mlc-llm/python/mlc_llm/cli/convert_weight.py", line 87, in main model = detect_model_type(parsed.model_type, parsed.config) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/hhg/mlc-llm/python/mlc_llm/support/auto_config.py", line 156, in detect_model_type raise ValueError(f"Unknown model type: {model_type}. Available ones: {list(MODELS.keys())}") ValueError: Unknown model type: rwkv. Available ones: ['llama', 'mistral', 'gemma', 'gpt2', 'mixtral', 'gpt_neox', 'gpt_bigcode', 'phi-msft', 'phi', 'phi3', 'qwen', 'qwen2', 'qwen2_moe', 'stablelm', 'baichuan', 'internlm', 'internlm2', 'rwkv5', 'orion', 'llava', 'rwkv6', 'chatglm', 'eagle', 'bert', 'medusa', 'telechat']

Expected behavior

Environment

Additional context

MasterJH5574 commented 1 month ago

Hi @haohenggang thank you for reporting. Could you please share an example (e.g., a Python script) showing how we can run the music-4-rwkv model with HuggingFace? That would be helpful in helping us identify what's needed.