Skip to main content

Training Backends

CLaaS supports three training backends. Each implements the same TrainingEngine abstract base class, so the feedback API works identically regardless of which backend you choose.

Comparison

Engine abstraction

All backends implement the TrainingEngine ABC defined in claas/training/engine/base.py. The key interface:
The execution mode is selected via the CLAAS_DISTILL_EXECUTION_MODE environment variable (local, tinker, or modal). The API reads this at startup and instantiates the corresponding engine.

DistillBatchRequestPayload

Typed batched payload forwarded to the training engine. Defined in claas/core/types.py.

DistillResponse

Response returned after a distillation step completes. Defined in claas/core/types.py.

Hybrid engine (Local)

The locally hosted request path uses a hybrid engine that alternates between:
  • Serving mode - routes traffic through vLLM for low-latency generation
  • Update mode - pauses serving, frees GPU memory, runs a single SDPO step, then resumes
This sleep/wake mechanism ensures vLLM and CLaaS don’t compete for GPU memory.