Instructions to use thinkingmachines/Inkling-2-Small-MXFP8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use thinkingmachines/Inkling-2-Small-MXFP8 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="thinkingmachines/Inkling-2-Small-MXFP8") 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-Small-MXFP8") model = AutoModelForMultimodalLM.from_pretrained("thinkingmachines/Inkling-2-Small-MXFP8", 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use thinkingmachines/Inkling-2-Small-MXFP8 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "thinkingmachines/Inkling-2-Small-MXFP8" # 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-Small-MXFP8", "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-Small-MXFP8
- SGLang
How to use thinkingmachines/Inkling-2-Small-MXFP8 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-Small-MXFP8" \ --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-Small-MXFP8", "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-Small-MXFP8" \ --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-Small-MXFP8", "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-Small-MXFP8 with Docker Model Runner:
docker model run hf.co/thinkingmachines/Inkling-2-Small-MXFP8
Commit History
3 days ago
-
Add a generation config (#9)
- Add a generation config (2f3b515e0e662cb236f8077d6869cbf3bf96ea02) Co-authored-by: Quentin Gallouédec <qgallouedec@users.noreply.huggingface.co>14f2cb2 -
Add generation markers to the chat template (#8)
- Add generation markers to the chat template (026e825508bfd4eb39c924725387dfc6bfd932a9) Co-authored-by: Quentin Gallouédec <qgallouedec@users.noreply.huggingface.co>ba8f9aa -
Set the eos and pad tokens (#7)
- Set the eos and pad tokens (523bfdc11c1a236a9d0fe5dfa7ad2993f243f55a) Co-authored-by: Quentin Gallouédec <qgallouedec@users.noreply.huggingface.co>680439e -
[surge-update] update DAYJOB (Finance) and DAYJOB (Healthcare) for Inkling 2 Small (#6)
- [marstin-dev] update DAYJOB (Finance) and DAYJOB (Healthcare) for Inkling 2 Small (a8e31bc74921a3d7bbbfe6beac506d58666b6a94)1c94d07
6 days ago
-
Update config.json
Verified signaturef69fa26 -
Add quantization config (#4)
- Add quantization config (6f840ff985ab38fee3a92832fb4262c133d85ef7) - Use checkpoint module names in quantization config and add activation_scheme (5253d0f7ad6f452d51586a0c8a32135bc763b843) Co-authored-by: Guarin Flück <guarin@users.noreply.huggingface.co>a39521f
8 days ago
-
[marstin-dev] drop sage1.1 for mistral4l on validation set; update tab headline metric (#5)
- [marstin-dev] drop sage1.1 for mistral4l on validation set; update tab headline metric (64cbdb4d5ef9b6e9f4bf4774d2bcb3a5382c6052)1ac1a60
10 days ago
-
Add minimal quantization config to correct Hub parameter count (#3)
- Add minimal quantization config to correct Hub parameter count (caa74f7794ac21eb308e9eec006173863b88ae74) Co-authored-by: ben burtenshaw <burtenshaw@users.noreply.huggingface.co>12c2056 -
Update README.md
Verified signature68db600 -
Keep nested tool-call argument order in the chat template
Verified signatureTool-call arguments are sorted by top-level name only, and each argument's value keeps its own key order, as the reference renderer writes them. Keys inside object-valued arguments were previously sorted too.086a047
11 days ago
-
Update README.md
Verified signature3febc62 -
Adding transformers as the library name (#1)
- Adding transformers as the library name (f370581cef5f2954addb58a538ed13c6baa90f9e) Co-authored-by: Aritra Roy Gosthipaty <ariG23498@users.noreply.huggingface.co>689fc16 -
upload model
544ad43