Instructions to use baa-ai/GLM-5.2-RAM-307GB-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use baa-ai/GLM-5.2-RAM-307GB-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="baa-ai/GLM-5.2-RAM-307GB-GGUF", filename="GLM-5.2-RAM-local-knee-00001-of-00007.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use baa-ai/GLM-5.2-RAM-307GB-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 baa-ai/GLM-5.2-RAM-307GB-GGUF # Run inference directly in the terminal: llama cli -hf baa-ai/GLM-5.2-RAM-307GB-GGUF
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf baa-ai/GLM-5.2-RAM-307GB-GGUF # Run inference directly in the terminal: llama cli -hf baa-ai/GLM-5.2-RAM-307GB-GGUF
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 baa-ai/GLM-5.2-RAM-307GB-GGUF # Run inference directly in the terminal: ./llama-cli -hf baa-ai/GLM-5.2-RAM-307GB-GGUF
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 baa-ai/GLM-5.2-RAM-307GB-GGUF # Run inference directly in the terminal: ./build/bin/llama-cli -hf baa-ai/GLM-5.2-RAM-307GB-GGUF
Use Docker
docker model run hf.co/baa-ai/GLM-5.2-RAM-307GB-GGUF
- LM Studio
- Jan
- vLLM
How to use baa-ai/GLM-5.2-RAM-307GB-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "baa-ai/GLM-5.2-RAM-307GB-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": "baa-ai/GLM-5.2-RAM-307GB-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/baa-ai/GLM-5.2-RAM-307GB-GGUF
- Ollama
How to use baa-ai/GLM-5.2-RAM-307GB-GGUF with Ollama:
ollama run hf.co/baa-ai/GLM-5.2-RAM-307GB-GGUF
- Unsloth Studio
How to use baa-ai/GLM-5.2-RAM-307GB-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 baa-ai/GLM-5.2-RAM-307GB-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 baa-ai/GLM-5.2-RAM-307GB-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for baa-ai/GLM-5.2-RAM-307GB-GGUF to start chatting
- Pi
How to use baa-ai/GLM-5.2-RAM-307GB-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf baa-ai/GLM-5.2-RAM-307GB-GGUF
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": "baa-ai/GLM-5.2-RAM-307GB-GGUF" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use baa-ai/GLM-5.2-RAM-307GB-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 baa-ai/GLM-5.2-RAM-307GB-GGUF
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 baa-ai/GLM-5.2-RAM-307GB-GGUF
Run Hermes
hermes
- Atomic Chat new
- OpenClaw new
How to use baa-ai/GLM-5.2-RAM-307GB-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf baa-ai/GLM-5.2-RAM-307GB-GGUF
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 "baa-ai/GLM-5.2-RAM-307GB-GGUF" \ --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 baa-ai/GLM-5.2-RAM-307GB-GGUF with Docker Model Runner:
docker model run hf.co/baa-ai/GLM-5.2-RAM-307GB-GGUF
- Lemonade
How to use baa-ai/GLM-5.2-RAM-307GB-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull baa-ai/GLM-5.2-RAM-307GB-GGUF
Run and chat with the model
lemonade run user.GLM-5.2-RAM-307GB-GGUF-{{QUANT_TAG}}List all available models
lemonade list
GLM-5.2 โ 307GB (GGUF)
Mixed-precision quantized version of zai-org/GLM-5.2 using a proprietary quantization method by baa.ai.
Per-tensor bit-width allocation via advanced sensitivity analysis and budget-constrained optimisation โ no calibration data required. Built at the efficiency knee (best quality-per-GB).
Metrics
| Metric | Value |
|---|---|
| Size | 307 GB (7 shards) |
| Average bits | 3.50 |
| Format | llama.cpp (GGUF) |
| Architecture | MoE (256 experts, MLA + sparse attention) |
Routed experts Q3_K; attention Q4_K; DSA indexer / shared experts Q6_KโQ8_0; first/last-layer and protected tensors F16; output and token-embeddings Q6_K.
Requirements
llama.cpp build โฅ b9820 is required โ GLM-5.2's sparse-attention shared-indexer layout is only handled by recent builds.
Usage
brew install llama.cpp
hf download baa-ai/GLM-5.2-RAM-307GB-GGUF --include "*.gguf" --local-dir ./glm-5.2-ram-307gb
# The model is split into 7 shards โ point -m at the first; llama.cpp loads the rest automatically
llama-cli -m ./glm-5.2-ram-307gb/GLM-5.2-RAM-local-knee-00001-of-00007.gguf -p "Hello!" -n 256 -ngl 99
Or via llama-server for an OpenAI-compatible HTTP API:
llama-server -m ./glm-5.2-ram-307gb/GLM-5.2-RAM-local-knee-00001-of-00007.gguf --port 8080 -ngl 99 --ctx-size 8192
For fast inference use a host with โฅ ~310 GB RAM/VRAM; otherwise it runs via mmap paging. The chat template is embedded; GLM-5.2 supports a thinking mode. No importance matrix (imatrix) was used โ per-tensor sensitivity allocation provides the primary quality signal.
Quantized by baa.ai
Black Sheep AI Products
Shepherd โ Private AI deployment platform that shrinks frontier models by 50-60% through RAM compression, enabling enterprises to run sophisticated AI on single GPU instances or Apple Silicon hardware. Deploy in your VPC with zero data leaving your infrastructure. Includes CI/CD pipeline integration, fleet deployment across Apple Silicon clusters, air-gapped and sovereign deployment support, and multi-format export (MLX, GGUF). Annual cloud costs from ~$2,700 โ or run on a Mac Studio for electricity only.
Watchman โ Capability audit and governance platform for compressed AI models. Know exactly what your quantized model can do before it goes live. Watchman predicts which capabilities survive compression in minutes โ replacing weeks of benchmarking. Includes compliance-ready reporting for regulated industries, quality valley warnings for counterproductive memory allocations, instant regression diagnosis tracing issues to specific tensors, and 22 adversarial security probes scanning for injection, leakage, hallucination, and code vulnerabilities.
Learn more at baa.ai โ Sovereign AI.
- Downloads last month
- -
We're not able to determine the quantization variants.
Model tree for baa-ai/GLM-5.2-RAM-307GB-GGUF
Base model
zai-org/GLM-5.2