Volumes are in Private Preview. Contact Baseten
to request access.
Versions, tags, and digests
A volume holds a series of sealed versions. Whenbaseten volume push or baseten volume sync finishes, BDN commits the files as a new version and seals it. A sealed version never changes, and BDN identifies it by a digest of its contents, such as bdn:weights/llama@b3:9f3c….
- Namespace: groups volumes in your organization, such as
weights. - Volume: one versioned collection of files, such as
llama. - Version: one sealed, immutable snapshot of the volume, identified by its digest.
- Tag: a mutable, case-sensitive name that points at one version, such as
prod. Pushing with--tag prodmoves the tag to the new version. - Head: the volume’s latest version. A reference with no tag or digest resolves to head.
- Reproducible deployments: a deployment that mounts a digest gets the same bytes on every replica.
- Small updates: BDN splits files into chunks and stores each chunk once, so a new checkpoint that shares most of its bytes with the previous one uploads only the chunks that changed.
- Fast starts: deployments don’t download the volume before they start. Data streams in as your model reads it.
Volume references
Commands, API responses, andconfig.yaml all identify volumes with the same references:
A reference has the form
bdn:<namespace>/<volume>[@b3:<digest>|:<tag>], followed optionally by a path in the version. Every reference needs the bdn: prefix, a namespace, and a volume name. A digest can be the full value or a unique prefix of 12 to 64 hexadecimal characters. Copy digests from the version_ref that baseten volume push, stat, and versions return instead of typing them.
Namespace, volume, and tag names can be up to 256 characters and can’t contain /, .., or null bytes. Namespace names are lowercase letters, digits, and hyphens, at least two characters long, and can’t start with a digit. You can’t name a namespace namespaces or resolve.
How deployments resolve tags
When a deployment mounts a tag or a bare volume name, each replica resolves it when the replica starts and keeps that version for its lifetime. Moving the tag later doesn’t change what running replicas serve, but new and scaled-up replicas mount the tag’s new target. A deployment that mounts a tag can therefore serve two versions at once after a push. Pin a digest inconfig.yaml so every replica serves the same files, and use tags to name versions for people.
Requirements
- Baseten CLI.
- To deploy with Truss, install Truss. The
basetenCLI doesn’t require Truss. - A CPU instance or a GPU other than T4 or L4. BDN doesn’t support volume mounts on T4 or L4 GPUs.
Publish, mount, and deploy a volume
This walkthrough publishes a small directory as a volume, mounts it in a model, and deploys the model. To publish a volume and mount it in a deployment:-
Create a directory with a few files:
-
Push the directory as a new volume and tag the version
prod.pushcreates the namespace and volume if they don’t exist, and--jqprints the new version’s immutable reference:Save the printed reference. The rest of this walkthrough calls it<version-ref>. -
Inspect the published version:
-
Create a model directory named
volume-quickstartwith aconfig.yamlthat mounts the version. Pinning the digest means later pushes can’t change what this deployment mounts:config.yaml -
Add a
model/model.pythat reads the mounted files:model/model.py -
Deploy the model from the
volume-quickstartdirectory: -
Call the deployment with the predict URL from the push output:
The response includes the message and metadata read from the volume.
Next steps
Manage volumes
Publish new versions, roll back, and delete or restore versions.
Sync from remote sources
Copy a Hugging Face repo or storage bucket into a volume.