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
Dinosaur problem
This like other models is filled with information that some of us might not need like various different types of dinosaurs.
Is there a way we can increase the reasoning capabilities and reduce this useless information - to keep the model size so that we can continue to run it locally.
This like other models is filled with information that some of us might not need like various different types of dinosaurs.
Is there a way we can increase the reasoning capabilities and reduce this useless information - to keep the model size so that we can continue to run it locally.
Information about the species that have inhabited our planet and those that live today is exceptionally important, as it is fundamental knowledge about the world. It is far more important than coding silly programs that will become unnecessary tomorrow.
Any model trained to code machines is incapable of programming people in natural language, which is the highest form of programming. You like to vibecode because you don’t know programming properly. But this is not the problem of the model’s creators.
I agree, in fact in my opinion the models should not have any information and all weights should be used exclusively for reasoning, and the information should be included in the system message, e.g. if model needs to output python, it should have python documentation in the system message, or it should have a search tool
I agree, in fact in my opinion the models should not have any information and all weights should be used exclusively for reasoning, and the information should be included in the system message, e.g. if model needs to output python, it should have python documentation in the system message, or it should have a search tool
Well, try using minicpm or spark-x2.6, and you’ll see what models without any knowledge of the world are capable of. P.S. They can’t even find the config of any utility on the host.
I agree, in fact in my opinion the models should not have any information and all weights should be used exclusively for reasoning, and the information should be included in the system message, e.g. if model needs to output python, it should have python documentation in the system message, or it should have a search tool
Well, try using minicpm or spark-x2.6, and you’ll see what models without any knowledge of the world are capable of. P.S. They can’t even find the config of any utility on the host.
did you include the full documentation for your OS in their system message?
I agree, in fact in my opinion the models should not have any information and all weights should be used exclusively for reasoning, and the information should be included in the system message, e.g. if model needs to output python, it should have python documentation in the system message, or it should have a search tool
Well, try using minicpm or spark-x2.6, and you’ll see what models without any knowledge of the world are capable of. P.S. They can’t even find the config of any utility on the host.
did you include the full documentation for your OS in their system message?
And what will it give? Will the model somehow magically figure out the paths to all the configs of all the utilities? That even sounds stupid - so for that, I also have to specify every utility on every SSH host, constantly monitor and update it, no way. And without that, they just endlessly read the same paths, get confused by them, and get stuck in a loop. They don’t even understand where the configs should be located by default. There’s nothing to even talk about with them; they know nothing and can’t even mention anything themselves - they can only find a summary of the given question, which won’t be of any use, as it will just be a brief description. it's such a misconception to think that a model without knowledge of anything will be able to write something even with full documentation about the language, she has never seen examples of projects in this language, working functions and algorithms to even remotely come up with something, knowledge of function conflicts and just the logic of terminal commands, she doesn't even she will understand a simple request in the "create an llm proxy" format, because she won't even know what it is, and you can't even expect her to think through the functions, and her recognition of the mechanics of the language and commands will be hitting the wall every time she calls the tool and starts building code, if she even knows what it is. So this will happen over and over again in each session, which will require a huge context, making the model slow and consuming as much memory as it does, unlike a model that knows almost everything about the world. The task execution speed will be 100 times slower, whereas a normal model will just need to execute five scripts one at a time.
I agree, in fact in my opinion the models should not have any information and all weights should be used exclusively for reasoning, and the information should be included in the system message, e.g. if model needs to output python, it should have python documentation in the system message, or it should have a search tool
you're brilliant sir
I agree, in fact in my opinion the models should not have any information and all weights should be used exclusively for reasoning, and the information should be included in the system message, e.g. if model needs to output python, it should have python documentation in the system message, or it should have a search tool
Well, try using minicpm or spark-x2.6, and you’ll see what models without any knowledge of the world are capable of. P.S. They can’t even find the config of any utility on the host.
did you include the full documentation for your OS in their system message?
And what will it give? Will the model somehow magically figure out the paths to all the configs of all the utilities? That even sounds stupid - so for that, I also have to specify every utility on every SSH host, constantly monitor and update it, no way. And without that, they just endlessly read the same paths, get confused by them, and get stuck in a loop. They don’t even understand where the configs should be located by default. There’s nothing to even talk about with them; they know nothing and can’t even mention anything themselves - they can only find a summary of the given question, which won’t be of any use, as it will just be a brief description. it's such a misconception to think that a model without knowledge of anything will be able to write something even with full documentation about the language, she has never seen examples of projects in this language, working functions and algorithms to even remotely come up with something, knowledge of function conflicts and just the logic of terminal commands, she doesn't even she will understand a simple request in the "create an llm proxy" format, because she won't even know what it is, and you can't even expect her to think through the functions, and her recognition of the mechanics of the language and commands will be hitting the wall every time she calls the tool and starts building code, if she even knows what it is. So this will happen over and over again in each session, which will require a huge context, making the model slow and consuming as much memory as it does, unlike a model that knows almost everything about the world. The task execution speed will be 100 times slower, whereas a normal model will just need to execute five scripts one at a time.
you shouldnt use a small model for OS work cause it can delete all files because it lacks brain cells, but for other types of work it will be good
I agree, in fact in my opinion the models should not have any information and all weights should be used exclusively for reasoning, and the information should be included in the system message, e.g. if model needs to output python, it should have python documentation in the system message, or it should have a search tool
Well, try using minicpm or spark-x2.6, and you’ll see what models without any knowledge of the world are capable of. P.S. They can’t even find the config of any utility on the host.
did you include the full documentation for your OS in their system message?
And what will it give? Will the model somehow magically figure out the paths to all the configs of all the utilities? That even sounds stupid - so for that, I also have to specify every utility on every SSH host, constantly monitor and update it, no way. And without that, they just endlessly read the same paths, get confused by them, and get stuck in a loop. They don’t even understand where the configs should be located by default. There’s nothing to even talk about with them; they know nothing and can’t even mention anything themselves - they can only find a summary of the given question, which won’t be of any use, as it will just be a brief description. it's such a misconception to think that a model without knowledge of anything will be able to write something even with full documentation about the language, she has never seen examples of projects in this language, working functions and algorithms to even remotely come up with something, knowledge of function conflicts and just the logic of terminal commands, she doesn't even she will understand a simple request in the "create an llm proxy" format, because she won't even know what it is, and you can't even expect her to think through the functions, and her recognition of the mechanics of the language and commands will be hitting the wall every time she calls the tool and starts building code, if she even knows what it is. So this will happen over and over again in each session, which will require a huge context, making the model slow and consuming as much memory as it does, unlike a model that knows almost everything about the world. The task execution speed will be 100 times slower, whereas a normal model will just need to execute five scripts one at a time.
what do you think about this idea, instead of 10 GB weights the weighst are 1 GB and there is 9 GB of text context that the model always has
what do you think about this idea, instead of 10 GB weights the weighst are 1 GB and there is 9 GB of text context that the model always has
1 GB of what?
Moreover, separating knowledge from this 1 GB of "latent something" and moving it into the context introduces O(N^2) compute costs, whereas frozen weights are effectively 'free' at runtime.
No, keep dinosaurs
This like other models is filled with information that some of us might not need like various different types of dinosaurs.
Is there a way we can increase the reasoning capabilities and reduce this useless information - to keep the model size so that we can continue to run it locally.
Information about the species that have inhabited our planet and those that live today is exceptionally important, as it is fundamental knowledge about the world. It is far more important than coding silly programs that will become unnecessary tomorrow.
Any model trained to code machines is incapable of programming people in natural language, which is the highest form of programming. You like to vibecode because you don’t know programming properly. But this is not the problem of the model’s creators.
Can we have separate files for knowledge and reasoning which can be plug and play ? With knowledge not in a single file but many files which we can either keep or remove. This way is more scalable and as per use cases.
I am just wasting gpus running models when my use case is only a single domain like automobiles or sports.
Hey what happens when facts change ? What if that dinosaur knowledge gets proven wrong. This is why this is bad architecture.