Instructions to use mlx-community/GLM-4.7-Flash-5bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use mlx-community/GLM-4.7-Flash-5bit 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("mlx-community/GLM-4.7-Flash-5bit") 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
- LM Studio
- Pi new
How to use mlx-community/GLM-4.7-Flash-5bit with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "mlx-community/GLM-4.7-Flash-5bit"
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": "mlx-community/GLM-4.7-Flash-5bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use mlx-community/GLM-4.7-Flash-5bit 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 "mlx-community/GLM-4.7-Flash-5bit"
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 mlx-community/GLM-4.7-Flash-5bit
Run Hermes
hermes
- MLX LM
How to use mlx-community/GLM-4.7-Flash-5bit with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "mlx-community/GLM-4.7-Flash-5bit"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "mlx-community/GLM-4.7-Flash-5bit" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mlx-community/GLM-4.7-Flash-5bit", "messages": [ {"role": "user", "content": "Hello"} ] }'
Add files using upload-large-folder tool
Browse files
README.md
CHANGED
|
@@ -5,16 +5,16 @@ language:
|
|
| 5 |
library_name: mlx
|
| 6 |
license: mit
|
| 7 |
pipeline_tag: text-generation
|
|
|
|
| 8 |
tags:
|
| 9 |
- mlx
|
| 10 |
-
base_model: zai-org/GLM-4.7-Flash
|
| 11 |
---
|
| 12 |
|
| 13 |
# mlx-community/GLM-4.7-Flash-5bit
|
| 14 |
|
| 15 |
This model [mlx-community/GLM-4.7-Flash-5bit](https://huggingface.co/mlx-community/GLM-4.7-Flash-5bit) was
|
| 16 |
converted to MLX format from [zai-org/GLM-4.7-Flash](https://huggingface.co/zai-org/GLM-4.7-Flash)
|
| 17 |
-
using mlx-lm version **0.30.
|
| 18 |
|
| 19 |
## Use with mlx
|
| 20 |
|
|
|
|
| 5 |
library_name: mlx
|
| 6 |
license: mit
|
| 7 |
pipeline_tag: text-generation
|
| 8 |
+
base_model: zai-org/GLM-4.7-Flash
|
| 9 |
tags:
|
| 10 |
- mlx
|
|
|
|
| 11 |
---
|
| 12 |
|
| 13 |
# mlx-community/GLM-4.7-Flash-5bit
|
| 14 |
|
| 15 |
This model [mlx-community/GLM-4.7-Flash-5bit](https://huggingface.co/mlx-community/GLM-4.7-Flash-5bit) was
|
| 16 |
converted to MLX format from [zai-org/GLM-4.7-Flash](https://huggingface.co/zai-org/GLM-4.7-Flash)
|
| 17 |
+
using mlx-lm version **0.30.5**.
|
| 18 |
|
| 19 |
## Use with mlx
|
| 20 |
|
model-00001-of-00004.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:02539ad4898ce5c302a0bf5b14d0e8522945eb1a79010cc489b79067d2aa752e
|
| 3 |
+
size 5368365795
|
model-00002-of-00004.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:994a112f63cc007b4c95e480f4dce5b11273606b4fb12ece820ece334082c68d
|
| 3 |
+
size 5249823927
|
model-00003-of-00004.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:903bd1a87267d4e69b8b7903ba504e89dad661f9bccd62cd4d54e0399299e221
|
| 3 |
+
size 5243532334
|
model-00004-of-00004.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1e9c1b6843da772fcf4e45121d7eda586452a4ed8468092a385bd8ebac1e3cef
|
| 3 |
+
size 4732858423
|
model.safetensors.index.json
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|