Run this model with HF Jobs
Run thinkingmachines/Inkling-2-Mini 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 and TRL to fine-tune https://huggingface.co/thinkingmachines/Inkling-2-Mini. 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/thinkingmachines/Inkling-2-Mini 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/thinkingmachines/Inkling-2-Mini. 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.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/thinkingmachines/Inkling-2-Mini. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use thinkingmachines/Inkling-2-Mini with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use thinkingmachines/Inkling-2-Mini with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="thinkingmachines/Inkling-2-Mini") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("thinkingmachines/Inkling-2-Mini") model = AutoModelForMultimodalLM.from_pretrained("thinkingmachines/Inkling-2-Mini", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- HuggingChat
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use thinkingmachines/Inkling-2-Mini with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "thinkingmachines/Inkling-2-Mini" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "thinkingmachines/Inkling-2-Mini", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/thinkingmachines/Inkling-2-Mini
- SGLang
How to use thinkingmachines/Inkling-2-Mini with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "thinkingmachines/Inkling-2-Mini" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "thinkingmachines/Inkling-2-Mini", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "thinkingmachines/Inkling-2-Mini" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "thinkingmachines/Inkling-2-Mini", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use thinkingmachines/Inkling-2-Mini with Docker Model Runner:
docker model run hf.co/thinkingmachines/Inkling-2-Mini
Running Inkling 2 Mini on RTX 3090s (1 or 2 GPUs): vLLM recipe, 262K context, ~300 tok/s
The official vllm/vllm-openai:inkling-2-mini image only supports Hopper/Blackwell. I got the shipped checkpoint running on consumer Ampere with small file overlays mounted over that image, nothing rebuilt. The recipe quantizes some layers to int8 at load time and uses the model’s DSpark drafter.
Repo (launchers, patches with diffs, test suite, raw results): https://github.com/lulakien/inkling2-mini-3090-recipe
LocalMaxxing results: 1× RTX 3090, 128K · 2× RTX 3090, 262K
Update: 262K context on one RTX 3090, 512K with BF16 KV on two.
| 1x RTX 3090 (128K) | 1x RTX 3090 (262K) | 2x RTX 3090 (262K default) | 2x RTX 3090 (512K) | |
|---|---|---|---|---|
| Context / KV cache | 131,072 / BF16 | 262,144 / FP8 | 262,144 / BF16 | 524,288 / BF16 |
| Decode, code / prose / story (tok/s) | 242 / 130 / 97 | 254 / 126 / 101 | 313 / 166 / 126 | 333 / 171 / 127 |
| Long-prompt check | 128K needle found | 262K needle found | 255K needle found | 8/8 planted facts at 500K |
| MMLU subset (57×20) | 912/1140 | 911/1140 | 911/1140 | 911/1140 |
Decode is batch 1 with DSpark k=7 on separate prompts. The 512K profile’s decode row is at temperature 0.6 (315 tok/s on code at temperature 0). The 500K agent prompt took 167 s cold (~3K input tok/s) and 1.98 s to first token with a cached prefix.
On one card, the 128K profile is faster for long prefills. At 16K it prefills at 5.28K tok/s vs. 4.64K with FP8 KV. The 262K profile can prefill a 254K prompt in about 154 s. On two cards there's also an opt-in 1M FP8 KV profile: it found a needle in a 1.04M-token prompt, which took about 19.5 minutes cold.
Setup: PCIe 4.0 x8/x8, no NVLink or P2P, 280 W cap per card. Tool calling, JSON schema output, streaming and reasoning split all pass; vision works on 2 GPUs (MM=1). Numbers were measured with gpu-unlock active (full-rate BF16 with FP32 accumulation on GeForce). Prefill will be lower without it.
A few things that might help others porting this model:
- Three of the image's custom kernels (
moe_align, the fused embedding,conv_mix) exist only for sm_100 and fail silently on Ampere: no error, just garbage MoE routing. They need Triton/torch fallbacks. - On one GPU, vLLM reserves in-flight room in each of the 12 sliding-window/short-conv caches, and async scheduling doubles it (~2.4 GiB per request). Turning off async scheduling and retaining only the short-conv tail makes more room for the KV cache.
- Even
reasoning_effort: "none"writes a short reasoning block (as the card says), so leave room inmax_tokens.
If you try this on a single 3090 or another Ampere card, I’d love to hear what numbers you get.
dont work
dont work
thanks for trying it! can you share a bit more so i can figure out what's going on?
GPU(s): model, count, VRAM, and whether a monitor/desktop runs on that card (display uses extra VRAM, might have caused the OOM)
the exact command you ran (2gpu.sh / 1gpu.sh, which profile, any env vars you changed)
which checkpoint: the official thinkingmachines/Inkling-2-Mini? (community quants/GGUF won't load with this recipe)
where it stops: image pull, server boot (never prints BOOT_OK), first request errors, or it runs but the output is garbage
the output of this (run from the repo folder while the container is up or right after it fails):
git log --oneline -1; nvidia-smi; docker --version; cat launch/image.env; docker logs --tail 80 inkling2 2>&1
(if you used the 1-GPU launcher the container is called inkling2-1gpu)