Skip to content
SurogateSurogateDocs
↑↓ to move↵ to openesc to close

Surogate Engine

Surogate Engine trains and serves language models on your own NVIDIA GPUs. It is written in C++ and CUDA, so one tool takes you from a first fine-tune on a single card to a model answering many people at once, in BF16, FP8, NVFP4 or GGUF.

You describe a run in one YAML file and start it with one command, such as surogate sft config.yaml. The same engine then serves the result behind an OpenAI-compatible API.

You want toStart with
Install it and check your GPUInstallation, then Compatibility
Pick the right kind of trainingTraining modes: SFT, pretraining, DPO, GRPO and distillation side by side
Teach a model new behaviour from examplesQuickstart: SFT
Teach a model to prefer better answersQuickstart: DPO
Train a model against a reward, with reinforcement learningQuickstart: GRPO, then the GRPO kits
Train a model from scratchQuickstart: pretraining
Serve a model you trainedServing models

The GRPO kits are the fastest way to see what the engine does. Each kit teaches a small model (0.8B, or 2B for the two agents) one job on one GPU in about an hour or less, and scores the model before and after on questions it never trained on:

  • Countdown: reach a target number with arithmetic, reasoning step by step.
  • Phone actions: turn a request into the right function calls.
  • Policy guard: decide whether a message breaks a written policy.
  • Document extraction: fill the JSON a schema asks for from a document.
  • MCP agent: answer questions by calling the tools of an MCP server.
  • Pocket researcher: answer questions by searching a private document collection.

For other models and methods, the examples library has ready configs for Qwen3 with LoRA and QLoRA, a Qwen3 MoE model, pretraining and GRPO, and the recipes cover DPO, distillation, serving and more.

When you need toRead
Write a config and prepare dataConfiguration, Datasets
Train with less memoryLoRA and QLoRA, Precision, Fit in memory, Offloading
Go faster or biggerSpeed, Multiple GPUs, Multiple machines, Pipeline parallelism
Train special modelsMixture-of-experts, Long context, MiniCPM5 and Spark-X2.5, Distillation
Do reinforcement learningGRPO training, Environments and rewards, GRPO on one GPU
Watch a run and fix itMetrics, Debugging
Serve and call a modelInference, Command line, OpenAI-compatible API
Look up a settingConfig options, CLI, Python API
Understand how it works insideHow it works, the model DSL, automatic differentiation, adaptive training
Check a number or a wordBenchmarks, Glossary, FAQ, Release notes

The full list, in reading order.