Downloads · 30 days
179
37% of all-time downloads
SirSahOl/glm-edge-4b-chat-mlx-16bit
glm-edge-4b-chat-mlx-16bit is a text generation model from SirSahOl. Use it when you need the model to write or continue text. It is set up for mlx. The card lists the license as other.
16-bit MLX conversion of THUDM/glm-edge-4b-chat optimized for Apple Silicon native GPU inference.
Downloads · 30 days
179
37% of all-time downloads
All-time downloads
487
Public
Parameters
4.3B
8.7 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors8.7 GB · 100%
From the Hugging Face model README
16-bit MLX conversion of THUDM/glm-edge-4b-chat optimized for Apple Silicon native GPU inference.
Converted by: SirSahOl
Source Model: THUDM/glm-edge-4b-chat
Framework: MLX by Apple
Quantization: 16-bit (Average 16.00 (unquantized bfloat16) bits per weight)
Format: safetensors
License: other
pip install mlx-lm
# Chat interactively
mlx_lm.chat --model SirSahOl/glm-edge-4b-chat-mlx-16bit
# Generate text
mlx_lm.generate --model SirSahOl/glm-edge-4b-chat-mlx-16bit --prompt "Write a short poem about artificial intelligence."
from mlx_lm import load, generate
model, tokenizer = load("SirSahOl/glm-edge-4b-chat-mlx-16bit")
messages = [
{"role": "user", "content": "Explain quantum superposition in simple terms."}
]
prompt = tokenizer.apply_chat_template(
messages, tokenize=False, add_generation_prompt=True
)
response = generate(model, tokenizer, prompt=prompt, verbose=True)
print(response)
Estimated decoding throughput, time-to-first-token (TTFT), and active unified memory footprint across Apple Silicon tiers:
| Apple Silicon Tier | Unified Memory | Active VRAM | Estimated Speed | Est. TTFT | Recommended Use Case |
|---|---|---|---|---|---|
| M1 / M2 / M3 / M4 (Base) | 16 GB Unified Memory | ~9.4 GB | ~25 tokens/sec | ~126 ms | Everyday interactive assistant & fast local completions |
| M1 / M2 / M3 / M4 Pro | 18 GB – 36 GB | ~9.4 GB | ~38 tokens/sec | ~86 ms | Balanced daily driver for coding, tool invocation, and multi-turn chat |
| M1 / M2 / M3 / M4 Max | 36 GB – 128 GB | ~9.4 GB | ~54 tokens/sec | ~53 ms | High-throughput generation, low latency, agent orchestration |
| M1 / M2 / M3 Ultra | 64 GB – 192 GB | ~9.4 GB | ~75 tokens/sec | ~35 ms | Peak concurrency, batch document extraction, production serving |
Estimates based on Apple Silicon unified memory bandwidth and active parameter footprint. Real-world speeds may vary with context length.
Evaluate your hardware budget and choose the optimal precision:
| Variant | Disk Size | VRAM Footprint | Target Apple Silicon Hardware | Key Advantage |
|---|---|---|---|---|
| 4-bit MLX | ~2.6 GB | ~2.6 GB | M1 / M2 / M3 / M4 (8GB+) | Maximum generation speed and lowest RAM overhead. |
| 8-bit MLX | ~4.7 GB | ~4.7 GB | M1 / M2 / M3 / M4 Pro/Max (16GB+) | Balanced accuracy and generation speed; near-lossless reasoning. |
| 16-bit MLX (This Repository) | ~8.8 GB | ~8.8 GB | M2 / M3 / M4 Max/Ultra (32GB+) | Full unquantized precision; reference evaluation quality. |
| Your Hardware | Recommended Quantization |
|---|---|
| M1/M2/M3/M4 (8GB – 16GB) | 4-bit — Best balance of speed, low memory, and multitasking capability |
| M1/M2/M3/M4 Pro/Max (18GB – 36GB) | 8-bit — Higher quality reasoning with comfortable memory headroom |
| M1/M2/M3/M4 Max/Ultra (36GB – 192GB) | 16-bit — Unquantized full precision, zero quality degradation |
General guidance:
| Variant | Link |
|---|---|
| 8-bit | SirSahOl/glm-edge-4b-chat-mlx-8bit |
| 16-bit | SirSahOl/glm-edge-4b-chat-mlx-16bit |
To prevent runaway loops and ensure correct conversational turn-taking, configure custom stop strings in your local inference runtime.
Ensure the following sequence tokens are configured as strict stop boundaries:
<|user|><|observation|><|endoftext|>Create a custom prompt preset JSON file named GLM-Edge.json in your LM Studio config directory:
~/.lmstudio/config-presets/GLM-Edge.json%USERPROFILE%\.lmstudio\config-presets\GLM-Edge.json{
"name": "GLM-Edge",
"inference_params": {
"pre_prompt": "You are a helpful, respectful, and honest assistant.",
"input_prefix": "<|user|>\n",
"input_suffix": "",
"pre_prompt_prefix": "<|system|>\n",
"pre_prompt_suffix": "\n",
"antiprompt": [
"<|user|>",
"<|observation|>",
"<|endoftext|>"
],
"stopStrings": [
"<|user|>",
"<|observation|>",
"<|endoftext|>"
],
"temperature": 0.7,
"max_tokens": 2048
}
}
Restart LM Studio, load SirSahOl/glm-edge-4b-chat-mlx-16bit, and select "GLM-Edge" from the Prompt Template dropdown.
<|user|>, <|observation|>, <|endoftext|><|system|>\n\n<|user|>\n\n<|assistant|>\nCreate a Modelfile to run this model in Ollama:
FROM SirSahOl/glm-edge-4b-chat-mlx-16bit
PARAMETER stop "<|user|>"
PARAMETER stop "<|observation|>"
PARAMETER stop "<|endoftext|>"
PARAMETER temperature 0.7
TEMPLATE """{{ if .System }}<|im_start|>system
{{ .System }}<|im_end|>
{{ end }}{{ if .Prompt }}<|im_start|>user
{{ .Prompt }}<|im_end|>
{{ end }}<|im_start|>assistant
"""
Create and run with Ollama:
ollama create glm-edge -f Modelfile
ollama run glm-edge
| Property | Value |
|---|---|
| Source Model | THUDM/glm-edge-4b-chat |
| Quantization | 16-bit |
| mlx-lm Version | 0.31.3 |
| Conversion Time | 19.78s |
| Output Size | 8.1 GB |
| Date | 2026-09-20T16:32:30.700543+00:00 |
To reproduce this conversion:
pip install mlx-lm==0.31.3
python3 -m mlx_lm.convert --hf-path /root/.cache/huggingface/hub/models--THUDM--glm-edge-4b-chat/snapshots/a1817f2ab339ecdd8497c4d752ea71a65299f29a --mlx-path /opt/mlx-foundry/output/glm-edge-4b-chat-mlx-16bit
This model conversion inherits the license of the source model: other.
See the original model card for full license details.
| Version | Date | Changes |
|---|---|---|
| v1.0 | 2026-09-20 | Initial conversion |
Converted with MLX Foundry — a professional pipeline for converting models to Apple MLX format.