Train and serve LLMs at extreme speed and massive throughput.
813
stars
1,309
commits
C++
primary language
Sep 11, 2026
updated
Surogate Trainer is built for developers and enterprises that need fast experimentation — whether running on-premise or in the cloud.
⚡ The Surogate trainer surpasses all existing training frameworks in performance for single-GPU, multi-GPU and GPU+CPU by a large margin.
✨ The native CPU offloading feature achieves superior performance and VRAM usage compared to QLoRA. You can fine-tune models at native bf16 precision, rendering QLoRA obsolete.
bfloat16 for all GEMMs, designed for maximum numerical accuracy. No quantization is applied.FP8 training delivering extreme performance with E4M3 used for activations and weights and E5M2 for gradients. Uses per-tensor delayed scaling to provide stable training.FP4 E2M1 training with two-level block scaling for extreme performance and memory efficiency on Blackwell GPUs (SM100+: B200, B300, RTX 50xx series). Uses stochastic rounding and random Hadamard Transforms for numerical stability. Supports NVIDIA B200, B300, RTX 5070, 5080, 5090 !!We support the following models. Please create a PR if you need a specific model
| Model | Architecture | Model Sizes |
|---|---|---|
| Qwen3 | Qwen3ForCausalLM | 0.6B, 1.7B, 4B, 8B, 14B, 35B |
| Qwen3VL | Qwen3VLForConditionalGeneration | 2B, 4B, 8B, 32B |
| Qwen3 MoE | Qwen3MoeForCausalLM | 30B-A3B, 235B-A22B |
| Qwen3.5 | Qwen3_5ForCausalLM, Qwen3_5ForConditionalGeneration | 0.8B, 2B 4B, 9B, 27B |
| Qwen3.5 Moe | Qwen3MoeForCausalLM, Qwen3_5MoeForConditionalGeneration | 35B-A3B, 122B-A10B, 397B-A17B |
| Qwen3.6 | Qwen3_5ForCausalLM, Qwen3_5ForConditionalGeneration | 27B |
| Gemma 4 | Gemma4ForCausalLM, Gemma4ForConditionalGeneration | 12B, 26B-A4B |
| Nemotron Nano v3 | NemotronHForCausalLM | 30B-A3B |
| Nemotron Super v3 | NemotronHForCausalLM | 120B-A12B |
| Nemotron Cascade 2 | NemotronHForCausalLM | 30B-A3B |
| GPT-OSS | GptOssForCausalLM | 20B, 120B |
| Laguna | LagunaForCausalLM | XS-2.1 |
| LFM2 | Lfm2ForCausalLM | 350M, 700M, 1.2B, 2.6B |
| Llama 3.1 | LlamaForCausalLM | 8B, 70B, 405B |
| Llama 3.2 | LlamaForCausalLM | 1B, 3B |
You can interact with the Surogate High-Performance Training Engine at the framework level via the CLI.
Surogate provides 3 docker images for various CUDA versions. Currently only the x86-64 architecture is supported.
| CUDA | Image | Recommended NVIDIA Driver | Minimum NVIDIA Driver |
|---|---|---|---|
| 12.8.1 | ghcr.io/invergent-ai/surogate:latest-cu128 | >= 570.124.06 | >= 525 |
| 12.9.1 | ghcr.io/invergent-ai/surogate:latest-cu129 | >= 575.57.08 | >= 525 |
| 13.1 | ghcr.io/invergent-ai/surogate:latest-cu130 | >= 590.48.01 | >= 580 |
docker run --gpus=all -v /my/local/config.yaml:/home/surogate/config.yaml -v /my/local/output_dir:<OUTPUT_DIR_FROM_CONFIG_YAML> <IMAGE> sft config.yaml
The install.sh script auto-detects your CUDA version (12.8, 12.9, or 13.x) and installs the matching pre-built wheel into a local .venv/.
Install the latest release:
curl -LsSf https://github.com/invergent-ai/surogate/releases/latest/download/install.sh | bash
Or pin to a specific release (e.g. v0.0.1):
curl -LsSf https://github.com/invergent-ai/surogate/releases/download/v0.0.1/install.sh | bash
After installation:
source .venv/bin/activate
surogate sft examples/sft/qwen3/qwen3-lora-bf16.yaml
You need CUDA 12.8/12.9/13.x installed on your machine and NCCL development libraries libnccl-dev for your CUDA version (https://developer.nvidia.com/nccl/nccl-download)
# ...clone repo...
uv pip install -e .
model: Qwen/Qwen3-0.6B
output_dir: ./output
# training
per_device_train_batch_size: 2
gradient_accumulation_steps: 4
sequence_len: 2048
learning_rate: 2e-4
# LoRA / QLoRA
lora: true
lora_rank: 16
# qlora_fp8: true # optional, hardware-dependent
# qlora_fp4: true # Blackwell+
# qlora_bnb: true # Any GPU, lowest
datasets:
- path: "mlabonne/FineTome-100k"
type: auto
surogate sft config.yaml
output_dirSM80: A100, A30SM86: A2, A16, A10, A40, RTX3050, RTX3060, RTX 3070, RTX 3080, RTX 3090, A2000, A3000, A4000, A5000, A6000SM89: L4, L40, L40S, RTX 4050, RTX 4060, RTX 4070, RTX 4080, RTX 4090, RTX 2000 Ada, RTX 4000 SFF Ada, RTX 4000 Ada, RTX 4500 Ada, RTX 5000 Ada, RTX 6000 AdaSM90: H100, H200, GH200SM100: B200, GB200SM103: B300, GB300SM120: RTX PRO 6000/5000/4000/2500/2000 Blackwell, RTX 5050, RTX 5060, RTX 5070, RTX 5080, RTX 5090SM121: DGX SparkWe welcome contributions across the entire ecosystem! If you are submitting a PR to the core framework, please ensure you include a clear description, steps to test locally, and relevant examples.
If you’re adding kernels/recipes or touching build/tooling, please keep changes minimal and include:
make test where applicable),Apache 2.0 — see LICENSE.
C++
55.8%
Python
26.1%
Cuda
14.2%
TypeScript
3.4%
Train and serve LLMs at extreme speed and massive throughput.
813
stars
1,309
commits
C++
primary language
Sep 11, 2026
updated
Surogate Trainer is built for developers and enterprises that need fast experimentation — whether running on-premise or in the cloud.
⚡ The Surogate trainer surpasses all existing training frameworks in performance for single-GPU, multi-GPU and GPU+CPU by a large margin.
✨ The native CPU offloading feature achieves superior performance and VRAM usage compared to QLoRA. You can fine-tune models at native bf16 precision, rendering QLoRA obsolete.
bfloat16 for all GEMMs, designed for maximum numerical accuracy. No quantization is applied.FP8 training delivering extreme performance with E4M3 used for activations and weights and E5M2 for gradients. Uses per-tensor delayed scaling to provide stable training.FP4 E2M1 training with two-level block scaling for extreme performance and memory efficiency on Blackwell GPUs (SM100+: B200, B300, RTX 50xx series). Uses stochastic rounding and random Hadamard Transforms for numerical stability. Supports NVIDIA B200, B300, RTX 5070, 5080, 5090 !!We support the following models. Please create a PR if you need a specific model
| Model | Architecture | Model Sizes |
|---|---|---|
| Qwen3 | Qwen3ForCausalLM | 0.6B, 1.7B, 4B, 8B, 14B, 35B |
| Qwen3VL | Qwen3VLForConditionalGeneration | 2B, 4B, 8B, 32B |
| Qwen3 MoE | Qwen3MoeForCausalLM | 30B-A3B, 235B-A22B |
| Qwen3.5 | Qwen3_5ForCausalLM, Qwen3_5ForConditionalGeneration | 0.8B, 2B 4B, 9B, 27B |
| Qwen3.5 Moe | Qwen3MoeForCausalLM, Qwen3_5MoeForConditionalGeneration | 35B-A3B, 122B-A10B, 397B-A17B |
| Qwen3.6 | Qwen3_5ForCausalLM, Qwen3_5ForConditionalGeneration | 27B |
| Gemma 4 | Gemma4ForCausalLM, Gemma4ForConditionalGeneration | 12B, 26B-A4B |
| Nemotron Nano v3 | NemotronHForCausalLM | 30B-A3B |
| Nemotron Super v3 | NemotronHForCausalLM | 120B-A12B |
| Nemotron Cascade 2 | NemotronHForCausalLM | 30B-A3B |
| GPT-OSS | GptOssForCausalLM | 20B, 120B |
| Laguna | LagunaForCausalLM | XS-2.1 |
| LFM2 | Lfm2ForCausalLM | 350M, 700M, 1.2B, 2.6B |
| Llama 3.1 | LlamaForCausalLM | 8B, 70B, 405B |
| Llama 3.2 | LlamaForCausalLM | 1B, 3B |
You can interact with the Surogate High-Performance Training Engine at the framework level via the CLI.
Surogate provides 3 docker images for various CUDA versions. Currently only the x86-64 architecture is supported.
| CUDA | Image | Recommended NVIDIA Driver | Minimum NVIDIA Driver |
|---|---|---|---|
| 12.8.1 | ghcr.io/invergent-ai/surogate:latest-cu128 | >= 570.124.06 | >= 525 |
| 12.9.1 | ghcr.io/invergent-ai/surogate:latest-cu129 | >= 575.57.08 | >= 525 |
| 13.1 | ghcr.io/invergent-ai/surogate:latest-cu130 | >= 590.48.01 | >= 580 |
docker run --gpus=all -v /my/local/config.yaml:/home/surogate/config.yaml -v /my/local/output_dir:<OUTPUT_DIR_FROM_CONFIG_YAML> <IMAGE> sft config.yaml
The install.sh script auto-detects your CUDA version (12.8, 12.9, or 13.x) and installs the matching pre-built wheel into a local .venv/.
Install the latest release:
curl -LsSf https://github.com/invergent-ai/surogate/releases/latest/download/install.sh | bash
Or pin to a specific release (e.g. v0.0.1):
curl -LsSf https://github.com/invergent-ai/surogate/releases/download/v0.0.1/install.sh | bash
After installation:
source .venv/bin/activate
surogate sft examples/sft/qwen3/qwen3-lora-bf16.yaml
You need CUDA 12.8/12.9/13.x installed on your machine and NCCL development libraries libnccl-dev for your CUDA version (https://developer.nvidia.com/nccl/nccl-download)
# ...clone repo...
uv pip install -e .
model: Qwen/Qwen3-0.6B
output_dir: ./output
# training
per_device_train_batch_size: 2
gradient_accumulation_steps: 4
sequence_len: 2048
learning_rate: 2e-4
# LoRA / QLoRA
lora: true
lora_rank: 16
# qlora_fp8: true # optional, hardware-dependent
# qlora_fp4: true # Blackwell+
# qlora_bnb: true # Any GPU, lowest
datasets:
- path: "mlabonne/FineTome-100k"
type: auto
surogate sft config.yaml
output_dirSM80: A100, A30SM86: A2, A16, A10, A40, RTX3050, RTX3060, RTX 3070, RTX 3080, RTX 3090, A2000, A3000, A4000, A5000, A6000SM89: L4, L40, L40S, RTX 4050, RTX 4060, RTX 4070, RTX 4080, RTX 4090, RTX 2000 Ada, RTX 4000 SFF Ada, RTX 4000 Ada, RTX 4500 Ada, RTX 5000 Ada, RTX 6000 AdaSM90: H100, H200, GH200SM100: B200, GB200SM103: B300, GB300SM120: RTX PRO 6000/5000/4000/2500/2000 Blackwell, RTX 5050, RTX 5060, RTX 5070, RTX 5080, RTX 5090SM121: DGX SparkWe welcome contributions across the entire ecosystem! If you are submitting a PR to the core framework, please ensure you include a clear description, steps to test locally, and relevant examples.
If you’re adding kernels/recipes or touching build/tooling, please keep changes minimal and include:
make test where applicable),Apache 2.0 — see LICENSE.
C++
55.8%
Python
26.1%
Cuda
14.2%
TypeScript
3.4%