Image-Text-to-Text
MLX
Safetensors
inkling2_loop
gpustack
mlx-vlm
quantized
mixed-precision
dynamic-quantization
4-bit precision
dflash2
multimodal
conversational
Instructions to use gpustack/Inkling-2-Mini-MLX-4bit-dynamic with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use gpustack/Inkling-2-Mini-MLX-4bit-dynamic 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("gpustack/Inkling-2-Mini-MLX-4bit-dynamic") config = load_config("gpustack/Inkling-2-Mini-MLX-4bit-dynamic") # 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 gpustack/Inkling-2-Mini-MLX-4bit-dynamic with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "gpustack/Inkling-2-Mini-MLX-4bit-dynamic"
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "gpustack/Inkling-2-Mini-MLX-4bit-dynamic" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent
How to use gpustack/Inkling-2-Mini-MLX-4bit-dynamic 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 "gpustack/Inkling-2-Mini-MLX-4bit-dynamic"
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 gpustack/Inkling-2-Mini-MLX-4bit-dynamic
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use gpustack/Inkling-2-Mini-MLX-4bit-dynamic with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "gpustack/Inkling-2-Mini-MLX-4bit-dynamic"
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 "gpustack/Inkling-2-Mini-MLX-4bit-dynamic" \ --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"
File size: 2,666 Bytes
dd63bac | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | ---
library_name: mlx
license: apache-2.0
license_link: https://www.apache.org/licenses/LICENSE-2.0
pipeline_tag: image-text-to-text
base_model:
- thinkingmachines/Inkling-2-Mini
- incoai/Inkling-2-Mini-DFlash2
base_model_relation: quantized
tags:
- gpustack
- mlx
- mlx-vlm
- inkling2_loop
- quantized
- mixed-precision
- dynamic-quantization
- 4-bit
- dflash2
- multimodal
---
# gpustack/Inkling-2-Mini-MLX-4bit-dynamic
An MLX-native mixed-precision affine (`group_size = 64`) 4-bit dynamic quantization of [`thinkingmachines/Inkling-2-Mini`](https://huggingface.co/thinkingmachines/Inkling-2-Mini) (`inkling2_loop`) for Apple Silicon (`mlx-vlm >= 0.8.1`), preserving the full BF16 vision tower (`vision_tower.*`) and bundling a blockwise-FP8 quantized [`incoai/Inkling-2-Mini-DFlash2`](https://huggingface.co/incoai/Inkling-2-Mini-DFlash2) drafter under `speculator/`.
## Original Models & License
| Role | Original Model | Original License |
| --- | --- | --- |
| Target Model | [thinkingmachines/Inkling-2-Mini](https://huggingface.co/thinkingmachines/Inkling-2-Mini) | [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| Speculative Drafter (`speculator/`) | [incoai/Inkling-2-Mini-DFlash2](https://huggingface.co/incoai/Inkling-2-Mini-DFlash2) | [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0) |
## Quantization Details (`4-bit dynamic`, ~14.88 GiB weights, 4 Shards)
All quantized tensors use standard MLX affine packing (`mode = "affine"`, `group_size = 64`) in `mlx-vlm >= 0.8.1` layout (`language_model.model.*`, split `mlp.switch_mlp.{gate_proj,up_proj,down_proj}`) with per-module precision overrides in `config.json`:
| Precision | Modules | Override Count |
| --- | --- | ---: |
| **8-bit (`Q8G64`)** | Embeddings and `lm_head` | `2` |
| **6-bit (`Q6G64`)** | Attention projections (`wq_du`, `wk_dv`, `wv_dv`, `wo_ud`, `wr_du`, `gate_attn`) | `144` |
| **4-bit (`Q4G64`)** | MoE routed expert projections (`switch_mlp.{gate_proj,up_proj,down_proj}`) | base |
| **BF16 (preserved)** | `vision_tower.*`, norms, routers, loop controllers, and short convolutions | preserved |
| **Speculator (`speculator/`)** | Bundled FP8 `Inkling-2-Mini-DFlash2` drafter | — |
## Usage with MLX (`mlx-vlm >= 0.8.1`)
```sh
pip install -U "mlx-vlm>=0.8.1"
# Text generation
python -m mlx_vlm generate \
--model gpustack/Inkling-2-Mini-MLX-4bit-dynamic \
--max-tokens 256 \
--prompt "Write a Python Fibonacci function."
# Multimodal vision
python -m mlx_vlm generate \
--model gpustack/Inkling-2-Mini-MLX-4bit-dynamic \
--max-tokens 256 \
--prompt "Describe this image." \
--image <path-to-image>
```
|