GigaChat 4 708B-A41B Hybrid MoE: Sparse Attention, MTP & SGLang Serving

GigaChat 4 (`ai-sage/GigaChat4-708B-A41B`) is an MIT-licensed 708B-parameter Mixture-of-Experts model activating 41B parameters per token across a 1M-token context window. Interleaving Gated DeltaNet and DeepSeek Sparse Attention with recurrent MTP or DFlash2 speculative decoding, it scores 80.89% on SWE-bench Verified and 79.55% on BFCL v4.
GigaChat 4 708B-A41B Hybrid MoE: Sparse Attention, MTP & SGLang Serving: GigaChat 4 (`ai-sage/GigaChat4-708B-A41B`) is an MIT-licensed 708B-parameter Mixture-of-Experts model activating 41B parameters per token across a 1M-token context window. Interleaving Gated DeltaNet and DeepSeek Sparse Attention with recurrent MTP or DFlash2 speculative decoding, it scores 80.89% on SWE-bench Verified and 79.55% on BFCL v4. Designed as a zero-dependency, open-source TypeScript architecture under the MIT License with native Model Context Protocol (MCP) support and deterministic phase state machines.
- 708B Total / 41B Active MoE: Routes 8 of 256 experts plus 1 shared expert per token across 64 decoder layers (hidden size 7,168) under an MIT license.
- 3:1 Gated DeltaNet + DSA Hybrid: Combines 48 fixed-state linear attention layers with 16 DeepSeek Sparse Attention layers selecting 2,048 tokens per query up to 1,048,576 context.
- Unified Instant & Reasoning Checkpoint: Toggles reasoning on or off per API call via `chat_template_kwargs.reasoning` without maintaining separate model weights.
- Dual Speculative Decoding Modes: Ships a built-in recurrent MTP draft head (3x smaller than GigaChat 3.5) and supports a 5-layer BF16 DFlash2 parallel drafter.
import { createAgent } from '@smoke-monkey/harness';const moeAgent = createAgent({agentId: 'gigachat4-708b-architect',provider: 'custom',baseUrl: 'http://localhost:30000/v1',model: 'ai-sage/GigaChat4-708B-A41B',workspacePath: process.cwd(),permissions: {read_file: 'allow',write_file: 'allow',run_command: 'ask',},sampling: {temperature: 1.0,topP: 1.0,maxTokens: 8192,extra_body: {chat_template_kwargs: { reasoning: true },},},});async function executeAudit() {const res = await moeAgent.run('Analyze multi-module dependency cycles across src/ and generate a JSONSchema-validated refactoring plan.');console.log('GigaChat 4 Result:', res.summary);}executeAudit().catch(console.error);
Watch: Related Video Guides
What is vLLM? Efficient AI Inference for Large Language Models
How inference works at scale? vLLM and SGLang inference engines
What Is GigaChat 4 708B-A41B? Hybrid Attention & MoE Specs
GigaChat 4 (ai-sage/GigaChat4-708B-A41B) is an open-weights MIT-licensed Mixture-of-Experts foundation model with 708B total parameters and 41B active parameters per token. Built across 64 decoder layers (hidden dimension 7,168), it interleaves 48 Gated DeltaNet linear-attention layers with 16 DeepSeek Sparse Attention (DSA) layers in a 3:1 ratio to support 1,048,576-token contexts.
The first 3 decoder layers use dense FFNs before transitioning to sparse MoE blocks containing 256 routed experts (top-8 active) plus 1 shared expert, stabilized by GatedNorm, Progressive Residual Warm-up (ProRes), projection-specific z-loss, and Dynamic Learning-Rate Rescaling (DLR). Context extension occurred in stages from 32K to 128K (indexer-only DSA warmup) and finally to 1M tokens via joint optimization.
Coding, Structured Output & Agentic Benchmarks (Reasoning vs Instant)
Unlike GigaChat 3.5, which split instant and reasoning weights into separate checkpoints, GigaChat 4 unifies both behaviors via multi-teacher on-policy distillation optimized with Muon. Passing chat_template_kwargs.reasoning: false switches a single serving deployment into fast instant mode.
| Benchmark Suite | GigaChat 4 (Reasoning) | GigaChat 4 (Instant) | DeepSeek V4 Flash 0731 (Reas.) | Qwen 3.5 397B (Reas.) |
|---|---|---|---|---|
| SWE-bench Verified (7h) | 80.89% | 80.82% | 81.80% | 73.00% |
| LiveCodeBench v6 | 88.82% | 78.77% | 90.00% | 86.64% |
| Terminal-Bench 2.0 (7h) | 71.26% | 60.47% | 55.01% | 56.18% |
| BFCL v4 (Tool Calling) | 79.55% | 63.62% | 73.12% | 69.10% |
| JSONSchemaBench | 99.28% | 88.31% | 94.00% | 96.26% |
| τ²-Bench (mean@3) | 83.31% | 66.75% | 83.30% | 78.83% |
| CoworkBench | 83.00% | 75.00% | 78.00% | 64.11% |
On SWE-bench Verified, instant mode retains 80.82% accuracy—nearly identical to reasoning mode's 80.89%—making it practical for latency-sensitive edit loops, while reasoning mode boosts BFCL v4 tool calling by +15.93 points and LiveCodeBench v6 by +10.05 points.
Speculative Decoding with Recurrent MTP vs DFlash2
GigaChat 4 includes a built-in recurrent EAGLE-3-style MTP layer (reused across draft steps to cut drafter parameters by ~3x) and supports an external 5-layer BF16 DFlash2 drafter predicting 8-token blocks (1 anchor + 7 draft positions).
Serving GigaChat 4 FP8 Across 2x8 H100 GPUs (SGLang & vLLM)
The official FP8 checkpoint deploys on two 8x H100 80GB nodes (--tp 16, --nnodes 2) using either SGLang (commit ff14289793) or vLLM (pull/69762). Both engines parse tool calls and reasoning_content out of the box.
# Deploy on Node 0 (HEAD_IP) and Node 1 via SGLang with Recurrent MTP
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 \
--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
# Or deploy via vLLM with Expert Parallelism and MTP
vllm serve ai-sage/GigaChat4-708B-A41B \
--tensor-parallel-size 16 --enable-expert-parallel \
--nnodes 2 --node-rank "$NODE_RANK" --master-addr "$HEAD_IP" --master-port 20000 \
--tool-call-parser gigachat4 --enable-auto-tool-choice \
--reasoning-parser gigachat4 \
--speculative-config '{"method":"mtp","num_speculative_tokens":3}'Hybrid Instant/Reasoning Routing in Smoke Monkey Canvas
Inside Smoke Monkey Canvas, teams bind a single GigaChat 4 TP16 cluster to multiple agent roles by toggling chat_template_kwargs.reasoning per subagent. Planning and architecture agents run with reasoning enabled for 79.55% BFCL v4 tool accuracy and 99.28% JSONSchema compliance, while routine file-patching workers switch to instant mode for lower latency without loading a second checkpoint.
Frequently Asked Questions
Q:How much hardware is needed to serve GigaChat 4 708B-A41B FP8?
The official SGLang and vLLM production recipes target two 8x NVIDIA H100 80GB nodes (TP16, 1,280 GB total HBM) with expert parallelism enabled. A GGUF repository (`ai-sage/GigaChat4-708B-A41B-GGUF`) is also published for quantized setups.
Q:How does GigaChat 4 achieve a 1M-token context window efficiently?
It interleaves 48 Gated DeltaNet linear-attention layers (maintaining a fixed-size recurrent state) with 16 DeepSeek Sparse Attention (DSA) layers in a 3:1 ratio, where each DSA query selectively attends to 2,048 tokens.
Q:How do I toggle instant vs reasoning mode in GigaChat 4?
Send `"chat_template_kwargs": {"reasoning": false}` in the OpenAI-compatible request payload for instant mode, or `true` (the default) for reasoning mode, which separates thinking into `message.reasoning_content`.
Q:What speculative decoding methods does GigaChat 4 support?
It ships a built-in recurrent Multi-Token Prediction (MTP) drafter compatible with EAGLE speculative flags in SGLang/vLLM, plus support for DFlash2, a separate 5-layer BF16 drafter predicting 7 draft tokens per anchor.
Related Alternatives & Comparisons
Related Architecture Guides
View all guidesBest Open Source Coding Agents in 2026: Free, Local & Fully Hackable Harnesses
MCP Server Security Best Practices: Hardening Model Context Protocol Agents in 2026
Open Source Coding Agent Harness: Build a Forkable, Local AI Engineering Runtime
Build with Smoke Monkey Harness
Zero dependencies. 24 built-in tools. Human-in-the-loop safety. 100% open source under the MIT License.