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"
Card: match Swift MLX card format, Apache 2.0
Browse files123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869701 unmodified line7273747576777819 unmodified lines989910010110210310434 unmodified lines139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191---license: otherlicense_name: swift-open-license-1.0license_link: https://huggingface.co/ukisai/Swift-Inkling-2-Mini/blob/main/LICENSEbase_model: ukisai/Swift-Inkling-2-Minibase_model_relation: quantizedquantized_by: ukisailibrary_name: mlx-lmpipeline_tag: image-text-to-textlanguage:- entags:- mlx- apple-silicon- inkling- looped-transformer- mixture-of-experts- efficient-thinking- reasoning- token-efficient- swift---<div align="center"><a href="https://ukisai.com"><img src="ukisai-banner.png" alt="UkisAI" style="width:100%;max-width:100%;height:auto;display:block;margin-bottom:0.6em;" /></a><div style="display:flex;justify-content:center;gap:0.6em;margin-bottom:1em;"><a href="https://ukisai.com"><strong>Website</strong></a> • <a href="https://huggingface.co/ukisai/Swift-Inkling-2-Mini"><strong>Source model</strong></a> • <a href="https://huggingface.co/ukisai/Swift-Inkling-2-Mini/blob/main/LICENSE"><strong>License</strong></a></div></div># Swift Inkling 2 Mini MLX BF16Swift Inkling 2 Mini MLX BF16 is an Apple Silicon MLX distribution of [Swift Inkling 2 Mini](https://huggingface.co/ukisai/Swift-Inkling-2-Mini), UkisAI's reasoning-efficient derivative of [Inkling 2 Mini](https://huggingface.co/thinkingmachines/Inkling-2-Mini). It is designed for local text and image understanding, coding, agentic workflows, and long-context reasoning workloads on supported Apple Silicon systems.## OverviewSwift Inkling 2 Mini is a multimodal autoregressive looped transformer with a sparse mixture-of-experts feed-forward network. The source model has 24 physical decoder layers; the middle 12 layers are executed three times per token, giving 48 layer visits. It routes each token to 8 of 128 experts, accepts text and image inputs, and supports long-context reasoning. The post-training used to create Swift Inkling 2 Mini reduces unnecessary thinking tokens while retaining near-source benchmark performance.This distribution packages the model for MLX-LM. It includes the architecture implementation, tokenizer, chat template, vision processor helper, and model configuration required to load the checkpoint without modifying the installed MLX-LM package.## Release details| Property | Value ||---|---|| Distribution type | MLX-LM model package || Source model | [Swift Inkling 2 Mini](https://huggingface.co/ukisai/Swift-Inkling-2-Mini) || Architecture | `Inkling2LoopForConditionalGeneration` || Input modalities | Text and images || Output modality | Text || Maximum source context | 1,048,576 tokens || Repository size | 19.6 GB || Non-expert precision | BF16 || Effective precision | no additional affine quantization of non-expert weights || Recommended runtime | MLX-LM 0.32.2 or later || Recommended hardware | Apple Silicon with 32 GB unified memory or more |## QuantizationNon-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 BF16 non-expert treatment is the highest-fidelity non-expert precision in this MLX release.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.## Installation```bashpip install -U "mlx-lm>=0.32.2" pillow1 unmodified line`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```pythonfrom mlx_lm.generate import stream_generate19 unmodified linesSupported reasoning-effort values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Sampling parameters may be adjusted for a specific workload.## Image inputThe repository includes `inkling2_processor.py`, which expands the Inkling image token into the number of tokens required by the vision encoder.34 unmodified linesprint(response.text, end="", flush=True)```## Intended useThis distribution is intended for local inference and deployment on Apple Silicon, including:- coding assistance and repository-oriented reasoning;- agentic workflows and tool-use prototyping;- document, diagram, screenshot, and general image understanding;- long-context analysis within available memory; and- interactive assistants where controllable reasoning effort is useful.## Limitations and responsible use- Quantization can introduce numerical deviations relative to the source checkpoint. No MLX-specific benchmark suite was rerun for this release; evaluate the selected precision on representative tasks before deployment.- The model can produce incorrect, incomplete, or confidently stated outputs. Verify generated code, factual claims, and tool calls before taking consequential actions.- Do not use the model as the sole decision-making authority in medical, legal, safety-critical, financial, or other high-stakes contexts.- Audio input is not supported.- Practical context length is bounded by available unified memory and runtime configuration.- The model inherits the capabilities and limitations described in the source model card.## Runtime compatibilityThe package is self-contained and uses MLX-LM's `model_file` mechanism. It has been load-validated with MLX-LM 0.32.2. Use an MLX-LM release that supports remote model files and the Inkling 2 model-file hook. Apple Silicon GPU execution is required for the native NVFP4/MXFP8 expert path; a CPU-only environment is not a supported inference target.## FilesThe release includes model weights, `config.json`, `inkling2_loop.py`, `inkling2_processor.py`, tokenizer files, the chat template, image processor metadata, generation configuration, license, and notice. The model weight index describes the sharded MLX safetensors files.## License and attributionThis is a quantized distribution of Swift Inkling 2 Mini. UkisAI's contribution remains under the [Swift Open License v1.0](https://huggingface.co/ukisai/Swift-Inkling-2-Mini/blob/main/LICENSE). Use of this distribution must also comply with the source model's license terms. The bundled Inkling MLX architecture and processor helper are based on the upstream MLX-LM Inkling 2 implementation.See [LICENSE](LICENSE) and [NOTICE](NOTICE) for complete terms and attribution.## Citation```bibtex@misc{swift-inkling-2-mini-mlx,title = {Swift Inkling 2 Mini MLX BF16},author = {UkisAI},year = {2026},url = {https://huggingface.co/ukisai/Swift-Inkling-2-Mini-MLX-bf16}}@misc{swift-inkling-2-mini,title = {Swift Inkling 2 Mini},author = {UkisAI},year = {2026},url = {https://huggingface.co/ukisai/Swift-Inkling-2-Mini}}```12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576771 unmodified line7980818283848519 unmodified lines10510610710810911011134 unmodified lines146147148149150151152153154155156157158159160161162163164165166167168169170---license: apache-2.0license_link: https://huggingface.co/ukisai/Swift-Inkling-2-Mini-MLX-bf16/blob/main/LICENSEbase_model: ukisai/Swift-Inkling-2-Minibase_model_relation: quantizedlibrary_name: mlxpipeline_tag: image-text-to-texttags:- mlx- bf16- inkling---<div align="center"><a href="https://ukisai.com"><img src="ukisai-banner.png" alt="UkisAI" style="width:100%;max-width:100%;height:auto;display:block;margin-bottom:0.6em;" /></a><div style="display:flex;justify-content:center;gap:0.6em;margin-bottom:1em;"><a href="https://ukisai.com"><strong>Website</strong></a> • <a href="https://ukisai.com/products/swift"><strong>Learn more</strong></a> • <a href="https://huggingface.co/ukisai/Swift-Inkling-2-Mini"><strong>Safetensors</strong></a> • <a href="https://huggingface.co/ukisai/Swift-Inkling-2-Mini-GGUF"><strong>GGUF</strong></a> • <a href="https://huggingface.co/ukisai/Swift-Inkling-2-GSQ-RCO-GGUF"><strong>GSQ-RCO GGUF</strong></a> • <a href="#evaluation"><strong>Evaluation</strong></a> • <a href="#license-and-access"><strong>License</strong></a></div></div># Swift Inkling 2 Mini — BF16 MLX**Apple MLX BF16.** This is Swift Inkling 2 Mini in native MLX format, with BF16 non-expert weights.Swift Inkling 2 Mini uses **56.6% fewer thinking tokens** while maintaining near-identical performance(**<1% loss**) and as a result getting a **x1.86 speed-up** on several tasks.<video controls autoplay muted loop playsinline style="width:100%;max-width:100%;height:auto;display:block;border-radius:12px;margin:0.8em 0 1.4em;" src="https://huggingface.co/ukisai/Swift-Inkling-2-Mini/resolve/main/swift-inkling-2-demo.mp4"></video><p align="center" style="font-size:13px;color:#8C94A8;margin:-0.6em 0 1.4em;">The prompt is a sample from LiveCodeBench v6</p>## Download the complete modelDownload the **whole repository from its root**:```bashhf 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](https://huggingface.co/ukisai/Swift-Inkling-2-Mini-MLX-bf16/resolve/main/model-00001-of-00004.safetensors?download=true) | 5,333,707,043 bytes || [model-00002-of-00004.safetensors](https://huggingface.co/ukisai/Swift-Inkling-2-Mini-MLX-bf16/resolve/main/model-00002-of-00004.safetensors?download=true) | 5,084,149,934 bytes || [model-00003-of-00004.safetensors](https://huggingface.co/ukisai/Swift-Inkling-2-Mini-MLX-bf16/resolve/main/model-00003-of-00004.safetensors?download=true) | 5,360,338,436 bytes || [model-00004-of-00004.safetensors](https://huggingface.co/ukisai/Swift-Inkling-2-Mini-MLX-bf16/resolve/main/model-00004-of-00004.safetensors?download=true) | 3,790,299,914 bytes |You also need the root config, index, tokenizer and model code files; the command abovedownloads them together.## Source and quantizationThe conversion used [Swift Inkling 2 Mini](https://huggingface.co/ukisai/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.## EvaluationSee the [Swift Inkling 2 Mini source model card](https://huggingface.co/ukisai/Swift-Inkling-2-Mini#benchmarks)for the source model's evaluations and methodology. Those results were not independentlyre-run on this MLX quantization.## Validation and useThe 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.```bashpip install -U "mlx-lm>=0.32.2" pillow1 unmodified line`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```pythonfrom mlx_lm.generate import stream_generate19 unmodified linesSupported reasoning-effort values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Sampling parameters may be adjusted for a specific workload.### Image inputThe repository includes `inkling2_processor.py`, which expands the Inkling image token into the number of tokens required by the vision encoder.34 unmodified linesprint(response.text, end="", flush=True)```## License and accessSwift Inkling 2 Mini is a derivative of [Inkling 2 Mini](https://huggingface.co/thinkingmachines/Inkling-2-Mini), and both are licensed under the[Apache License 2.0](https://huggingface.co/ukisai/Swift-Inkling-2-Mini-MLX-bf16/blob/main/LICENSE). See [NOTICE](https://huggingface.co/ukisai/Swift-Inkling-2-Mini-MLX-bf16/blob/main/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~~~bibtex@misc{swift-inkling-2-mini,title = {Swift Inkling 2 Mini},author = {UkisAI},year = {2026},url = {https://huggingface.co/ukisai/Swift-Inkling-2-Mini}}~~~## AcknowledgementsWe acknowledge [Amazon Web Services](https://aws.amazon.com/) and[Google Cloud](https://cloud.google.com/) for providing thecompute for Swift Inkling 2 Mini's development, training, and evaluation.
README.md+59-80