ModelBrief · GigaChat 4 · Topic Page
Last updated Nov 27, 2026

GigaChat 4 Deployment: SGLang Recipe, 2x8 H100

ModelBrief · Published 2026-11-27 · Fact-check 2026-11-27 · Reference: Hugging Face model card, SGLang cookbook

GigaChat 4 has no hosted API, so deployment is the whole of access. The good news is the serving side was delivered complete: SGLang supports it natively, vLLM is officially documented, and the cookbook went live with the model card, with tested two-node recipes from both frameworks. The bad news is the bar is genuinely high: the FP8 flagship needs 2 nodes × 8×H100 80GB — eight cards on one node cannot hold it. The official recipes, item by item, follow.

Hardware first: the flagship needs two nodes, the 37B one card

ModelReference setupParallelismNotes
708B FP8 (flagship)2 nodes × 8×H100 80GBTP16Weights exceed one node of 8×H100 80GB combined; the 8×H200 TP8 recipe is unverified
37B (compact)One H100 80GBSingle GPU~40GB weights, before KV cache and recurrent states

Eight H200 (141GB) cards on one node would hold more memory in theory, but the SGLang cookbook states the TP8 recipe is unverified — do not build on a single-node 8×H200 plan. Both frameworks' official recipes are two-node TP16.

SGLang recipe (native support, recommended)

SGLang natively supports GigaChat 4, including recurrent MTP and DFlash2 speculative decoding, per-request instant/reasoning mode selection, and tool calling. The deployment recipe was tested on SGLang commit ff14289793. Install:

python3 -m pip install \ "sglang @ git+https://github.com/sgl-project/sglang.git@ff142897935ec6ede004dea8439d6111110bd446#subdirectory=python"

Download the same model revision on both nodes, set HEAD_IP to the head node's IP and NODE_RANK to 0 or 1, and run on each:

sglang serve \ --model-path ai-sage/GigaChat4-708B-A41B \ --tp 16 \ --nnodes 2 \ --node-rank "$NODE_RANK" \ --dist-init-addr "${HEAD_IP}:20000" \ --mem-fraction-static 0.8 \ --max-running-requests 64 \ --cuda-graph-max-bs-decode 64 \ --reasoning-parser auto \ --tool-call-parser auto \ --speculative-algorithm EAGLE \ --speculative-num-steps 3 \ --speculative-eagle-topk 1 \ --speculative-num-draft-tokens 4 \ --host 0.0.0.0 \ --port 30000

This enables recurrent MTP speculative decoding with the built-in draft head. The cookbook offers three strategies: Low-Latency (MTP on — start here for chat and agent loops), High-Throughput (speculative decoding off, for tuning workloads with many concurrent requests — compare it with MTP on your own workload first), and DFlash2 (a separate BF16 draft with a learned path selector; download the dflash_draft/ directory first). Mind the two cache pools: DSA layers use a paged-attention KV pool, while GDN layers keep per-request recurrent and convolution states in a Mamba-style pool — --mamba-full-memory-ratio balances the two pools, --max-mamba-cache-size sets the state pool explicitly, and speculative decoding needs additional GDN state buffers for verification.

vLLM recipe (official docs, commit c0c9083)

vLLM also supports GigaChat 4, including recurrent MTP and DFlash2 speculative decoding, per-request mode selection and tool calling. Install from commit c0c9083:

git clone https://github.com/vllm-project/vllm.git cd vllm git fetch origin c0c90837262bf3059b3d7b20bf120ffbe197a785 git checkout --detach c0c90837262bf3059b3d7b20bf120ffbe197a785 python3 -m pip install --upgrade pip VLLM_USE_PRECOMPILED=1 python3 -m pip install -e .

Serve (two nodes, recurrent MTP; add --headless on the worker node):

vllm serve ai-sage/GigaChat4-708B-A41B \ --tensor-parallel-size 16 \ --enable-expert-parallel \ --distributed-executor-backend mp \ --nnodes 2 \ --node-rank "$NODE_RANK" \ --master-addr "$HEAD_IP" \ --master-port 20000 \ --no-numa-bind \ --gpu-memory-utilization 0.90 \ --max-num-seqs 16 \ --max-num-batched-tokens 4096 \ --compilation-config '{"max_cudagraph_capture_size":64}' \ --tool-call-parser gigachat4 \ --enable-auto-tool-choice \ --reasoning-parser gigachat4 \ --speculative-config '{"method":"mtp","num_speculative_tokens":3}' \ --host 0.0.0.0 \ --port 8000

Mode switching: per request, no restart

