Muse Spark Open, hands-on: run Meta's 816B open-weight model three ways
Meta's Muse Spark Open is an 816-billion-parameter open-weight model with a 1M-token context window — and a 700 GB VRAM appetite that puts self-hosting out of reach for most machines. This tutorial gets it working three ways: a hosted API call in five minutes, Ollama's cloud tag from the terminal, and a full vLLM server on a GPU node — then builds a small coding agent on top.
- What it is: a sparse mixture-of-experts model — 816B total parameters, 42B active per token, 256 experts with top-8 routing, 62 layers, 1,048,576-token context, 202,048-token vocabulary.
- Hosted cost: $1.25 per million input tokens, $0.15 cached, $4.25 output — the same at every provider (OpenRouter, Together, Fireworks, Baseten, Modal, Nebius).
- Self-host floor: NVFP4 checkpoint is about 537 GB of weights and needs 700 GB+ of VRAM; BF16 is about 1.65 TB and needs about 2 TB. Two M5 Ultra Mac Studios run it via MLX.
- License: Muse Model License — free to use, fine-tune, distill, and sell, but products must display "Built with Muse Spark Open", and API resale above $20M a year in group revenue needs a separate agreement with Meta. Downloads are gated: Hugging Face asks for your legal name, date of birth, and organization.
- Defaults that matter: temperature 1.0, top_p 1.0, top_k disabled, and reasoning_effort xhigh (strength 512) unless you lower it.

On October 15, 2026, Meta Superintelligence Labs did something it had never done at this scale: it published the weights of a frontier model. Muse Spark Open is the open-weight version of Muse Spark, the model family behind Meta's own coding agents — 816 billion parameters, a million tokens of context, and training aimed squarely at long-horizon agentic work: reading a whole codebase, planning a change, calling tools, checking the result, and correcting itself when a step fails.
The catch is the size. This is not a model you download on a laptop and run over the weekend. The full-precision checkpoint is about 1.65 terabytes, and even the 4-bit version is about 537 GB and needs more than 700 GB of VRAM to serve. So the honest question is not "can I run it" but "which way of running it fits what I have?" This tutorial answers that three times over: the hosted API for five-minute access, Ollama's cloud tag for terminal-first use, and a real vLLM server for anyone with a GPU node — then it builds a small coding agent against the local server, so the serving work turns into something useful. The Python in this tutorial was run end to end against an OpenAI-compatible test server; the shell commands are quoted from Meta's own documentation and the model card.
What you'll need#
- Python 3.10 or newer and
pip, for the API and agent steps. I used Python 3.12 with theopenaipackage (version 3.60.0). - An API key from one hosted provider (OpenRouter, Together AI, or Fireworks) for Step 1 — a few dollars of credit is plenty for this tutorial. OpenRouter is used below because it routes to several hosts behind one key.
- Ollama (a recent version) and an Ollama account, for Step 2. No GPU needed — the model runs on Ollama's servers.
- For Step 3: a machine with roughly 500 GB of free disk and hundreds of gigabytes of RAM. If that is not you, read it and skip it — Steps 1 and 2 are the whole tutorial for most readers.
- For Step 4: a GPU node — Meta's recipe is 4× B300 for the NVFP4 checkpoint — with vLLM installed. This is the production path, not the laptop path.
One thing to settle before you build on it: the license. Muse Spark Open is open-weight, not open source. The Muse Model License lets you use, modify, fine-tune, distill, and sell the model and its derivatives for free, and Meta claims no ownership of outputs. Two conditions bite: every product or service built on it must prominently display "Built with Muse Spark Open", and if you resell the model itself as an API service and your group's gross revenue tops $20 million in any 12-month period, you must notify Meta and sign a separate agreement first. The model is not intended for users under 18. Read the license on the Hugging Face model card before shipping anything into a product.

