llama.cpp运行qwen0.5B

编译llama.cp

参考

下载模型

05b模型下载

转化模型

创建虚拟环境

bash 复制代码
conda create --prefix=D:\miniconda3\envs\llamacpp python=3.10
conda activate D:\miniconda3\envs\llamacpp

安装所需要的包

bash 复制代码
cd G:\Cpp\llama.cpp-master
pip install -r requirements.txt
python convert.py -h



执行转换命令

bash 复制代码
python convert.py G:\Python\Qwen1.5-0.5B-Chat --outfile G:\Cpp\qwenchat0.5b.gguf --outtype q8_0
python convert-hf-to-gguf.py G:\Python\Qwen1.5-0.5B-Chat  --outfile G:\Cpp\qwenchat0.5b.gguf
# 解释
# python 
# convert.py # convert.py路径
# /content/finetuned-2_merged # 模型路径
# --outfile finetuned-2.gguf # 要分配的gguf模型名称
# --outtype q8_0 #以8 Bit量化



将模型量化为5Bit(使用q5_k-m方法)

bash 复制代码
quantize.exe G:\Cpp\qwenchat0.5b.gguf qwenchat0.5b-q5_k_m.gguf q5_k_m


运行

bash 复制代码
# 注意Qwen模型要使用chatml prompt 模版
main.exe -m qwenchat0.5b-q5_k_m.gguf -n 512 --chatml

尝鲜通义千问1.8B
参考
hf2gguf

相关推荐
龙的爹23336 小时前
论文翻译 | LLaMA-Adapter :具有零初始化注意的语言模型的有效微调
人工智能·gpt·语言模型·自然语言处理·nlp·prompt·llama
Yoin.1 天前
Llama微调以及Ollama部署
llama
强哥之神3 天前
一文了解:最新版本 Llama 3.2
人工智能·深度学习·机器学习·计算机视觉·语言模型·llm·llama
机器学习是魔鬼4 天前
在矩池云使用 Llama-3.2-11B-Vision 详细指南
llama
刘承卓4 天前
【Text2SQL】当前在BIRD基准测试集上取得SOTA的论文
gpt·自然语言处理·prompt·aigc·llama
程序员陆通4 天前
Meta Llama 3.2发布:小型文本模型与多模态视觉能力,AI的未来已来!
人工智能·llama
HyperAI超神经4 天前
凌晨1点开播!Meta Connect 2024开发者大会,聚焦Llama新场景和AR眼镜
ar·llama
OpenVINO 中文社区5 天前
实战精选 | 如何用 OpenVINO™ 在本地快速部署 Llama 3.2
人工智能·llama·openvino
凤枭香5 天前
Llama 3.1 技术研究报告-5
人工智能·ai·语言模型·llama
FLY AGAIN5 天前
真正的Open AI ——LLaMA颠覆开源大模型
人工智能·开源·llama