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 default tag, normally pointing at the volume’s latest version. You can move it to another version. File reads and deployment mounts use
headwhen the reference has no tag or digest.
- 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
Use abdn: reference to identify a namespace, volume, version, or path within your Baseten organization.
Your Baseten credentials select the organization, so the reference doesn’t include an organization name. Write bdn: without //. The Baseten CLI rejects bdn:// references, and cross-organization references aren’t supported.
Use a full digest or a unique prefix of 12 to 64 hexadecimal characters. To pin a version in commands or
config.yaml, copy its version_ref from the CLI output.
A volume reference without a tag or digest names the volume. File access and deployment mounts use its head version. stat returns metadata for the volume itself, and versions lists its versions.
Namespace and volume names can be up to 256 characters and can’t contain /, .., or null bytes. Tags can be up to 128 characters: letters, digits, underscores, periods, and hyphens, starting with a letter, digit, or underscore. 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
- Install the Baseten CLI.
- Choose a CPU instance or a GPU instance with an accelerator other than NVIDIA T4 or L4.
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, manage tags and expiration, and roll back deployments.
Sync from remote sources
Copy a Hugging Face repo or storage bucket into a volume.