Downloads · 30 days
23
7% of all-time downloads
SirSahOl/glm-edge-1.5b-chat-mlx-4bit
glm-edge-1.5b-chat-mlx-4bit 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.
This repository contains Zhipu AI's GLM-Edge-1.5B-Chat quantized to 4-bit precision. It is compiled natively for Apple Silicon under the MLX framework.
Downloads · 30 days
23
7% of all-time downloads
All-time downloads
315
Public
Parameters
1.5B
828 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors828 MB · 99%
How the weights are stored.
U321.5B · 100%
From the Hugging Face model README
This repository contains Zhipu AI's GLM-Edge-1.5B-Chat quantized to 4-bit precision. It is compiled natively for Apple Silicon under the MLX framework.
4-bit quantization maximizes token generation speed and minimizes memory usage. It is the optimal setup for low-resource environments.
Install the MLX LM package.
pip install mlx-lm
Chat with the model in your terminal.
mlx_lm.chat --model SirSahOl/glm-edge-1.5b-chat-mlx-4bit
Load and generate text programmatically.
from mlx_lm import load, generate
model, tokenizer = load("SirSahOl/glm-edge-1.5b-chat-mlx-4bit")
messages = [{"role": "user", "content": "Explain quantum superposition."}]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
response = generate(model, tokenizer, prompt=prompt, verbose=True)
Evaluate your hardware budget and choose the optimal precision:
| Variant | Disk Size | VRAM Footprint | M1 Speed | Key Advantage |
|---|---|---|---|---|
| 4-bit MLX (This Repo) | ~800 MB | ~0.87 GB | ~72.5 tokens/sec | Maximum speed, lowest RAM. |
| 8-bit MLX | ~1.56 GB | ~1.56 GB | ~48.5 tokens/sec | Lossless balance, highly stable reasoning. |
| 16-bit MLX | ~2.94 GB | ~3.00 GB | ~32.5 tokens/sec | Raw full-precision, absolute peak quality. |
If you load this model in LM Studio, you must configure custom Stop Strings to prevent the model from entering an infinite self-dialogue loop.
You can create a custom prompt preset to configure all settings automatically. Create a JSON file named GLM-Edge.json inside your LM Studio config directory:
~/.lmstudio/config-presets/GLM-Edge.json%USERPROFILE%\.lmstudio\config-presets\GLM-Edge.jsonAdd the following JSON content:
{
"name": "GLM-Edge",
"inference_params": {
"pre_prompt": "You are a helpful, direct, and honest assistant.",
"input_prefix": "<|user|>\n",
"input_suffix": "\n<|assistant|>\n",
"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, open a Chat session, and select "GLM-Edge" from the Prompt Template dropdown.
Alternatively, configure the settings manually in the Advanced Configuration sidebar:
<|user|>, <|observation|>, and <|endoftext|><|user|>\n\n<|assistant|>\n<|system|>\n\n