Instructions to use anemll/GLM-5.2-sidecar 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 anemll/GLM-5.2-sidecar 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 anemll/GLM-5.2-sidecar # Run inference directly in the terminal: llama cli -hf anemll/GLM-5.2-sidecar
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf anemll/GLM-5.2-sidecar # Run inference directly in the terminal: llama cli -hf anemll/GLM-5.2-sidecar
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 anemll/GLM-5.2-sidecar # Run inference directly in the terminal: ./llama-cli -hf anemll/GLM-5.2-sidecar
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 anemll/GLM-5.2-sidecar # Run inference directly in the terminal: ./build/bin/llama-cli -hf anemll/GLM-5.2-sidecar
Use Docker
docker model run hf.co/anemll/GLM-5.2-sidecar
- LM Studio
- Jan
- Ollama
How to use anemll/GLM-5.2-sidecar with Ollama:
ollama run hf.co/anemll/GLM-5.2-sidecar
- Unsloth Studio
How to use anemll/GLM-5.2-sidecar 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 anemll/GLM-5.2-sidecar 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 anemll/GLM-5.2-sidecar to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for anemll/GLM-5.2-sidecar to start chatting
- Pi
How to use anemll/GLM-5.2-sidecar with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf anemll/GLM-5.2-sidecar
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": "anemll/GLM-5.2-sidecar" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use anemll/GLM-5.2-sidecar with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf anemll/GLM-5.2-sidecar
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 anemll/GLM-5.2-sidecar
Run Hermes
hermes
- Atomic Chat new
- OpenClaw new
How to use anemll/GLM-5.2-sidecar with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf anemll/GLM-5.2-sidecar
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 "anemll/GLM-5.2-sidecar" \ --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 anemll/GLM-5.2-sidecar with Docker Model Runner:
docker model run hf.co/anemll/GLM-5.2-sidecar
- Lemonade
How to use anemll/GLM-5.2-sidecar with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull anemll/GLM-5.2-sidecar
Run and chat with the model
lemonade run user.GLM-5.2-sidecar-{{QUANT_TAG}}List all available models
lemonade list
| license: other | |
| license_name: glm-5.2 | |
| tags: | |
| - gguf | |
| - moe | |
| - glm | |
| - flash-moe | |
| - llama.cpp | |
| - metal | |
| library_name: llama.cpp | |
| # GLM-5.2 Flash-MoE Sidecar (UD-IQ1_M) | |
| SSD-streamed Mixture-of-Experts **expert sidecar** for **GLM-5.2** (Unsloth Dynamic `UD-IQ1_M`), | |
| built for the **Flash-MoE slot-bank** runtime in the | |
| [`anemll/flash-llama.cpp`](https://github.com/Anemll/anemll-flash-llama.cpp/tree/GLM-5.2-Moe) fork. | |
| The routed experts are stored as per-layer `layer_*.bin` files and streamed from SSD on demand into | |
| a small resident **slot bank** during decode, so the full MoE runs on a unified-memory Mac without | |
| keeping every expert in RAM. The dense / shared weights live in a separate small GGUF. | |
| ## What's in this repo | |
| | Path | Size | Description | | |
| |------|------|-------------| | |
| | `dense/model-dense.gguf` | ~15.5 GB | Dense + shared weights, router, attention (the model you pass to `-m`) | | |
| | `dense/flashmoe-package.json` | β | Flash-MoE package descriptor | | |
| | `layer_003.bin` β¦ `layer_NNN.bin` | ~213 GB total | Per-layer routed-expert tensors (IQ1_M), streamed on demand | | |
| | `manifest.json` | β | Sidecar manifest (tensor map, quant types, byte offsets) | | |
| **Model facts:** arch `glm-dsa`, 256 routed experts, top-8 per token, 3 leading dense layers, | |
| `n_embd = 6144`, routed `n_ff = 2048`, experts quantized `IQ1_M`. Layout: `layer_major_whole_tensor`. | |
| > Total download is ~**213 GB**. You need a fast SSD; decode is I/O-bound on expert streaming. | |
| ## Download | |
| ```bash | |
| hf download anemll/GLM-5.2-sidecar --repo-type model --local-dir ~/Models/GLM-5.2-sidecar | |
| ``` | |
| ## Build the runtime (Apple Metal) | |
| This sidecar requires the Flash-MoE fork on the **`GLM-5.2-Moe`** branch: | |
| ```bash | |
| git clone -b GLM-5.2-Moe https://github.com/Anemll/anemll-flash-llama.cpp | |
| cd anemll-flash-llama.cpp | |
| cmake -B build -DGGML_METAL=ON | |
| cmake --build build --config Release -j --target llama-cli | |
| ``` | |
| ## Run / test | |
| ```bash | |
| ./build/bin/llama-cli --perf \ | |
| -m ~/Models/GLM-5.2-sidecar/dense/model-dense.gguf \ | |
| --moe-mode slot-bank \ | |
| --moe-sidecar ~/Models/GLM-5.2-sidecar/ \ | |
| --moe-verify-sidecar \ | |
| --moe-slot-bank 64 \ | |
| --moe-topk 8 \ | |
| --moe-cache-io-split 2 \ | |
| --moe-prefetch-temporal \ | |
| -fit on \ | |
| -ub 1 -b 64 \ | |
| -ngl 999 \ | |
| -c 512 \ | |
| --seed 123 --temp 0 \ | |
| -p "What is Apple Neural Engine? Answer in one sentence." \ | |
| -n 2000 -st \ | |
| --slot8 | |
| ``` | |
| ### `--slot8` (fused single-kernel routed FFN) | |
| This branch adds `--slot8`, which collapses the whole routed FFN β gate, up, SwiGLU, down, and the | |
| routed weighted-sum over all selected experts β into a **single fused op** (two Metal kernels, | |
| IQ1_M) for single-token decode. It reads the resident slot ids once at encode time, so the | |
| per-expert `mul_mat_id` decode replay / ICB cache is no longer used on that path. Output is | |
| validated byte-identical to the unfused reference path. | |
| Toggles: | |
| - `--slot8` / `--no-slot8` β enable/disable the fused path (only engages on eligible top-k decode layers). | |
| - `LLAMA_FLASH_MOE_SLOT8_REFERENCE=1` β force the `mul_mat` reference path (A/B comparison / fallback). | |
| - `LLAMA_FLASH_MOE_SLOT8_DEBUG=1` β log which layers take the fused path. | |
| > Tested on Apple M5 Max (128 GB). `--slot8` is a decode-only fast path; prefill and non-eligible | |
| > layers use the normal slot-bank route. | |
| ## License | |
| Derived from **GLM-5.2** (Z.ai / Zhipu AI). Use is subject to the original GLM-5.2 model license; | |
| this sidecar only repackages those weights for SSD-streamed inference. | |