PSA: unsloth/GLM-5.2-GGUF 正在上传
摘要
unsloth 已将 GLM-5.2 的 GGUF 版本上传至 Hugging Face,为 llama.cpp、vLLM 和 SGLang 等多种推理引擎提供了可直接使用的模型文件。
查看缓存全文
缓存时间: 2026/06/17 19:19
unsloth/GLM-5.2-GGUF · Hugging Face 来源:https://huggingface.co/unsloth/GLM-5.2-GGUF 库Transformers (https://huggingface.co/unsloth/GLM-5.2-GGUF?library=transformers)如何将 unsloth/GLM-5.2-GGUF 与 Transformers 结合使用: # 作为高级辅助工具使用 pipeline from transformers import pipeline pipe = pipeline("text-generation", model="unsloth/GLM-5.2-GGUF") messages = [ {"role": "user", "content": "你是谁?"}, ] pipe(messages) # 直接从模型加载 from transformers import AutoModel model = AutoModel.from_pretrained("unsloth/GLM-5.2-GGUF", dtype="auto") llama-cpp-python (https://huggingface.co/unsloth/GLM-5.2-GGUF?library=llama-cpp-python)如何将 unsloth/GLM-5.2-GGUF 与 llama-cpp-python 结合使用: # !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="unsloth/GLM-5.2-GGUF", filename="Q8_0/GLM-5.2-Q8_0-00001-of-00017.gguf", ) llm.create_chat_completion( messages = [ { "role": "user", "content": "法国的首都是哪里?" } ] ) 笔记本Google Colab (https://huggingface.co/unsloth/GLM-5.2-GGUF/colab)Kaggle (https://huggingface.co/unsloth/GLM-5.2-GGUF/kaggle)本地应用设置 (https://huggingface.co/settings/local-apps)llama.cpp (https://huggingface.co/unsloth/GLM-5.2-GGUF?local-app=llama.cpp)如何将 unsloth/GLM-5.2-GGUF 与 llama.cpp 结合使用: ##### 通过 brew 安装 brew install llama.cpp # 启动一个兼容 OpenAI 的本地服务器,并带有 Web UI: llama-server -hf unsloth/GLM-5.2-GGUF:Q8_0 # 直接在终端中运行推理: llama-cli -hf unsloth/GLM-5.2-GGUF:Q8_0 ##### 通过 WinGet (Windows) 安装 winget install llama.cpp # 启动一个兼容 OpenAI 的本地服务器,并带有 Web UI: llama-server -hf unsloth/GLM-5.2-GGUF:Q8_0 # 直接在终端中运行推理: llama-cli -hf unsloth/GLM-5.2-GGUF:Q8_0 ##### 使用预构建二进制文件 # 从以下地址下载预构建二进制文件: # https://github.com/ggerganov/llama.cpp/releases # 启动一个兼容 OpenAI 的本地服务器,并带有 Web UI: ./llama-server -hf unsloth/GLM-5.2-GGUF:Q8_0 # 直接在终端中运行推理: ./llama-cli -hf unsloth/GLM-5.2-GGUF:Q8_0 ##### 从源代码构建 git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # 启动一个兼容 OpenAI 的本地服务器,并带有 Web UI: ./build/bin/llama-server -hf unsloth/GLM-5.2-GGUF:Q8_0 # 直接在终端中运行推理: ./build/bin/llama-cli -hf unsloth/GLM-5.2-GGUF:Q8_0 ##### 使用 Docker docker model run hf.co/unsloth/GLM-5.2-GGUF:Q8_0 LM StudioJanvLLM (https://huggingface.co/unsloth/GLM-5.2-GGUF?local-app=vllm)如何将 unsloth/GLM-5.2-GGUF 与 vLLM 结合使用: ##### 通过 pip 安装并启动服务 # 通过 pip 安装 vLLM: pip install vllm # 启动 vLLM 服务: vllm serve "unsloth/GLM-5.2-GGUF" # 使用 curl 调用服务(兼容 OpenAI 的 API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "unsloth/GLM-5.2-GGUF", "messages": [ { "role": "user", "content": "法国的首都是哪里?" } ] }' ##### 使用 Docker docker model run hf.co/unsloth/GLM-5.2-GGUF:Q8_0 SGLang (https://huggingface.co/unsloth/GLM-5.2-GGUF?local-app=sglang)如何将 unsloth/GLM-5.2-GGUF 与 SGLang 结合使用: ##### 通过 pip 安装并启动服务 # 通过 pip 安装 SGLang: pip install sglang # 启动 SGLang 服务: python3 -m sglang.launch_server \ --model-path "unsloth/GLM-5.2-GGUF" \ --host 0.0.0.0 \ --port 30000 # 使用 curl 调用服务(兼容 OpenAI 的 API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "unsloth/GLM-5.2-GGUF", "messages": [ { "role": "user", "content": "法国的首都是哪里?" } ] }' ##### 使用 Docker 镜像 docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "unsloth/GLM-5.2-GGUF" \ --host 0.0.0.0 \ --port 30000 # 使用 curl 调用服务(兼容 OpenAI 的 API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "unsloth/GLM-5.2-GGUF", "messages": [ { "role": "user", "content": "法国的首都是哪里?" } ] }' Ollama (https://huggingface.co/unsloth/GLM-5.2-GGUF?local-app=ollama)如何将 unsloth/GLM-5.2-GGUF 与 Ollama 结合使用: ollama run hf.co/unsloth/GLM-5.2-GGUF:Q8_0 Unsloth Studio (https://huggingface.co/unsloth/GLM-5.2-GGUF?local-app=unsloth)如何将 unsloth/GLM-5.2-GGUF 与 Unsloth Studio 结合使用: ##### 安装 Unsloth Studio (macOS, Linux, WSL) curl -fsSL https://unsloth.ai/install.sh | sh # 运行 Unsloth Studio unsloth studio -H 0.0.0.0 -p 8888 # 然后在浏览器中打开 http://localhost:8888 # 搜索 unsloth/GLM-5.2-GGUF 开始聊天 ##### 安装 Unsloth Studio (Windows) irm https://unsloth.ai/install.ps1 | iex # 运行 Unsloth Studio unsloth studio -H 0.0.0.0 -p 8888 # 然后在浏览器中打开 http://localhost:8888 # 搜索 unsloth/GLM-5.2-GGUF 开始聊天 ##### 使用 HuggingFace Spaces 运行 Unsloth # 无需设置 # 在浏览器中打开 https://huggingface.co/spaces/unsloth/studio # 搜索 unsloth/GLM-5.2-GGUF 开始聊天 Pi (https://huggingface.co/unsloth/GLM-5.2-GGUF?local-app=pi)如何将 unsloth/GLM-5.2-GGUF 与 Pi 结合使用: ##### 启动 llama.cpp 服务器 # 安装 llama.cbrew install llama.cpp # 启动一个兼容 OpenAI 的本地服务器: llama-server -hf unsloth/GLM-5.2-GGUF:Q8_0 ##### 在 Pi 中配置模型 # 安装 Pi:npm install -g @mariozechner/pi-coding-agent # 添加到 ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "unsloth/GLM-5.2-GGUF:Q8_0" } ] } } } ##### 运行 Pi # 在项目目录中启动 Pi: pi Hermes Agentnew (https://huggingface.co/unsloth/GLM-5.2-GGUF?local-app=hermes-agent)如何将 unsloth/GLM-5.2-GGUF 与 Hermes Agent 结合使用: ##### 启动 llama.cpp 服务器 # 安装 llama.cbrew install llama.cpp # 启动一个兼容 OpenAI 的本地服务器: llama-server -hf unsloth/GLM-5.2-GGUF:Q8_0 ##### 配置 Hermes # 安装 Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # 将 Hermes 指向本地服务器: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default unsloth/GLM-5.2-GGUF:Q8_0 ##### 运行 Hermes hermes Atomic ChatnewDocker Model Runner (https://huggingface.co/unsloth/GLM-5.2-GGUF?local-app=docker-model-runner)如何将 unsloth/GLM-5.2-GGUF 与 Docker Model Runner 结合使用: docker model run hf.co/unsloth/GLM-5.2-GGUF:Q8_0 Lemonade (https://huggingface.co/unsloth/GLM-5.2-GGUF?local-app=lemonade)如何将 unsloth/GLM-5.2-GGUF 与 Lemonade 结合使用: ##### 拉取模型 # 从 https://lemonade-server.ai/ 下载 Lemonade lemonade pull unsloth/GLM-5.2-GGUF:Q8_0 ##### 运行并与模型聊天 lemonade run user.GLM-5.2-GGUF-Q8_0 ##### 列出所有可用模型 lemonade list
相似文章
GLM-5.2 现已可在 HuggingChat 上使用
GLM-5.2 是 zai-org 的一个开源 AI 模型,现已在 HuggingChat 上可用。
Unsloth MiniMax M3 GGUF
Unsloth 正在将 MiniMax M3 模型的 GGUF 量化版本上传到 Hugging Face。
unsloth/MiniMax-M3-GGUF
Unsloth 发布了 MiniMax-M3 多模态模型的 GGUF 量化版本,支持图像-文本到文本任务,兼容 Transformers、llama.cpp、vLLM 等推理引擎。
@aisearchio: GLM 5.2 GGUF 已经来了!8位版本大小约为完整模型的一半。更小版本即将推出 https://huggingfa…
GLM 5.2 GGUF 量化模型已发布,8位版本大小约为完整模型的一半;更小版本即将推出。
unsloth/gemma-4-26B-A4B-it-GGUF
# unsloth/gemma-4-26B-A4B-it-GGUF · Hugging Face 来源:[https://huggingface.co/unsloth/gemma-4-26B-A4B-it-GGUF](https://huggingface.co/unsloth/gemma-4-26B-A4B-it-GGUF) ## [https://huggingface.co/unsloth/gemma-4-26B-A4B-it-GGUF#read-our-how-to-run-gemma-4-guide](https://huggingface.co/unsloth/gemma-4-26B-A4B-it-GGUF#read-our-how-to-run-gemma-4-guide)阅读我们的[如何运行 Gemma 4 指南](https://docs.unsloth.ai/models/gemma-4)! *请参阅[Unsloth Dynamic 2.0 GGUFs](https://unsloth.ai/docs/basics/unslot