Inkling 2 Mini · MLX INT5

Affine MLX weights for native Swift text and still-image generation in speech-swift.

  • Expert weights: INT5, group size 64.
  • Attention and vocabulary matrices: INT8.
  • Vision, routing, normalization, relative-position parameters, loop controllers: source precision.
  • Model tensors: 19,198,967,808 bytes, about 19.2 GB; 40 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 smaller INT4 bundle uses the same runtime. Both variants passed the same 25 fixed acceptance cases.

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-5bit --local-dir Inkling-2-Mini-MLX-5bit

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-5bit --temperature 0 --max-tokens 512

.build/release/speech inkling "Describe this image." \
  --model-dir ../Inkling-2-Mini-MLX-5bit --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-5bit")
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 on a shared development machine, 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 and are not a controlled speed comparison with INT4. 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.

The INT5 bundle also passed three small-reference tests, four full-weight runtime checks, and two real CLI tests. The small FP32 CPU fixture matches exactly; Metal has its separate tight tolerance. Common exporter/configuration coverage includes 20 CPU exporter tests, four real source-sample conversions, and nine configuration/CLI argument tests.

Full-weight BF16 top-20 scores are not bit-exact across the Python and Swift paths. Against Python MLX 0.32.4, normalized RMS drift was 1.30%; against 0.31.1 (matching Swift's embedded core), it was 2.46%. Both references agreed on the top token (4). Maximum absolute drift was 0.704590 and 0.870966, respectively. The full-model guard allows 3% of the checkpoint's score cap of 30 and 2.5% normalized RMS drift, plus exact top-token agreement. Its original INT4-calibrated absolute maximum of 0.6 failed INT5 and was replaced by that cap-relative criterion without changing production inference. See the quality report and recorded references.

To rerun the acceptance corpus after building tests and the debug metallib:

INKLING2_MODEL_DIR=../Inkling-2-Mini-MLX-5bit \
  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.

All eight fixed action-selection cases passed on this INT5 bundle. They cover two questions, a summary, an image, missing image input, ambiguity, an unsupported action and a request to override the schema. These are selected cases, not proof of general routing accuracy or prompt-injection resistance. validated means schema/input compliance, not calibrated confidence or authorization.

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 INT5, directly from the original source. It is not a re-quantization of the INT4 bundle. 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
277
Safetensors
Model size
26B params
Tensor type
U32
·
BF16
·
F32
·
MLX
Hardware compatibility
Log In to add your hardware

5-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for aufklarer/Inkling-2-Mini-MLX-5bit

Quantized
(317)
this model