Skip to main content
Use Flint’s SGLang serving bundle to run an OpenAI-compatible server on NVIDIA GPUs. The bundle includes the model, tokenizer, Flint plugin, patched kernels, Dockerfile, and hardware-specific launch scripts.

Requirements

This recipe serves BF16 weights on one GPU per replica. 80 GB GPUs cannot run this single-GPU BF16 recipe. B200 and GB200/GB300 use the Blackwell configuration but have not been validated with this bundle. The Mac requirements apply to rec, not this deployment. For older datacenter drivers, confirm that the container runtime loads the forward-compatibility libraries at /usr/local/cuda/compat. A driver compatibility error should be resolved before loading weights.

Prepare the serving bundle

Download the BF16 model and serving kit from RecursiveSI/flint. The commands below pin the revision used for this guide so the weights, tokenizer, configurations, and launch scripts stay together.
If the repository requires access, sign in with a Hugging Face token that can read it. Use the model license published with the weights; the license in sglang/ applies to the serving code.
Run in Bash, using your Python environment:
Download into a new directory for this revision, verify its checksums, then build the image:
The download includes roughly 80 GB of weights. Keep the complete directory, including SHA256SUMS and sglang/, for the launch commands below. When updating revisions, use a new directory: a Hugging Face download does not remove files deleted upstream. The bundled Dockerfile pins SGLang 0.5.16-cu130 by image digest and installs flint_sglang 0.1.2, FlashInfer 0.6.16.post1, and the Flint kernel patches. It includes PyTorch 2.11.0+cu130, Transformers 5.12.1, and sglang-router 0.3.2. A stock SGLang image alone does not contain this integration.

Start one replica

Run one of the following commands from the same bundle directory. Both mount the downloaded model at /model, use GPU 0, and publish the API only on localhost.
Check startup progress and readiness:
First startup takes roughly four minutes on B300 with fast local storage; concurrent loads from shared storage can take up to 15 minutes. Wait for the readiness log and a successful health check before sending requests. The model ID is flint. The scripts listen on all interfaces inside the container and do not enable authentication by default. Keep the localhost mapping above for local clients. For a network deployment, restrict access to a private network or authenticated gateway; the scripts also accept --api-key for server authentication.

Exact server configuration

The launch scripts supply these flags automatically: Both scripts set SGLANG_EXTERNAL_MODEL_PACKAGE=flint_sglang and FLASHINFER_USE_CUDA_NORM=1. Keep these settings and the bundled tokenizer unchanged. Arguments after the script name override its defaults. For example, append --mem-fraction-static 0.85 to change the B300 memory allocation. Start with the tested defaults, then measure your workload before changing them. --mem-fraction-static allocates memory for weights and KV pools. --swa-full-tokens-ratio controls the sliding-window pool relative to the full-attention pool: increase it for many short concurrent requests, decrease it for fewer long requests. The 262,144-token context is specific to this BF16 configuration; input and generated tokens must fit within it. Tensor, expert, and pipeline parallelism, DP attention, quantized weights or KV cache, and speculative decoding have not been validated with this bundle. Do not replace the MoE runner with flashinfer_trtllm or triton_kernel, enable a MoE all-to-all backend, or switch attention to flashinfer: those paths do not preserve the required Flint routing or attention behavior.

Send requests and verify tools

Install the client dependency in your Python environment:
A short request uses the standard OpenAI client:
unused is a client placeholder for the localhost server above. If you enabled server authentication, use the configured key instead. Run the bundled examples from the model directory to check reasoning, tool calls, and follow-up answers:
The examples exercise a full tool round trip, nested argument schemas, and parallel calls with canned tool results. Before connecting a coding harness, also verify streaming and the complete tool cycle in that client.

Client settings

  • Use temperature 1.0, top-p 0.95, and top-k 20. These are also the bundle’s generation defaults.
  • For difficult tasks, allow at least 32,768 output tokens, subject to the remaining context budget. Reasoning counts toward max_tokens; finish_reason: "length" can mean the answer or tool call was cut off.
  • Flint decides whether to reason on each turn. This integration has no supported reasoning toggle or budget; thinking and enable_thinking template settings have no effect. Preserve reasoning_content when replaying assistant messages.
  • Send message content as strings, and include tool definitions on every tool-enabled request. Return the received function.arguments JSON string unchanged in the assistant tool-call record, followed by one tool result per call in order.
  • Set strict: true on a function definition when its arguments must match its JSON schema. Keep all three Flint parser/grammar flags enabled.
  • For structured answers, use response_format with json_schema or json_object. The Flint grammar permits reasoning before the constrained answer. If both tools and a response format are supplied, only the response-format constraint applies.
For the general request interface, see SGLang’s request documentation.

Scale across GPUs and nodes

Scale this configuration with independent single-GPU replicas behind the bundled router. Each replica holds a complete copy of the weights; this does not split the model across GPUs. On each eight-GPU node, use the same bundle revision and image. Set FLINT_NODE_IP to that node’s private interface address. Run from its bundle directory:
For H200 nodes, set SERVE_SCRIPT=serve_h200.sh. Restrict worker ports to the router’s private network. Check each worker’s /health_generate endpoint before routing traffic. On a Linux host that can reach every worker, build or load the same image and set FLINT_IMAGE to its tag. Replace the example hostnames below with your private node names:
Clients on the router host use http://127.0.0.1:8000/v1, model flint. For remote clients, place an authenticated gateway in front of the router. Run the same client and tool checks against this endpoint. serve_node_8x.sh stops all eight replicas if one exits. Use one container per GPU when you need independent restarts, with a distinct GPU and published port for each container.

Use an existing container

For enroot/pyxis or another writable container environment, start from the exact base image pinned in the bundle’s sglang/Dockerfile. Inside that container:
Use serve_b300.sh for B300. The installer changes the container’s Python packages and kernels in place; it needs network access and a writable Python installation. Save the resulting container before reuse. A fresh base image does not contain Flint support.

Troubleshooting

Contact support@recursive.com with the full model revision, image ID, GPU/driver details, launch flags, and relevant logs. For output problems, include a sanitized request and response. Remove keys and private prompt data before sharing.