Step 1: Call the hosted API in five minutes#
The fastest way to use the model is someone else's GPU. At launch, seven providers served it — Baseten, Fireworks AI, Groq (preview), Modal, Nebius, OpenRouter, and Together AI — and every one of them charges the same rate: $1.25 per million input tokens, $0.15 per million cached input tokens, $4.25 per million output tokens. That uniformity is worth knowing: pick on features and context support, not price. All of them expose an OpenAI-compatible endpoint, so the standard openai client works unchanged. The OpenRouter model ID is meta/muse-spark-open.
Install the client, export your key, and make a first call:
pip install openai
export OPENROUTER_API_KEY="sk-or-..."
from openai import OpenAI
client = OpenAI(
base_url="https://openrouter.ai/api/v1",
api_key="sk-or-...", # or read it from the environment
)
resp = client.chat.completions.create(
model="meta/muse-spark-open",
messages=[
{
"role": "system",
"content": "You are a code reviewer. Flag correctness bugs before style issues.",
},
{
"role": "user",
"content": (
"Review this function for off-by-one errors:\n\n"
"def first_n(n):\n"
" return list(range(1, n))"
),
},
],
temperature=1.0,
top_p=1.0,
max_tokens=2048,
)
print(resp.choices[0].message.content)
A note on the sampling settings, because they look wrong if you are used to other models: temperature 1.0 and top_p 1.0 are Meta's recommended defaults, measured that way across the model card's benchmarks. Do not "fix" them to 0.7 — the model was tuned and evaluated at 1.0, and lowering the temperature is the wrong lever here. The lever that matters is reasoning effort, covered in Step 6.
What should come back is a review that spots the bug: range(1, n) produces n - 1 values, 1 through n - 1 — it never returns 0 and never returns n. The response object also carries a usage block with prompt and completion token counts, which is what the cost math below needs.
Before you build anything on the hosted API, price it. The arithmetic is simple enough to keep in a snippet:
def estimate_cost(input_tokens, cached_tokens, output_tokens):
return (input_tokens * 1.25 + cached_tokens * 0.15 + output_tokens * 4.25) / 1_000_000
# A 60k-token codebase, mostly cached, one short answer:
print(f"${estimate_cost(2400, 57600, 400):.4f}") # $0.0133
# A cold 100k-token prompt with a 2k-token answer:
print(f"${estimate_cost(100000, 0, 2000):.4f}") # $0.1335
Two things fall out of that. First, the cached-input price ($0.15) is the number that decides whether a long-context agent is affordable: a repeated 60k-token codebase costs under two cents a call once it is cached, versus thirteen cents cold. Second, output tokens dominate — $4.25 per million is more than triple the input rate, and the model's default reasoning effort (xhigh) generates long reasoning traces before it answers. If your agent's bills surprise you, the reasoning setting is the first place to look, not the provider.
Step 2: Run it from your terminal with Ollama#
If you already live in Ollama, there is a one-command route — with a catch worth stating plainly. Ollama's library lists exactly one tag for this model, muse-spark-open:cloud, and the :cloud suffix means what it says: nothing downloads to your machine. Your prompts run on Ollama's servers and you are billed per token at the same $1.25 / $0.15 / $4.25 rates. What you gain is the Ollama workflow — the same commands, the same local API, the same agent integrations — without managing weights that would not fit on your disk anyway.
ollama run muse-spark-open:cloud
That drops you into an interactive chat. Try it with a coding prompt, since that is the model's primary design target — ask it to explain a function, or to write a test for one. You will notice the model thinks before it answers: that pause is the reasoning trace at the default xhigh effort, and it is longest on the first hard question.
The cloud tag also plugs straight into coding agents through Ollama's launch shortcuts. The most useful one is Claude Code:
ollama launch claude --model muse-spark-open:cloud
That starts Claude Code with Muse Spark Open as the model behind it. The same pattern works for OpenCode, Hermes Agent, and OpenClaw (ollama launch opencode --model muse-spark-open:cloud, and so on). Two honest limits: cloud models need an Ollama account — the library page lists access for Pro, Teams, and Max plans — and your prompts and code are processed on Ollama's servers, so do not send anything you would not send to any other hosted API. If either of those is a problem, the next two steps are the self-hosted alternatives.
Step 3: Run the weights locally with llama.cpp#
This is the first step that touches real weights, and the numbers decide whether it is for you. The official checkpoints on Hugging Face are BF16 (about 1.65 TB) and NVFP4 (about 537 GB), and the model card puts the serving floor at 700 GB of VRAM for NVFP4 and about 2 TB for BF16. The community GGUF quants from Unsloth go smaller — the 4-bit UD-Q4_K_XL build is about 505 GB, and the 2-bit UD-IQ2_XXS build is the smallest published quant — but even the 2-bit file is hundreds of gigabytes, and you still need a machine with hundreds of gigabytes of RAM to hold it plus the key-value cache. If you do not have that hardware, skip to Step 4's hosted alternative and come back to this step when you do.
With a recent llama.cpp build, serving is one command. Meta's own example uses the ggml-org quant:
llama serve -hf ggml-org/Muse-Spark-Open-816B-A42B-GGUF:Q4_K_S
That downloads the quant on first run — hundreds of gigabytes, so start it and walk away — then serves an OpenAI-compatible API on port 8080. The Unsloth equivalent swaps in their repo and lets you pick the quant that fits your machine:
llama serve -hf unsloth/Muse-Spark-Open-816B-A42B-GGUF:UD-Q4_K_XL
# smallest footprint instead:
llama-server -hf unsloth/Muse-Spark-Open-816B-A42B-GGUF:UD-IQ2_XXS --temp 1.0 --top-p 1.0 --top-k 0
Note the sampling flags on the second command: temperature 1.0, top_p 1.0, top_k 0 (disabled) — the same recommended defaults from the model card, expressed as llama.cpp flags. Check the server is up with the models endpoint, then send a first chat request:
curl http://localhost:8080/v1/models
curl http://localhost:8080/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "ggml-org/Muse-Spark-Open-816B-A42B-GGUF:Q4_K_S",
"messages": [{"role": "user", "content": "Write a Python function that reverses a string."}],
"temperature": 1.0
}'
The models endpoint should list the quant you served; the chat request should return a completion with a reasoning trace followed by the answer. If the download is the blocker — and at this size it usually is — the hf download command from the Hugging Face CLI resumes interrupted downloads, which matters when the file is half a terabyte: hf download ggml-org/Muse-Spark-Open-816B-A42B-GGUF --local-dir ./muse-spark-gguf.
Step 4: Serve it on a GPU node with vLLM#
For production serving, vLLM had day-zero support for this model, and it is the path Meta documents most completely. The sizing comes from Meta's own table: the NVFP4 checkpoint serves with tensor parallel 4 and expert parallel 4 on 4× B300, while BF16 needs tensor parallel 8 and expert parallel 8 on 8× B300. Expert parallelism is the important flag — the experts are 799B of the 816B parameters, so spreading them across ranks is what makes the model fit at all.
On your node, with the NVFP4 checkpoint:
export VLLM_USE_RUST_FRONTEND=1
vllm serve meta-models/Muse-Spark-Open-816B-A42B-NVFP4 \
--tensor-parallel-size 4 \
--enable-expert-parallel \
--max-model-len 1048576 \
--reasoning-parser muse \
--tool-call-parser muse \
--enable-auto-tool-choice
Every flag earns its place. --tensor-parallel-size 4 and --enable-expert-parallel split the model the way the architecture wants. --max-model-len 1048576 opens the full 1M-token window — set it lower if your workload does not need the whole window, because the key-value cache is sized against it. The two muse parsers are what make the server speak the model's native format: --reasoning-parser muse returns the reasoning trace separately from the answer, and --tool-call-parser muse turns the model's tool calls into standard OpenAI-style tool_calls. --enable-auto-tool-choice lets the model decide when to call a tool instead of requiring the client to force it. vLLM's own recipe uses tensor parallel 8 on an 8-GPU node for the same checkpoint — scale the parallel sizes to the node you actually have.
Once the server reports ready, verify it the same way as llama.cpp — the endpoint is OpenAI-compatible on port 8000:
curl http://localhost:8000/v1/models
Expect the NVFP4 model ID in the list. Two optional speedups, both from the launch-day posts: vLLM's DSpark speculative decoding (Inferact/Muse-Spark-Open-DSpark) drafts up to seven tokens in a single pass, and SGLang — python3 -m sglang.launch_server --model-path meta-models/Muse-Spark-Open-816B-A42B-NVFP4 — is the alternative runtime, with the same muse reasoning and tool-call parsers. Do not add speculative decoding until the plain server works; it is a multiplier on a working setup, not a fix for a broken one.
Step 5: Build a small coding agent on your server#
A served model is only useful once something drives it. This step builds the smallest agent worth having: a loop that sends the model a task, lets it call two file tools, feeds the results back, and repeats until the model answers in prose. It is deliberately minimal — two tools, no framework — so you can see exactly where the model's decisions happen. Point it at your vLLM server from Step 4, or at any OpenAI-compatible endpoint serving the model by changing BASE_URL and MODEL.
import json
import os
from openai import OpenAI
client = OpenAI(
base_url=os.environ.get("BASE_URL", "http://localhost:8000/v1"),
api_key="not-needed", # local vLLM does not check the key
)
MODEL = os.environ.get("MODEL", "meta-models/Muse-Spark-Open-816B-A42B-NVFP4")
TOOLS = [
{
"type": "function",
"function": {
"name": "read_file",
"description": "Read a file from the working directory and return its contents.",
"parameters": {
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "Path to the file, relative to the working directory.",
}
},
"required": ["path"],
},
},
},
{
"type": "function",
"function": {
"name": "write_file",
"description": "Write text to a file in the working directory, creating it if needed.",
"parameters": {
"type": "object",
"properties": {
"path": {"type": "string"},
"content": {"type": "string"},
},
"required": ["path", "content"],
},
},
},
]
def read_file(path):
with open(path) as f:
return f.read()
def write_file(path, content):
with open(path, "w") as f:
f.write(content)
return f"Wrote {len(content)} characters to {path}."
TOOL_FNS = {"read_file": read_file, "write_file": write_file}
def run_agent(task, max_steps=10):
messages = [
{
"role": "system",
"content": (
"You are a coding agent. Use the tools to inspect files before "
"changing them. After each tool result, decide the next step. "
"When the task is done, reply with a short summary of what changed."
),
},
{"role": "user", "content": task},
]
for _step in range(max_steps):
resp = client.chat.completions.create(
model=MODEL,
messages=messages,
tools=TOOLS,
temperature=1.0,
top_p=1.0,
max_tokens=4096,
)
msg = resp.choices[0].message
messages.append(msg)
if not msg.tool_calls:
return msg.content
for call in msg.tool_calls:
args = json.loads(call.function.arguments)
try:
result = TOOL_FNS[call.function.name](**args)
except Exception as exc:
result = f"Error: {exc}"
messages.append(
{
"role": "tool",
"tool_call_id": call.id,
"content": str(result),
}
)
return "Stopped: hit the step limit."
if __name__ == "__main__":
print(run_agent("Fix the off-by-one error in demo.py so first_n(n) returns 1..n."))
Run it from a directory containing a demo.py with the same off-by-one function from Step 1:
python agent.py
Watch what happens across the turns. On the first turn the model should call read_file on demo.py — it inspects before it changes, because the system prompt told it to and because this model is trained to. On the next turn it should call write_file with the corrected function, then answer with a short summary. That is the whole agentic loop: the model reasons, acts through tools, reads the result, and decides again. I ran this exact script against an OpenAI-compatible test server and the loop behaved as described — tool call, tool result, final answer.
Three things to get right when you extend it. First, always append the assistant message before appending the tool results — the conversation history must show the tool call before its result, or the next request is malformed. Second, surface tool errors to the model as text (Error: ...) instead of crashing the loop; this model is trained to diagnose a failed tool call and retry, and crashing throws that away. Third, keep max_steps small while testing. A 1M-token context means a runaway agent can burn a very large bill before you notice — ten steps is plenty for a demo, and a production harness wants a budget in tokens, not just steps.
Step 6: Tune the reasoning effort#
Every setting so far has been the default. The one setting worth changing deliberately is reasoning effort — how much the model thinks before it answers. It is the single biggest lever on both answer quality and token spend, and unlike temperature it is a named parameter in the request: reasoning_effort, set to low, medium, high, or xhigh. The model always reasons; it cannot be turned off. The default is xhigh.
| Level | Reasoning strength | Use it for |
|---|---|---|
low | 8 | Classification, extraction, straightforward questions, short tool loops |
medium | 32 | General agentic work |
high | 256 | Multi-step reasoning, hard debugging, long tool loops |
xhigh (default) | 512 | Problems where depth matters more than latency |
Against your local server, set it in the request body:
curl http://localhost:8000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "meta-models/Muse-Spark-Open-816B-A42B-NVFP4",
"messages": [{"role": "user", "content": "Write a Python function that reverses a string."}],
"temperature": 1.0,
"reasoning_effort": "high"
}'
Two practical rules. Use low or medium for anything where the answer is short and the cost of being wrong is low — classification, extraction, a quick lookup — because the reasoning trace is billed as output tokens at $4.25 per million. Keep high or xhigh for the work the model was built for: multi-step coding, hard debugging, and long tool loops. And always stream (stream: true) for reasoning workloads — a long generation at xhigh can hit a client or proxy timeout if you wait for the whole response at once.
One more thing the prompting guide makes clear: the system prompt you send does not replace the template's own system block, it is added to it. The rendered system message starts with the default lines ("You are a helpful AI assistant", the knowledge cutoff of 2026-01-04, and the current date), then your prompt, then the tool definitions, then the reasoning strength. Put the rules that must always hold first in your system prompt — the model pays more attention to the beginning of it — and do not describe your tools there; pass them in tools and let the template add their definitions.

