Instructions to use Downtown-Case/GLM-4.5-Base-128GB-RAM-IQ2_KL-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use Downtown-Case/GLM-4.5-Base-128GB-RAM-IQ2_KL-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Downtown-Case/GLM-4.5-Base-128GB-RAM-IQ2_KL-GGUF", filename="GLM-4.5-Base.imatrix.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 Downtown-Case/GLM-4.5-Base-128GB-RAM-IQ2_KL-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Downtown-Case/GLM-4.5-Base-128GB-RAM-IQ2_KL-GGUF:Q2_K # Run inference directly in the terminal: llama-cli -hf Downtown-Case/GLM-4.5-Base-128GB-RAM-IQ2_KL-GGUF:Q2_K
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Downtown-Case/GLM-4.5-Base-128GB-RAM-IQ2_KL-GGUF:Q2_K # Run inference directly in the terminal: llama-cli -hf Downtown-Case/GLM-4.5-Base-128GB-RAM-IQ2_KL-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 Downtown-Case/GLM-4.5-Base-128GB-RAM-IQ2_KL-GGUF:Q2_K # Run inference directly in the terminal: ./llama-cli -hf Downtown-Case/GLM-4.5-Base-128GB-RAM-IQ2_KL-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 Downtown-Case/GLM-4.5-Base-128GB-RAM-IQ2_KL-GGUF:Q2_K # Run inference directly in the terminal: ./build/bin/llama-cli -hf Downtown-Case/GLM-4.5-Base-128GB-RAM-IQ2_KL-GGUF:Q2_K
Use Docker
docker model run hf.co/Downtown-Case/GLM-4.5-Base-128GB-RAM-IQ2_KL-GGUF:Q2_K
- LM Studio
- Jan
- vLLM
How to use Downtown-Case/GLM-4.5-Base-128GB-RAM-IQ2_KL-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Downtown-Case/GLM-4.5-Base-128GB-RAM-IQ2_KL-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": "Downtown-Case/GLM-4.5-Base-128GB-RAM-IQ2_KL-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Downtown-Case/GLM-4.5-Base-128GB-RAM-IQ2_KL-GGUF:Q2_K
- Ollama
How to use Downtown-Case/GLM-4.5-Base-128GB-RAM-IQ2_KL-GGUF with Ollama:
ollama run hf.co/Downtown-Case/GLM-4.5-Base-128GB-RAM-IQ2_KL-GGUF:Q2_K
- Unsloth Studio
How to use Downtown-Case/GLM-4.5-Base-128GB-RAM-IQ2_KL-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 Downtown-Case/GLM-4.5-Base-128GB-RAM-IQ2_KL-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 Downtown-Case/GLM-4.5-Base-128GB-RAM-IQ2_KL-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Downtown-Case/GLM-4.5-Base-128GB-RAM-IQ2_KL-GGUF to start chatting
- Docker Model Runner
How to use Downtown-Case/GLM-4.5-Base-128GB-RAM-IQ2_KL-GGUF with Docker Model Runner:
docker model run hf.co/Downtown-Case/GLM-4.5-Base-128GB-RAM-IQ2_KL-GGUF:Q2_K
- Lemonade
How to use Downtown-Case/GLM-4.5-Base-128GB-RAM-IQ2_KL-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Downtown-Case/GLM-4.5-Base-128GB-RAM-IQ2_KL-GGUF:Q2_K
Run and chat with the model
lemonade run user.GLM-4.5-Base-128GB-RAM-IQ2_KL-GGUF-Q2_K
List all available models
lemonade list
Run and chat with the model
lemonade run user.GLM-4.5-Base-128GB-RAM-IQ2_KL-GGUF-Q2_KList all available models
lemonade listGLM-4.5-Base, quantized down to 124GB (V2) and 118GB (V1), specifically for 128GB RAM + small GPU setups.
llm_load_tensors: CPU buffer size = 114156.88 MiB
llm_load_tensors: CUDA_Host buffer size = 416.25 MiB
llm_load_tensors: CUDA0 buffer size = 10584.35 MiB
It uses ik_llama.cpp's new IQ2_KL quantization:
https://github.com/ikawrakow/ik_llama.cpp/pull/602
With the following mix, derived from ubergarm's GLM-4.5 (Instruct) quantizations:
https://huggingface.co/ubergarm/GLM-4.5-GGUF
# Attention
blk\..*\.attn_q.*=iq5_ks
blk\..*\.attn_k.*=iq6_k
blk\..*\.attn_v.*=iq6_k
blk\..*\.attn_output.*=iq5_ks
# First 3 Dense Layers [0-2]
blk\..*\.ffn_down\.weight=iq5_ks
blk\..*\.ffn_(gate|up)\.weight=iq5_ks
# Shared Expert Layers [3-92]
blk\..*\.ffn_down_shexp\.weight=iq5_ks
blk\..*\.ffn_(gate|up)_shexp\.weight=iq5_ks
# Routed Experts Layers [3-19]
blk\.[3-9]\.ffn_down_exps\.weight=iq3_ks
blk\.[3-9]\.ffn_(gate|up)_exps\.weight=iq3_ks
blk\.[1-1][0-9]\.ffn_down_exps\.weight=iq3_ks
blk\.[1-1][0-9]\.ffn_(gate|up)_exps\.weight=iq3_ks
# Routed Experts Layers [81-92]
blk\.[8-8][1-9]\.ffn_down_exps\.weight=iq3_ks
blk\.[8-8][1-9]\.ffn_(gate|up)_exps\.weight=iq3_ks
blk\.[9-9][0-2]\.ffn_down_exps\.weight=iq3_ks
blk\.[9-9][0-2]\.ffn_(gate|up)_exps\.weight=iq3_ks
# Routed Experts Layers [20-80]
blk\..*\.ffn_down_exps\.weight=iq2_kl
blk\..*\.ffn_(gate|up)_exps\.weight=iq2_kl
# NextN MTP Layer [92]
blk\..*\.nextn\.embed_tokens\.weight=iq5_ks
blk\..*\.nextn\.shared_head_head\.weight=iq5_ks
blk\..*\.nextn\.eh_proj\.weight=q8_0
# Non-Repeating Layers
token_embd\.weight=iq4_k
output\.weight=iq6_k
Mostly iq5_ks GPU layers to minimize loss cheaply, keep it fast (as iqX_ks quantizations are very fast), and minimize the number of quantization types.
iq3_ks shared experts near the beginning and end, as this seems to be where there are perplexity 'bumps.'
iq2_kl 'middle' shared experts.
Works well on 128GB RAM, with room for 24K F16 context in 24GB VRAM and RAM to spare for the system. It's awesome for story continuation.
Do NOT load with mmap! Requires ik_llama.cpp, see ubergarm's GLM 4.5 page. And let me know if you want a different mix (such as one more optimal for 8-11GB GPUs).
Old V1 Recipe
# Attention
blk\..*\.attn_q.*=iq5_ks_r4
blk\..*\.attn_k.*=iq6_k
blk\..*\.attn_v.*=iq6_k
blk\..*\.attn_output.*=iq5_ks_r4
# First 3 Dense Layers [0-2]
blk\..*\.ffn_down\.weight=iq4_kt
blk\..*\.ffn_(gate|up)\.weight=iq4_kt
# Shared Expert Layers [3-92]
blk\..*\.ffn_down_shexp\.weight=iq5_ks_r4
blk\..*\.ffn_(gate|up)_shexp\.weight=iq4_ks_r4
# Routed Experts Layers [3-92]
blk\..*\.ffn_down_exps\.weight=iq2_kl
blk\..*\.ffn_(gate|up)_exps\.weight=iq2_kl
# NextN MTP Layer [92]
blk\..*\.nextn\.embed_tokens\.weight=iq5_ks
blk\..*\.nextn\.shared_head_head\.weight=iq5_ks
blk\..*\.nextn\.eh_proj\.weight=q8_0
# Non-Repeating Layers
token_embd\.weight=iq4_k
output\.weight=iq6_k
- Downloads last month
- 11
2-bit
Model tree for Downtown-Case/GLM-4.5-Base-128GB-RAM-IQ2_KL-GGUF
Base model
zai-org/GLM-4.5-Base
Pull the model
# Download Lemonade from https://lemonade-server.ai/lemonade pull Downtown-Case/GLM-4.5-Base-128GB-RAM-IQ2_KL-GGUF:Q2_K