Instructions to use inferencerlabs/GLM-5.2-MTP-MLX-Q4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use inferencerlabs/GLM-5.2-MTP-MLX-Q4 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("inferencerlabs/GLM-5.2-MTP-MLX-Q4") config = load_config("inferencerlabs/GLM-5.2-MTP-MLX-Q4") # 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
Update README.md
Browse files
README.md
CHANGED
|
@@ -15,7 +15,7 @@ See GLM-5.2 in action: [demonstration videos](https://youtube.com/xcreate)
|
|
| 15 |
|
| 16 |
This draft model contains the **Multi-Token Prediction (MTP)** layers from **[zai-org/GLM-5.2](https://huggingface.co/zai-org/GLM-5.2)** for use alongside the [GLM-5.2-MLX](https://huggingface.co/models?search=inferencerlabs/glm-5.2) model as a speculative decoder.
|
| 17 |
|
| 18 |
-
Q4 quant typically achieves higher throughput with less RAM usage at no loss in quality.
|
| 19 |
|
| 20 |
#### Tested on a M3 Ultra 512GB RAM using [Inferencer app v2.0.6](https://inferencer.com)
|
| 21 |
<table style="border-collapse: collapse; border: none; text-align:left; margin-top:10px; margin-bottom:0px;">
|
|
|
|
| 15 |
|
| 16 |
This draft model contains the **Multi-Token Prediction (MTP)** layers from **[zai-org/GLM-5.2](https://huggingface.co/zai-org/GLM-5.2)** for use alongside the [GLM-5.2-MLX](https://huggingface.co/models?search=inferencerlabs/glm-5.2) model as a speculative decoder.
|
| 17 |
|
| 18 |
+
Q4 quant typically achieves higher throughput with less RAM usage (compared to base MTP) at no loss in quality.
|
| 19 |
|
| 20 |
#### Tested on a M3 Ultra 512GB RAM using [Inferencer app v2.0.6](https://inferencer.com)
|
| 21 |
<table style="border-collapse: collapse; border: none; text-align:left; margin-top:10px; margin-bottom:0px;">
|