🚀 KimChen/gemma-2-27b-it-Q8_0-GGUF
本项目将模型转换为GGUF格式,原始模型为google/gemma-2-27b-it
,转换借助了llama.cpp并通过ggml.ai的GGUF-my-repo空间完成。如需了解该模型的更多详细信息,请参考原始模型卡片。
🚀 快速开始
访问Gemma模型
要在Hugging Face上访问Gemma模型,你需要查看并同意Google的使用许可。请确保你已登录Hugging Face,然后点击下方按钮。请求将立即处理。
使用llama.cpp
安装llama.cpp
可以通过brew(适用于Mac和Linux)来安装llama.cpp:
brew install llama.cpp
调用llama.cpp服务器或CLI
CLI方式:
llama-cli --hf-repo KimChen/gemma-2-27b-it-Q8_0-GGUF --hf-file gemma-2-27b-it-q8_0.gguf -p "The meaning to life and the universe is"
服务器方式:
llama-server --hf-repo KimChen/gemma-2-27b-it-Q8_0-GGUF --hf-file gemma-2-27b-it-q8_0.gguf -c 2048
直接使用检查点
你也可以通过Llama.cpp仓库中列出的使用步骤直接使用此检查点:
步骤1:从GitHub克隆llama.cpp
git clone https://github.com/ggerganov/llama.cpp
步骤2:进入llama.cpp文件夹并使用LLAMA_CURL=1
标志以及其他特定硬件标志(例如,在Linux上使用Nvidia GPU时使用LLAMA_CUDA=1
)进行编译
cd llama.cpp && LLAMA_CURL=1 make
步骤3:通过主二进制文件运行推理
./llama-cli --hf-repo KimChen/gemma-2-27b-it-Q8_0-GGUF --hf-file gemma-2-27b-it-q8_0.gguf -p "The meaning to life and the universe is"
或者
./llama-server --hf-repo KimChen/gemma-2-27b-it-Q8_0-GGUF --hf-file gemma-2-27b-it-q8_0.gguf -c 2048
📦 安装指南
安装llama.cpp
可以通过brew(适用于Mac和Linux)来安装llama.cpp:
brew install llama.cpp
💻 使用示例
基础用法
CLI方式
llama-cli --hf-repo KimChen/gemma-2-27b-it-Q8_0-GGUF --hf-file gemma-2-27b-it-q8_0.gguf -p "The meaning to life and the universe is"
服务器方式
llama-server --hf-repo KimChen/gemma-2-27b-it-Q8_0-GGUF --hf-file gemma-2-27b-it-q8_0.gguf -c 2048
高级用法
直接使用检查点
git clone https://github.com/ggerganov/llama.cpp
cd llama.cpp && LLAMA_CURL=1 make
./llama-cli --hf-repo KimChen/gemma-2-27b-it-Q8_0-GGUF --hf-file gemma-2-27b-it-q8_0.gguf -p "The meaning to life and the universe is"
./llama-server --hf-repo KimChen/gemma-2-27b-it-Q8_0-GGUF --hf-file gemma-2-27b-it-q8_0.gguf -c 2048
📄 许可证
本项目使用的许可证为gemma。
📋 模型信息
属性 |
详情 |
基础模型 |
google/gemma-2-27b-it |
库名称 |
transformers |
许可证 |
gemma |
任务类型 |
文本生成 |
标签 |
llama-cpp、gguf-my-repo |