Dedicated Endpoints

Run this model inference on single tenant GPU with unmatched speed and reliability at scale.

Learn more
Container

Run this model inference with full control and performance in your environment.

Learn more

Get help setting up a custom Dedicated Endpoints.

Talk with our engineer to get a quote for reserved GPU instances with discounts.

README

License: mit

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 Revisor pipeline 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.

ModelOutput tpsTotal tpsTPOTDiff vs Lightning BF16
GigaChat-3.1-Lightning BF162 8665 8329.52+0.0%
GigaChat-3.1-Lightning BF16 + MTP3 3466 8108.25+16.7%
GigaChat-3.1-Lightning FP83 3826 8837.63+18.0%
GigaChat-3.1-Lightning FP8 + MTP3 9588 0546.92+38.1%
YandexGPT-5-Lite-8B3 0816 2817.62+7.5%

Benchmark Results

DomainMetricGigaChat-3-LightningGigaChat-3.1-LightningQwen3-1.7B-InstructQwen3-4B-InstructSmolLM3gemma-3-4b-it
GeneralMMLU RU0.6830.6803-0.5970.5000.519
GeneralRUBQ0.6520.6646-0.3170.6360.382
GeneralMMLU PRO0.6060.61760.4100.6850.5010.410
GeneralMMLU EN0.7400.72980.6000.7080.5990.594
GeneralBBH0.4530.57580.33170.7170.4160.131
GeneralSuperGPQA0.2730.29390.2090.3750.2460.201
CodeHuman Eval Plus0.6950.73170.6280.8780.7010.713
TotalAverage0.5860.6310.4580.6120.5140.421

Arena Results

ArenaGigaChat-2-Lite-30.1GigaChat-3-LightningGigaChat-3.1-LightningYandexGPT-5-Lite-8BSmolLM3gemma-3-4b-itQwen3-4BQwen3-4B-Instruct-2507
Arena Hard Logs V323.70014.346.70017.918.138.727.761.5
Validator SBS Pollux32.50024.355.70010.313.734.00019.856.100
Total Average28.10019.351.20014.115.936.3523.7558.800

Usage Example

1. transformers

python

import torch
from transformers import AutoTokenizer, AutoModelForCausalLM, GenerationConfig
model_name = "ai-sage/GigaChat3.1-10B-A1.8B"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype=torch.bfloat16,
device_map="auto",
)
model.generation_config = GenerationConfig.from_pretrained(model_name)
messages = [
{"role": "user", "content": "Докажи теорему о неподвижной точке"}
]
prompt = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True,
)
inputs = tokenizer(prompt, return_tensors="pt")
inputs = {k: v.to(model.device) for k, v in inputs.items()}
outputs = model.generate(
**inputs,
max_new_tokens=1000,
)
prompt_len = inputs["input_ids"].shape[1]
result = tokenizer.decode(
outputs[0][prompt_len:],
skip_special_tokens=True,
)
print(result)

2. vLLM

Start the server

shell

vllm serve ai-sage/GigaChat3.1-10B-A1.8B \
--dtype "auto" \
--speculative-config '{"method": "mtp", "num_speculative_tokens": 1, "disable_padded_drafter_batch": false}'

Request example

shell

curl http://localhost:8000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "ai-sage/GigaChat3.1-10B-A1.8B",
"messages": [
{
"role": "user",
"content": "Докажи теорему о неподвижной точке"
}
],
"max_tokens": 400,
"temperature": 0
}'

3. SGLang

Start the server

shell

python -m sglang.launch_server \
--model-path ai-sage/GigaChat3.1-10B-A1.8B \
--host 0.0.0.0 \
--port 30000 \
--dtype auto \
--mem-fraction-static 0.88 \
--speculative-algorithm EAGLE \
--speculative-num-steps 1 \
--speculative-eagle-topk 1 \
--speculative-num-draft-tokens 2

Request example

shell

curl http://localhost:30000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "ai-sage/GigaChat3.1-10B-A1.8B",
"messages": [
{
"role": "user",
"content": "Докажи теорему о неподвижной точке"
}
],
"max_tokens": 1000,
"temperature": 0
}'

Function calling

1. transformers

python

