Use AIUnderstand AIBuild with AI
Build with AI·Model deep dive·· 4 min read

Run Flint, a 2.5B-Active MoE Coding Agent Model, with SGLang

Recursive's Flint is a 39.8B mixture-of-experts model for coding agents. Here is how to serve it on one H200 or B300 and call it with the OpenAI client.

The code in this post comes from the model's docs and hasn't been run in our CI yet. If something breaks, let us know.

Flint is a mixture-of-experts language model from Recursive, built for coding agents. It has 39.8 billion total parameters but only about 2.5 billion are active per token, so each token costs far less compute than the total size suggests. The card says it is designed to investigate codebases, fix bugs, implement features and write tests. It takes text in, gives text out, supports reasoning and handles multi-turn tool use. The weights are Apache 2.0.

Key specs

Property Value
Total parameters 39.8B
Active per token About 2.5B, including the output head
Layers 49: 2 dense, then 47 MoE
Experts 256 routed per MoE layer, 6 selected per token, plus an always-active shared expert
Attention 35 sliding-window layers (window of 513 tokens) and 14 full-attention layers
Documented context 262,144 tokens, prompt and output combined
Vocabulary 150,144 tokens
Input / output Text / text
Stated knowledge cutoff June 2026

The repository holds the BF16 checkpoint, the config, tokenizer, chat template and an SGLang serving kit. Quantized variants are prepared separately, and the card says Transformers modeling code is not included yet.

Recursive reports 54.9% on Terminal-Bench 2.1, 89.7% on SWE-bench Pro v2 and 74.2% on SWE-bench Verified. The card notes these use specific harnesses (Terminus 2 for Terminal-Bench, mini-swe-agent for SWE-bench), report average pass@1 over at least five attempts, and that comparison scores from other developers may not use the same setup.

Install and serve

Flint runs on one B300 or H200 GPU per replica using the SGLang kit in the repo’s sglang/ folder. These are the card’s commands:

Terminal window
pip install -U huggingface_hub openai
hf download RecursiveSI/flint --local-dir flint && cd flint # about 80 GB
docker build -t flint-sglang sglang
docker run -d --name flint --gpus '"device=0"' --ipc=host -p 127.0.0.1:30000:30000 \
-v "$PWD:/model" -e MODEL=/model flint-sglang bash /model/sglang/serve_b300.sh # H200: serve_h200.sh
until curl -sf localhost:30000/health_generate >/dev/null; do sleep 15; done # progress: docker logs -f flint
python3 sglang/example_client.py --base-url http://localhost:30000/v1 # reasoning and a tool call

Use serve_h200.sh instead of serve_b300.sh on an H200. The card points to sglang/README.md for requirements, serve-script options, multi-GPU deployments and API details.

Call it from Python

The server speaks the OpenAI-compatible API, so the standard client works:

ask_flint.py
from openai import OpenAI
client = OpenAI(base_url="http://localhost:30000/v1", api_key="unused")
response = client.chat.completions.create(
model="flint",
messages=[{"role": "user", "content": "Write a Python function that merges overlapping intervals."}],
max_tokens=32768,
)
print(response.choices[0].message.content)

The large max_tokens is deliberate. The card recommends an output budget of at least 32,768 tokens for hard problems, and that budget includes the model’s reasoning.

Settings that matter

Setting Recommended value
Temperature 1.0
Top-p / top-k 0.95 / 20
Output budget for hard problems At least 32,768 tokens, including reasoning

The server applies these sampling settings when a request leaves them out, so you usually do not need to set them yourself.

Tool calls and multi-turn use

The card says Flint supports OpenAI-compatible tool calls, and that sglang/example_client.py demonstrates reasoning and a tool call. The card does not include a tool-call request in its text, so start from that script rather than writing the request format from memory.

Two instructions from the card apply to any agent loop you build. Use the checkpoint’s chat template, and preserve the returned reasoning_content in conversation history.

Gotchas

  • Hardware is specific. The card names one B300 or H200 per replica. It does not describe smaller GPUs, and the checkpoint is about 80 GB to download.
  • Long reasoning can eat the budget. The card warns that long reasoning can raise latency and use up the output budget before an answer finishes.
  • Context is capacity, not a promise. The 262,144-token figure is a limit. The card says it does not guarantee equal accuracy across all sequence lengths or tasks. Prompt and output share the window.
  • Results vary by precision and runtime. Evaluate the exact checkpoint and runtime you plan to deploy.
  • Tools need guardrails. The card says structured tool-call grammar does not stop the model from choosing an unsafe or incorrect action. Enforce your own permissions and execution boundaries, and review consequential changes and generated code before applying them.
  • Hosted terms differ. The Apache 2.0 license covers the weights. Hosted API terms and data practices are separate.

When to pick it

Pick Flint if you want an open-weight model for a coding agent and have an H200 or B300 to dedicate to it. Only about 2.5B parameters are active per token, which is the main reason to consider it over a dense model of similar total size, though the card gives no speed numbers to confirm that.

Look elsewhere if you need a text-and-image model (Flint is text only), if you only have a small GPU, or if you want to use Transformers directly, since the card says that modeling code is not included yet. Treat the benchmark scores as Recursive’s own results under its stated setups, and test on your own repositories before trusting it with real changes.

Related