[Doc] cookbook: Add Recursive Flint cookbook (#45625)

This commit is contained in:
zijiexia
2026-10-21 08:58:16 -07:00
committed by GitHub
parent cdbd478422
commit 75878f27c8
5 changed files with 316 additions and 0 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

@@ -0,0 +1,151 @@
---
title: Flint
description: "Deploy Recursive's Flint with SGLang — a 40B Mixture-of-Experts model for fast, local agentic coding with a 262K context window — on NVIDIA H200, B200, B300, GB300, and DGX Spark."
tag: NEW
---
## Deployment
<a id="install" />
<Accordion title="Install SGLang">
Flint runs on the `lmsysorg/sglang:dev-flint` Docker image:
```bash Command
docker pull lmsysorg/sglang:dev-flint
```
For how to launch the image, see [Install → Method 3: Using Docker](../../../docs/get-started/install#method-3-using-docker). The **Docker** toggle in the command panel below produces the full `docker run` command; the **Python** toggle produces the inner `sglang serve ...` to run inside the container.
</Accordion>
Pick your hardware to generate the launch command.
import { Deployment } from "/src/snippets/_deployment.jsx";
import { config } from "/src/snippets/configs/RecursiveSI/flint.jsx";
<Deployment config={config} />
## 1. Model Introduction
**[Flint](https://huggingface.co/RecursiveSI/flint)** is a new open-weight **40B Mixture-of-Experts** model from Recursive, built for fast, local AI coding. Flint was developed using Recursive's Eureka Machine for automated AI research and is released under Apache 2.0.
<table style={{width: "100%", borderCollapse: "collapse", tableLayout: "fixed"}}>
<thead>
<tr style={{borderBottom: "2px solid #d55816"}}>
<th style={{textAlign: "left", padding: "10px 12px", fontWeight: 700}}>Model</th>
<th style={{textAlign: "right", padding: "10px 12px", fontWeight: 700}}>Total params</th>
<th style={{textAlign: "right", padding: "10px 12px", fontWeight: 700}}>Context</th>
<th style={{textAlign: "left", padding: "10px 12px", fontWeight: 700}}>Use</th>
</tr>
</thead>
<tbody>
<tr>
<td style={{padding: "9px 12px"}}><strong><a href="https://huggingface.co/RecursiveSI/flint">Flint</a></strong></td>
<td style={{padding: "9px 12px", textAlign: "right"}}>40B (MoE)</td>
<td style={{padding: "9px 12px", textAlign: "right"}}>262,144</td>
<td style={{padding: "9px 12px"}}>Fast, local agentic coding</td>
</tr>
</tbody>
</table>
**License:** Apache 2.0
**Resources:** [Hugging Face](https://huggingface.co/RecursiveSI/flint).
## 2. Advanced Usage
### 2.1 Reasoning
Launch with `--reasoning-parser flint` (included in the commands above). Thinking is separated into `message.reasoning_content`, and the final answer is returned in `message.content`.
<Accordion title="Reasoning Example (Python)">
```python Example
from openai import OpenAI
client = OpenAI(base_url="http://localhost:30000/v1", api_key="EMPTY")
response = client.chat.completions.create(
model="flint",
messages=[{"role": "user", "content": "What is 15% of 240?"}],
)
message = response.choices[0].message
print("=============== Reasoning ===============")
print(message.reasoning_content)
print("=============== Answer ===============")
print(message.content)
```
</Accordion>
<Accordion title="Example Output">
```text Output
=============== Reasoning ===============
We need answer simple. Need maybe show calculation. User asks "What is 15% of 240?" We can answer. Need be careful maybe just 36. Let's craft concise.
=============== Answer ===============
15% of 240 is **36**.
```
</Accordion>
### 2.2 Tool Calling
Launch with `--tool-call-parser flint` (included in the commands above) to surface structured tool calls via `message.tool_calls`.
<Accordion title="Tool Calling Example (Python)">
```python Example
import json
from openai import OpenAI
client = OpenAI(base_url="http://localhost:30000/v1", api_key="EMPTY")
tools = [
{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get the current weather for a city",
"parameters": {
"type": "object",
"properties": {"city": {"type": "string"}},
"required": ["city"],
},
},
}
]
response = client.chat.completions.create(
model="flint",
messages=[{"role": "user", "content": "What's the weather in Paris?"}],
tools=tools,
)
message = response.choices[0].message
print("=============== Reasoning ===============")
print(getattr(message, "reasoning_content", None))
print("=============== Content ===============")
print(message.content)
print("=============== Tool Calls ===============")
for call in message.tool_calls or []:
print(call.function.name, json.loads(call.function.arguments))
```
</Accordion>
<Accordion title="Example Output">
```text Output
=============== Reasoning ===============
The user asked for the weather in Paris, and I have a get_weather tool available that takes a city parameter. I should call it with city 'Paris' to get the current weather.
=============== Content ===============
I'll get the current weather for Paris for you.
=============== Tool Calls ===============
get_weather {'city': 'Paris'}
```
</Accordion>
+6
View File
@@ -187,6 +187,12 @@ metatags:
href="/cookbook/autoregressive/Tencent/Hy4-Preview"
img="/cards/logos/tencent.png"
/>
<Card
title="Recursive"
mode="card"
href="/cookbook/autoregressive/Recursive/Flint"
img="/cards/logos/recursive.png"
/>
<Card
title="Poolside"
mode="card"
+6
View File
@@ -1496,6 +1496,12 @@
"cookbook/autoregressive/Tencent/Hunyuan3-Preview"
]
},
{
"group": "Recursive",
"pages": [
"cookbook/autoregressive/Recursive/Flint"
]
},
{
"group": "Poolside",
"pages": [
@@ -0,0 +1,153 @@
export const config = {
modelName: "Flint",
supportedHardware: ["h200", "b200", "b300", "gb300", "dgx-spark"],
// A single hidden dim: the engine renders nothing when matchDims is empty.
matchDims: [
{ id: "variant", title: "Model Variant", showWhen: () => false, options: [{ id: "default", label: "Default" }] },
],
modelNames: {
default: "RecursiveSI/flint",
},
placeholders: {
HOST_IP: { target: "command", label: "Bind host", default: "0.0.0.0" },
PORT: { target: "command", label: "Bind port", default: "30000" },
HF_TOKEN: { target: "command", label: "HF token (Docker)", default: "<your-hf-token>" },
CURL_HOST: { target: "curl", label: "Server host", default: "localhost" },
CURL_PORT: { target: "curl", label: "Server port", default: "30000" },
},
curl: `curl http://{{CURL_HOST}}:{{CURL_PORT}}/v1/chat/completions \\
-H 'Content-Type: application/json' \\
-d '{ "model": "flint", "messages": [{"role":"user","content":"Hello"}] }'`,
showPlaygroundLink: false,
dockerImages: {
h200: "lmsysorg/sglang:dev-flint",
b200: "lmsysorg/sglang:dev-flint",
b300: "lmsysorg/sglang:dev-flint",
gb300: "lmsysorg/sglang:dev-flint",
"dgx-spark": "lmsysorg/sglang:dev-flint",
},
github: {
cookbookModel: "RecursiveSI/flint",
},
cells: [
{
match: { hw: "h200", variant: "default" },
verified: true,
nnodes: 1,
env: [],
// No backend flags: FA4 and the trtllm MoE are Blackwell-only, and on Hopper Flint resolves to FA3 and Triton MoE.
flags: [
"--model-path {{MODEL_NAME}}",
"--served-model-name flint",
"--tp-size 1",
"--enable-fp32-lm-head",
"--context-length 262144",
"--chunked-prefill-size 4096",
"--enable-unified-memory",
"--mem-fraction-static 0.8",
"--tool-call-parser flint",
"--reasoning-parser flint",
"--host {{HOST_IP}}",
"--port {{PORT}}",
],
},
{
match: { hw: "b200", variant: "default" },
verified: true,
nnodes: 1,
env: [],
flags: [
"--model-path {{MODEL_NAME}}",
"--served-model-name flint",
"--tp-size 1",
"--attention-backend fa4",
"--moe-runner-backend flashinfer_trtllm_routed",
"--enable-fp32-lm-head",
"--context-length 262144",
"--chunked-prefill-size 4096",
"--swa-full-tokens-ratio 0.05",
"--mem-fraction-static 0.8",
"--tool-call-parser flint",
"--reasoning-parser flint",
"--host {{HOST_IP}}",
"--port {{PORT}}",
],
},
{
match: { hw: "b300", variant: "default" },
verified: true,
nnodes: 1,
env: [],
flags: [
"--model-path {{MODEL_NAME}}",
"--served-model-name flint",
"--tp-size 1",
"--attention-backend fa4",
"--moe-runner-backend flashinfer_trtllm_routed",
"--enable-fp32-lm-head",
"--context-length 262144",
"--chunked-prefill-size 4096",
"--swa-full-tokens-ratio 0.05",
"--mem-fraction-static 0.8",
"--tool-call-parser flint",
"--reasoning-parser flint",
"--host {{HOST_IP}}",
"--port {{PORT}}",
],
},
{
match: { hw: "gb300", variant: "default" },
verified: true,
nnodes: 1,
env: [],
flags: [
"--model-path {{MODEL_NAME}}",
"--served-model-name flint",
"--tp-size 1",
"--attention-backend fa4",
"--moe-runner-backend flashinfer_trtllm_routed",
"--enable-fp32-lm-head",
"--context-length 262144",
"--chunked-prefill-size 4096",
"--swa-full-tokens-ratio 0.05",
"--mem-fraction-static 0.8",
"--tool-call-parser flint",
"--reasoning-parser flint",
"--host {{HOST_IP}}",
"--port {{PORT}}",
],
},
{
match: { hw: "dgx-spark", variant: "default" },
verified: true,
nnodes: 1,
env: [],
// No backend flags: on GB10 Flint resolves to Triton attention and Triton MoE.
// GB10 counts page cache as used GPU memory, so evict each weight shard after loading it.
flags: [
"--model-path {{MODEL_NAME}}",
"--served-model-name flint",
"--tp-size 1",
"--enable-fp32-lm-head",
"--context-length 262144",
"--chunked-prefill-size 4096",
"--enable-unified-memory",
"--mem-fraction-static 0.8",
"--weight-loader-drop-cache-after-load",
"--tool-call-parser flint",
"--reasoning-parser flint",
"--host {{HOST_IP}}",
"--port {{PORT}}",
],
},
],
};