Image-Text-to-Text
MLX
Safetensors
English
multilingual
inkling2_loop
jang
jangh
quantized
apple-silicon
Mixture of Experts
looped
reasoning
thinking
agent
tool-use
coding
vision
speculative-decoding
inkling
conversational
Instructions to use OsaurusAI/Inkling-2-Mini-JANGH2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use OsaurusAI/Inkling-2-Mini-JANGH2 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("OsaurusAI/Inkling-2-Mini-JANGH2") config = load_config("OsaurusAI/Inkling-2-Mini-JANGH2") # 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 OsaurusAI/Inkling-2-Mini-JANGH2 with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "OsaurusAI/Inkling-2-Mini-JANGH2"
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": "OsaurusAI/Inkling-2-Mini-JANGH2" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent
How to use OsaurusAI/Inkling-2-Mini-JANGH2 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 "OsaurusAI/Inkling-2-Mini-JANGH2"
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 OsaurusAI/Inkling-2-Mini-JANGH2
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use OsaurusAI/Inkling-2-Mini-JANGH2 with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "OsaurusAI/Inkling-2-Mini-JANGH2"
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 "OsaurusAI/Inkling-2-Mini-JANGH2" \ --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"
|
Download README.md from OsaurusAI/Inkling-2-Mini-JANGH2: direct link, hf CLI and curl.
- Browser
- Download file 8.36 kB
-
https://huggingface.co/OsaurusAI/Inkling-2-Mini-JANGH2/resolve/main/README.md
- Command line
-
hf download hf://OsaurusAI/Inkling-2-Mini-JANGH2/README.md
-
curl -L -o README.md https://huggingface.co/OsaurusAI/Inkling-2-Mini-JANGH2/resolve/main/README.md
8.36 kB
| language: | |
| - en | |
| - multilingual | |
| library_name: mlx | |
| license: apache-2.0 | |
| pipeline_tag: image-text-to-text | |
| base_model: thinkingmachines/Inkling-2-Mini | |
| base_model_relation: quantized | |
| tags: | |
| - mlx | |
| - jang | |
| - jangh | |
| - quantized | |
| - apple-silicon | |
| - moe | |
| - looped | |
| - reasoning | |
| - thinking | |
| - agent | |
| - tool-use | |
| - coding | |
| - vision | |
| - speculative-decoding | |
| - inkling | |
| <p align="center"> | |
| <a href="https://osaurus.ai"><img src="./osaurus-x-banner.png" alt="Osaurus AI"></a> | |
| </p> | |
| **Runtime: [Osaurus](https://osaurus.ai) 1.0.11 or newer.** | |
| # OsaurusAI/Inkling-2-Mini-JANGH2 | |
| **Inkling-2-Mini in 10.2 GB, with 91.3% top-1 agreement with the original release.** The original checkpoint is | |
| 20.2 GB; this bundle is half that size. | |
| This is a JANGH bundle of [thinkingmachines/Inkling-2-Mini](https://huggingface.co/thinkingmachines/Inkling-2-Mini): a | |
| 26.4B-parameter multimodal Mixture-of-Experts model with 3.4B active parameters. It has 24 decoder layers; the middle 12 | |
| run three times with shared weights, so every token makes 48 layer passes. Each token is routed to 8 of 128 experts per | |
| layer. Attention mixes sliding-window (1,024 tokens) and full layers. | |
| - **Routed experts (24.5B of the 26.4B parameters):** JANGH, our Hadamard-32 codebook format with one fp16 scale per | |
| output row. Every expert projection is GPTQ-rounded on Hessians captured from all three passes of the looped layers. | |
| The looped layers, which run three times per token, get 3 bits where they matter most; the other layers get 2 bits. | |
| The experts average 2.34 bits per weight. | |
| - **Attention projections, embeddings and lm_head:** affine 8-bit (group size 64). | |
| - **Router, norms, attention sinks, loop message gates, short convolutions:** unchanged (fp32 / BF16 as released). | |
| - **Vision encoder and the model's own drafter:** included unchanged (BF16). | |
| - **Size:** 10.18 GB of model shards: 7.16 GB experts, 1.75 GB other text weights, 0.64 GB vision encoder, 0.64 GB | |
| drafter. The text model is 2.73 bits per weight. | |
| ## Quality vs the original model | |
| The test set is **312,022 positions in 243 held-out conversations**, scored against the original release (its own NVFP4 / | |
| MXFP8 experts, full-precision activations) with top-128 KL. Most of the conversations are Inkling-2-Mini's own answers, | |
| generated at every reasoning effort, and only the model's generated tokens are scored. None of these conversations were | |
| used for calibration. | |
| | | median KL ↓ | mean KL ↓ | p99 KL ↓ | top-1 ↑ | top-5 contains the original's top-1 ↑ | | |
| |---|---|---|---|---|---| | |
| | original in BF16 on this runtime (measurement floor) | 0.00042 | 0.0017 | 0.019 | 98.45% | 100.00% | | |
| | **Inkling-2-Mini-JANGH2 (10.2 GB)** | **0.0192** | **0.0539** | **0.496** | **91.31%** | **99.73%** | | |
| Change in negative log-likelihood of the held-out tokens: **+0.052** (floor: +0.001). | |
| **By domain** (median KL · top-1): | |
| | domain | positions | **JANGH2** | floor | | |
| |---|---|---|---| | |
| | terminal | 4,985 | **0.0020 · 96.3%** | 0.00006 · 99.2% | | |
| | reasoning / math | 47,390 | **0.0023 · 95.0%** | 0.00003 · 99.3% | | |
| | coding | 21,821 | **0.0058 · 93.7%** | 0.00015 · 98.8% | | |
| | long context | 4,120 | **0.0071 · 93.5%** | 0.00033 · 98.2% | | |
| | science | 30,733 | **0.0113 · 91.9%** | 0.00021 · 98.7% | | |
| | agentic tool loops | 13,474 | **0.0127 · 92.0%** | 0.00039 · 98.6% | | |
| | multilingual | 52,199 | **0.0208 · 90.5%** | 0.00041 · 98.4% | | |
| | encyclopedic | 61,490 | **0.0268 · 90.2%** | 0.00074 · 98.1% | | |
| | creative writing | 75,810 | **0.0334 · 89.0%** | 0.00070 · 98.0% | | |
| Terminal, reasoning and coding hold up best. Creative writing and encyclopedic text lose the most. | |
| **By reasoning effort** (median KL · top-1): max 0.0118 · 93.0%, xhigh 0.0165 · 92.1%, high 0.0132 · 92.5%, | |
| medium 0.0276 · 89.4%, low 0.0161 · 89.9%, minimal 0.0216 · 90.3%, none 0.0190 · 90.6%. | |
| ## Turn structure, tool calls and reasoning | |
| Scored at every point in the held-out conversations where the model makes a structural decision: | |
| - **Opening a segment:** the bundle's top choice matches the original model's actual choice at all **194** reasoning | |
| openings, all **179** answer openings and all **8** tool-call openings (the original: also 100%). | |
| - **End of turn:** top choice matches at all **182** turn ends. | |
| - **Closing reasoning:** at the **184** points where the model closed its reasoning, the bundle's top choice is the | |
| close at 72.8% (the original model's own top choice: 77.7%; these conversations were sampled at temperature 1.0, so | |
| not every close is the most likely token). | |
| **Generation check:** 13 fixed prompts with known answers (time and arithmetic word problems, primes, divisors, | |
| probability, two coding tasks, a tool call and an answer from a tool result, Korean, a poem), across reasoning efforts | |
| none to max. Greedy: 13/13 correct and closed. Sampled at temperature 1.0 with three seeds: 39/39. The original model | |
| scores the same on both. | |
| ## Serving contract | |
| - **Reasoning:** Inkling-2-Mini always reasons before it answers. The chat template adds no generation prompt: the model | |
| opens its own turn with a reasoning segment, then the answer or a tool call. Reasoning effort is a template setting | |
| (`reasoning_effort`: none, minimal, low, medium, high, xhigh, max, or a number from 0 to 0.99; default 0.9) that the | |
| template renders as one system message. | |
| - **Tool calls:** JSON (`{"name": ..., "args": {...}}`) in the model's own tool-call segment; tool results go back as | |
| tool messages. | |
| - **Sampling:** temperature 1.0, no top-p or top-k (`generation_config.json`), the model's distribution unchanged. | |
| - **EOS:** `<|content_model_end_sampling|>`. | |
| - **Context:** up to 1M tokens per the original card. Sliding-window layers keep at most 1,024 tokens of KV. Only the | |
| full-attention layers keep a KV cache that grows with the context: layers 5 and 23, and layers 11 and 17 once per | |
| loop pass (6 caches). | |
| - **Images:** the vision encoder is included unchanged; image quality was not separately measured for this bundle. | |
| ## What's in the bundle | |
| All bit widths below are from the bundle's own `config.json` and the shard bytes. | |
| - Routed experts (gate / up / down, 128 per layer): JANGH, Hadamard-32 rotation, odd-cubic codebook, fp16 row scales. | |
| - gate/up 3-bit on layers 9, 10, 11, 13, 14, 15; 2-bit on the other 18 layers. | |
| - down 3-bit on the looped layers 6-17; 2-bit on layers 0-5 and 18-23. | |
| - q / k / v / o / attention-gate / relative-position projections, embeddings and lm_head: affine 8-bit, group size 64. | |
| - Router and its selection bias fp32; norms, attention sinks, depth queries, loop message gates and short convolutions | |
| as released. | |
| - `vision_tower.*`: the vision encoder (BF16). `mtp_drafter.*`: the model's own speculative-decoding drafter (BF16). | |
| - `jang_config.json` records the format, sources, the scale correction and the evaluation summary. `SHA256SUMS` covers | |
| every file. | |
| ## Build details | |
| - **Calibration:** 5.57M tokens. Most of it is Inkling-2-Mini's own reasoning and answers to 2,825 prompts (agentic tool | |
| loops, coding, reasoning/math, terminal, long context, science, multilingual, encyclopedic, creative), generated at | |
| every reasoning effort, plus raw text. Held-out conversations were split off first. | |
| - **Hessians:** per-expert input statistics from the original model running in its own NVFP4 / MXFP8 encoding, kept | |
| separately for each of the three passes of the looped layers and pooled for rounding. | |
| - **Bit allocation:** 2 or 3 bits chosen per layer and projection at a fixed size, by measured output error on held-out | |
| rows, with the looped layers weighted by their three passes. At the same size it beat the uniform split (2-bit gate/up, | |
| 3-bit down) by 11% on that error. | |
| - **Row-scale correction:** each row scale is multiplied by the square root of `<w,w>/<w,q>` (half of the full gain | |
| correction). Compared on the same codes, half correction gave the lowest held-out KL (0.0192, vs 0.0240 without and | |
| 0.0267 with the full correction), the best score in every domain, and the cleanest generation. | |
| - **For reference:** plain rounding at the same size and format (no calibration) scores median KL 0.069 and top-1 85.4% | |
| on the same test set. | |
| - **Verification:** the bundle's runtime declaration passes the format contract for all 24 expert stacks, and the | |
| runtime's own decoder reproduces every expert tensor bit-for-bit. | |