开源项目:https://github.com/QwenLM/Qwen1.5
模型下载:https://www.modelscope.cn/models/qwen/Qwen1.5-7B-Chat/files
使用方法
1、安装 transformers>=4.37.0。
pip install transformers
2、模型格式转换。
cd E:/github/llama.cpp
python convert-hf-to-gguf.py E:/github/Qwen1.5-7B-Chat
3、启动聊天。
cd E:/github/llama.cpp
main -m E:/github/Qwen1.5-7B-Chat/ggml-model-f16.gguf -n -1 --color --in-prefix "[User] " --in-suffix "[AI] " --interactive-first -e -c 4096 -t 6 --temp 0.8 --top_k 40 --top_p 0.9 --repeat_penalty 1.1 --in-prefix-bos
常见问题
1、RuntimeError: Internal: could not parse ModelProto from E:\github\Qwen1.5-7B-Chat\vocab.json。
将 python convert.py E:/github/Qwen1.5-7B-Chat 改为 python convert-hf-to-gguf.py E:/github/Qwen1.5-7B-Chat。
参考文档
1、阿里巴巴开源的720亿参数规模的Qwen-72B怎么样:https://www.zhihu.com/question/632712536