Instructions to use ai-sage/GigaChat4-708B-A41B-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use ai-sage/GigaChat4-708B-A41B-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf ai-sage/GigaChat4-708B-A41B-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf ai-sage/GigaChat4-708B-A41B-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf ai-sage/GigaChat4-708B-A41B-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf ai-sage/GigaChat4-708B-A41B-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf ai-sage/GigaChat4-708B-A41B-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf ai-sage/GigaChat4-708B-A41B-GGUF:Q4_K_M
Use Docker
docker model run hf.co/ai-sage/GigaChat4-708B-A41B-GGUF:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use ai-sage/GigaChat4-708B-A41B-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ai-sage/GigaChat4-708B-A41B-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ai-sage/GigaChat4-708B-A41B-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ai-sage/GigaChat4-708B-A41B-GGUF:Q4_K_M
- Ollama
How to use ai-sage/GigaChat4-708B-A41B-GGUF with Ollama:
ollama run hf.co/ai-sage/GigaChat4-708B-A41B-GGUF:Q4_K_M
- Unsloth Desktop
- Pi
How to use ai-sage/GigaChat4-708B-A41B-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf ai-sage/GigaChat4-708B-A41B-GGUF:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "ai-sage/GigaChat4-708B-A41B-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use ai-sage/GigaChat4-708B-A41B-GGUF with Docker Model Runner:
docker model run hf.co/ai-sage/GigaChat4-708B-A41B-GGUF:Q4_K_M
- Lemonade
How to use ai-sage/GigaChat4-708B-A41B-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull ai-sage/GigaChat4-708B-A41B-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.GigaChat4-708B-A41B-GGUF-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use ai-sage/GigaChat4-708B-A41B-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf ai-sage/GigaChat4-708B-A41B-GGUF:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:9931/v1 hermes config set model.default ai-sage/GigaChat4-708B-A41B-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use ai-sage/GigaChat4-708B-A41B-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf ai-sage/GigaChat4-708B-A41B-GGUF:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:9931/v1 \ --custom-model-id "ai-sage/GigaChat4-708B-A41B-GGUF:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
GigaChat 4
Technical Report · Blog · Model Collection · SGLang Cookbook · GitHub
GigaChat 4 is the flagship hybrid model of the GigaChat family. It combines a Mixture-of-Experts (MoE) architecture with DeepSeek Sparse Attention (DSA) and Gated DeltaNet (GDN) with 708B total parameters and 41B 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 GGUF versions of the final instruction-tuned model. Choose a weight format from the repository's Files and versions tab to match your available RAM and VRAM.
Model variants
| Repository | Weights | Training stage |
|---|---|---|
| GigaChat4-708B-A41B | FP8 | Instruction-tuned |
| GigaChat4-708B-A41B-GGUF | GGUF | Instruction-tuned |
| GigaChat4-708B-A41B-bf16 | BF16 | Instruction-tuned |
| GigaChat4-708B-A41B-base | BF16 | Base |
| GigaChat4-708B-A41B-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 | 708B / 41B |
| Decoder layers / hidden size | 64 / 7,168 |
| Linear-attention / sparse-attention layers | 48 / 16 |
| Routed experts / active routed experts / shared experts | 256 / 8 / 1 |
| Initial decoder layers with dense FFNs | 3 |
| 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)
GigaChat 4 has 708B total parameters, with 41B active per token. Each MoE layer combines an attention block with shared and routed experts, selecting 8 of 256 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
Several techniques were introduced to improve training stability at scale:
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.
Muon was used for optimization during this stage. The resulting model supports both instant and reasoning modes within a single checkpoint.
For more details on the model architecture, training methodology, and alignment, see the GigaChat 4 technical report.
Evaluation Results
The following tables summarize GigaChat 4'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 708B | GigaChat 3.5 Ultra 432B | DeepSeek V4 Flash 0731 | GLM-5.3 | DeepSeek 4.1 1017 | Qwen 3.5 397B | Mistral 4 Large |
|---|---|---|---|---|---|---|---|
| LiveCodeBench v6 | 88.82 | 85.40 | 90.00 | 82.67 | 90.14 | 86.64 | 84.64 |
| SWE-bench Verified (7-hour timeout) | 80.89 | 64.70 | 81.80 | 86.67 | 79.40 | 73.00 | 79.60 |
| SWE-bench Multilingual (7-hour timeout) | 77.00 | — | 73.00 | 80.33 | 79.33 | 66.33 | 81.67 |
| DeepSWE (7-hour timeout) | 35.40 | — | 53.10 | 67.26 | 74.34 | 3.54 | 61.95 |
| NL2Repo (Cheating adjusted) (7-hour timeout) | 30.89 | 5.00 | 33.13 | 28.69 | 5.90 | 18.59 | 27.88 |
| Terminal-Bench 2.0 (7-hour timeout) | 71.26 | 30.30 | 55.01 | 71.67 | 61.80 | 56.18 | 77.78 |
| Terminal-Bench 2.1 (7-hour timeout) | 69.66 | — | 78.65 | 88.70 | 87.64 | 57.30 | 83.33 |
General
| Benchmark | GigaChat 4 708B | GigaChat 3.5 Ultra 432B | DeepSeek V4 Flash 0731 | GLM-5.3 | DeepSeek 4.1 1017 | Qwen 3.5 397B | Mistral 4 Large |
|---|---|---|---|---|---|---|---|
| IFBench (prompt-level loose) | 80.33 | 77.00 | 63.00 | 55.67 | 75.67 | 74.33 | 71.00 |
| JSONSchemaBench | 99.28 | 93.01 | 94.00 | 91.64 | 99.31 | 96.26 | 97.38 |
| StructEval Text | 87.64 | 85.00 | 88.00 | 85.36 | 85.36 | 85.48 | 86.10 |
| POLLUX | 81.46 | 75.50 | 70.00 | 77.96 | 78.64 | 74.16 | 73.18 |
| GraphWalks | 74.92 | 38.00 | 72.70 | 78.35 | 79.09 | 61.01 | 78.45 |
| Natural Plan | 94.53 | 80.19 | 91.03 | 80.00 | 93.73 | 92.25 | 94.39 |
| NIH Complex | 100.00 | 99.16 | — | 96.89 | 96.53 | 98.74 | 99.75 |
| AA-LCR | 70.33 | 25.00 | — | 66.70 | — | 68.00 | 73.67 |
STEM
| Benchmark | GigaChat 4 708B | GigaChat 3.5 Ultra 432B | DeepSeek V4 Flash 0731 | GLM-5.3 | DeepSeek 4.1 1017 | Qwen 3.5 397B | Mistral 4 Large |
|---|---|---|---|---|---|---|---|
| GPQA Diamond | 82.83 | 82.30 | 91.00 | 90.40 | 90.91 | 85.35 | 87.37 |
| HMMT (pass@8) | 98.33 | 93.00 | 100.00 | 100.00 | 100.00 | 98.33 | 100.00 |
| HMMT (mean@8) | 93.75 | — | 98.75 | 92.08 | 97.92 | 82.71 | 99.58 |
| AIME 2025 (pass@8) | 96.67 | 93.00 | 96.67 | 100.00 | 100.00 | 96.67 | 100.00a |
| AIME 2025 (mean@8) | 93.33 | 89.00 | 90.00 | 93.125 | 97.60 | 93.75 | 97.08a |
| AIME 2026 (pass@8) | 96.67 | 97.00 | 100.00 | 100.00 | 100.00 | — | 100.00a |
| AIME 2026 (mean@8) | 95.00 | 91.00 | 95.00 | 95.104 | 98.23 | — | 99.17a |
| IMO-AnswerBench | 82.69 | 73.00 | 89.80 | 88.50 | 92.69 | 83.22 | 78.20 |
| HLE (text only, without tools) | 23.91 | 13.16 | 37.80 | 39.62 | 43.42 | 28.36 | 30.40 |
a Evaluated without tools.
Agentic
| Benchmark | GigaChat 4 708B | GigaChat 3.5 Ultra 432B | DeepSeek V4 Flash 0731 | GLM-5.3 | DeepSeek 4.1 1017 | Qwen 3.5 397B | Mistral 4 Large |
|---|---|---|---|---|---|---|---|
| BFCL v4 | 79.55 | 58.59 | 73.12 | 68.29 | 72.18 | 69.10 | 70.68 |
| τ²-Bench (mean@3) | 83.31 | 61.58 | 83.30 | 78.70 | 79.43 | 78.83 | 80.60 |
| τ³-Bench Banking (mean@3) | 18.03 | 8.93 | 20.90 | 56.00 | 21.65 | 12.03 | 24.74 |
| CoworkBench | 83.00 | 25.00 | 78 | 73.79 | 77.82 | 64.11 | 59.27 |
| SkillsBench (no skills) | 33.08 | — | 29.89 | 45.47 | 45.47 | 42.06 | 37.00 |
| SkillsBench (skills) | 58.24 | — | 59.81 | 61.54 | — | 42.06 | 46.90 |
| HealthAdminBench (success rate / mean) | 40.74 / 88.27 | — | 25.92 / 78.36 | 45.93 / 88.37 | — | 41.48 / 86.12 | — |
Instant
Code
| Benchmark | GigaChat 4 708B | GigaChat 3.1 Ultra 702B | GigaChat 3.5 Ultra 432B | DeepSeek V4 Flash 0731 | Qwen 3.5 397B |
|---|---|---|---|---|---|
| LiveCodeBench v6 | 78.77 | 57.00 | 56.20 | 71.18 | 61.52 |
| SWE-bench Verified (7-hour timeout) | 80.82 | 9.00 | 39.70 | 78.80 | 68.60 |
| SWE-bench Multilingual (7-hour timeout) | 70.67 | 3.33 | 21.60 | 72.33 | 65.00 |
| DeepSWE (7-hour timeout) | 19.47 | 0.00 | 0.00 | 28.32 | 0.88 |
| NL2Repo (Full score) (7-hour timeout) | 37.56 | 7.90 | — | 30.37 | 30.28 |
| Terminal-Bench 2.0 (7-hour timeout) | 60.47 | 9.00 | 12.94 | — | 49.44 |
| Terminal-Bench 2.1 (7-hour timeout) | 66.29 | 6.74 | — | 70.77 | 56.18 |
General
| Benchmark | GigaChat 4 708B | GigaChat 3.1 Ultra 702B | GigaChat 3.5 Ultra 432B | DeepSeek V4 Flash 0731 | Qwen 3.5 397B |
|---|---|---|---|---|---|
| IFBench (prompt-level loose) | 50.33 | 29.00 | 43.66 | 40.00 | 53.00 |
| JSONSchemaBench | 88.31 | 93.96 | 83.94 | 93.70 | 93.45 |
| StructEval Text | 89.12 | 84.98 | 74.35 | 85.64 | 83.62 |
| POLLUX | 79.65 | 63.28 | 74.25 | 72.22 | 74.29 |
| GraphWalks | 48.02 | 15.16 | 19.99 | 51.16 | 56.49 |
| Natural Plan | 52.17 | 32.00 | 66.42 | 41.58 | 45.72 |
| NIH Complex | 95.71 | 74.22 | 97.11 | 32.21 | 99.24 |
| AA-LCR | 48.00 | — | 27.60 | — | 60.00 |
STEM
| Benchmark | GigaChat 4 708B | GigaChat 3.1 Ultra 702B | GigaChat 3.5 Ultra 432B | DeepSeek V4 Flash 0731 | Qwen 3.5 397B |
|---|---|---|---|---|---|
| GPQA Diamond | 70.20 | 56.57 | 61.11 | 74.75 | 83.33 |
| HMMT (pass@8) | 86.67 | 45.00 | 55.00 | 70.00 | 78.33 |
| HMMT (mean@8) | 63.75 | — | — | 44.38 | 63.33 |
| AIME 2025 (pass@8) | 93.33 | 73.33 | 93.30 | 86.67 | 93.33 |
| AIME 2025 (mean@8) | 68.75 | 37.08 | 68.00 | 48.23 | 80.00 |
| AIME 2026 (pass@8) | 96.67 | 66.67 | 83.30 | 93.33 | 93.333 |
| AIME 2026 (mean@8) | 80.83 | 39.17 | 67.00 | 60.42 | 86.250 |
| IMO-AnswerBench | 60.09 | 28.75 | 32.00 | 41.91 | 72.38 |
| Humanity's Last Exam (text only, without tools) | 8.20 | 4.00 | 3.94 | 10.43 | 19.83 |
Agentic
| Benchmark | GigaChat 4 708B | GigaChat 3.1 Ultra 702B | GigaChat 3.5 Ultra 432B | DeepSeek V4 Flash 0731 | Qwen 3.5 397B |
|---|---|---|---|---|---|
| BFCL v4 | 63.62 | -- | 51.57 | 65.81 | — |
| τ²-Bench (mean@3) | 66.75 | 33.00 | 68.71 | 77.13 | 78.73 |
| τ³-Bench Banking (mean@3) | 15.00 | 5.50 | 5.15 | — | 12.71 |
| CoworkBench (Pi) | 75.00 | — | 19.76 | 54.84 | 63.31 |
| SkillsBench (without skills) | 33.93 | 0.51 | — | 27.87 | — |
| SkillsBench (with skills) | 54.24 | 1.23 | — | 54.32 | — |
| HealthAdminBench (success rate / mean) | 40.74 / 86.99 | — | — | 23.73 / 70.14 | 33.33 / — |
| JobBench | 33.59 | — | — | 29.64 | 16.85 |
Evaluation Notes
Agentic benchmarks were evaluated using Harbor-based runners (SWE-bench, Terminal-Bench, NL2Repo, SkillsBench, HealthAdminBench, CoworkBench, and JobBench), except DeepSWE, which used Pier. Runs with a seven-hour timeout are marked in the tables.
NL2Repo reports cheating-adjusted scores, counting cheating attempts as zero. StructEval uses the text subset with rule-based scoring, while HLE includes only text-based questions without tools. HealthAdminBench reports success rate / mean.
Usage
llama.cpp
The GGUF release includes a recurrent MTP drafter for each weight format. The benchmarks below use the November 20, 2026 GGUF release and llama.cpp commit 0541e50e2f. MTP-3 allows up to three draft tokens per verification step.
GigaChat 4 support in llama.cpp
Speed
We evaluate single-stream greedy decoding using a 1,024-token prompt constructed by repeating and truncating the same 37-token ShareGPT sequence. EOS is ignored to reach the specified output length. Each configuration is warmed up and measured three times.
Decode throughput is measured from the first generated token to the end of the output stream. Draft acceptance rate is the fraction of proposed tokens accepted by the target model. Both columns report the median of three repeats. Speedup compares median throughputs for the same format and hardware.
GPU · 8 × NVIDIA H100 80 GB, one node
192 generated tokens per request, full layer offload (-sm layer -ngl 99), and a Q8_0 target KV cache.
| GGUF format | Config | Draft acceptance rate | Decode tok/s | Speedup |
|---|---|---|---|---|
| Q4_K_M | Off | — | 40.3 | 1.00× |
| Q4_K_M | MTP-3 | 1.000 | 82.3 | 2.04× |
| Q6_K | Off | — | 37.4 | 1.00× |
| Q6_K | MTP-3 | 1.000 | 64.6 | 1.73× |
Both Q6_K runs used --tensor-split 9,8,8,8,8,8,8,9 to balance the MoE layers across the eight GPUs. To reproduce this Q6_K configuration with the GPU command below, add that flag and use -c 8192 -np 1.
The Q8_0 weights (703.3 GiB) and BF16 weights (1,323.3 GiB) each exceed the eight GPUs’ combined usable memory of about 637 GiB before KV cache and compute buffers.
CPU · 2 × AMD EPYC 9474F, 64 threads
128 generated tokens per request, CPU-only build, -t 64 -tb 64, and a Q8_0 target KV cache. The job had a 1.42 TiB RAM limit.
| GGUF format | Config | Draft acceptance rate | Decode tok/s | Speedup |
|---|---|---|---|---|
| Q4_K_M | Off | — | 3.7 | 1.00× |
| Q4_K_M | MTP-3 | 1.000 | 9.0 | 2.41× |
| Q6_K | Off | — | 3.2 | 1.00× |
| Q6_K | MTP-3 | 1.000 | 6.7 | 2.10× |
| Q8_0 | Off | — | 2.9 | 1.00× |
| Q8_0 | MTP-3 | 1.000 | 5.8 | 2.00× |
| BF16 | Off | — | 2.1 | 1.00× |
| BF16 | MTP-3 | 1.000 | 3.7 | 1.79× |
Q4_K_M batch scaling on GPU
A separate benchmark measured batch scaling on the same 8 × H100 configuration, using 1,024 input tokens and 512 generated tokens per request. Batch size 1 used a single fixed prompt, while batch size 16 used 16 distinct prompts. Decode throughput (tok/s) is aggregated across the batch and excludes prefill. Acceptance length is the average number of generated tokens per verification step.
| Batch | Off decode tok/s | MTP-3 decode tok/s | Speedup | MTP-3 accept length |
|---|---|---|---|---|
| 1 | 40.0 | 81.9 | 2.05× | 4.00 / 4 |
| 16 | 100.3 | 153.0 | 1.53× | 3.38 / 4 |
Accuracy and draft acceptance on chat tasks
Each row uses the same 200 examples with drafting off and on. GSM8K uses 5-shot chat. MMLU uses 0-shot chat stratified across 57 subjects. Both use temperature 1.0, top_p 0.95, an 8,192-token output limit, and concurrency 16 on the 8-GPU Q4_K_M configuration.
| Task | Mode | Accuracy · Off | Accuracy · MTP-3 | MTP-3 draft acceptance rate |
|---|---|---|---|---|
| GSM8K | Instant | 0.970 | 0.975 | 0.768 |
| GSM8K | Reasoning | 0.965 | 0.970 | 0.774 |
| MMLU | Instant | 0.920 | 0.910 | 0.676 |
| MMLU | Reasoning | 0.940 | 0.960 | 0.643 |
Usage
Get llama.cpp and the weights
Fetch the GigaChat4 PR and check out the revision used for the benchmarks. Run the download, build, and server commands in the same shell from the llama.cpp directory so the server can use the MODEL path set below.
git clone https://github.com/ggml-org/llama.cpp.git
cd llama.cpp
git fetch origin pull/32767/head:pr-32767
git checkout pr-32767
Q4_K_M contains 9 shards totaling 429.4 GB (400.0 GiB). Download all shards to the same directory and pass the first shard to llama-server. If the repository requires authentication, run hf auth login with an account that has access before downloading.
Hugging Face CLI documentation
python -m pip install -U huggingface_hub
hf download ai-sage/GigaChat4-708B-A41B-GGUF \
--include "GigaChat4-708B-A41B-Q4_K_M/*.gguf" \
--local-dir ./gguf
MODEL=./gguf/GigaChat4-708B-A41B-Q4_K_M/GigaChat4-708B-A41B-Q4_K_M-00001-of-00009.gguf
GPU server
Build with CUDA and start the server with four slots and 32,768 tokens of total context. The single-stream benchmark used -c 8192 -np 1.
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DGGML_CUDA=ON -DLLAMA_USE_PREBUILT_UI=OFF
cmake --build build --config Release --parallel --target llama-server
./build/bin/llama-server \
-m "$MODEL" --alias gigachat4 \
-sm layer -ngl 99 --fit off -fa on \
-c 32768 -np 4 -ctk q8_0 -ctv q8_0 \
--jinja --reasoning-format deepseek \
--spec-type draft-mtp --spec-draft-n-max 3 \
--host 127.0.0.1 --port 8080
CPU server
Run the CPU build on a host with RAM for the weights, KV cache, and compute buffers. This example uses 64 threads and a single 8,192-token slot.
cmake -S . -B build-cpu -DCMAKE_BUILD_TYPE=Release -DGGML_CUDA=OFF -DLLAMA_USE_PREBUILT_UI=OFF
cmake --build build-cpu --config Release --parallel --target llama-server
./build-cpu/bin/llama-server \
-m "$MODEL" --alias gigachat4 \
-ngl 0 -t 64 -tb 64 -fa on \
-c 8192 -np 1 -ctk q8_0 -ctv q8_0 \
--jinja --reasoning-format deepseek \
--spec-type draft-mtp --spec-draft-n-max 3 \
--host 127.0.0.1 --port 8080
On Intel AMX hosts that encounter GGML_ASSERT(*cur_backend_id != -1) while loading quantized weights, add -DGGML_NATIVE=OFF to the CPU configure command and rebuild to use the portable x86 kernels.
Both commands use the MTP head included in the GGUF. For the Off configuration, replace --spec-type draft-mtp --spec-draft-n-max 3 with --spec-type none. For clients on another host, change --host 127.0.0.1 to --host 0.0.0.0.
Tool-calling request
Run this from a second terminal. The model returns a call to get_weather. Your application runs the function and sends its result back with role: "tool" and the matching tool_call_id. GigaChat4 uses chat_template_kwargs.reasoning to select instant mode (false) or reasoning mode (true).
curl -sS http://localhost:8080/v1/chat/completions \
-H "Content-Type: application/json" \
--data-binary @- <<'JSON'
{
"model": "gigachat4",
"temperature": 0,
"max_tokens": 256,
"chat_template_kwargs": { "reasoning": false },
"messages": [
{ "role": "system", "content": "To get the weather, call get_weather. Pass the city name in English." },
{ "role": "user", "content": "What is the current weather in London?" }
],
"tools": [{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get the current weather in a city.",
"parameters": {
"type": "object",
"properties": { "city": { "type": "string" } },
"required": ["city"],
"additionalProperties": false
}
}
}],
"tool_choice": "auto"
}
JSON
License
GigaChat 4 is released under the MIT License.
- Downloads last month
- 25,899
4-bit
6-bit
8-bit
16-bit
Model tree for ai-sage/GigaChat4-708B-A41B-GGUF
Base model
ai-sage/GigaChat4-708B-A41B-base