Instructions to use JANGQ-AI/GLM-5.2-JANG_2L with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use JANGQ-AI/GLM-5.2-JANG_2L with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("JANGQ-AI/GLM-5.2-JANG_2L") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use JANGQ-AI/GLM-5.2-JANG_2L with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "JANGQ-AI/GLM-5.2-JANG_2L"
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "JANGQ-AI/GLM-5.2-JANG_2L" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use JANGQ-AI/GLM-5.2-JANG_2L with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "JANGQ-AI/GLM-5.2-JANG_2L"
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 JANGQ-AI/GLM-5.2-JANG_2L
Run Hermes
hermes
- OpenClaw new
How to use JANGQ-AI/GLM-5.2-JANG_2L with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "JANGQ-AI/GLM-5.2-JANG_2L"
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 "JANGQ-AI/GLM-5.2-JANG_2L" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
- MLX LM
How to use JANGQ-AI/GLM-5.2-JANG_2L with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "JANGQ-AI/GLM-5.2-JANG_2L"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "JANGQ-AI/GLM-5.2-JANG_2L" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "JANGQ-AI/GLM-5.2-JANG_2L", "messages": [ {"role": "user", "content": "Hello"} ] }'
Access is manual — please read the warning first
This repository is publicly accessible, but you have to accept the conditions to access its files and content.
There is no working runtime for this bundle. vMLX, Osaurus, MLX Studio and stock mlx_lm cannot load it today. It is a 318 GB research artifact published for archival and for researchers working on SSD-offloaded MoE inference. It will not fit in RAM on any shipping Apple Silicon machine, and there is no supported way to generate text with it. Requests are reviewed manually — please say what you intend to do with it.
Log in or Sign Up to review the conditions and access this model content.
⚠️ NO RUNTIME AVAILABLE YET — DO NOT EXPECT THIS TO RUN
There is no vMLX / Osaurus / MLX Studio runtime for this bundle. Stock
mlx_lmwill not load it either.These weights are published as an archival research artifact, not as a usable model. At 318 GB they do not fit in RAM on any shipping Apple Silicon machine, and the only code that has ever produced coherent text from them is an unreleased SSD-offload prototype (
mlxpress) that tops out at ~2.8 tok/s and was shelved for missing its performance bar.If you want a GLM MoE bundle you can actually run today, use
GLM-5.1-JANG_1Linstead.
GLM-5.2-JANG_2L
745B-parameter Mixture-of-Experts quantized to 3.12 bits/weight — 318 GB Created by Jinho Jang — eric@jangq.ai
A JANG v2 affine mixed-precision quantization of zai-org/GLM-5.2,
produced 2026-07-19 with jang_tools convert -p JANG_2L. The conversion is complete and
structurally verified; what does not exist is a runtime that can serve it.
Why this is here
This bundle was built for the mlxpress campaign — an attempt to run a 745B MoE on a
128 GB Apple Silicon machine by keeping only hot experts resident and streaming cold
experts from SSD. The quantization worked. The offload engine worked and produced
coherent long-context output. It was too slow to ship (~2.8 tok/s against a 6 tok/s
bar), so the campaign was paused and no runtime was ever released.
Rather than delete a 318 GB artifact that took a 1.5 TB download and a multi-hour conversion to produce, it is archived here. It is useful if you are working on SSD-offloaded MoE inference, expert-routing analysis, or low-bit quantization of DeepSeek-V3.2-family architectures.
Model summary
| Field | Value |
|---|---|
| Base model | zai-org/GLM-5.2 (bf16 source, not FP8) |
| Architecture | GlmMoeDsaForCausalLM / model_type=glm_moe_dsa (DeepSeek-V3.2 family + DSA sparse attention) |
| Parameters | ~745 B total, ~40 B active per token |
| Layers | 78 transformer layers + layer 78 = MTP (MTP is present in this bundle, not stripped) |
| Routed experts | 256, top-8, sigmoid routing (noaux_tc), routed_scaling_factor=2.5 |
| Shared experts | 1 |
| Dense layers | first 3 (first_k_dense_replace=3), intermediate_size=12288 |
| Expert MLP | moe_intermediate_size=2048 |
| Hidden size | 6144 |
| Attention | MLA — q_lora_rank=2048, kv_lora_rank=512, 64 heads, qk_head_dim=256, v_head_dim=256 |
| DSA indexer | 32 heads, index_head_dim=128, index_topk=2048, index_topk_freq=4 |
| RoPE | theta=8e6, interleaved |
| Context window | 1,048,576 (1M) per config |
| Vocab | 154,880 |
| EOS tokens | [154820, 154827, 154829] |
| Format | JANG v2 — MLX-native safetensors, mmap load |
| On-disk size | 318 GiB (341,207,533,424 bytes) across 233 shards, 3,303 tensors |
| Mode | Text-only |
Quantization
Profile JANG_2L, affine, via mx.quantize. No AWQ, no Hadamard rotation, no
expert pruning, no TurboQuant/JANGTQ anywhere in this bundle.
| Setting | Value |
|---|---|
| Method | jang-importance |
| Target bits | 2.0 |
| Actual bits | 3.12 |
| Group size | 64 |
| Scheme | asymmetric affine |
| Backend | mx.quantize |
| Quantization objective | MSE |
| Scoring | weight-magnitude |
| Calibration | weights (no activation calibration) |
| MLP asymmetry floor | enabled |
| Hadamard rotation | disabled |
| Bit widths used | 2, 3, 4, 6, 8 |
| Passthrough (unquantized) tensors | 0 |
| Manifest | 929 entries, schema v1, in jang_config.json |
Notable per-tensor assignments:
| Tensor class | Bits |
|---|---|
lm_head |
8 |
embed_tokens |
6 |
| dense-layer MLP (layers 0–2) | 8 |
routed experts (switch_mlp.{gate,up,down}_proj) |
2 (bulk of the model) |
The 3.12 actual-bits figure against a 2.0 target is why this landed at 318 GB rather than the ~300 GB the campaign was aiming for — the asymmetry floor and the 8-bit high-precision slice cost more than budgeted.
Measured performance
All numbers below are from the unreleased mlxpress Python offload prototype on an
M5 Max MacBook, 128 GB, experts streamed from internal NVMe, 45 GB hot cache,
sampled (temp 0.7 / top-p 0.95 / rep-pen 1.1). These are the only numbers that exist
for this bundle.
| Routing config | Experts kept / 8 | tok/s | Coherent |
|---|---|---|---|
| exact (all 8) | 8.0 | 0.34–0.40 | ✅ |
| min-keep 6 by router weight | 6.2 | 0.67 | ✅ |
| min-keep 5 by router weight | 5.4 | 1.25 | ✅ |
| min-keep 4 by router weight | 4.6 | 1.85 | ✅ |
| min-keep 4 + multithreaded reads | 4.6 | ~2.8 (best stable) | ✅ |
| pure force-resident (drop by residency) | 2.5 | 6.9 | ❌ garbage |
No standard benchmarks (MMLU, HumanEval, GSM8K) were run on this bundle. The campaign was paused before evaluation. Quality was assessed only by manual inspection of generated text, which was coherent at every ✅ row above.
Two findings from those runs that may be useful to others:
- Coherence needs only the ~4–5 highest-router-weight experts per layer, not all 8. Dropping the low-weight tail stays coherent down to 4.6/8. Dropping by cache residency instead of by router weight discards high-weight experts and immediately produces garbage.
- Shrink-to-fit is not available for this model. Expert weight matrices were measured to be effectively full-rank and mutually orthogonal, so there is no low-rank or shared-basis trick that makes 40 B active parameters fit the ~50 GB of spendable cache on a 128 GB machine.
Known issues
lm_headis mislabeled. The threelm_headtensors are stored under thelanguage_model.prefix (language_model.lm_head.{weight,scales,biases}) while all 3,300 other tensors usemodel.. This is a converter bug. Any loader must remap it — the offload prototype had to dequantize it and assign it as a plain fp16 tensor to get coherent output. Loading this bundle without handling that produces pure garbage, which is exactly how the bug was found.- MTP layer 78 is included.
model.layers.78.eh_projand its own MoE block are present. Any loader must either use or explicitly strip them. MTP was evaluated for the offload path and ruled out: verifying K speculative tokens touches K× distinct experts, so drive-bound cost scales with distinct experts read, not with forward passes. - 318 GB does not fit in RAM on any shipping Apple Silicon machine. SSD offload is mandatory, and no released runtime implements it.
- Not evaluated. See the benchmarks note above.
Files
| File | Purpose |
|---|---|
model-*-of-00233.safetensors |
233 weight shards |
model.safetensors.index.json |
shard map, 3,303 tensors |
config.json |
architecture + MLX quantization block (per-tensor overrides) |
jang_config.json |
full JANG quantization manifest (929 entries) |
generation_config.json |
sampling + stop tokens |
tokenizer.json, tokenizer_config.json, chat_template.jinja |
tokenizer |
License
MIT, inherited from zai-org/GLM-5.2.
Credit
Quantization, offload research, and this bundle by Jinho Jang — eric@jangq.ai. Base model by Z.ai (Zhipu AI).
- Downloads last month
- -
Quantized
Model tree for JANGQ-AI/GLM-5.2-JANG_2L
Base model
zai-org/GLM-5.2