Image-Text-to-Text
Transformers
Safetensors
inkling2_loop
inkling
Mixture of Experts
reasoning
efficient-thinking
token-efficient
post-training
agentic
terminal-bench
conversational
8-bit precision
modelopt
Run this model with HF Jobs
Run ukisai/Swift-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/ukisai/Swift-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/ukisai/Swift-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/ukisai/Swift-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/ukisai/Swift-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 ukisai/Swift-Inkling-2-Mini with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ukisai/Swift-Inkling-2-Mini with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="ukisai/Swift-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("ukisai/Swift-Inkling-2-Mini") model = AutoModelForMultimodalLM.from_pretrained("ukisai/Swift-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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ukisai/Swift-Inkling-2-Mini with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ukisai/Swift-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": "ukisai/Swift-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/ukisai/Swift-Inkling-2-Mini
- SGLang
How to use ukisai/Swift-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 "ukisai/Swift-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": "ukisai/Swift-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 "ukisai/Swift-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": "ukisai/Swift-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 ukisai/Swift-Inkling-2-Mini with Docker Model Runner:
docker model run hf.co/ukisai/Swift-Inkling-2-Mini
Card: MTP after reasoning effort, quantized below; quantized intro in house wording
Browse files172 unmodified lines1731741751761771784 unmodified lines18318418518618718818910 unmodified lines200201202203204205206207208209210211212213214215216217218219220221222172 unmodified lines</tbody></table>## Quantized models| Format | Repository | Runtime |4 unmodified lines| MLX 8-bit | [Swift-Inkling-2-Mini-MLX-8bit](https://huggingface.co/ukisai/Swift-Inkling-2-Mini-MLX-8bit) | Apple MLX || MLX 4-bit | [Swift-Inkling-2-Mini-MLX-4bit](https://huggingface.co/ukisai/Swift-Inkling-2-Mini-MLX-4bit) | Apple MLX |These results evaluate Swift Inkling 2 Mini quantized exports on **GPQA-Diamond (198 questions)**, five seeds each, served with llama.cpp. Each row compares the same quantization of Inkling 2 Mini and Swift Inkling 2 Mini.<table class="swift15-table" style="display:table;width:100%;table-layout:fixed;"><thead><tr>10 unmodified lines</tbody></table>## MTP speculative decodingThe published weights include the base model's MTP head. These results evaluate its acceptance rate on **GPQA-Diamond (32 questions)**, served with llama.cpp.<table class="swift15-table swift15-compact"><thead><tr><th class="benchmark-heading" style="width:40%;text-align:left;padding-left:18px;">Benchmark</th><th class="score-heading" style="width:30%;">Base<br>MTP acceptance</th><th class="score-heading" style="width:30%;">Swift<br>MTP acceptance</th></tr></thead><tbody><tr><td class="model">GPQA-Diamond<br><span class="detail">BF16 GGUF</span></td><td>48.7%</td><td class="swift15"><strong>49.4%</strong></td></tr></tbody></table>Swift keeps the base model's MTP acceptance with the same, unchanged MTP head.## How to useThe checkpoint is about 20 GB in Inkling 2 Mini's native mixed NVFP4/MXFP8 precision, so it runs on a single GPU172 unmodified lines1731741751761771781791801811821831841851861871881891901911921931941954 unmodified lines20020120220320420520620710 unmodified lines218219220221222223172 unmodified lines</tbody></table>## MTP speculative decodingThe published weights include the base model's MTP head. These results evaluate its acceptance rate on **GPQA-Diamond (32 questions)**, served with llama.cpp.<table class="swift15-table swift15-compact"><thead><tr><th class="benchmark-heading" style="width:40%;text-align:left;padding-left:18px;">Benchmark</th><th class="score-heading" style="width:30%;">Base<br>MTP acceptance</th><th class="score-heading" style="width:30%;">Swift<br>MTP acceptance</th></tr></thead><tbody><tr><td class="model">GPQA-Diamond<br><span class="detail">BF16 GGUF</span></td><td>48.7%</td><td class="swift15"><strong>49.4%</strong></td></tr></tbody></table>Swift keeps the base model's MTP acceptance with the same, unchanged MTP head.## Quantized models| Format | Repository | Runtime |4 unmodified lines| MLX 8-bit | [Swift-Inkling-2-Mini-MLX-8bit](https://huggingface.co/ukisai/Swift-Inkling-2-Mini-MLX-8bit) | Apple MLX || MLX 4-bit | [Swift-Inkling-2-Mini-MLX-4bit](https://huggingface.co/ukisai/Swift-Inkling-2-Mini-MLX-4bit) | Apple MLX |These results evaluate three Swift Inkling 2 Mini GGUF exports on **GPQA-Diamond (198 questions)**.Each model completed the full dataset with **five seeds and zero request errors**.<table class="swift15-table" style="display:table;width:100%;table-layout:fixed;"><thead><tr>10 unmodified lines</tbody></table>## How to useThe checkpoint is about 20 GB in Inkling 2 Mini's native mixed NVFP4/MXFP8 precision, so it runs on a single GPU
README.md+19-18