Image-Text-to-Text
MLX
Safetensors
inkling2_loop
mlx-serve
inkling2
Mixture of Experts
conversational
8-bit precision
Instructions to use ddalcu/Inkling-2-Mini-MLX-8bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use ddalcu/Inkling-2-Mini-MLX-8bit 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("ddalcu/Inkling-2-Mini-MLX-8bit") config = load_config("ddalcu/Inkling-2-Mini-MLX-8bit") # 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 ddalcu/Inkling-2-Mini-MLX-8bit with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "ddalcu/Inkling-2-Mini-MLX-8bit"
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": "ddalcu/Inkling-2-Mini-MLX-8bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent
How to use ddalcu/Inkling-2-Mini-MLX-8bit 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 "ddalcu/Inkling-2-Mini-MLX-8bit"
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 ddalcu/Inkling-2-Mini-MLX-8bit
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use ddalcu/Inkling-2-Mini-MLX-8bit with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "ddalcu/Inkling-2-Mini-MLX-8bit"
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 "ddalcu/Inkling-2-Mini-MLX-8bit" \ --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"
Add the DFlash2 draft (incoai/Inkling-2-Mini-DFlash2, unchanged) as drafter/
Browse files- README.md +13 -2
- drafter/config.json +58 -0
- drafter/model.safetensors +3 -0
README.md
CHANGED
|
@@ -17,8 +17,8 @@ text + images) in mlx-lm's layout.
|
|
| 17 |
- **Experts:** the release's own bytes, untouched (NVFP4 on layers 0-19, MXFP8 on 20-23).
|
| 18 |
- **Attention, embedding and head:** affine 8-bit, group 64. The release stores these in bf16.
|
| 19 |
- **Vision tower:** bf16.
|
| 20 |
-
- **Draft
|
| 21 |
-
- **Size:**
|
| 22 |
|
| 23 |
## Quality
|
| 24 |
|
|
@@ -45,6 +45,17 @@ llmprobe 0.6.18, greedy, 192-token decode. Drafted rows use the bundled draft he
|
|
| 45 |
|
| 46 |
Against the release served as is, it decodes ~15% faster at the same quality. The bf16 attention and head are read in full every token; 8-bit halves those bytes.
|
| 47 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 48 |
## Run
|
| 49 |
|
| 50 |
```
|
|
|
|
| 17 |
- **Experts:** the release's own bytes, untouched (NVFP4 on layers 0-19, MXFP8 on 20-23).
|
| 18 |
- **Attention, embedding and head:** affine 8-bit, group 64. The release stores these in bf16.
|
| 19 |
- **Vision tower:** bf16.
|
| 20 |
+
- **Draft heads:** the bundled block drafter, `mtp.safetensors` (0.64 GB), and the DFlash2 draft in `drafter/` (0.99 GB, below).
|
| 21 |
+
- **Size:** 19.7 GB.
|
| 22 |
|
| 23 |
## Quality
|
| 24 |
|
|
|
|
| 45 |
|
| 46 |
Against the release served as is, it decodes ~15% faster at the same quality. The bf16 attention and head are read in full every token; 8-bit halves those bytes.
|
| 47 |
|
| 48 |
+
## The DFlash2 draft (`drafter/`)
|
| 49 |
+
|
| 50 |
+
`drafter/config.json` and `drafter/model.safetensors` are
|
| 51 |
+
[incoai/Inkling-2-Mini-DFlash2](https://huggingface.co/incoai/Inkling-2-Mini-DFlash2) as published: bf16, both files
|
| 52 |
+
unchanged, Apache-2.0. It is a draft model for speculative decoding, not a language model on its own: it proposes a
|
| 53 |
+
block of tokens a step and Inkling 2 Mini checks every one, so the text stays the model's own.
|
| 54 |
+
|
| 55 |
+
mlx-serve builds with DFlash2 support ([mlx-serve#1331](https://github.com/ddalcu/mlx-serve/pull/1331)) draft with it
|
| 56 |
+
in place of the bundled head, for one chat and for several at once. Earlier builds decline the folder by name and serve
|
| 57 |
+
the pack with the bundled head, as before.
|
| 58 |
+
|
| 59 |
## Run
|
| 60 |
|
| 61 |
```
|
drafter/config.json
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"DFlash2DraftModel"
|
| 4 |
+
],
|
| 5 |
+
"attention_bias": false,
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"bos_token_id": null,
|
| 8 |
+
"dflash_config": {
|
| 9 |
+
"block_size": 8,
|
| 10 |
+
"conv_group_size": 16,
|
| 11 |
+
"conv_kernel_size": 2,
|
| 12 |
+
"final_logit_softcapping": 30.0,
|
| 13 |
+
"mask_token_id": 200056,
|
| 14 |
+
"selector_rank": 256,
|
| 15 |
+
"selector_softcap_mode": "after_correction",
|
| 16 |
+
"selector_top_k": 16,
|
| 17 |
+
"target_layer_ids": [
|
| 18 |
+
5,
|
| 19 |
+
23,
|
| 20 |
+
41,
|
| 21 |
+
48
|
| 22 |
+
]
|
| 23 |
+
},
|
| 24 |
+
"dtype": "bfloat16",
|
| 25 |
+
"eos_token_id": null,
|
| 26 |
+
"head_dim": 128,
|
| 27 |
+
"hidden_act": "silu",
|
| 28 |
+
"hidden_size": 2304,
|
| 29 |
+
"initializer_range": 0.02,
|
| 30 |
+
"intermediate_size": 6912,
|
| 31 |
+
"is_causal": false,
|
| 32 |
+
"layer_types": [
|
| 33 |
+
"sliding_attention",
|
| 34 |
+
"sliding_attention",
|
| 35 |
+
"sliding_attention",
|
| 36 |
+
"sliding_attention",
|
| 37 |
+
"sliding_attention"
|
| 38 |
+
],
|
| 39 |
+
"max_position_embeddings": 1048576,
|
| 40 |
+
"max_window_layers": 5,
|
| 41 |
+
"model_type": "qwen3",
|
| 42 |
+
"num_attention_heads": 32,
|
| 43 |
+
"num_hidden_layers": 5,
|
| 44 |
+
"num_key_value_heads": 8,
|
| 45 |
+
"num_target_layers": 48,
|
| 46 |
+
"pad_token_id": null,
|
| 47 |
+
"rms_norm_eps": 1e-06,
|
| 48 |
+
"rope_parameters": {
|
| 49 |
+
"rope_theta": 10000.0,
|
| 50 |
+
"rope_type": "default"
|
| 51 |
+
},
|
| 52 |
+
"sliding_window": 2048,
|
| 53 |
+
"tie_word_embeddings": false,
|
| 54 |
+
"transformers_version": "5.12.1",
|
| 55 |
+
"use_cache": false,
|
| 56 |
+
"use_sliding_window": true,
|
| 57 |
+
"vocab_size": 201024
|
| 58 |
+
}
|
drafter/model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:217980ab00d116693fa5946df7bbfd967caf5fac1f529afd541fbd470ddb54ee
|
| 3 |
+
size 989975616
|