Both frameworks expose an OpenAI-compatible interface, and the mode is set per request: chat_template_kwargs.reasoning false for instant, true for reasoning; omitted, it defaults to reasoning. Thinking and the final answer are returned separately: message.reasoning_content and message.content in SGLang, message.reasoning and message.content in vLLM; max_tokens covers both. In multi-turn conversations, store thinking in the reasoning field of the same assistant message — do not create a separate reasoning role; drop_history_thinking can strip thinking from earlier turns.

curl http://localhost:30000/v1/chat/completions \ -H 'Content-Type: application/json' \ -d '{ "model": "ai-sage/GigaChat4-708B-A41B", "messages": [{"role": "user", "content": "What is 17 times 24?"}], "temperature": 1.0, "top_p": 1.0, "max_tokens": 4096, "chat_template_kwargs": {"reasoning": false} }'

Tool calling: GCML format, OpenAI-compatible

Tool calls use GigaChat's GCML format, and the gigachat4 parser converts GCML blocks into OpenAI message.tool_calls and removes the blocks from content. One block can contain several calls; the application executes the functions, appends the assistant message and a tool result for every matching tool_call_id, then requests the final answer. tool_choice="auto" lets the model decide whether to call, "required" forces a call and "none" disables calling — use "required" only on turns that need a call. When streaming, thinking and answer text arrive in separate delta fields, and control tokens (such as <think> and GCML delimiters) are removed by the parsers.

The 37B on one GPU, and GGUF

The 37B's official recipe is a single H100 80GB at ~40GB of weights (before KV cache and recurrent states). An official GGUF variant also exists (ai-sage/GigaChat4-708B-A41B-GGUF for the flagship, with the same variant categories for the 37B), suited to local inference frameworks such as llama.cpp — but the model card gives no GGUF quantisation levels or measured speeds, so check the repo files before deploying. Note the 37B is under a noncommercial licence — read the licence text before commercial use; see our licence and access guide.

Agent harnesses: Pi, Codex CLI, DeepSeek Harness

The model card's recommended agent harnesses are Pi, Codex CLI and DeepSeek Harness, all over the OpenAI-compatible interface. Sber verified interactive shell tool calls on an internal checkpoint with Pi 1.6.0, Codex CLI 0.171.0 and DeepSeek Harness 0.2.2-rc.5; Pi and DeepSeek Harness connect directly through Chat Completions, Codex through a Responses-to-Chat-Completions gateway. To verify connectivity, ask "How much RAM is available on this machine right now?" and check whether the model picks a shell tool to inspect memory and whether its answer matches the command output.

Context and concurrency: 1M is the configured value

The configured context window is 1M (YaRN factor 32, 32K base), but the request length a server can admit depends on cache memory: the startup log's context_len and max_total_num_tokens are authoritative, and a smaller --context-length should be set when the application does not need the full window. The official recipes set --max-running-requests 64 and --cuda-graph-max-bs-decode 64. The cookbook's serving measurements use 8192 input tokens and 1024 output tokens with greedy decoding at concurrency 1, 16 or 64, with TTFT and TPOT at P50 — but the cookbook publishes no measured throughput figures, so this site cites no tokens/second.

FAQ

Can the flagship run on one node of 8×H100?

No. The FP8 weights exceed the combined capacity of eight H100 80GB GPUs; the official recipe is 2 nodes × 8×H100 80GB (TP16). The 8×H200 TP8 recipe is unverified — do not build on a single-node plan.

SGLang or vLLM — which one?

Both are official recipes: SGLang is natively supported with the fullest cookbook (Low-Latency / High-Throughput / DFlash2 strategies); vLLM has official docs and a tested commit, c0c9083. Pick the one you already run — SGLang if you know SGLang, vLLM if you know vLLM; this site has no citable performance comparison between them.

How do I switch between instant and reasoning modes?

Per request, no restart: set chat_template_kwargs.reasoning to false for instant, true for reasoning; omitted, it defaults to reasoning. Thinking and the final answer are returned separately (message.reasoning_content in SGLang, message.reasoning in vLLM).

What does DFlash2 need downloaded?

The dflash_draft/ directory from the model repo (a separate 5-layer BF16 drafter), downloaded before launching; the draft config must identify the draft model as GigaChat4DFlash2DraftModel and contain the trained dflash_config; the draft must stay BF16 while the target can stay FP8. A draft trained for a different target size is not interchangeable.

ModelBrief's take: This is the most solid article in the topic, for a simple reason: it is a transcription of official recipes, not this site's own guesswork. Two frameworks, two ports, three strategies, two cache pools — every figure comes from the model card and the cookbook. Its limits should be stated too: no measured throughput figures, no verified 8×H200 recipe, no GGUF quantisation levels — check the official pages before deploying, and trust your own measurements once it runs.

Reference: Hugging Face — ai-sage/GigaChat4-708B-A41B · SGLang cookbook — GigaChat 4 · GigaChat 4 topic page (rewritten and organized by ModelBrief; facts per the model card and cookbook)