Instructions to use MachineFi/Trio-Spark-DI with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MachineFi/Trio-Spark-DI with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="MachineFi/Trio-Spark-DI") 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("MachineFi/Trio-Spark-DI") model = AutoModelForMultimodalLM.from_pretrained("MachineFi/Trio-Spark-DI", 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
- llama.cpp
How to use MachineFi/Trio-Spark-DI with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf MachineFi/Trio-Spark-DI:Q4_K_M # Run inference directly in the terminal: llama cli -hf MachineFi/Trio-Spark-DI:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf MachineFi/Trio-Spark-DI:Q4_K_M # Run inference directly in the terminal: llama cli -hf MachineFi/Trio-Spark-DI:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf MachineFi/Trio-Spark-DI:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf MachineFi/Trio-Spark-DI:Q4_K_M
Use Docker
docker model run hf.co/MachineFi/Trio-Spark-DI:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use MachineFi/Trio-Spark-DI with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MachineFi/Trio-Spark-DI" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MachineFi/Trio-Spark-DI", "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/MachineFi/Trio-Spark-DI:Q4_K_M
- SGLang
How to use MachineFi/Trio-Spark-DI 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 "MachineFi/Trio-Spark-DI" \ --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": "MachineFi/Trio-Spark-DI", "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 "MachineFi/Trio-Spark-DI" \ --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": "MachineFi/Trio-Spark-DI", "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" } } ] } ] }' - Ollama
How to use MachineFi/Trio-Spark-DI with Ollama:
ollama run hf.co/MachineFi/Trio-Spark-DI:Q4_K_M
- Unsloth Desktop
- Pi
How to use MachineFi/Trio-Spark-DI with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf MachineFi/Trio-Spark-DI:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "MachineFi/Trio-Spark-DI:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use MachineFi/Trio-Spark-DI with Docker Model Runner:
docker model run hf.co/MachineFi/Trio-Spark-DI:Q4_K_M
- Lemonade
How to use MachineFi/Trio-Spark-DI with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull MachineFi/Trio-Spark-DI:Q4_K_M
Run and chat with the model
lemonade run user.Trio-Spark-DI-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use MachineFi/Trio-Spark-DI with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf MachineFi/Trio-Spark-DI:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default MachineFi/Trio-Spark-DI:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use MachineFi/Trio-Spark-DI with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf MachineFi/Trio-Spark-DI:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "MachineFi/Trio-Spark-DI:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Start the llama.cpp server
# Install llama.cpp:
brew install llama.cpp# Start a local OpenAI-compatible server:
llama serve -hf MachineFi/Trio-Spark-DI:Q4_K_MConfigure Hermes
# Install Hermes:
curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash
hermes setup# Point Hermes at the local server:
hermes config set model.provider custom
hermes config set model.base_url http://127.0.0.1:8080/v1
hermes config set model.default MachineFi/Trio-Spark-DI:Q4_K_MRun Hermes
hermesAccess Trio-Spark DI (research, non-commercial)
This repository is publicly accessible, but you have to accept the conditions to access its files and content.
These weights are released under CC BY-NC 4.0 for research and evaluation only. Commercial use requires a separate license from MachineFi (or use the hosted Trio-Spark API).
Log in or Sign Up to review the conditions and access this model content.
Trio-Spark DI (research checkpoint)
Trio-Spark DI is a research checkpoint of MachineFi's Trio-Spark decision model, trained for the
Decision Index typed-decision protocol:
given a state and typed questions with explicit options, it returns a probability for every option.
- Base model: Qwen/Qwen3.5-9B (Apache-2.0).
- Weights:
model-0000{1..4}-of-00004.safetensors(bf16, with the base model's vision tower) load in Transformers and vLLM asQwen3_5ForConditionalGeneration; these are the weights evaluated on the vision board.trio-spark-di-q8_0.gguf(Q8_0, about 9.5 GB, sha25642edc59bโฆ) is the same checkpoint (DI14), text only, as evaluated on the text board;trio-spark-di-q4_k_m.gguf(Q4_K_M, about 5.6 GB) is the same at 4 bits and scores lower. - Text and images. The bf16 weights take images through the base model's vision tower; the GGUF files are text only. The hosted Trio-Spark API (v1.3) is a different, production model; this checkpoint is not what the API serves.
Decision Index 0.3 (public suite, self-run)
| Decision Index | Knowledge | Language | Retrieval | Tools | Arts | |
|---|---|---|---|---|---|---|
| Trio-Spark DI (DI14, Q8_0), full public suite | 56.74 | 40.4 | 60.0 | 59.4 | 79.3 | 43.9 |
| Trio-Spark DI (DI14, Q4_K_M), full public suite | 55.50 | 39.2 | 59.4 | 58.7 | 76.4 | 42.7 |
All 140,178 requests of the public 0.3 suite, run with the official kit against the server in serve/ (18 requests longer than 8,192 tokens refused, none truncated). The server is deterministic: the same request always gets the same answer.
Submitted to the Decision Index leaderboard; the official score also includes private test sets and may differ.
Decision Index vision (public suite, self-run)
| Vision index | CV-Bench | BLINK | RealWorldQA | CharXiv | InfographicVQA | Mind2Web | Winoground | KIE | Moderation | R-Bench-M | MMMU-Pro | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Trio-Spark DI (bf16) | 67.07 | 76.1 | 52.3 | 68.1 | 71.7 | 93.4 | 70.9 | 80.2 | 92.3 | 27.1 | 25.5 | 35.7 |
All 12,210 rows of the public vision suite, run with the kit's reference vllm-vl engine (images up to 1.6 MP). Submitted to the Decision Index vision leaderboard; the official score also includes private test sets and may differ.
Earlier text checkpoints
Earlier checkpoints (Q4_K_M), on a 12,001-request stratified sample of the same suite:
| Decision Index | Knowledge | Language | Retrieval | Tools | Arts | |
|---|---|---|---|---|---|---|
| Trio-Spark DI (DI14) | 54.47 | 38.1 | 55.8 | 58.4 | 77.3 | 43.8 |
Trio-Spark DI (DI13, tag di13) |
54.08 | 38.6 | 54.5 | 58.2 | 76.6 | 43.7 |
Running it
Trio-Spark DI is not a chat model. It answers through its decision prompt and reads a probability for every option from the model's next-letter scores, so plain chat prompts will not reproduce the scores above.
Images (bf16 weights). Use vLLM or Transformers; the chat template has thinking off by default (enable_thinking=true turns it on). The vision score above comes from the Decision Index kit's reference engine:
python -m decision_index vision pipeline --dir work/vision --engine vllm-vl --option model=MachineFi/Trio-Spark-DI --out runs/trio-spark-di-vision
Text (GGUF). The /v1/systemone server used for the text evaluation is in serve/: llama.cpp (release b11249, CUDA 12.8) with one slot per server and a small Python front end (standard library only) that evaluates the questions of a request in order and clears the slot between requests, so answers do not depend on what ran before. It is compatible with the Decision Index kit's http engine.
hf download MachineFi/Trio-Spark-DI --include "trio-spark-di-q8_0.gguf" "serve/*" --local-dir trio-spark-di
bash trio-spark-di/serve/setup.sh $PWD/trio-spark-di/trio-spark-di-q8_0.gguf
# then, from the Decision Index kit:
python -m decision_index pipeline --engine http --option base_url=http://127.0.0.1:8800 --option model=trio-spark --out runs/trio-spark-di
Text server limits: up to 8,192 tokens per decision prompt (longer requests are refused, never truncated); questions with more than 8 options are decided by an 8-way tournament (groups of 8, then a final over the group winners), so no option is dropped.
License
The weights are released under CC BY-NC 4.0: free for research and evaluation with attribution,
no commercial use. For commercial use, use the hosted Trio-Spark API or contact MachineFi.
The base model Qwen3.5-9B is Apache-2.0; its license and notice apply to the base weights (see NOTICE). Full license text: LICENSE.
The hosted, production model is documented at MachineFi/Trio-Spark.
- Downloads last month
- 28
# Gated model: Login with a HF token with gated access permission hf auth login