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: quantized table = Q4_K_M + BF16; GSQ-RCO IQ3_S row removed until re-measured
Browse files193 unmodified lines1941951961971971981992005 unmodified lines2062072082092102092102112122 unmodified lines215216217219220218219220221222193 unmodified lines
Quantized deployment is the intended use for Swift: lower-memory weights paired withshorter reasoning. The GGUF evaluations below retain token savings on GPQA-Diamond, and Swiftreduces output-cap failures by **48–65%**.reduces output-cap failures by **59–94%**.
<table class="swift15-table" style="display:table;width:100%;table-layout:fixed;"> <thead><tr>5 unmodified lines </tr></thead> <tbody> <tr><td class="model">GPQA-Diamond<br><span class="detail">GGUF Q4_K_M · completion tokens</span></td><td>85.45%</td><td class="swift15">85.15%</td><td class="change">↓ 40.4%</td><td class="change">↓ 55.9%</td></tr> <tr><td class="model">GPQA-Diamond<br><span class="detail">GSQ-RCO IQ3_S · completion tokens</span></td><td>86.87%</td><td class="swift15">84.14%</td><td class="change">↓ 33.8%</td><td class="change">↓ 54.3%</td></tr> <tr><td class="model">GPQA-Diamond<br><span class="detail">GGUF BF16 · completion tokens</span></td><td>85.76%</td><td class="swift15">84.65%</td><td class="change">↓ 42.3%</td><td class="change">↓ 52.8%</td></tr> <tr><td class="model">GPQA-Diamond<br><span class="detail">BF16 · thinking tokens</span></td><td>86.67%</td><td class="swift15">85.45%</td><td class="change">↓ 42.9%</td><td class="change">↓ 56.6%</td></tr> </tbody></table>
2 unmodified lines
Each row compares the same quantized base with and without the Swift post-training.GPQA uses five seeds. Output cap: GPQA 100,000. Truncated answers count as incorrect.Base quantizations: ISTA-DASLab's GSQ-RCO IQ3_S, a Q4_K_M with the same per-tensor types asSwift's, and the BF16 GGUF. Serving with llama.cpp makes it a separate comparison from the BF16 table.Base quantization: a Q4_K_M with the same per-tensor types as Swift's, served with llama.cpp.The BF16 row is the same run as the BF16 table.
</details>
README.md+4-5