Which approach should you use?#
All three paths reach the same weights. The choice is about what you have and what you need to control.
| Approach | Cost | Setup | Use when |
|---|---|---|---|
| Hosted API (OpenRouter, Together, Fireworks) | $1.25 / $0.15 / $4.25 per M tokens | Minutes, one key | Evaluating the model, building an app, or running an agent where you pay per use |
Ollama cloud (muse-spark-open:cloud) | Same per-token rates | One command, Ollama account | You live in Ollama and want the model inside Claude Code or OpenCode |
| llama.cpp GGUF (local) | Hardware + electricity | Hours; ~500 GB download | You have a big-RAM machine and need fully offline inference |
| vLLM on a GPU node | Node rental or owned GPUs | Hours; 4× B300-class node | Serving a team or product, or fine-tuning later — vLLM also serves LoRA adapters on top |
| MLX on two M5 Ultra Mac Studios | Hardware | Hours; Apple silicon only | You are on Apple hardware and want the desktop setup Meta demonstrated |
The decision in one paragraph: start hosted. Five minutes and a few cents tell you whether the model is right for your task, and the cached-input price makes long-context agentic work affordable once your prompts repeat. Move to Ollama cloud if your workflow already runs through Ollama. Self-host only when you have a concrete reason — data that cannot leave your machines, a volume where per-token pricing stops making sense, or a fine-tuning plan — because the hardware floor is a multi-GPU node, not a workstation. And keep the benchmark context honest: on Artificial Analysis's Intelligence Index the model scores 39 at xhigh — the highest of any US open-weight model, per Meta, but behind GLM 5.3 (45) and Kimi K3 (44). If raw benchmark score is the deciding factor, those models exist; if you want the most capable US open-weight model with a 1M-token context and a license that lets you build on it, this is the one.
The takeaway#
Muse Spark Open matters because it moves the frontier into the open: an 816B-parameter agentic model with a million tokens of context, downloadable and fine-tunable under a permissive license, served by every major runtime on day one. The size is real and it is the whole story — most readers will use it hosted, and that is the correct call. The working checklist:
- Try it hosted first: one
openaiclient call tometa/muse-spark-openon OpenRouter, at $1.25 / $0.15 / $4.25 per million tokens. - Price the reasoning: the default xhigh effort generates long traces billed as output — drop to
lowormediumfor short, cheap work. - Use Ollama cloud if you want it inside Claude Code:
ollama run muse-spark-open:cloud. - Self-host only with the right node: NVFP4 needs 700 GB+ of VRAM; serve it with vLLM, the
museparsers, and expert parallelism enabled. - Build the agent loop yourself before reaching for a framework — two tools and a ten-step loop are enough to see how the model plans, acts, and recovers.
And remember the license line that will show up in your product: "Built with Muse Spark Open." It is not a suggestion — it is the price of the weights.