Last updated: 2026-11-25
Use this runbook to change an existing model's weights while keeping its model ID, pricing and aliases. The revision architecture explains staging, draining, retained hashes and failure recovery.
Use a new revision for replacement weights, tokenizer/config updates or an embedded MTP checkpoint under an existing model ID. For a new model ID or a quantization exposed as a separate build, use model migration. Overwriting an already published R2 revision is rejected.
| State | Operation | Credentials |
|---|---|---|
| New model ID with a valid, already published canonical manifest | Register the build using model migration | Coordinator publishing key |
| Existing model ID with a valid, already published new revision | Set publish_revision_only=true and promote=true in Register Model |
Coordinator publishing key |
| Missing files, changed bytes, wrong manifest inventory or noncanonical prefix | Publish a new immutable revision, then register or promote it | Model-bucket upload credentials plus coordinator publishing key |
A public download URL proves read access, not bucket write permission. Conversely, an R2 write failure does not prevent registering a valid existing upload. Check the model ID, version, canonical prefix and complete serving inventory before choosing a path. Keep optional assistant checkpoints outside the base inventory unless the runtime explicitly supports their combined layout.
The coordinator validates the canonical manifest and file sizes; providers verify the file hashes. A backup manifest at another prefix cannot be submitted as an arbitrary manifest URL through the standard registration API. Publish a new canonical revision when its identity or inventory differs; do not make direct database edits part of the routine workflow.
- The model already has an active registry entry. Qualify the new checkpoint's engine compatibility, memory, output and MTP behavior separately; an upload succeeding is not a model-quality verdict.
- Confirm the external platform already supports the revision API and Macs
advertise
model_revisions_v1for automatic same-ID updates. Backend deployment is owned by the platform and is not part of this runbook. - Configure
MODEL_REGISTRY_PUBLISHING_KEYfor the selected coordinator. - For uploads only, configure AWS CLI credentials for the model bucket and
its matching account endpoint. The command takes the endpoint explicitly or
through
R2_ENDPOINT. Release-artifact credentials and the account selected in a browser are not evidence of access todarkbloom-models. - For uploads from local files, use a complete, stable checkpoint directory and do not modify it during hashing/upload. Keep old R2 revisions and provider snapshots for rollback. An already published revision needs no local checkpoint.
- Exercise this flow on dev first. Production publication, promotion or retirement requires approval for that specific operation.
Confirm the endpoint, bucket and credential source with the bucket owner. Keep credentials out of terminal output, reports and commits. The endpoint is the account URL, without a bucket path appended. With credentials already configured, check one known object in the actual model bucket:
aws s3api head-object --bucket darkbloom-models \
--key "$KNOWN_MODEL_MANIFEST_KEY" --endpoint-url "$R2_ENDPOINT" \
--query '{bytes:ContentLength,etag:ETag}'AccessDenied or HTTP 403 is an access/configuration failure, not evidence that
the model is missing. Stop and correct that tuple instead of trying unrelated
accounts or assuming release CI credentials have model-bucket access. This read
check does not prove write permission; the normal conditional revision reservation
is the first authorized write. A timeout leaves the outcome uncertain: inspect
the destination and any running publisher before resuming the same reserved
version with identical bytes.
-
Read the existing catalog entry and save its version and hash before selecting replacement bytes. The Nemotron Lightning rollout uses the catalog ID
nvidia-nemotron-3.5-lightning; confirm that ID and its active entry on the selected coordinator. A Hugging Face repository name is a download source and does not replace the catalog ID.REVISION_COORDINATOR=https://api.dev.darkbloom.dev REVISION_MODEL_ID=nvidia-nemotron-3.5-lightning curl --fail --silent --show-error \ "${REVISION_COORDINATOR}/v1/models/catalog/${REVISION_MODEL_ID}" \ --output /tmp/nemotron-catalog-before.json python3 -m json.tool /tmp/nemotron-catalog-before.jsonRetain the returned
version,aggregate_sha256,r2_prefixand anyhugging_face_artifactfor verification and rollback. Choose and qualify the exact replacement checkpoint independently; the commands below leave its local path and optional pinned HF source explicit. -
If an upload is needed, preview it. This hashes locally and makes no remote changes. For an already published revision, use the workflow mode in step 3:
python3 scripts/publish-model-revision.py publish /path/to/qualified-checkpoint "$REVISION_MODEL_ID" \ --coordinator "$REVISION_COORDINATOR" \ --endpoint https://ACCOUNT.r2.cloudflarestorage.com \ --version candidate-YYYYMMDD-r1 --dry-run
-
To upload, run the same command without
--dry-runto reserve the R2 prefix, upload files and the final manifest, then invoke the authenticatedpublish-revisionregistry action. Omit--versionto generate a unique timestamp/UUID version. Retry with the same version and identical files to resume an interrupted publication.If the revision is already uploaded, the Register Model GitHub workflow accepts
publish_revision_only=truewithpromote=true. It invokespublish-revisionwith the version and optional pinned HF artifact, preserving model metadata and prices. It uses onlyMODEL_REGISTRY_PUBLISHING_KEY; it does not need R2 credentials or a local GCP login. Registration-only inputs are optional at dispatch and ignored in this mode; normal registration validates them before sending. Revision-only publication always promotes; leavingpromote=falsefails before any HTTP request. Use normal registration for a staged-only build. Keeppublish_revision_only=falsefor normal registration.To use a different HF source for this revision, add these flags to both the preview and publication commands:
--hf-repo-id EigenLabs/model-revision-v2 \ --hf-revision <full-lowercase-40-character-commit-SHA> \ --hf-path-prefix mlx/q4
The path prefix is optional. The pinned HF repo must contain this revision's exact manifest files and bytes. Providers try that HF source first, verify checksums, and fall back to R2 if it is unavailable or incorrect. Every new version can specify a different repo, commit and subdirectory. Omitting the HF flags for a new version makes it R2-only; a source is never inherited from another version. Retrying an existing version preserves its stored source, including R2-only, even if the flags are omitted or changed. Use normal registration for an intentional mirror edit on an existing version.
The action preserves model metadata, upstream
hugging_face_idand pricing, and records the initial authenticated publisher inuploaded_by. Identical retries keep the originaluploaded_byanduploaded_at, and the stored download source. The coordinator checks the R2 manifest and file sizes before promotion; providers check file and aggregate SHA-256 hashes for either source. If publication returns 503 after promotion, retry with the same version and HF flags until the live catalog and alias refresh and desired-state delivery succeed. An alias read or provider send failure can return 503 even after the durable promotion and live catalog have changed; do not treat that response as a rollback. An alias refresh failure retains the last loaded alias map and does not fan out desired state from that stale map. -
Let eligible providers download while serving their existing revisions. Providers then stagger their model-scoped drains, switch snapshots and announce the new hash through
models_update. While a download or switch holds a model's write lease, a start's verification of that model reportsSelectedModelBusy("being downloaded, updated or verified by another process"); an Autopilotdarkbloom startkeeps such a recorded model and starts. No per-model binary release, alias edit or manual fleet download command is needed after support is installed. -
If this model participates in cache routing, qualify and derive the new
(model_id, model_aggregate_sha256, prompt_contract_id)tuple using the cache-routing rollout. Append it toEIGENINFERENCE_CACHE_ROUTING_ALLOWED_ARTIFACTSthrough that runbook's separately approved deployment step. Keep tuples for retained approved revisions during convergence and rollback. Promotion does not update the allowlist, and a changed weight hash needs a new tuple even when its tokenizer and prompt contract remain identical. Until it is appended the model has no cache routing:artifact_allowlist.stale_modelsinGET /v1/cache/statuscounts it and the coordinator log names the exact tuple (stale entries).
- Read
GET /v1/models/catalog/{model_id}andGET /v1/models/catalog/manifest/{model_id}. Confirmversion,r2_prefixandaggregate_sha256match the published manifest and that the catalog ID, pricing and aliases remain the intended ones. - Check provider logs for
model revision:and the exact model/version.outcome=installedfollows activation and advertisement; download progress alone does not prove a loaded replacement. Check heartbeat slot state and signed model hashes for resident-model verification. - Compare connected providers' advertised hashes with the desired hash, separating old approved revisions, updated advertisements, loaded slots, offline providers and providers lacking revision support.
- Exercise inference before/during/after the switch, including accepted streams, a failed download, cancellation, a newer promotion and rollback. There is no guaranteed zero-gap rollout for a model with only one available provider.
- The fixture suites cover filesystem publication, cold activation, cancellation, drain ownership and coordinator/store behavior. A real large-checkpoint swap and fleet availability remain separate pilot qualification gates.
Use the existing authenticated POST /v1/admin/models/{model_id}/promote with
{"version":"previous-version"}. Providers receive its hash as desired state
and use the retained snapshot when available. Previously approved, non-retired
revisions remain acceptable during that convergence. Rollback does not restore
model metadata changes made separately through other admin actions. If promotion
returns 503 with Retry-After: 5, its storage change may already be committed;
retry the same previous version until the live catalog refresh and desired-state
delivery succeed.
Retirement is a separate, explicit operation after checking fleet adoption:
POST /v1/admin/models/{model_id}/retire-revision with {"version":"old-version"}.
The active version cannot be retired. Re-registering a retired version does
not reactivate it; publish a new version to approve its bytes again.
Retirement revokes the old hash for routing
and challenge validation, including returning offline providers; do not use it
as automatic storage cleanup. It does not delete R2 or provider files.
If retirement returns 503 after its storage write, retry the same operation;
revocation is not complete until the live routing policy refresh succeeds.