Instructions to use aufklarer/Inkling-2-Mini-MLX-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use aufklarer/Inkling-2-Mini-MLX-4bit 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("aufklarer/Inkling-2-Mini-MLX-4bit") config = load_config("aufklarer/Inkling-2-Mini-MLX-4bit") # 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 aufklarer/Inkling-2-Mini-MLX-4bit with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "aufklarer/Inkling-2-Mini-MLX-4bit"
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": "aufklarer/Inkling-2-Mini-MLX-4bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent
How to use aufklarer/Inkling-2-Mini-MLX-4bit 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 "aufklarer/Inkling-2-Mini-MLX-4bit"
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 aufklarer/Inkling-2-Mini-MLX-4bit
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use aufklarer/Inkling-2-Mini-MLX-4bit with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "aufklarer/Inkling-2-Mini-MLX-4bit"
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 "aufklarer/Inkling-2-Mini-MLX-4bit" \ --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"
Inkling 2 Mini · MLX INT4
Affine MLX weights for native Swift text and still-image generation in speech-swift.
- Expert weights: INT4, group size 64.
- Attention and vocabulary matrices: INT8.
- Vision, routing, normalization, relative-position parameters, loop controllers: source precision.
- Model tensors: 16,141,320,192 bytes, about 16.1 GB; 39 weight shards.
- Tested hardware: Apple M5 Pro, 48 GB unified memory, macOS 27.2.
- Source revision:
ed40e7da625f594fc9c4990f5f66be24873c22d7.
The model stores 24 decoder layers and visits 48 layers per token by repeating its twelve middle layers three times. The Swift runtime shares weights and keeps an independent attention/convolution history for each layer visit.
The INT5 bundle contains 19,198,967,808 bytes of model tensors and uses the same runtime. Each variant passed the same 25 selected acceptance cases; these checks do not establish a quality or speed advantage for either precision.
Download and run
The native Swift runtime is merged into speech-swift.
The build below pins the tested implementation to public commit
15eda930df3d.
python -m pip install -U huggingface_hub
hf download aufklarer/Inkling-2-Mini-MLX-4bit --local-dir Inkling-2-Mini-MLX-4bit
git clone https://github.com/soniqo/speech-swift.git speech-swift-inkling
cd speech-swift-inkling
git checkout --detach 15eda930df3d6cad07a0cd25e8d22dfdd9a040c3
make build
.build/release/speech inkling "Reply with only the result of 2 + 2." \
--model-dir ../Inkling-2-Mini-MLX-4bit --temperature 0 --max-tokens 512
.build/release/speech inkling "Describe this image." \
--model-dir ../Inkling-2-Mini-MLX-4bit --image photo.png --max-tokens 512
Follow the package's build requirements, including the MLX metallib step handled
by make build. The Swift API is:
import Qwen3Chat
let model = try await Inkling2Chat.fromPretrained(
modelId: "aufklarer/Inkling-2-Mini-MLX-4bit")
for try await text in model.generateStream(
messages: [.init(role: .user, content: "What is 2 + 2?")]) {
print(text, terminator: "")
}
Inkling2Chat.fromDirectory(...) also loads a local bundle. This is an affine
MLX export; the upstream ModelOpt loading path does not interpret these weights.
The tensor names follow MLX-VLM's Inkling 2 layout. Python generation with an
unmodified released MLX-VLM package was not validated for this release.
What was checked
25/25 fixed acceptance cases passed through the Swift runtime on November 22, 2026: twenty text prompts, four synthetic images, and one longer document. Coverage includes comprehension, arithmetic, conversation memory, code reading and repair, JSON, SQL, a short explanation, and one prompt each in German, Spanish, French, Chinese, and Japanese. The longer prompt contains 2,032 tokens.
The image tests cover blue-circle counting, a shape's relative position, printed
text (MEET AT 4 PM), and a labeled bar chart. Final replies passed their declared
rules and a semantic/coherence review. The generated SQL also ran on an isolated
in-memory fixture.
The run used a debug build, temperature 0, top-k 0, top-p 1, repetition penalty 1, effort 0, a 512-token generation limit, and an 8,192-token total context budget. Timings include hidden reasoning. These selected cases are not a standard benchmark, a general intelligibility guarantee, or evidence of broad multilingual parity. The later 512-position comparison below measures likelihoods against the original checkpoint.
Earlier targeted validation passed 20 CPU exporter tests, four real source-sample conversion tests, nine configuration/CLI argument tests, three small-reference tests, four full-weight runtime tests, and two real CLI tests. The small CPU reference matches exactly. Full-weight top-20 scores had 1.29% normalized RMS drift and the same top token across the tested Python/Swift MLX versions. The exporter tests check NVFP4/MXFP8 decoding against MLX's native dequantizers.
To rerun the acceptance corpus after building tests and the debug metallib:
INKLING2_MODEL_DIR=../Inkling-2-Mini-MLX-4bit \
swift test --filter E2EInkling2QualityTests --disable-sandbox
Local action proposals
The merged runtime includes a local decision example
and architecture/image examples.
The example asks for answer, summarize, describe_image, or clarify, then
validates JSON, allowed actions and required input. Invalid output falls back
to clarify. It executes no action. The backend generates free text; native
constrained JSON decoding and tool-call parsing are not implemented.
The separate eight-case action-selection run used INT5. This bundle's own 25-case acceptance run is recorded above.
Measured MLX comparison
On an Apple M5 Pro with 48 GiB unified memory, the fixed text workload used 128 prompt tokens, 64 decode tokens, one warmup and three measured trials. EOS was ignored to keep the work fixed. Values are medians from separate runs on the same shared development Mac.
| Model/runtime | Decode tokens/s | Prefill tokens/s | Peak physical footprint, GB | Peak RSS, GB |
|---|---|---|---|---|
| Original checkpoint, pinned MLX-VLM | 23.80 | 360.22 | 24.12 | 4.19 |
| Swift MLX INT4 | 26.54 | 359.62 | 16.93 | 6.76 |
| Swift MLX INT5 | 26.40 | 337.04 | 19.99 | 10.74 |
GB is decimal. Footprint includes GPU allocations and peaks during loading, warmup and inference. RSS overlaps footprint; do not add them. These are workload-specific observations, not minimum-RAM requirements. The original checkpoint uses native NVFP4 experts in layers 0–19 and MXFP8 in 20–23. The exports use affine INT4/INT5 experts and INT8 attention/vocabulary weights, so both runtime and weight representation change in this comparison.
A separate likelihood check used identical histories from four selected WikiText-2 paragraphs: 32 context tokens and 128 scored positions each.
| Model | Perplexity on 512 selected positions | Correct actual next tokens | Top-prediction agreement with original |
|---|---|---|---|
| Original checkpoint | 9.111 | 280/512 | Reference |
| Swift MLX INT4 | 9.153 | 274/512 | 474/512 |
| Swift MLX INT5 | 9.172 | 277/512 | 483/512 |
Mean KL(original || export) was 0.01775 nats per position for INT4 and 0.00853 for INT5. This small sample does not establish a general quality ranking or full-corpus perplexity. The machine-readable comparison records source revisions, runtime versions, methods and measured ranges.
Limits
The output limit includes hidden reasoning and framing. Even effort 0 can produce reasoning before answer text, so a short limit may produce an empty visible reply. The runtime streams final text and suppresses structural markers.
The default total context budget is 8,192 tokens and the default per-image budget is 1,024 merged patches. Runtime memory exceeds on-disk tensor size. Larger contexts need separate memory/quality testing. Serialize requests on one model instance. This release supports text and still images; native tool-call parsing, audio/video input, and DSpark speculative decoding are not implemented.
Conversion provenance and license
The original release source patch and
source/base.json retain the original pre-merge snapshot
against commit acc12681e84cbeab885130fab740a8e3db95a5f1. The recipe above uses
the merged implementation, including the local action-selection example.
The source mixes NVFP4 and MXFP8 expert weights. This export decodes their source scales and re-quantizes experts to affine INT4. It changes weight representation and does not reproduce source activation quantization.
See export_config.json, source_config.json, source_quant_config.json, and release_manifest.json for conversion settings and hashes. The original generated export card is retained as export_README.md. The source model card is retained as source_README.md.
The source license is Apache 2.0. Read the upstream model card and limitations and Model Acceptable Use Policy.
- Downloads last month
- 285
4-bit
Model tree for aufklarer/Inkling-2-Mini-MLX-4bit
Base model
thinkingmachines/Inkling-2-Mini