Skip to main content
Run or adapt examples for deploying, serving, and post-training models on Baseten.
  • Deploy a model for a first dedicated endpoint, using an existing recipe through the CLI, Explore, or Management API.
  • Configure a model server to learn how weights, a serving container, and hardware fit together in a Truss configuration.

Models

Deploy LLMs, image generation models, transcription models, and embedding models from example Truss configurations.

Model recipes

Engines

Deploy supported LLMs, embedding models, and other common architectures on Baseten inference engines with configuration only. You do not need Python code or a Dockerfile. See engines for architecture support, quantization options, and performance guidance.

Fast LLMs with TensorRT-LLM

Speculative decoding

Embeddings with BEI

Custom Docker servers

Bring an inference server such as vLLM, SGLang, or another HTTP server. Baseten runs the container, and you configure its serving behavior. See Custom Docker servers for configuration.

Deploy a Hugging Face model

Run any LLM with vLLM

Deploy LLMs with SGLang

Deploy LLMs with Ollama

Dockerized model

Custom Python models

Write a Truss Model class to control model loading and prediction logic. Use custom Python when an inference engine or existing server does not fit the model. See custom model code for the API.

Build and deploy a LLM

Image generation

Customize a model

Chains

Build multi-step workflows with models that scale independently, parallel execution, routing, and postprocessing. See Chains for the SDK.

RAG pipeline with Chains

Transcribe audio with Chains

Post-training

Post-train models on managed GPUs with supervised fine-tuning (SFT) or reinforcement learning (RL). Use Loops to fine-tune an LLM with LoRA or run RL from a Python training loop. Use Training Jobs to bring your own framework and container for LLM fine-tuning or custom training. For the choices behind these examples, see Learn post-training. These examples use Loops with the Loops cookbook for SFT and RL, from data or environment to an evaluated adapter:

Tool calling with SFT

Fine-tune on real tool-agent conversations and compare with the base model.

Counting with RL

Train a vision model to count overlapping circles, with no sandboxes.

Tool-using agent with RL

Train an agent that edits files in a sandbox, graded by hidden checks.

Coding agent with RL

Train a bash agent on Terminal-Bench tasks with asynchronous RL.
These examples use the Loops SDK directly:

Train on a chat dataset

Batch a dataset, train, save resumable checkpoints, and evaluate against the live sampler.

An RL loop

Roll out completions, score them into advantages, and step the trainer.

Vision fine-tuning

Train on geometry diagrams, deploy the checkpoint, and send an image prompt.

Programmatic training

Train and evaluate from your application, and choose data for the next round.
These examples use Training Jobs:

Loops cookbook

Browse every SFT and RL recipe, and the source for the examples on this page.
Our training infrastructure supports popular frameworks including VERL, Megatron, and Unsloth, as well as models trained directly with Hugging Face Transformers.

Baseten for Model Labs

Deploy a Model Labs listing into your workspace or a specific team.

Deploy a Model Labs listing