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

# Create a custom bundle

Create a bundle to serve several models as one unit, to configure speculative decoding, or to validate and share a named configuration. A bundle is a reusable, named `ModelBundle` resource that combines one or more model and profile pairs.

Creating a bundle does not serve it. Once the bundle passes validation, deploy it with a `ModelDeployment` as described in [Deploy a bundle](/docs/en/v2.2.6/sambastack/service-administration/model-deployment/deploying-models-and-bundles/deploy-a-bundle).

> [!NOTE]
>
> A bundle is optional. To serve a single model, pair it with a profile and deploy it directly. See [Deploy a single model](/docs/en/v2.2.6/sambastack/service-administration/model-deployment/deploying-models-and-bundles/deploy-a-single-model).

## Prerequisites

Before authoring a bundle, complete the quickstart that applies to you:

> **[Quickstart - Hosted](/docs/en/v2.2.6/sambastack/getting-started/hosted)**
>
> System set up for hosted SambaStack

> **[Quickstart - On-prem](/docs/en/v2.2.6/sambastack/getting-started/on-prem)**
>
> System set up for on-prem SambaStack

Additionally:

* Review the [ModelBundle](/docs/en/v2.2.6/sambastack/service-administration/model-deployment/custom-resources/model-bundle) field reference, including [model configurations](/docs/en/v2.2.6/sambastack/service-administration/model-deployment/custom-resources/model-bundle#model-configurations) and [legalizer results](/docs/en/v2.2.6/sambastack/service-administration/model-deployment/custom-resources/model-bundle#legalizer-results).
* Identify the models and profiles to include, and confirm each pair is compatible. See [Identify available models and profiles](/docs/en/v2.2.6/sambastack/service-administration/model-deployment/deploying-models-and-bundles/overview#identify-available-models-and-profiles).
* Review [Supported models and bundles](/docs/en/v2.2.6/sambastack/service-administration/model-deployment/supported-models-and-bundles) for the available model checkpoints.

## Create the bundle

**1. Create the YAML file**

Create a YAML file for your ModelBundle:

```yaml theme={}
apiVersion: sambanova.ai/v1alpha1
kind: ModelBundle
metadata:
  name: mb-gpt120
spec:
  modelConfigs:
  - model: gpt-oss-120b:1
    profile: gpt-oss-fp8-dyt
    batchingConfig:
      8k:
        batch_sizes: [2]
      32k:
        batch_sizes: [2]
      64k:
        batch_sizes: [2]
      128k:
        batch_sizes: [2]
```

For multi-model bundles with speculative decoding, see the [ModelBundle structure](/docs/en/v2.2.6/sambastack/service-administration/model-deployment/custom-resources/model-bundle#structure) example.

**2. Apply the ModelBundle**

**Hosted**

```bash theme={}
kubectl apply -f <modelbundle-file>.yaml
```

**On Premise**

```bash theme={}
kubectl -n <namespace> apply -f <modelbundle-file>.yaml
```

**3. Verify legalizer validation**

The legalizer automatically runs when you apply the bundle and validates whether the configuration fits in RDU memory.

**Hosted**

```bash theme={}
kubectl describe modelbundle <bundle-name>
```

**On Premise**

```bash theme={}
kubectl -n <namespace> describe modelbundle.sambanova.ai <bundle-name>
```

**Successful validation**

```text theme={}
Status:
  Conditions:
    Last Transition Time:  2026-06-22T21:11:05.689262+00:00
    Message:               ModelBundle is Valid
    Observed Generation:   1
    Reason:                ValidationSucceeded
    Status:                True
    Type:                  Valid
```

**Failed validation**

```text theme={}
Status:
  Conditions:
    Last Transition Time:  2026-06-22T21:11:54.975311+00:00
    Message:               <error-details>
    Reason:                ValidationFailed
    Status:                False
    Type:                  Valid
```

The `Message` field contains error details, including legalizer errors if any.

To read the legalizer result directly, including memory utilization and any warnings:

```bash theme={}
kubectl get modelbundle <bundle-name> -o jsonpath='{.status.legalizerInfo}'
```

For the full status structure and field descriptions, see [Legalizer results](/docs/en/v2.2.6/sambastack/service-administration/model-deployment/custom-resources/model-bundle#legalizer-results).

> [!WARNING]
>
> Do not proceed to deployment until the bundle shows `ValidationSucceeded`.

## Troubleshooting

A bundle is validated by the legalizer before it can be deployed. For the errors and warnings it reports and how to resolve them, see [Legalizer validation failures](/docs/en/v2.2.6/sambastack/service-administration/model-deployment/deploying-models-and-bundles/troubleshooting#legalizer-validation-failures).

## Next steps

> **[Deploy a bundle](/docs/en/v2.2.6/sambastack/service-administration/model-deployment/deploying-models-and-bundles/deploy-a-bundle)**
>
> Serve the bundle you just created

> **[ModelBundle](/docs/en/v2.2.6/sambastack/service-administration/model-deployment/custom-resources/model-bundle)**
>
> Full field reference for the bundle resource
