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
Inkling Hasn't Achieved True Adaptive Looping Yet โ Could This Be the Breakthrough That Makes Small Models Competitive?
I've been following Thinking Machines Lab's Inkling-2-Mini, and I think its Looped Transformer architecture is one of the more interesting directions in recent model research.
Inkling-2-Mini uses a fixed 3-pass looping design. By sharing Transformer weights across multiple passes, it increases computational depth without proportionally increasing the number of model parameters.
But I think this is only the beginning.
1. Fixed Looping Isn't Enough. Adaptive Looping Is the Real Opportunity.
Inkling-2-Mini currently uses a fixed number of loops. This means the model performs the same number of passes regardless of whether the task is simple or complex.
A more interesting approach would be Adaptive Looping:
- Simple tasks: 1 pass for fast responses.
- Normal tasks: 2โ3 passes.
- Complex coding tasks: 4โ6 passes.
- Difficult mathematical reasoning and planning: 6โ10 passes.
- Automatically stop when the model reaches a sufficient confidence or reasoning state, or exhausts its compute budget.
The goal is to stop spending the same amount of computation on every task.
2. Adaptive Looping Could Change How We Build Small Models
Traditional Transformers generally improve model capacity by increasing parameter count, network depth, and training compute.
Looped Transformers introduce another possibility:
Decouple parameter count from computational depth through weight sharing.
Consider models with the same 4B parameter budget:
- Standard Transformer: relies on a fixed network depth.
- Looped Transformer: increases computational depth by repeatedly executing shared layers.
- Adaptive Looped Transformer: dynamically allocates computation according to task difficulty.
This could allow 3Bโ8B models to achieve significantly stronger performance on specific reasoning tasks.
3. My Preferred Direction: MoE + Looped Transformer + Adaptive Compute
I believe the most promising architecture could combine three approaches:
- MoE: Improve specialization and knowledge capacity through expert networks.
- Looped Transformer: Increase computational depth through parameter sharing.
- Adaptive Compute: Dynamically determine how much computation each task needs.
An ideal architecture might look like this:
Task Input โ Initial Understanding โ Expert Routing โ Recurrent Reasoning โ Exit Condition Evaluation โ Output.
Simple tasks exit early. Difficult tasks receive additional computation.
4. An Experiment Worth Doing
I'd love to see a fair comparison under identical parameter budgets, training data, inference FLOPs, and memory constraints.
Compare:
- Standard Transformer
- MoE Transformer
- Fixed-loop Looped Transformer
- Adaptive Looped Transformer
- MoE + Adaptive Looped Transformer
Key evaluation metrics:
- Reasoning accuracy
- Coding performance
- Mathematical reasoning
- Time to First Token (TTFT)
- Decode tokens per second
- Average inference cost
- Compute allocation efficiency across different task difficulties
The most important question is whether adaptive looping can deliver better performance under the same total compute budget.
5. My Take
I think Inkling-2-Mini demonstrates that recurrent computation is a promising direction, but fixed looping hasn't fully unlocked its potential.
The real breakthrough won't simply be making models think more times. It will be teaching models when to think more and when to stop.
Perhaps the next generation of small models won't compete primarily on parameter count, but on how much intelligence they can extract from every parameter and every unit of computation.
What do you think?
Could Adaptive Looping become one of the key technologies that finally makes small language models competitive with much larger models?
They released this: https://huggingface.co/thinkingmachines/TML-d24-varloop-research
Which might be more in lines with what you're looking for.
The released this: https://huggingface.co/thinkingmachines/TML-d24-varloop-research
Which might be more in lines with what you're looking for.
But it seems that he hasn't implemented Adaptive Halting: the model decides to exit autonomously
After each iteration of the model, a decision is made whether to continue the computation. For simple problems, the computation might be terminated after the second iteration, while for complex problems, it might be terminated after the fifth iteration.
The released this: https://huggingface.co/thinkingmachines/TML-d24-varloop-research
Which might be more in lines with what you're looking for.
But it seems that he hasn't implemented Adaptive Halting: the model decides to exit autonomously
After each iteration of the model, a decision is made whether to continue the computation. For simple problems, the computation might be terminated after the second iteration, while for complex problems, it might be terminated after the fifth iteration.
For workaround that can be made with decision model to decide number of iteraction before passing the prompt to the varloop model , let call it DIM 'decision in the middle', and based on that it pick the model , one thing is that there is overhead of additional model, the inference itself is fast only the memory footprint, some small decision model perform good.
GLM 5.4 just copied them, they have their own looped transformers. I can see it taking off, even for large models. Its an extremely clever efficiency/performance trick.