Instructions to use ai-sage/GigaChat3.1-10B-A1.8B-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ai-sage/GigaChat3.1-10B-A1.8B-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ai-sage/GigaChat3.1-10B-A1.8B-GGUF") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("ai-sage/GigaChat3.1-10B-A1.8B-GGUF", dtype="auto") - llama-cpp-python
How to use ai-sage/GigaChat3.1-10B-A1.8B-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="ai-sage/GigaChat3.1-10B-A1.8B-GGUF", filename="GigaChat3.1-10B-A1.8B-bf16.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use ai-sage/GigaChat3.1-10B-A1.8B-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/GigaChat3.1-10B-A1.8B-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf ai-sage/GigaChat3.1-10B-A1.8B-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/GigaChat3.1-10B-A1.8B-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf ai-sage/GigaChat3.1-10B-A1.8B-GGUF:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf ai-sage/GigaChat3.1-10B-A1.8B-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf ai-sage/GigaChat3.1-10B-A1.8B-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf ai-sage/GigaChat3.1-10B-A1.8B-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf ai-sage/GigaChat3.1-10B-A1.8B-GGUF:Q4_K_M
Use Docker
docker model run hf.co/ai-sage/GigaChat3.1-10B-A1.8B-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use ai-sage/GigaChat3.1-10B-A1.8B-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ai-sage/GigaChat3.1-10B-A1.8B-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/GigaChat3.1-10B-A1.8B-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ai-sage/GigaChat3.1-10B-A1.8B-GGUF:Q4_K_M
- SGLang
How to use ai-sage/GigaChat3.1-10B-A1.8B-GGUF with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "ai-sage/GigaChat3.1-10B-A1.8B-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ai-sage/GigaChat3.1-10B-A1.8B-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "ai-sage/GigaChat3.1-10B-A1.8B-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ai-sage/GigaChat3.1-10B-A1.8B-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use ai-sage/GigaChat3.1-10B-A1.8B-GGUF with Ollama:
ollama run hf.co/ai-sage/GigaChat3.1-10B-A1.8B-GGUF:Q4_K_M
- Unsloth Studio
How to use ai-sage/GigaChat3.1-10B-A1.8B-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for ai-sage/GigaChat3.1-10B-A1.8B-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for ai-sage/GigaChat3.1-10B-A1.8B-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for ai-sage/GigaChat3.1-10B-A1.8B-GGUF to start chatting
- Pi
How to use ai-sage/GigaChat3.1-10B-A1.8B-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/GigaChat3.1-10B-A1.8B-GGUF:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "ai-sage/GigaChat3.1-10B-A1.8B-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use ai-sage/GigaChat3.1-10B-A1.8B-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/GigaChat3.1-10B-A1.8B-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:8080/v1 hermes config set model.default ai-sage/GigaChat3.1-10B-A1.8B-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat new
- OpenClaw new
How to use ai-sage/GigaChat3.1-10B-A1.8B-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/GigaChat3.1-10B-A1.8B-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:8080/v1 \ --custom-model-id "ai-sage/GigaChat3.1-10B-A1.8B-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"
- Docker Model Runner
How to use ai-sage/GigaChat3.1-10B-A1.8B-GGUF with Docker Model Runner:
docker model run hf.co/ai-sage/GigaChat3.1-10B-A1.8B-GGUF:Q4_K_M
- Lemonade
How to use ai-sage/GigaChat3.1-10B-A1.8B-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull ai-sage/GigaChat3.1-10B-A1.8B-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.GigaChat3.1-10B-A1.8B-GGUF-Q4_K_M
List all available models
lemonade list
GigaChat 3.1 Lightning
GigaChat 3.1 Lightning is the compact instruct model of the GigaChat 3.1 family. It is a Mixture-of-Experts (MoE) model with 10B total parameters and 1.8B active parameters, designed for fast multilingual assistant workloads, reasoning, code, function calling, and product-style deployment.
For high-performance inference, an fp8 version of the model is available - GigaChat3.1-10B-A1.8B.
bf16 version is also avaliable - GigaChat3.1-10B-A1.8B-bf16.
More details can be found in the Habr article.
Model architecture
GigaChat 3.1 Lightning uses a custom MoE architecture with the following key components.
Mixture-of-Experts (MoE)
The model has 10B total parameters with 1.8B active parameters at inference time. This allows it to scale model capacity aggressively while keeping the active compute budget much lower than that of an equally large dense model.
Multi-head Latent Attention (MLA)
Instead of standard multi-head attention, the model uses MLA, which compresses the KV cache into a latent representation. This reduces memory usage and improves inference throughput, especially in long-context settings.
Multi-Token Prediction (MTP)
The model is trained with MTP, which allows it to predict multiple tokens per forward pass. In production systems, this can be used with speculative or parallel decoding techniques to improve throughput.
Training data
The base GigaChat 3 training corpus spans 10 languages and includes books, academic material, code datasets, and mathematics datasets. All data goes through deduplication, language filtering, and automatic quality checks based on heuristics and classifiers.
Synthetic data remains a major contributor to quality. Across the broader training corpus, we used approximately 5.5 trillion synthetic tokens, including:
- question-answer data generated from source texts,
- reverse-prompt chains for structured data generation,
- model-authored notes embedded inside texts,
- millions of synthetic tasks with solutions in mathematics and olympiad-style programming,
- synthetic tests for code and reasoning tasks.
For the 3.1 release, we made major data improvements:
- Hard-domain expansion at Stage 1.5: stronger coverage of mathematics, finance, physics, engineering, biology, chemistry, and medicine.
- Stricter quality validation: our internal
Revisorpipeline was extended with stronger checks for Markdown, LaTeX, and answer-format correctness. - LLM-judge validation: SFT and DPO data is validated with judges selected for the task type and response structure.
- On-policy DPO data: preference pairs were generated from preview-model behavior, making them better aligned with real model failure modes.
- Better product-oriented data: we expanded data for search-and-citation scenarios, file-aware code interpretation, personalization, and agentic dialogues with executable tool calls.
- Improved answer style: we also revised formatting and writing guidelines to improve readability, correctness, and overall response quality.
Post-training improvements
DPO in native FP8
Unlike the preview release, GigaChat 3.1 Lightning includes a full DPO stage. This stage was redesigned for the MoE setup and trained in native FP8, not just quantized after training.
Important changes include:
- MTP heads trained during DPO for better consistency between main-model predictions and MTP predictions,
- weighted gamma with exponential decay over long sequences,
- stronger tuning of batch size and DPO contribution,
- better robustness against loop-inducing failure modes.
In our experiments, native FP8 DPO not only recovered the quality that could be lost with post-training FP8 quantization, but in some cases even exceeded the BF16 result while using substantially less memory.
Faster post-training
We also optimized the SFT pipeline with a combination of sequence packing, dynamic sequence parallelism, and additional pipeline optimizations. This reduced training cost significantly and improved GPU utilization, especially on long-context workloads.
Inference
One of the key advantages of GigaChat3.1-10B-A1.8B is its inference speed. The model (especially in MTP mode) demonstrates throughput comparable to that of significantly smaller dense models.
We measured this using vllm 0.17.1rc1.dev158+g600a039f5, concurrency=32, 1xH100 80gb SXM5.
Link to code.
| Model | Output tps | Total tps | TPOT | Diff vs Lightning BF16 |
|---|---|---|---|---|
| GigaChat-3.1-Lightning BF16 | 2 866 | 5 832 | 9.52 | +0.0% |
| GigaChat-3.1-Lightning BF16 + MTP | 3 346 | 6 810 | 8.25 | +16.7% |
| GigaChat-3.1-Lightning FP8 | 3 382 | 6 883 | 7.63 | +18.0% |
| GigaChat-3.1-Lightning FP8 + MTP | 3 958 | 8 054 | 6.92 | +38.1% |
| YandexGPT-5-Lite-8B | 3 081 | 6 281 | 7.62 | +7.5% |
Benchmark Results
| Domain | Metric | GigaChat-3-Lightning | GigaChat-3.1-Lightning | Qwen3-1.7B-Instruct | Qwen3-4B-Instruct | SmolLM3 | gemma-3-4b-it |
|---|---|---|---|---|---|---|---|
| General | MMLU RU | 0.683 | 0.6803 | - | 0.597 | 0.500 | 0.519 |
| General | RUBQ | 0.652 | 0.6646 | - | 0.317 | 0.636 | 0.382 |
| General | MMLU PRO | 0.606 | 0.6176 | 0.410 | 0.685 | 0.501 | 0.410 |
| General | MMLU EN | 0.740 | 0.7298 | 0.600 | 0.708 | 0.599 | 0.594 |
| General | BBH | 0.453 | 0.5758 | 0.3317 | 0.717 | 0.416 | 0.131 |
| General | SuperGPQA | 0.273 | 0.2939 | 0.209 | 0.375 | 0.246 | 0.201 |
| Code | Human Eval Plus | 0.695 | 0.7317 | 0.628 | 0.878 | 0.701 | 0.713 |
| Total | Average | 0.586 | 0.631 | 0.458 | 0.612 | 0.514 | 0.421 |
Arena Results
| Arena | GigaChat-2-Lite-30.1 | GigaChat-3-Lightning | GigaChat-3.1-Lightning | YandexGPT-5-Lite-8B | SmolLM3 | gemma-3-4b-it | Qwen3-4B | Qwen3-4B-Instruct-2507 |
|---|---|---|---|---|---|---|---|---|
| Arena Hard Logs V3 | 23.700 | 14.3 | 46.700 | 17.9 | 18.1 | 38.7 | 27.7 | 61.5 |
| Validator SBS Pollux | 32.500 | 24.3 | 55.700 | 10.3 | 13.7 | 34.000 | 19.8 | 56.100 |
| Total Average | 28.100 | 19.3 | 51.200 | 14.1 | 15.9 | 36.35 | 23.75 | 58.800 |
Usage Example
llama-cpp version>=8495 (58c81f7e8)
cmake version>=3.28.3
Build llama-cpp
git clone https://github.com/ggml-org/llama.cpp.git
cd llama.cpp
cmake -B build -DGGML_CUDA=ON # build for CUDA
cmake --build build --config Release --target llama-server -j 8
Start the server
# Specify the full path to your model.gguf
export MODEL_PATH="/path/to/your/model.gguf"
./build/bin/llama-server \
-m $MODEL_PATH \
-np 1 \
-cb \
-ctk q8_0 \
-ctv q8_0 \
-fa on \
--n-gpu-layers 999 \ # number of layers on GPU
--ctx-size 32768 \
--port 8080 \
--host 0.0.0.0 \
--jinja
Request example
curl http://localhost:8080/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"tool_choice": "none",
"messages": [
{
"role": "user",
"content": "Докажи теорему о неподвижной точке"
}
],
"max_tokens": 1000,
"temperature": 0
}'
Request example with function call
curl http://localhost:8080/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"temperature": 0,
"messages": [
{
"role": "user",
"content": "Какая сейчас погода в Москве?"
}
],
"tools": [
{
"type": "function",
"function": {
"name": "get_weather",
"description": "Получить информацию о текущей погоде в указанном городе.",
"parameters": {
"type": "object",
"properties": {
"city": {
"type": "string",
"description": "Название города (например, Москва, Казань)."
}
},
"required": ["city"]
}
}
}
]
}'
- Downloads last month
- 3,779
4-bit
6-bit
8-bit
16-bit
Model tree for ai-sage/GigaChat3.1-10B-A1.8B-GGUF
Base model
ai-sage/GigaChat3-10B-A1.8B-base