> ## Documentation Index
> Fetch the complete documentation index at: https://docs.baseten.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a standalone sampler

> Sample from a base model or a saved Loops checkpoint without a training run, for evaluation before or after training.

A standalone sampler serves a base model or a saved checkpoint without a trainer. Use one to score a base model before you train, or to evaluate saved weights after a run ends. To sample during training, use the run's [paired sampler](https://docs.baseten.co/loops/sample-from-a-run.md) instead.

> [!WARNING]
>
> A standalone sampler bills until it's inactive. It isn't tied to a run, so deactivating a run doesn't stop it. [Deactivate the sampler](https://docs.baseten.co/loops/deactivate-a-sampler.md) when you finish.

## Create the sampler

**To create a standalone sampler**:

Call [`ServiceClient.create_sampling_client()`](https://docs.baseten.co/reference/sdk/loops/service-client) with either `model_path` or `base_model`, but not both.

To evaluate saved weights, pass the checkpoint's path as `model_path`. Replace `<checkpoint_path>` with the `path` that [`save_weights_for_sampler()`](https://docs.baseten.co/reference/sdk/loops/training-client) returned, which has the form [`bt://loops:<run_id>/sampler_weights/<checkpoint_name>`](https://docs.baseten.co/loops/concepts#checkpoints):

```python theme={"system"}
from baseten.loops import ServiceClient

sampling_client = ServiceClient().create_sampling_client(model_path="<checkpoint_path>")
print(sampling_client.sampler_id)
```

To sample from a base model instead, pass its model ID from [Supported models](https://docs.baseten.co/loops/supported-models.md) as `base_model`:

```python theme={"system"}
sampling_client = ServiceClient().create_sampling_client(base_model="Qwen/Qwen3.6-35B-A3B")
```

[`sampler_id`](https://docs.baseten.co/reference/sdk/loops/sampling-client) is the ID you need to [deactivate the sampler](https://docs.baseten.co/loops/deactivate-a-sampler.md) later.

Then call [`sample()`](https://docs.baseten.co/reference/sdk/loops/sampling-client) as you would with a paired sampler; see [Sample published weights](https://docs.baseten.co/loops/sample-from-a-run.md#sample-published-weights) for a complete call.

To create a standalone sampler without the SDK, send a [Create a sampler](https://docs.baseten.co/reference/loops-api/samplers/create-a-sampler.md) request with a session ID and either `base_model` or `model_path`. Sampling from it requires the SDK.

## Next steps

* [Set sampling parameters](https://docs.baseten.co/loops/sampling-settings.md): Control temperature, cut-offs, length, and stop sequences.
* [Deactivate a sampler](https://docs.baseten.co/loops/deactivate-a-sampler.md): Shut down the sampler when you finish.
