GigaChat 4 37B-A4B
Technical Report · Blog · Model Collection · SGLang Cookbook · GitHub
GigaChat 4 37B-A4B is a compact hybrid model in the GigaChat 4 family. It combines a Mixture-of-Experts (MoE) architecture with DeepSeek Sparse Attention (DSA) and Gated DeltaNet (GDN) with 37B total parameters and 4B active parameters per token. The model supports multilingual conversation, multi-step agentic tasks, tool calling, structured outputs, mathematical reasoning, coding, and question answering over long documents.
Unlike GigaChat 3.5, which offered separate instant and reasoning checkpoints, GigaChat 4 supports both modes within a single model, selectable per request. It features a one-million-token context window and supports speculative decoding with either a recurrent MTP drafter or a separate DFlash2 drafter.
This repository contains the final BF16 instruction-tuned model, which supports both instant and reasoning modes.
Model variants
| Repository | Weights | Training stage |
|---|---|---|
| GigaChat4-37B-A4B | FP8 | Instruction-tuned |
| GigaChat4-37B-A4B-GGUF | GGUF | Instruction-tuned |
| GigaChat4-37B-A4B-bf16 | BF16 | Instruction-tuned |
| GigaChat4-37B-A4B-base | BF16 | Base |
| GigaChat4-37B-A4B-checkpoints | BF16 | Base, intermediate checkpoints |
Model architecture
GigaChat 4 extends the hybrid backbone of GigaChat 3.5 by adding DSA to its multi-head latent attention (MLA) layers.
| Property | Value |
|---|---|
| Total / active parameters per token | 37B / 4B |
| Decoder layers / hidden size | 32 / 2,560 |
| Linear-attention / sparse-attention layers | 24 / 8 |
| Routed experts / active routed experts / shared experts | 192 / 8 / 1 |
| Initial decoder layers with dense FFNs | 1 |
| Maximum context length | 1,048,576 tokens |
| DSA tokens selected per query | 2,048 |
| Built-in MTP layers | 1, reused recurrently |
Mixture-of-Experts (MoE)
This model has 37B total parameters, with 4B active per token. Each MoE layer combines an attention block with shared and routed experts, selecting 8 of 192 routed experts per token alongside a shared expert. GatedNorm is applied to block outputs before residual addition.
Hybrid attention
The model interleaves GatedDeltaNet and DSA layers in a 3:1 ratio. GatedDeltaNet maintains a fixed-size recurrent state for efficient processing, while DSA selectively attends to 2,048 earlier tokens per query, enabling retrieval of information from long contexts.
The context window was progressively extended from 32K to 128K and finally to 1M tokens. DSA was introduced at 128K through indexer-only training, followed by joint optimization of the indexer and backbone at 1M tokens.
Speculative decoding
GigaChat 4 supports two approaches to speculative decoding:
Recurrent MTP: An EAGLE-3-style drafter that reuses a single prediction layer across draft steps, reducing drafter parameters by approximately 3× compared to GigaChat 3.5's three independent MTP blocks without sacrificing draft quality.
DFlash2: A separate five-layer BF16 drafter that predicts tokens in parallel using blocks of eight positions: one anchor token and seven draft positions.
Both approaches accelerate autoregressive generation by allowing the target model to verify multiple draft tokens in a single forward pass.
Training and alignment
Pretraining stability
GigaChat 4 37B builds on the training techniques used for the 708B model, with additional improvements to optimizer scaling and stability:
Muon with μP-based scaling was used throughout pretraining and midtraining. We derived scaling rules for Muon's weight updates that account for GatedDeltaNet and gated normalization, allowing hyperparameters tuned on a 4B model to transfer to 37B. During midtraining, we increased the number of Newton–Schulz iterations per optimizer step.
Progressive residual warm-up (ProRes) gradually increases residual branch contributions during early training, with deeper layers warming up more slowly to prevent activation growth.
Projection-specific z-loss and logit softcapping control activation outliers and extreme output logits.
Dynamic learning-rate rescaling (DLR) adjusts learning rates for individual MoE blocks when persistent expert-load imbalance is detected, without affecting the rest of the model.
Alignment
Following supervised fine-tuning, expert models were trained using reinforcement learning on mathematics, coding, tool use, and multi-turn agent workflows.
These experts were then consolidated into a single model through multi-teacher on-policy distillation, where the student generates its own responses and receives task-specific feedback from the corresponding teachers.
The resulting model supports both instant and reasoning modes within a single checkpoint.
For more details on the GigaChat 4 architecture and training methodology, see the GigaChat 4 technical report. A dedicated technical report for GigaChat 4 37B will be published later.
Evaluation Results
The following tables summarize GigaChat 4 37B's performance across a broad range of benchmarks. All scores are reported as percentages unless otherwise specified. A dash indicates an unreported result.
Reasoning
Code
| Benchmark | GigaChat 4 37B | GigaChat 3.5 37B | Qwen3.5-35B-A3B | Qwen3.6-35B-A3B | GigaChat 3.5 Ultra 432B |
|---|---|---|---|---|---|
| LiveCodeBench v6 | 85.00 | 64.00 | 69.00 | 65.00 | 85.40 |
| SWE-bench Verified | 70.80 | 32.40 | 60.60 | 67.80 | 64.70 |
| SWE-bench Multilingual | 61.67 | 26.00 | 57.30 | 60.70 | — |
| NL2Repo (mean score / pass rate) | 14.89 / 25.03 | 3.20 / 3.40 | 11.40 / 5.70 | 30.30 / 17.70 | 5.00 / — |
| Terminal-Bench 2.0 | 38.20 | 22.50 | 33.70 | 48.30 | 30.30 |
| Terminal-Bench 2.1 | 39.33 | 22.50 | 34.80 | 49.40 | — |
General
| Benchmark | GigaChat 4 37B | GigaChat 3.5 37B | Qwen3.5-35B-A3B | Qwen3.6-35B-A3B | GigaChat 3.5 Ultra 432B |
|---|---|---|---|---|---|
| IFBench (prompt-level loose) | 75.00 | 61.00 | 64.30 | 58.00 | 77.00 |
| JSONSchemaBench | 96.00 | 87.00 | 94.20 | 42.00 | 93.01 |
| StructEval Text | 86.00 | 75.00 | 78.90 | 85.60 | 85.00 |
| POLLUX | — | 73.00 | 68.60 | 71.00 | 75.50 |
| GraphWalks | 63.00 | 13.00 | 60.50 | 46.00 | 38.00 |
| Natural Plan | 92.00 | 51.00 | 75.20 | 76.00 | 80.19 |
| NIH Complex | 99.00 | 94.00 | 96.90 | 67.00 | 99.16 |
| AA-LCR | 54.00 | 18.70 | 66.00 | 60.70 | 25.00 |
STEM
| Benchmark | GigaChat 4 37B | GigaChat 3.5 37B | Qwen3.5-35B-A3B | Qwen3.6-35B-A3B | GigaChat 3.5 Ultra 432B |
|---|---|---|---|---|---|
| GPQA Diamond | 70.00 | 66.00 | 85.00 | 80.00 | 82.30 |
| HMMT (pass@8) | 95.00 | 86.70 | 87.00 | 83.00 | 93.00 |
| HMMT (mean@8) | 87.00 | 61.50 | 74.00 | 70.00 | — |
| AIME 2025 (pass@8) | 93.00 | 80.00 | 93.00 | 93.00 | 93.00 |
| AIME 2025 (mean@8) | 88.00 | 73.00 | 88.00 | 92.00 | 89.00 |
| AIME 2026 (pass@8) | 93.00 | 93.00 | 97.00 | 97.00 | 97.00 |
| AIME 2026 (mean@8) | 92.00 | 78.00 | 88.00 | 87.00 | 91.00 |
| IMO-AnswerBench | 76.00 | 60.00 | 74.00 | 76.00 | 73.00 |
| HLE (text only) | 9.00 | 6.00 | 19.00 | 20.00 | 13.00 |
Agentic
| Benchmark | GigaChat 4 37B | GigaChat 3.5 37B | Qwen3.5-35B-A3B | Qwen3.6-35B-A3B | GigaChat 3.5 Ultra 432B |
|---|---|---|---|---|---|
| BFCL (overall accuracy) | 72.00 | 63.00 | 69.00 | 67.00 | 58.59 |
| τ³-Bench (mean@3) | 57.00 | 41.20 | 53.60 | 63.30 | 47.80 |
| τ²-Bench (mean@3) | 73.00 | 53.40 | 69.40 | 80.00 | 61.58 |
| τ³-Bench Banking (mean@3) | 9.00 | 4.80 | 6.20 | 8.60 | 8.93 |
| CoworkBench (Pi) | 59.48 | 5.80 | 39.00 | 57.00 | 25.00 |
| Toolathlon | 39.00 | 18.90 | 40.00 | 42.00 | 1.41 |
| SkillsBench (without skills) | 8.62 | 1.20 | 9.00 | 14.00 | — |
| SkillsBench (with skills) | 23.80 | 3.70 | 25.00 | 35.00 | — |
| JobBench | 23.28 | 2.50 | 9.10 | 17.10 | — |
Instant
Code
| Benchmark | GigaChat 4 37B | GigaChat 3.5 37B | Qwen3.5-35B-A3B | Qwen3.6-35B-A3B | GigaChat 3.5 Ultra 432B |
|---|---|---|---|---|---|
| LiveCodeBench v6 | 52.00 | 49.00 | 57.63 | 46.45 | 56.20 |
| SWE-bench Verified | 70.80 | 34.00 | 57.80 | 63.40 | 39.70 |
| SWE-bench Multilingual | 61.67 | 7.00 | 54.30 | 59.70 | 21.60 |
| Terminal-Bench 2.0 | 38.20 | 5.60* | 36.00 | 44.90* | 12.94 |
| Terminal-Bench 2.1 | 39.33 | 7.90 | 46.10 | 46.10* | — |
General
| Benchmark | GigaChat 4 37B | GigaChat 3.5 37B | Qwen3.5-35B-A3B | Qwen3.6-35B-A3B | GigaChat 3.5 Ultra 432B |
|---|---|---|---|---|---|
| IFBench (prompt-level loose) | 48.00 | 35.00 | 41.30 | 37.30 | 43.66 |
| JSONSchemaBench | 86.00 | 85.00 | 91.00 | 92.10 | 83.94 |
| StructEval Text | 87.00 | 72.00 | 83.80 | 82.40 | 74.35 |
| POLLUX | — | 70.00 | 65.10 | — | 74.25 |
| GraphWalks | 26.00 | 7.00 | 56.20 | 55.60 | 19.99 |
| Natural Plan | 45.00 | 21.00 | 44.10 | 44.60 | 66.42 |
| NIH Complex | 92.00 | 82.00 | 96.60 | 99.99 | 97.11 |
| AA-LCR | 54.00 | 10.70 | 52.70 | 52.30 | 27.60 |
STEM
| Benchmark | GigaChat 4 37B | GigaChat 3.5 37B | Qwen3.5-35B-A3B | Qwen3.6-35B-A3B | GigaChat 3.5 Ultra 432B |
|---|---|---|---|---|---|
| GPQA Diamond | 55.00 | 58.00 | 78.30 | 81.80 | 61.11 |
| HMMT (pass@8) | 67.00 | 73.30 | 71.70 | 80.00 | 55.00 |
| HMMT (mean@8) | — | 46.90 | 49.80 | 56.70 | — |
| AIME 2025 (pass@8) | 73.00 | 67.00 | 93.30 | 90.00 | 93.00 |
| AIME 2025 (mean@8) | 39.00 | 50.00 | 76.30 | 72.50 | 68.00 |
| AIME 2026 (pass@8) | 80.00 | 77.00 | 93.30 | 93.30 | 83.00 |
| AIME 2026 (mean@8) | 57.00 | 55.00 | 71.30 | 76.30 | 67.00 |
| IMO-AnswerBench | 35.00 | 44.00 | 59.20 | 56.00 | 32.00 |
| HLE (text only) | 4.00 | 4.00 | 12.20 | 12.90 | 4.00 |
Agentic
| Benchmark | GigaChat 4 37B | GigaChat 3.5 37B | Qwen3.5-35B-A3B | Qwen3.6-35B-A3B | GigaChat 3.5 Ultra 432B |
|---|---|---|---|---|---|
| BFCL (overall accuracy) | 49.00 | 37.00 | 57.80 | 55.00 | 51.57 |
| τ³-Bench (mean@3) | 47.30 | 40.80 | 60.20 | 59.40 | 50.04 |
| τ²-Bench (mean@3) | 60.00 | 54.00 | 78.50 | 78.00 | 68.71 |
| τ³-Bench Banking (mean@3) | 10.00 | 2.10* | 5.50 | 3.80 | 5.15 |
Evaluation Notes
IFBench uses prompt-level loose scoring. NL2Repo entries report mean score / pass rate, in that order. HLE uses the text subset.
Usage
SGLang
GigaChat 4 is natively supported in SGLang, including recurrent MTP and DFlash2 speculative decoding, per-request instant/reasoning mode selection, and tool calling.
For detailed deployment instructions, hardware configurations, API examples, and performance benchmarks, see the GigaChat 4 SGLang cookbook.
The deployment recipe below was tested on SGLang commit ff14289793.
Installation
python3 -m pip install \
"sglang @ git+https://github.com/sgl-project/sglang.git@ff142897935ec6ede004dea8439d6111110bd446#subdirectory=python"
Deployment
The BF16 model can be deployed on a single node with two H100 80GB GPUs (TP2). The model weights require approximately 76.5 GB of GPU memory, with additional memory needed for attention caches, recurrent states, and activations.
sglang serve \
--model-path ai-sage/GigaChat4-37B-A4B-bf16 \
--tp 2 \
--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 configuration enables recurrent MTP speculative decoding using the built-in draft head. For DFlash2 deployment and alternative serving configurations, refer to the cookbook.
Instant and reasoning modes
Both modes are available through the same OpenAI-compatible API. Set chat_template_kwargs.reasoning to false for instant mode or true for reasoning mode.
curl http://localhost:30000/v1/chat/completions \
-H 'Content-Type: application/json' \
-d '{
"model": "ai-sage/GigaChat4-37B-A4B-bf16",
"messages": [
{"role": "user", "content": "What is 17 times 24?"}
],
"temperature": 1.0,
"top_p": 1.0,
"repetition_penalty": 1.0,
"max_tokens": 4096,
"chat_template_kwargs": {"reasoning": false}
}'
The chat template enables reasoning by default when the argument is omitted. With the reasoning parser enabled, the response separates thinking into message.reasoning_content and the final answer into message.content.
For tool calling, multi-turn conversations, streaming, and advanced inference settings, see the SGLang cookbook.
vLLM
GigaChat 4 supports inference with vLLM, including recurrent MTP and DFlash2 speculative decoding, per-request instant/reasoning mode selection, and tool calling.
The following example uses vLLM commit c0c9083 from the GigaChat 4 integration PR.
Installation
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 .
Deployment
The example below uses a single node with two H100 80GB GPUs (TP2) and recurrent MTP speculative decoding enabled.
vllm serve ai-sage/GigaChat4-37B-A4B-bf16 \
--tensor-parallel-size 2 \
--enable-expert-parallel \
--no-numa-bind \
--gpu-memory-utilization 0.90 \
--max-num-seqs 64 \
--compilation-config '{"max_decode_cudagraph_capture_requests": 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
Instant and reasoning modes
Both modes are available through the same OpenAI-compatible API. Set chat_template_kwargs.reasoning to false for instant mode or true for reasoning mode.
curl http://localhost:8000/v1/chat/completions \
-H 'Content-Type: application/json' \
-d '{
"model": "ai-sage/GigaChat4-37B-A4B-bf16",
"messages": [
{"role": "user", "content": "Prove that the sum of the first n odd positive integers is n**2. Write a proof in the style of Eminem’s lyrics."}
],
"max_tokens": 8192,
"temperature": 1.0,
"top_p": 1.0,
"chat_template_kwargs": {"reasoning": true}
}'
The chat template enables reasoning by default when the argument is omitted. With the reasoning parser enabled, the response separates thinking into message.reasoning and the final answer into message.content. The max_tokens limit covers both.
Tool calling
The following example demonstrates tool calling in reasoning mode using the OpenAI-compatible Chat Completions API.
curl http://localhost:8000/v1/chat/completions \
-H 'Content-Type: application/json' \
-d '{
"model": "ai-sage/GigaChat4-37B-A4B-bf16",
"messages": [
{"role": "user", "content": "What is the weather in London right now?"}
],
"tools": [
{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get the current weather in a city",
"parameters": {
"type": "object",
"properties": {
"city": {"type": "string"}
},
"required": ["city"]
}
}
}
],
"tool_choice": "auto",
"max_tokens": 2000,
"temperature": 0.6,
"chat_template_kwargs": {"reasoning": true}
}'
When the model requests a tool, the response contains the function name and arguments in message.tool_calls. Execute the function in your application, append the assistant message and a tool message with the matching tool_call_id, then request the final answer.
Recommended agent harnesses
We recommend Pi for agentic tasks with GigaChat 4 37B-A4B. Codex CLI and DeepSeek Harness are alternatives for interactive terminal work. You can use each harness’s standard prompts and tools without fine-tuning the checkpoint for that harness.
We 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 connected directly through Chat Completions. Codex used a Responses-to-Chat-Completions gateway.
The examples below use the SGLang base URL http://127.0.0.1:30000/v1 and the BF16 model ID ai-sage/GigaChat4-37B-A4B-bf16. For the vLLM deployment above, the base URL is http://127.0.0.1:8000/v1. If you set a custom served name, use the model ID returned by GET /v1/models.
| Harness | API used by the harness | Required endpoint |
|---|---|---|
| Pi | OpenAI Chat Completions | POST /v1/chat/completions |
| Codex CLI | OpenAI Responses | POST /v1/responses |
| DeepSeek Harness | OpenAI Chat Completions | POST /v1/chat/completions |
Pi
Add gigachat to the providers object in ~/.pi/agent/models.json.
{
"providers": {
"gigachat": {
"baseUrl": "http://127.0.0.1:30000/v1",
"api": "openai-completions",
"apiKey": "$GIGACHAT_API_KEY",
"models": [
{ "id": "ai-sage/GigaChat4-37B-A4B-bf16" }
]
}
}
}
Pi reads GIGACHAT_API_KEY from the environment. Export your endpoint’s key, or use export GIGACHAT_API_KEY=local for an unauthenticated local server. Run pi from your project directory and select GigaChat 4 37B-A4B with /model.
Codex CLI
Codex requires a Responses API endpoint that can stream tool calls and accept tool results on subsequent requests. Connect directly if your deployment supports the tool types sent by your Codex version. If it serves only Chat Completions or rejects those tool types, set base_url to the API root of a compatible Responses-to-Chat-Completions gateway.
For Codex CLI 0.134.0 and later, save this profile as ~/.codex/gigachat.config.toml.
model = "ai-sage/GigaChat4-37B-A4B-bf16"
model_provider = "gigachat"
[model_providers.gigachat]
name = "GigaChat 4"
base_url = "http://127.0.0.1:30000/v1"
wire_api = "responses"
For an authenticated endpoint, add env_key = "GIGACHAT_API_KEY" under [model_providers.gigachat] and export the key. If your gateway rejects the built-in web_search tool, add web_search = "disabled" at the top level, above [model_providers.gigachat]. We used this setting with our gateway.
Codex CLI before 0.134.0
Put both sections in ~/.codex/config.toml.
[model_providers.gigachat]
name = "GigaChat 4"
base_url = "http://127.0.0.1:30000/v1"
wire_api = "responses"
[profiles.gigachat]
model = "ai-sage/GigaChat4-37B-A4B-bf16"
model_provider = "gigachat"
When upgrading, move the profile settings into ~/.codex/gigachat.config.toml, then remove the old [profiles.gigachat] section and any top-level profile = "gigachat" setting from the base file.
Start an interactive session from your project directory.
codex --profile gigachat
DeepSeek Harness
For the interactive terminal UI, install the tested launcher and plugin versions.
npm install -g @deepseek-ai/[email protected]
dsh plugin --profile tui add @deepseek-harness-tui/[email protected]
Save the following as gigachat-dsh.yml. The interactive TUI and the headless CLI use the same configuration.
- id: llm-pi-ai
config:
providers:
gigachat:
api: openai-completions
baseURL: http://127.0.0.1:30000/v1
apiKeyEnv: GIGACHAT_API_KEY
models:
- id: ai-sage/GigaChat4-37B-A4B-bf16
- id: agent-default-model
config:
provider: gigachat
model: ai-sage/GigaChat4-37B-A4B-bf16
Export GIGACHAT_API_KEY with your endpoint’s key, or set it to local for an unauthenticated server. Launch the TUI from the directory containing the configuration.
dsh --profile tui --patch ./gigachat-dsh.yml
Verify the connection and tool calling
To check that the harness can reach the model, execute a tool, and return its output to the model, ask this question in an interactive session:
How much RAM is available on this machine right now?
The model chooses how to inspect memory. Look for a shell tool call in the session and check that the answer matches the available RAM in the command output.
You can run the same check from a script with the DeepSeek Harness headless CLI.
dsh --profile headless --patch ./gigachat-dsh.yml \
'How much RAM is available on this machine right now?'
License
GigaChat 4 37B-A4B is released under the Noncommercial License for individuals 1.0.
- Downloads last month
- 3