import torch
import json
from transformers import AutoTokenizer, AutoModelForCausalLM, GenerationConfig
FUNCTION_CALL_TOKEN = "<|function_call|>"
def parse_function_and_content(completion_str: str):
completion_str = completion_str.strip()
if FUNCTION_CALL_TOKEN not in completion_str:
return None, completion_str or None
content_part, function_part = completion_str.split(FUNCTION_CALL_TOKEN, 1)
content = content_part.strip() or None
function_part = function_part.strip()
for suffix in ("</s>", "<s>"):
if function_part.endswith(suffix):
function_part = function_part[: -len(suffix)].strip()
try:
function_call = json.loads(function_part)
except json.JSONDecodeError:
return None, content if content is not None else completion_str
if not (
isinstance(function_call, dict)
and "name" in function_call
and "arguments" in function_call
and isinstance(function_call["arguments"], dict)
):
return None, content
return function_call, content
model_name = "ai-sage/GigaChat3.1-10B-A1.8B"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype=torch.bfloat16,
device_map="auto",
)
model.generation_config = GenerationConfig.from_pretrained(model_name)
tools = [
{
"type": "function",
"function": {
"name": "get_weather",
"description": "Получить информацию о текущей погоде в указанном городе.",
"parameters": {
"type": "object",
"properties": {
"city": {
"type": "string",
"description": "Название города (например, Москва, Казань)."
}
},
"required": ["city"]
}
}
}
]
messages = [
{"role": "user", "content": "Какая сейчас погода в Москве?"}
]
prompt = tokenizer.apply_chat_template(
messages,
tools=tools,
tokenize=False,
add_generation_prompt=True,
)
inputs = tokenizer(prompt, return_tensors="pt")
inputs = {k: v.to(model.device) for k, v in inputs.items()}
with torch.inference_mode():
outputs = model.generate(
**inputs,
max_new_tokens=1000,
)
prompt_len = inputs["input_ids"].shape[1]
completion = tokenizer.decode(
outputs[0][prompt_len:],
skip_special_tokens=False,
)
function_call, content = parse_function_and_content(completion)
print(function_call, content)

2. vLLM

commit>=293f036

Start the server

shell

vllm serve ai-sage/GigaChat3.1-10B-A1.8B \
--dtype "auto" \
--speculative-config '{"method": "mtp", "num_speculative_tokens": 1, "disable_padded_drafter_batch": false}' \
--enable-auto-tool-choice \
--tool-call-parser gigachat3

Request example

shell

curl http://localhost:8000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "ai-sage/GigaChat3.1-10B-A1.8B",
"temperature": 0,
"messages": [
{
"role": "user",
"content": "Какая сейчас погода в Москве?"
}
],
"tools": [
{
"type": "function",
"function": {
"name": "get_weather",
"description": "Получить информацию о текущей погоде в указанном городе.",
"parameters": {
"type": "object",
"properties": {
"city": {
"type": "string",
"description": "Название города (например, Москва, Казань)."
}
},
"required": ["city"]
}
}
}
]
}'

3. SGLang

commit>=30a35ec

Start the server

shell

python -m sglang.launch_server \
--model-path ai-sage/GigaChat3.1-10B-A1.8B \
--host 0.0.0.0 \
--port 30000 \
--dtype auto \
--mem-fraction-static 0.88 \
--speculative-algorithm EAGLE \
--speculative-num-steps 1 \
--speculative-eagle-topk 1 \
--speculative-num-draft-tokens 2
--tool-call-parser gigachat3

Request example

shell

curl http://localhost:30000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "ai-sage/GigaChat3.1-10B-A1.8B",
"temperature": 0,
"messages": [
{
"role": "user",
"content": "Какая сейчас погода в Москве?"
}
],
"tools": [
{
"type": "function",
"function": {
"name": "get_weather",
"description": "Получить информацию о текущей погоде в указанном городе.",
"parameters": {
"type": "object",
"properties": {
"city": {
"type": "string",
"description": "Название города (например, Москва, Казань)."
}
},
"required": ["city"]
}
}
}
]
}'

Model provider

Necent

Necent

Model tree

Base

ai-sage/GigaChat3-10B-A1.8B-base

Quantized

this model

Modalities

Input

Text

Output

Text

Pricing

Dedicated Endpoints

View details

Supported Functionality

Model APIs

Dedicated Endpoints

Container

More information

Explore FriendliAI today