🚀 s0mecode/Phi-4-mini-instruct-Q4_K_M-GGUF
本项目将模型从 microsoft/Phi-4-mini-instruct
转换为 GGUF 格式,转换借助了 llama.cpp 并通过 ggml.ai 的 GGUF-my-repo 空间完成。如需了解该模型的更多详细信息,请参考 原始模型卡片。
🚀 快速开始
✨ 主要特性
- 支持多语言,包括阿拉伯语、中文、捷克语、丹麦语、荷兰语、英语、芬兰语、法语、德语、希伯来语、匈牙利语、意大利语、日语、韩语、挪威语、波兰语、葡萄牙语、俄语、西班牙语、瑞典语、泰语、土耳其语和乌克兰语。
- 属于文本生成类型的模型。
- 标签涵盖 NLP、代码、llama-cpp、gguf-my-repo 等。
📦 安装指南
使用 Homebrew 安装 llama.cpp(适用于 Mac 和 Linux)
brew install llama.cpp
💻 使用示例
基础用法
可以通过 llama.cpp 的命令行界面(CLI)或服务器模式来使用该模型。
CLI 模式
llama-cli --hf-repo s0mecode/Phi-4-mini-instruct-Q4_K_M-GGUF --hf-file phi-4-mini-instruct-q4_k_m.gguf -p "The meaning to life and the universe is"
服务器模式
llama-server --hf-repo s0mecode/Phi-4-mini-instruct-Q4_K_M-GGUF --hf-file phi-4-mini-instruct-q4_k_m.gguf -c 2048
高级用法
你也可以按照 Llama.cpp 仓库中列出的 使用步骤 直接使用该检查点。
步骤 1:从 GitHub 克隆 llama.cpp
git clone https://github.com/ggerganov/llama.cpp
步骤 2:进入 llama.cpp 文件夹并使用 LLAMA_CURL=1
标志以及其他特定硬件标志进行编译(例如,在 Linux 上使用英伟达 GPU 时设置 LLAMA_CUDA=1
)
cd llama.cpp && LLAMA_CURL=1 make
步骤 3:通过主二进制文件运行推理
./llama-cli --hf-repo s0mecode/Phi-4-mini-instruct-Q4_K_M-GGUF --hf-file phi-4-mini-instruct-q4_k_m.gguf -p "The meaning to life and the universe is"
或者
./llama-server --hf-repo s0mecode/Phi-4-mini-instruct-Q4_K_M-GGUF --hf-file phi-4-mini-instruct-q4_k_m.gguf -c 2048
📄 许可证
本项目采用 MIT 许可证,详情请见 许可证链接。
📚 详细文档
属性 |
详情 |
模型类型 |
文本生成 |
基础模型 |
microsoft/Phi-4-mini-instruct |
支持语言 |
阿拉伯语、中文、捷克语、丹麦语、荷兰语、英语、芬兰语、法语、德语、希伯来语、匈牙利语、意大利语、日语、韩语、挪威语、波兰语、葡萄牙语、俄语、西班牙语、瑞典语、泰语、土耳其语、乌克兰语 |