Run this model with HF Jobs
Run ukisai/Swift-Inkling-2-Mini-MLX-bf16 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/ukisai/Swift-Inkling-2-Mini-MLX-bf16. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/ukisai/Swift-Inkling-2-Mini-MLX-bf16 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/ukisai/Swift-Inkling-2-Mini-MLX-bf16. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Instructions to use ukisai/Swift-Inkling-2-Mini-MLX-bf16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use ukisai/Swift-Inkling-2-Mini-MLX-bf16 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("ukisai/Swift-Inkling-2-Mini-MLX-bf16") config = load_config("ukisai/Swift-Inkling-2-Mini-MLX-bf16") # 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 ukisai/Swift-Inkling-2-Mini-MLX-bf16 with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "ukisai/Swift-Inkling-2-Mini-MLX-bf16"
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": "ukisai/Swift-Inkling-2-Mini-MLX-bf16" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent
How to use ukisai/Swift-Inkling-2-Mini-MLX-bf16 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 "ukisai/Swift-Inkling-2-Mini-MLX-bf16"
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 ukisai/Swift-Inkling-2-Mini-MLX-bf16
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use ukisai/Swift-Inkling-2-Mini-MLX-bf16 with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "ukisai/Swift-Inkling-2-Mini-MLX-bf16"
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 "ukisai/Swift-Inkling-2-Mini-MLX-bf16" \ --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"
Swift Inkling 2 Mini
Apple MLX BF16. This is Swift Inkling 2 Mini in native MLX format, with BF16 non-expert weights.
Swift Inkling 2 Mini is UkisAI's reasoning-efficient derivative of Inkling 2 Mini, using 58.6% fewer thinking tokens while maintaining near-identical performance (<1% loss) and as a result getting a x2.4 speed-up on several tasks.
The prompt is a sample from LiveCodeBench v6
Training approach
We made Swift Inkling 2 Mini efficient by figuring out which tokens were linked to pathological overthinking and penalizing them without rewarding shorter reasoning length directly. We trained a model with this premise, then used it as the teacher for contextual on-policy distillation, leading to "compressed" token usage while maintaining accuracy.
Swift Inkling 2 Mini produces shorter reasoning traces. In our testing, we also observe fewer overthinking errors (reasoning loops without exit).
Evaluation scope
All results below compare the Inkling 2 Mini base with Swift Inkling 2 Mini. Both models use the same saved evaluation protocols, and all scores are averages over five seeds (0–4) per model.
The main table reports BF16 results. Quantized results are in Quantized models.
Benchmarks
| Benchmark | Score | Mean tokens | Median tokens | |||
|---|---|---|---|---|---|---|
| Base | Swift | Base | Swift | Reduction | Reduction | |
| General reasoning | ||||||
| GPQA-Diamond | 86.67% | 85.45% | 16,571 | 9,455 | ↓ 42.9% | ↓ 56.6% |
| MMLU-Pro | 83.19% | 82.41% | 5,471 | 2,521 | ↓ 53.9% | ↓ 58.6% |
| C-Eval | 82.15% | 84.40% | 3,317 | 1,611 | ↓ 51.4% | ↓ 52.4% |
| IFBench | 76.07% | 73.73% | 5,596 | 2,247 | ↓ 59.8% | ↓ 53.5% |
| Mathematics | ||||||
| AIME 2024–2026 | 99.33% | 97.11% | 16,972 | 10,137 | ↓ 40.3% | ↓ 44.0% |
| HMMT (Nov 2025) | 66.67% | 64.67% | 20,715 | 15,282 | ↓ 26.2% | ↓ 40.1% |
| Multimodal | ||||||
| ERQA | 63.25% | 61.50% | 4,134 | 1,653 | ↓ 60.0% | ↓ 58.6% |
| Coding | ||||||
| LiveCodeBench v6 | 86.41% | 85.99% | 15,990 | 11,140 | ↓ 30.3% | ↓ 33.7% |
| Agentic coding | ||||||
| Terminal-Bench 2.1* | 57.98% | 57.75% | 36,720 | 27,454 | ↓ 25.2% | ↓ 57.0% |
| DeepSWE v1.1* | 28.32% | 36.58% | 80,594 | 49,883 | ↓ 38.1% | ↓ 41.1% |
* Note: Thinking Machines benchmarked Inkling 2 Mini on agent tasks with its full 1M-token context window. We consider that unrealistic for local use, so we ran both models at context sizes most people can actually run: 131,072 tokens for Terminal-Bench 2.1 and 262,144 tokens for DeepSWE v1.1.
How to reproduce
Serving: native mixed precision (BF16 attention, NVFP4/MXFP8 experts) · vLLM (vllm/vllm-openai:inkling-2-mini image) · data-parallel across 2 GPUs · context 262,144 · thinking on (enable_thinking=True, reasoning_effort="max").
Sampling: temperature 1.0 · top_p 0.95 · top_k 20 · min_p 0.0 · no repeat penalty.
Benchmarks: every benchmark averaged over five seeds (0–4) per model, same caps and scorer for base and Swift.
| Benchmark | Runs | Output cap |
|---|---|---|
| GPQA-Diamond | 5 | 100,000 |
| MMLU-Pro | 5 | 100,000 |
| C-Eval | 5 | 16,384 |
| IFBench | 5 | 81,920 |
| AIME 2024–2026 | 5 | 250,000 |
| HMMT Nov 2025 | 5 | 250,000 |
| ERQA | 5 | 100,000 |
| LiveCodeBench v6 | 5 | 100,000 |
| Terminal-Bench 2.1 | 5 per task | agent limit 5 h per task, context 131,072, Harbor 0.20.0 + Terminus 2; thinking tokens per trial (all agent turns) |
| DeepSWE v1.1 | 3 per task | mini-swe-agent 2.4.6, task time limits; thinking tokens per trial (all agent turns) |
Efficiency across reasoning efforts
Swift Inkling 2 Mini was benchmarked, trained and made to be used at "max" reasoning effort. The Swift version of the model at "max" uses 30.1% fewer tokens even when compared to the base model at the default "high" reasoning effort.
Inkling 2 Mini's reasoning effort setting lets users choose how much the model thinks. For Swift Inkling 2 Mini to be useful across these settings, it needs to reduce thinking while keeping accuracy close to the base.
| Reasoning effort | Score | Mean thinking tokens | Median thinking tokens | |||
|---|---|---|---|---|---|---|
| Base | Swift | Base | Swift | Reduction | Reduction | |
| GPQA-Diamond | ||||||
| Max | 86.67% | 85.45% | 16,571 | 9,455 | ↓ 42.9% | ↓ 56.6% |
| High | 86.46% | 84.44% | 13,523 | 6,618 | ↓ 51.1% | ↓ 60.1% |
| Medium | 84.75% | 80.20% | 5,844 | 3,027 | ↓ 48.2% | ↓ 35.1% |
| Low | 79.19% | 76.77% | 1,940 | 1,400 | ↓ 27.8% | ↓ 17.5% |
MTP speculative decoding
The BF16 weights include the base model's MTP head. These results evaluate its acceptance rate on GPQA-Diamond (32 questions), served with llama.cpp.
| Benchmark | Base MTP acceptance |
Swift MTP acceptance |
|---|---|---|
| GPQA-Diamond BF16 GGUF | 48.7% | 49.4% |
Swift keeps the base model's MTP acceptance with the same, unchanged MTP head.
Quantized models
Quantized deployment is the intended use for Swift: lower-memory weights paired with shorter reasoning. The GGUF evaluations below retain token savings on GPQA-Diamond, and Swift reduces output-cap failures by 59–94%.
| Benchmark / quantization | Base accuracy | Swift accuracy | Mean token reduction | Median token reduction |
|---|---|---|---|---|
| GPQA-Diamond GGUF Q4_K_M · completion tokens | 85.45% | 85.15% | ↓ 40.4% | ↓ 55.9% |
| GPQA-Diamond BF16 · thinking tokens | 86.67% | 85.45% | ↓ 42.9% | ↓ 56.6% |
Quantized evaluation settings
Each row compares the same quantized base with and without the Swift post-training. GPQA uses five seeds. Output cap: GPQA 100,000. Truncated answers count as incorrect. Base quantization: a Q4_K_M with the same per-tensor types as Swift's, served with llama.cpp. The BF16 row is the same run as the BF16 table.
How to use
Download the whole repository from its root:
hf download ukisai/Swift-Inkling-2-Mini-MLX-bf16 --local-dir Swift-Inkling-2-Mini-MLX-bf16
The full checkpoint is 19.57 GB and requires all 4 files:
| Weight shard | Size |
|---|---|
| model-00001-of-00004.safetensors | 5,333,707,043 bytes |
| model-00002-of-00004.safetensors | 5,084,149,934 bytes |
| model-00003-of-00004.safetensors | 5,360,338,436 bytes |
| model-00004-of-00004.safetensors | 3,790,299,914 bytes |
You also need the root config, index, tokenizer and model code files; the command above downloads them together.
The package is self-contained and uses MLX-LM's model_file mechanism. It has been load-validated with MLX-LM 0.32.2. Apple Silicon GPU execution is required for the native NVFP4/MXFP8 expert path; a CPU-only environment is not a supported inference target.
pip install -U "mlx-lm>=0.32.2" pillow
trust_remote_code=True is required because inkling2_loop is not registered in the released MLX-LM model registry. The repository ships the implementation through inkling2_loop.py using MLX-LM's model_file hook.
Text generation
from mlx_lm.generate import stream_generate
from mlx_lm.sample_utils import make_sampler
from mlx_lm.utils import load
model, tokenizer = load("ukisai/Swift-Inkling-2-Mini-MLX-bf16", trust_remote_code=True)
messages = [
{"role": "user", "content": "Summarize the trade-offs between CPU and GPU inference."},
]
prompt = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
reasoning_effort="max",
tokenize=False,
)
sampler = make_sampler(temp=1.0, top_p=0.95, top_k=20)
for response in stream_generate(model, tokenizer, prompt, max_tokens=1024, sampler=sampler):
print(response.text, end="", flush=True)
Supported reasoning-effort values are none, minimal, low, medium, high, xhigh, and max. Sampling parameters may be adjusted for a specific workload.
Image input
The repository includes inkling2_processor.py, which expands the Inkling image token into the number of tokens required by the vision encoder.
import json
import os
import sys
import mlx.core as mx
from huggingface_hub import snapshot_download
from mlx_lm.generate import stream_generate
from mlx_lm.sample_utils import make_sampler
from mlx_lm.utils import load
model_path = snapshot_download("ukisai/Swift-Inkling-2-Mini-MLX-bf16")
sys.path.insert(0, model_path)
from inkling2_processor import Processor
model, tokenizer = load(model_path, trust_remote_code=True)
with open(os.path.join(model_path, "config.json")) as file:
config = json.load(file)
processor = Processor.from_config(config)
image = processor.load_image("photo.jpg")
chat_prompt = tokenizer.apply_chat_template(
[{"role": "user", "content": [{"type": "image"}]}],
add_generation_prompt=True,
reasoning_effort="max",
tokenize=False,
)
image_prompt, pixel_values = processor(chat_prompt, images=[image])
prompt_ids = tokenizer.encode(image_prompt, add_special_tokens=False)
input_embeddings = model.embed_inputs(mx.array(prompt_ids), pixel_values=pixel_values)
mx.eval(input_embeddings)
sampler = make_sampler(temp=1.0, top_p=0.95, top_k=20)
for response in stream_generate(
model,
tokenizer,
prompt_ids,
max_tokens=1024,
sampler=sampler,
input_embeddings=input_embeddings,
):
print(response.text, end="", flush=True)
Quantization
The conversion used Swift Inkling 2 Mini. Non-expert tensors are retained in BF16. The routed experts retain the source checkpoint's native NVFP4/MXFP8 representation.
Preserving the native expert representation avoids dequantizing the checkpoint to a 52 GB BF16 intermediate and keeps the release close to the source model's storage format.
The upstream DSpark MTP speculative-draft head is not included in this MLX release. It is not required for normal text or image generation with this package.
The benchmark scores above were measured on the safetensors checkpoint, not on these files.
License and access
Swift Inkling 2 Mini is a derivative of Inkling 2 Mini, and both are licensed under the Apache License 2.0. See NOTICE for the change notice and attribution details. The bundled Inkling MLX architecture and processor helper are based on the upstream MLX-LM Inkling 2 implementation.
Citation
@misc{swift-inkling-2-mini,
title = {Swift Inkling 2 Mini},
author = {UkisAI},
year = {2026},
url = {https://huggingface.co/ukisai/Swift-Inkling-2-Mini}
}
- Downloads last month
- 61
4-bit
