window11 部署llama.cpp并运行Qwen2-0.5B-Instruct-GGUF

吾名爱妃,性好静亦好动。好编程,常沉浸于代码之世界,思维纵横,力求逻辑之严密,算法之精妙。亦爱篮球,驰骋球场,尽享挥洒汗水之乐。且喜跑步,尤钟马拉松,长途奔袭,考验耐力与毅力,每有所进,心甚喜之。

吾以为,编程似布阵,算法如谋略,需精心筹谋,方可成就佳作。篮球乃团队之艺,协作共进,方显力量。跑步与马拉松,乃磨炼身心之途,愈挫愈勇,方能达至远方。愿交志同道合之友,共探此诸般妙趣。

诸君,此文尚佳,望点赞收藏,谢之!

  1. 下载llama.cpp框架编译环境(llama.cpp/docs/build.md at master · ggerganov/llama.cpp · GitHub):
  1. 下载w64devkit:Releases · skeeto/w64devkit · GitHub
  1. 解压后直接运行w64devkit.exe:
  1. 下载llama.cp源码:

    git clone https://github.com/ggerganov/llama.cpp

进入llama.cpp目录,执行make命令:

  1. 运行后,在llama.cpp目录找到llama-cli.exe表示安装成功
  1. 下载Qwen2-0.5B-Instruct-GGUF格式模型:魔搭社区

7.在llama-cli.exe文件所在目录新建chat-with-qwen.txt文件,内容为:You are a helpful assistant.

在llama-cli.exe文件所在目录打开命中行,执行:

复制代码
llama-cli.exe -m ..\Qwen2-0.5B-Instruct-GGUF\qwen2-0_5b-instruct-q5_k_m.gguf -n 512 -co -i -if -f chat-with-qwen.txt --in-prefix "<|im_start|>user\n" --in-suffix "<|im_end|>\n<|im_start|>assistant\n" -ngl 24

结果:

可以进行交互了~

  1. 以服务的形式运行模型:

    llama-server.exe -m ..\Qwen2-0.5B-Instruct-GGUF\qwen2-0_5b-instruct-q5_k_m.gguf -ngl 24 -fa

结果:

启动成功,使用postman测试:

相关推荐
blackoon882 天前
DeepSeek R1大模型微调实战-llama-factory的模型下载与训练
llama
johnny2332 天前
大模型微调理论、实战:LLaMA-Factory、Unsloth
llama
闲看云起3 天前
从 GPT 到 LLaMA:解密 LLM 的核心架构——Decoder-Only 模型
gpt·架构·llama
小草cys4 天前
在树莓派集群上部署 Distributed Llama (Qwen 3 14B) 详细指南
python·llama·树莓派·qwen
咕咚-萌西5 天前
联邦学习论文分享:Towards Building the Federated GPT:Federated Instruction Tuning
llama·联邦学习·指令微调
relis6 天前
解密llama.cpp中的batch与ubatch:深度学习推理优化的内存艺术
深度学习·batch·llama
relis6 天前
解密llama.cpp:Prompt Processing如何实现高效推理?
prompt·llama
GEO_JYB7 天前
BERT家族进化史:从BERT到LLaMA,每一次飞跃都源于对“学习”的更深理解
学习·bert·llama
AI大模型7 天前
大模型开发实战:使用 LLaMA Factory 微调与量化模型并部署至 Ollama
程序员·llm·llama
relis7 天前
解密llama.cpp:从Prompt到Response的完整技术流程剖析
prompt·llama