QwenLM / qwen.cpp

C++ implementation of Qwen-LM
Other
506 stars 40 forks source link

qwen1.5 support? #80

Open anan1213095357 opened 4 months ago

anan1213095357 commented 4 months ago

root@a:~/qwen/qwen.cpp/qwen_cpp# python3 convert.py -i /root/qwen/Qwen1.5-1.8B -t q4_0 -o qwen1_8b.bin Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained. Traceback (most recent call last): File "/root/qwen/qwen.cpp/qwen_cpp/convert.py", line 262, in main() File "/root/qwen/qwen.cpp/qwen_cpp/convert.py", line 256, in main convert(f, args.model_name_or_path, dtype=args.type) File "/root/qwen/qwen.cpp/qwen_cpp/convert.py", line 230, in convert QwenConverter.convert(f, model, tokenizer, ggml_type) File "/root/qwen/qwen.cpp/qwen_cpp/convert.py", line 182, in convert cls.dump_config(f, model.config, model.generation_config, tokenizer, ggml_type) File "/root/qwen/qwen.cpp/qwen_cpp/convert.py", line 198, in dump_config tokenizer.im_start_id, AttributeError: 'Qwen2TokenizerFast' object has no attribute 'im_start_id'

dwojcik92 commented 3 months ago

Similar issue here:

python3 qwen.cpp/qwen_cpp/convert.py -i Qwen1.5-MoE-A2.7B-Chat   -o Qwen1.5-MoE-A2.7B-Chat.gguf   -t q4_0
Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.
Loading checkpoint shards: 100%|█████████████████████████████████████████████████████████████████| 8/8 [00:14<00:00,  1.79s/it]
Traceback (most recent call last):
  File "/home/dwojcik/HF-to-GGUF_converter/qwen.cpp/qwen_cpp/convert.py", line 262, in <module>
    main()
  File "/home/dwojcik/HF-to-GGUF_converter/qwen.cpp/qwen_cpp/convert.py", line 256, in main
    convert(f, args.model_name_or_path, dtype=args.type)
  File "/home/dwojcik/HF-to-GGUF_converter/qwen.cpp/qwen_cpp/convert.py", line 230, in convert
    QwenConverter.convert(f, model, tokenizer, ggml_type)
  File "/home/dwojcik/HF-to-GGUF_converter/qwen.cpp/qwen_cpp/convert.py", line 182, in convert
    cls.dump_config(f, model.config, model.generation_config, tokenizer, ggml_type)
  File "/home/dwojcik/HF-to-GGUF_converter/qwen.cpp/qwen_cpp/convert.py", line 195, in dump_config
    config.seq_length,
  File "/home/dwojcik/.local/lib/python3.10/site-packages/transformers/configuration_utils.py", line 263, in __getattribute__
    return super().__getattribute__(key)
AttributeError: 'Qwen2MoeConfig' object has no attribute 'seq_length'. Did you mean: 'max_length'?
zhangfan-algo commented 3 months ago

我也遇到了 貌似不太支持 求解