Instructions to use EZCon/GLM-OCR-8bit-mlx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use EZCon/GLM-OCR-8bit-mlx with MLX:
# Make sure mlx-vlm is installed # pip install --upgrade mlx-vlm from mlx_vlm import load, generate from mlx_vlm.prompt_utils import apply_chat_template from mlx_vlm.utils import load_config # Load the model model, processor = load("EZCon/GLM-OCR-8bit-mlx") config = load_config("EZCon/GLM-OCR-8bit-mlx") # Prepare input image = ["http://images.cocodataset.org/val2017/000000039769.jpg"] prompt = "Describe this image." # Apply chat template formatted_prompt = apply_chat_template( processor, config, prompt, num_images=1 ) # Generate output output = generate(model, processor, formatted_prompt, image) print(output) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use EZCon/GLM-OCR-8bit-mlx with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "EZCon/GLM-OCR-8bit-mlx"
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": "EZCon/GLM-OCR-8bit-mlx" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent
How to use EZCon/GLM-OCR-8bit-mlx 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 "EZCon/GLM-OCR-8bit-mlx"
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 EZCon/GLM-OCR-8bit-mlx
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use EZCon/GLM-OCR-8bit-mlx with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "EZCon/GLM-OCR-8bit-mlx"
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 "EZCon/GLM-OCR-8bit-mlx" \ --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"
Upload folder using huggingface_hub
Browse files- README.md +1 -1
- model.safetensors +2 -2
- processor_config.json +5 -7
README.md
CHANGED
|
@@ -11,9 +11,9 @@ language:
|
|
| 11 |
- ko
|
| 12 |
library_name: mlx
|
| 13 |
base_model: zai-org/GLM-OCR
|
| 14 |
-
pipeline_tag: image-text-to-text
|
| 15 |
tags:
|
| 16 |
- mlx
|
|
|
|
| 17 |
---
|
| 18 |
|
| 19 |
# EZCon/GLM-OCR-8bit-mlx
|
|
|
|
| 11 |
- ko
|
| 12 |
library_name: mlx
|
| 13 |
base_model: zai-org/GLM-OCR
|
|
|
|
| 14 |
tags:
|
| 15 |
- mlx
|
| 16 |
+
pipeline_tag: image-text-to-text
|
| 17 |
---
|
| 18 |
|
| 19 |
# EZCon/GLM-OCR-8bit-mlx
|
model.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:eba8ecf5191394f4ac478366d08759e79acea4c52397e6b41d0ac08cf35d724d
|
| 3 |
+
size 1583785403
|
processor_config.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
{
|
| 2 |
"image_processor": {
|
|
|
|
| 3 |
"do_convert_rgb": true,
|
| 4 |
"do_normalize": true,
|
| 5 |
"do_rescale": true,
|
| 6 |
-
"do_resize": true,
|
| 7 |
"image_mean": [
|
| 8 |
0.48145466,
|
| 9 |
0.4578275,
|
|
@@ -15,15 +15,13 @@
|
|
| 15 |
0.26130258,
|
| 16 |
0.27577711
|
| 17 |
],
|
|
|
|
| 18 |
"merge_size": 2,
|
|
|
|
| 19 |
"patch_size": 14,
|
| 20 |
-
"resample": 3,
|
| 21 |
"rescale_factor": 0.00392156862745098,
|
| 22 |
-
"
|
| 23 |
-
|
| 24 |
-
"shortest_edge": 12544
|
| 25 |
-
},
|
| 26 |
-
"temporal_patch_size": 2
|
| 27 |
},
|
| 28 |
"processor_class": "GlmOcrProcessor"
|
| 29 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"image_processor": {
|
| 3 |
+
"_transformers_image_processor": null,
|
| 4 |
"do_convert_rgb": true,
|
| 5 |
"do_normalize": true,
|
| 6 |
"do_rescale": true,
|
|
|
|
| 7 |
"image_mean": [
|
| 8 |
0.48145466,
|
| 9 |
0.4578275,
|
|
|
|
| 15 |
0.26130258,
|
| 16 |
0.27577711
|
| 17 |
],
|
| 18 |
+
"max_pixels": 9633792,
|
| 19 |
"merge_size": 2,
|
| 20 |
+
"min_pixels": 12544,
|
| 21 |
"patch_size": 14,
|
|
|
|
| 22 |
"rescale_factor": 0.00392156862745098,
|
| 23 |
+
"temporal_patch_size": 2,
|
| 24 |
+
"use_transformers_backend": true
|
|
|
|
|
|
|
|
|
|
| 25 |
},
|
| 26 |
"processor_class": "GlmOcrProcessor"
|
| 27 |
}
|