Instructions to use agentmessier/Inkling-2-Mini-bf16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use agentmessier/Inkling-2-Mini-bf16 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="agentmessier/Inkling-2-Mini-bf16") 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("agentmessier/Inkling-2-Mini-bf16") model = AutoModelForMultimodalLM.from_pretrained("agentmessier/Inkling-2-Mini-bf16", 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 agentmessier/Inkling-2-Mini-bf16 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "agentmessier/Inkling-2-Mini-bf16" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "agentmessier/Inkling-2-Mini-bf16", "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/agentmessier/Inkling-2-Mini-bf16
- SGLang
How to use agentmessier/Inkling-2-Mini-bf16 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 "agentmessier/Inkling-2-Mini-bf16" \ --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": "agentmessier/Inkling-2-Mini-bf16", "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 "agentmessier/Inkling-2-Mini-bf16" \ --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": "agentmessier/Inkling-2-Mini-bf16", "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 agentmessier/Inkling-2-Mini-bf16 with Docker Model Runner:
docker model run hf.co/agentmessier/Inkling-2-Mini-bf16
Inkling-2-Mini (bf16)
An unofficial bf16 copy of thinkingmachines/Inkling-2-Mini
(revision 7a67ae2314b44ef05c87fd1d4d311c58aaeb18f6). It is not made, reviewed or endorsed by Thinking Machines Lab. For what
the model is, how it was trained, its intended use, limitations and acceptable-use policy, read the
original model card.
What was changed
The original checkpoint stores the MoE expert weights in NVFP4 (layers 0-19) and MXFP8 (layers 20-23). Here those experts are dequantized to bf16. Nothing else is modified:
- NVFP4 experts: e2m1 values x fp8-e4m3 block scales (exact in fp32), times the per-tensor factor in float64, rounded once to bf16.
This follows vLLM's reference dequantization (
tests/models/inkling2/test_moe.pyat commit65ada0c40). The resulting bf16 expert weights are exactly the values transformers (>= 5.24) produces when it dequantizes the original checkpoint on load (all 20.4B NVFP4 values checked). - MXFP8 experts: e4m3 values x power-of-two block scales, exact in bf16.
- All other tensors are copied as stored (bf16 stays bf16; the small fp32 tensors stay fp32). Tensor names and the expert weight
layout are the original ones; the quantization blocks of
config.jsonandhf_quant_config.jsonare removed.mtp.safetensors, the tokenizer, processor and chat template are copied unchanged.
The result is about 50 GB (the original is about 20 GB).
Loading
- transformers >= 5.24.0 loads it (
Inkling2Loop). - vLLM (as of commit
65ada0c40, 2026-11-24) does not load bf16 Inkling2 experts; serve the original NVFP4/MXFP8 checkpoint with vLLM instead.
This copy is meant for fine-tuning or research code that wants plain bf16 weights.
Check
200 multiple-choice prompts, reading the option letters' probabilities at the answer position:
| compared | same top option | mean abs. difference in probability |
|---|---|---|
| this bf16 copy vs the original, both in transformers 5.24.1 | 194 / 200 | 0.013 |
| this bf16 copy (transformers) vs the original in vLLM | 192 / 200 | 0.021 |
| the original in transformers vs the original in vLLM | 192 / 200 | 0.020 |
transformers builds identical weights from both directories, so the conversion does not account for the differences in the first row; their source has not been isolated (the same model was not run twice to measure its run-to-run spread). Short greedy generations were identical between the bf16 copy and the original in transformers.
License
Apache License 2.0, as the original (see LICENSE). The original repository carries the apache-2.0 tag; the license text is added
here. Use of the model is also subject to Thinking Machines Lab's acceptable-use policy linked from the original card.
- Downloads last month
- 20
Model tree for agentmessier/Inkling-2-Mini-bf16
Base model
thinkingmachines/Inkling-2-Mini