Instructions to use ubergarm/GLM-4.7-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use ubergarm/GLM-4.7-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf ubergarm/GLM-4.7-GGUF:Q2_K # Run inference directly in the terminal: llama cli -hf ubergarm/GLM-4.7-GGUF:Q2_K
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf ubergarm/GLM-4.7-GGUF:Q2_K # Run inference directly in the terminal: llama cli -hf ubergarm/GLM-4.7-GGUF:Q2_K
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf ubergarm/GLM-4.7-GGUF:Q2_K # Run inference directly in the terminal: ./llama-cli -hf ubergarm/GLM-4.7-GGUF:Q2_K
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf ubergarm/GLM-4.7-GGUF:Q2_K # Run inference directly in the terminal: ./build/bin/llama-cli -hf ubergarm/GLM-4.7-GGUF:Q2_K
Use Docker
docker model run hf.co/ubergarm/GLM-4.7-GGUF:Q2_K
- LM Studio
- Jan
- vLLM
How to use ubergarm/GLM-4.7-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ubergarm/GLM-4.7-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ubergarm/GLM-4.7-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ubergarm/GLM-4.7-GGUF:Q2_K
- Ollama
How to use ubergarm/GLM-4.7-GGUF with Ollama:
ollama run hf.co/ubergarm/GLM-4.7-GGUF:Q2_K
- Unsloth Studio
How to use ubergarm/GLM-4.7-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for ubergarm/GLM-4.7-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for ubergarm/GLM-4.7-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for ubergarm/GLM-4.7-GGUF to start chatting
- Pi
How to use ubergarm/GLM-4.7-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf ubergarm/GLM-4.7-GGUF:Q2_K
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "ubergarm/GLM-4.7-GGUF:Q2_K" } ] } } }Run Pi
# Start Pi in your project directory: pi
- OpenClaw new
How to use ubergarm/GLM-4.7-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf ubergarm/GLM-4.7-GGUF:Q2_K
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "ubergarm/GLM-4.7-GGUF:Q2_K" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
- Docker Model Runner
How to use ubergarm/GLM-4.7-GGUF with Docker Model Runner:
docker model run hf.co/ubergarm/GLM-4.7-GGUF:Q2_K
- Lemonade
How to use ubergarm/GLM-4.7-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull ubergarm/GLM-4.7-GGUF:Q2_K
Run and chat with the model
lemonade run user.GLM-4.7-GGUF-Q2_K
List all available models
lemonade list
- Hermes Agent
How to use ubergarm/GLM-4.7-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf ubergarm/GLM-4.7-GGUF:Q2_K
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default ubergarm/GLM-4.7-GGUF:Q2_K
Run Hermes
hermes
- Atomic Chat
initial commit
Browse files- .gitattributes +3 -0
- README.md +86 -3
.gitattributes
CHANGED
|
@@ -33,3 +33,6 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
imatrix-*.dat filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
*.gguf filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
*.png filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
|
@@ -1,3 +1,86 @@
|
|
| 1 |
-
---
|
| 2 |
-
|
| 3 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
quantized_by: ubergarm
|
| 3 |
+
pipeline_tag: text-generation
|
| 4 |
+
base_model: zai-org/GLM-4.7
|
| 5 |
+
license: mit
|
| 6 |
+
base_model_relation: quantized
|
| 7 |
+
tags:
|
| 8 |
+
- imatrix
|
| 9 |
+
- conversational
|
| 10 |
+
- ik_llama.cpp
|
| 11 |
+
- glm4_moe
|
| 12 |
+
language:
|
| 13 |
+
- en
|
| 14 |
+
- zh
|
| 15 |
+
---
|
| 16 |
+
|
| 17 |
+
## WIP
|
| 18 |
+
Currently cooking this now!
|
| 19 |
+
|
| 20 |
+
- [x] download bf16 safetensors https://huggingface.co/zai-org/GLM-4.7
|
| 21 |
+
- [x] use llama.cpp/convert_hf_to_gguf.py to create bf16 GGUF
|
| 22 |
+
- [ ] calculate imatrix and upload to HF first so others can use as desired
|
| 23 |
+
- [ ] cook Q8_0 and test perplexity of BF16 and Q8_0 for baseline data
|
| 24 |
+
- [ ] cook IQ5_K with full q8_0 attn/shexp/first 3 dense layers and test
|
| 25 |
+
- [ ] upload IQ5_K if all looking good
|
| 26 |
+
- [ ] continue with smaller quants
|
| 27 |
+
- [ ] chek if any folks open discussions with desired RAM/VRAM breakpoints
|
| 28 |
+
|
| 29 |
+
## `ik_llama.cpp` imatrix Quantizations of zai-org/GLM-4.7
|
| 30 |
+
*NOTE* `ik_llama.cpp` can also run your existing GGUFs from bartowski, unsloth, mradermacher, etc if you want to try it out before downloading my quants.
|
| 31 |
+
|
| 32 |
+
Some of ik's new quants are supported with [Nexesenex/croco.cpp](https://github.com/Nexesenex/croco.cpp) fork of KoboldCPP with Windows builds for CUDA 12.9. Also check for [Windows builds by Thireus here.](https://github.com/Thireus/ik_llama.cpp/releases) which have been CUDA 12.8.
|
| 33 |
+
|
| 34 |
+
These quants provide best in class perplexity for the given memory footprint.
|
| 35 |
+
|
| 36 |
+
## Big Thanks
|
| 37 |
+
Shout out to Wendell and the **Level1Techs** crew, the community [Forums](https://forum.level1techs.com/t/deepseek-deep-dive-r1-at-home/225826), [YouTube Channel](https://www.youtube.com/@Level1Techs)! **BIG thanks** for providing **BIG hardware** expertise and access to run these experiments and make these great quants available to the community!!!
|
| 38 |
+
|
| 39 |
+
Also thanks to all the folks in the quanting and inferencing community on [BeaverAI Club Discord](https://huggingface.co/BeaverAI) and on [r/LocalLLaMA](https://www.reddit.com/r/LocalLLaMA/) for tips and tricks helping each other run, test, and benchmark all the fun new models! Thanks to huggingface for hosting all these big quants!
|
| 40 |
+
|
| 41 |
+
Finally, I *really* appreciate the support from [aifoundry.org](https://aifoundry.org) so check out their open source RISC-V based solutions!
|
| 42 |
+
|
| 43 |
+
## Quant Collection
|
| 44 |
+
Perplexity computed against *wiki.test.raw*.
|
| 45 |
+
|
| 46 |
+

|
| 47 |
+
|
| 48 |
+
These first two are just test quants for baseline perplexity comparison:
|
| 49 |
+
* `BF16` 667.598 GiB (16.003 BPW)
|
| 50 |
+
- Final estimate: PPL = TODO
|
| 51 |
+
* `Q8_0`
|
| 52 |
+
- Final estimate: PPL = TODO
|
| 53 |
+
|
| 54 |
+
## IQ5_K TODO
|
| 55 |
+
|
| 56 |
+
|
| 57 |
+
<details>
|
| 58 |
+
|
| 59 |
+
<summary>👈 Secret Recipe</summary>
|
| 60 |
+
|
| 61 |
+
```bash
|
| 62 |
+
echo TODO
|
| 63 |
+
```
|
| 64 |
+
|
| 65 |
+
</details>
|
| 66 |
+
|
| 67 |
+
## Quick Start
|
| 68 |
+
```bash
|
| 69 |
+
# Clone and checkout
|
| 70 |
+
$ git clone https://github.com/ikawrakow/ik_llama.cpp
|
| 71 |
+
$ cd ik_llama.cpp
|
| 72 |
+
|
| 73 |
+
# Build for hybrid CPU+CUDA
|
| 74 |
+
$ cmake -B build -DCMAKE_BUILD_TYPE=Release -DGGML_CUDA=ON
|
| 75 |
+
$ cmake --build build --config Release -j $(nproc)
|
| 76 |
+
|
| 77 |
+
# I'll follow up with updated commands especially for 2 to 4 CUDA GPUs for "graph parallel"
|
| 78 |
+
# https://github.com/ikawrakow/ik_llama.cpp/pull/1080
|
| 79 |
+
echo TODO
|
| 80 |
+
```
|
| 81 |
+
|
| 82 |
+
## References
|
| 83 |
+
* [ik_llama.cpp](https://github.com/ikawrakow/ik_llama.cpp)
|
| 84 |
+
* [Getting Started Guide (already out of date lol)](https://github.com/ikawrakow/ik_llama.cpp/discussions/258)
|
| 85 |
+
* [ubergarm-imatrix-calibration-corpus-v02.txt](https://gist.github.com/ubergarm/edfeb3ff9c6ec8b49e88cdf627b0711a?permalink_comment_id=5682584#gistcomment-5682584)
|
| 86 |
+
* [Solid mainline quants by AesSedai/GLM-4.7-GGUF](https://huggingface.co/AesSedai/GLM-4.7-GGUF)
|