Instructions to use flintglass/Inkling-2-Mini-PrismAgent with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use flintglass/Inkling-2-Mini-PrismAgent with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="flintglass/Inkling-2-Mini-PrismAgent") 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("flintglass/Inkling-2-Mini-PrismAgent") model = AutoModelForMultimodalLM.from_pretrained("flintglass/Inkling-2-Mini-PrismAgent", 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 flintglass/Inkling-2-Mini-PrismAgent with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "flintglass/Inkling-2-Mini-PrismAgent" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "flintglass/Inkling-2-Mini-PrismAgent", "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/flintglass/Inkling-2-Mini-PrismAgent
- SGLang
How to use flintglass/Inkling-2-Mini-PrismAgent 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 "flintglass/Inkling-2-Mini-PrismAgent" \ --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": "flintglass/Inkling-2-Mini-PrismAgent", "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 "flintglass/Inkling-2-Mini-PrismAgent" \ --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": "flintglass/Inkling-2-Mini-PrismAgent", "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 flintglass/Inkling-2-Mini-PrismAgent with Docker Model Runner:
docker model run hf.co/flintglass/Inkling-2-Mini-PrismAgent
Flintglass Inkling-2-Mini-PrismAgent
Flintglass Inkling-2-Mini-PrismAgent is a 4-Verifier Pure On-Policy RLVR (PPO-Clipped GRPO) post-training upgrade of thinkingmachines/Inkling-2-Mini (26.4B MoE Looped Transformer, 128 experts / 8 active, 1M context, native vision).
At reasoning_effort=0.0, it achieves +4.15 pts higher execution accuracy (84.59% vs 80.44%) across all 4,775 strictly held-out agentic tasksβimproving every single benchmark and every single BFCL v3 Live category simultaneouslyβwhile cutting output tokens by 58%β67% (~2.5Γ faster local inference).
- Quantized GGUF + Vision Projector (
Q4_K_M,Q6_K,Q8_0+mmproj-BF16): flintglass/Inkling-2-Mini-PrismAgent-GGUF - Training Dataset (100% Apache-2.0 / MIT / CC-BY-4.0, Zero Leakage): flintglass/PrismAgent-RLVR-Dataset
- Standalone PEFT / Tinker LoRA Adapter (
r=16): Included inlora/(adapter_config.json,adapter_model.safetensors) alongside full merged BF16 Safetensors (with vision & MTP weights preserved intact).
Key Highlights
- +4.15 pts Overall on 4,775 Held-Out Execution Tasks (
80.44%->84.59%) β our highest-scoring open agent model across the entire Flintglass PrismAgent family. - 58%β67% Fewer Output Tokens (
2.4Γβ3.0ΓFaster Generation) β eliminates runaway thinking traces atreasoning_effort=0.0without sacrificing accuracy. - Zero-Regression Across All 5 BFCL v3 Live Categories β improves single, multiple, parallel (
+12.50 ptsto87.50%), parallel-multiple (+4.16 pts), and irrelevance/abstention (+1.13 pts) simultaneously. - 97.00% Strict JSON Schema Compliance (
+9.40 pts) across Draft-4 / Draft-7 / Draft-2020-12 schemas validated viajsonschema. - 89.63% HumanEval+ (
+6.09 ptsat 3Γ Fewer Tokens) and 80.10% SQLite Execution Equivalence (+2.60 ptsat 2.7Γ Fewer Tokens). - 100% Apache-2.0 & Strictly Execution-Verified β trained exclusively with four deterministic execution verifiers (no LLM-as-a-judge, no proprietary model distillation).
Strictly Held-Out 5-Benchmark Results (4,775 Tasks)
All evaluations were run deterministically (temperature=0.0, reasoning_effort=0.0) on the exact same zero-leakage 4,775-task execution suite using Inkling-2's native <|content_invoke_tool_json|> tool-calling format and real execution verifiers (AST/arg matching, jsonschema, in-memory SQLite execution, and EvalPlus hidden unit tests).
| Benchmark (Held-Out Tasks) | Base Inkling-2-Mini |
Inkling-2-Mini-PrismAgent | Accuracy Delta | Avg Tokens (Base -> PrismAgent) |
|---|---|---|---|---|
| BFCL v3 Live (2,233) | 72.86% | 74.74% | +1.88% | 213.0 -> 88.9 (-58.3%) |
| JSONSchemaBench Test (1,000) | 87.60% | 97.00% | +9.40% | 435.0 -> 180.6 (-58.5%) |
| SQLite Text-to-SQL (1,000) | 77.50% | 80.10% | +2.60% | 266.3 -> 97.1 (-63.5%) |
| HumanEval+ (164) | 83.54% | 89.63% | +6.09% | 753.1 -> 250.1 (-66.8%) |
| MBPP+ (378) | 80.69% | 81.48% | +0.79% | 537.3 -> 220.6 (-58.9%) |
| 5-Benchmark Average | 80.44% | 84.59% | +4.15% | ~60% Fewer Tokens |
BFCL v3 Live Per-Category Breakdown (All 5 Categories Improved!)
| BFCL v3 Live Category | Tasks | Base Inkling-2-Mini |
Inkling-2-Mini-PrismAgent | Delta | Avg Tokens |
|---|---|---|---|---|---|
live_simple |
258 | 69.38% | 72.87% | +3.49% | 199.5 -> 87.3 |
live_multiple |
1,053 | 70.28% | 72.17% | +1.89% | 150.0 -> 75.5 |
live_parallel |
16 | 75.00% | 87.50% | +12.50% | 251.9 -> 144.8 |
live_parallel_multiple |
24 | 54.17% | 58.33% | +4.16% | 209.0 -> 118.5 |
live_irrelevance (Abstention) |
882 | 77.44% | 78.57% | +1.13% | 291.7 -> 103.7 |
| BFCL v3 Live Macro Average | 2,233 | 69.25% | 73.89% | +4.64% | 213.0 -> 88.9 |
Training Method & Transparency Ablations
- Algorithm: Pure On-Policy 4-Verifier GRPO (
loss_fn="ppo",K=8rollouts/prompt,40stratified prompts/step =320verified rollouts/step, LoRAr=16, alpha=32across all attention & 128-expert MoE MLP projections,unembedfrozen). - Four Exact Deterministic Verifiers:
- Tool-Calling & Hard Abstention Verifier: Native Inkling-2
<|content_invoke_tool_json|>AST/argument equivalence + 2,178 multilingual hard near-miss abstention cases. - JSON Schema Verifier: Real
jsonschemaDraft-4/7/2020-12 structural validation. - SQLite Execution Verifier: In-memory SQLite DDL + INSERT + SELECT result-set equivalence.
- Python Unit-Test Verifier: Isolated subprocess execution against real test suites (with 832 EvalPlus overlaps strictly removed prior to training).
- Tool-Calling & Hard Abstention Verifier: Native Inkling-2
- Accuracy-First Conciseness Tie-Breaker: Passing rollouts receive a bounded
+0.12efficiency bonus when staying near target token budgets, while failing rollouts receive zero efficiency bonusβensuring accuracy always dominates.
Checkpoint & Conciseness-Weight Ablation
| Variant | Concise Bonus | BFCL Live | JSONSchema | SQLite | HumanEval+ | MBPP+ | 5-Bench Avg | BFCL Avg Tok |
|---|---|---|---|---|---|---|---|---|
Base Inkling-2-Mini |
β | 72.86% | 87.60% | 77.50% | 83.54% | 80.69% | 80.44% | 213.0 |
| GRPO Step 20 (Released) | 0.12 | 74.74% | 97.00% | 80.10% | 89.63% | 81.48% | 84.59% | 88.9 |
| GRPO v2 Step 40 (Gentle) | 0.03 | 75.15% | 95.80% | 79.80% | 89.02% | 80.69% | 84.09% | 121.1 |
| GRPO Step 40 (Over-Pruned) | 0.12 | 70.94% | 98.20% | 79.80% | 81.71% | 75.66% | 81.26% | 52.1 |
Why Step 20 won: Pushing conciseness past Step 20 squeezed token budgets down to 35β81 tokens, hurting multi-step reasoning on
HumanEval+andlive_irrelevance. Step 20 hits the exact Pareto optimum: highest overall accuracy (84.59%) and ~60% token savings.
Quickstart
Local Inference with llama.cpp (Recommended β GGUF + Vision)
See flintglass/Inkling-2-Mini-PrismAgent-GGUF for Q4_K_M, Q6_K, Q8_0, and mmproj-Inkling-2-Mini-BF16.gguf:
llama-server \
-hf flintglass/Inkling-2-Mini-PrismAgent-GGUF:Q4_K_M \
--jinja \
--port 8080
Python (transformers)
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "flintglass/Inkling-2-Mini-PrismAgent"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id, torch_dtype=torch.bfloat16, device_map="auto"
)
tools = [{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get current weather for a city",
"parameters": {
"type": "object",
"properties": {"city": {"type": "string"}},
"required": ["city"],
},
},
}]
messages = [{"role": "user", "content": "What's the weather in Reykjavik right now?"}]
prompt = tokenizer.apply_chat_template(
messages, tools=tools, reasoning_effort=0.0, tokenize=False, add_generation_prompt=True
)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=256, do_sample=False)
print(tokenizer.decode(out[0][inputs.input_ids.shape[1]:], skip_special_tokens=False))
The Flintglass Prism Open-Source Agent & RAG Stack
All models are 100% Apache-2.0 and evaluated on zero-leakage held-out benchmarks:
- Ingest: PrismParse-4B / PrismParse-2B β Document, Table, Receipt & Math OCR VLMs
- Rerank:
PrismRerankβ Commercial-Safe Zero-MS-MARCO 8K Multilingual Cross-Encoder Rerankers - Protect: PrismGuard-Multilingual β 8K Prompt-Injection & Agent Security (Live Demo)
- Execute: Inkling-2-Mini-PrismAgent | PrismAgent-27B | PrismAgent-35B-A3B | PrismAgent-8B
- Verify: PrismVerify-4B / PrismVerify-Large β 8K RAG Hallucination & Groundedness Verification (Live Demo)
License
Released under Apache-2.0, derived from thinkingmachines/Inkling-2-Mini (Apache-2.0) and trained exclusively on Apache-2.0, MIT, and CC-BY-4.0 datasets.
- Downloads last month
- 30