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
Open SAEs and a steering playground for Inkling 2 Mini
Hello,
I've trained sparse autoencoders (SAEs) for Inkling 2 Mini and wanted to share them in case they're useful to anyone working with the model.
Contents
- SAEs: six layers (3, 8, 11, 14, 17 and 21), each with 32,768 features and 32 active per token. The looped layers (6–17) run three times per token, so their SAEs encode each pass separately.
https://huggingface.co/mm1m1/inkling-2-mini-saes - A steering playground (Space): load any feature and see the text where it fires most strongly. You can steer or ablate it and compare the model's replies side by side, or run auto-interp with your own API key to get an explanation and a score.
https://huggingface.co/spaces/mm1m1/inkling-2-mini-steer-lab - Shared explanations: a public dataset of the explanations visitors choose to share, which you can search and browse in the Space.
https://huggingface.co/datasets/mm1m1/inkling-2-mini-sae-explanations
Caveats
This is an early research preview. The model card reports where these SAEs fall short:
- the faithfulness results: layer 14 misses my bar and layer 21 is borderline;
- the layers where steering is weak;
- the fact that individual features only partly reproduce across training runs.
Please read the Limitations section before building on them.
Thank you to Thinking Machines for the cool model.
Thank you for sharing these — the looped layers make Inkling a genuinely interesting target for this, and encoding each pass separately is a thoughtful touch.
I read the repo's files firsthand before trying anything: the config matches the announcement exactly (layers 3, 8, 11, 14, 17 and 21; 32,768 features; k = 32; the base model pinned to a specific revision), and all six SAE files are served at 0.563 GB each, alongside both feature indexes — 29 weight files, 5.6 GB in total. One small find while reading: there is also a KL-tuned layer-21 variant (inkling2mini_L21_out_k32_32k_kl.safetensors) that the announcement does not mention — worth a line in the card, since layer 21 is one of the two you flag as borderline.
The playground, linking a feature straight to the text where it fires most strongly with steering beside it, is exactly the shape that makes SAEs easy to explore. Looking forward to the shared explanations growing.