# div model

> Names weights on a volume as a model version that div eval can measure, and lists the registry with what each version weighs.

```bash
div model publish redact:v0.4.0 --volume weights --path redact/v0.4.0
div model publish llama-ft:v3 --volume ckpt --path final --run run-k4t9
div model ls
```

A model version is weights on one of the org's volumes. Publishing names which ones; [`div eval run --model`](https://docs.divergentlabs.xyz/compute/cli/eval.md) hands that path to the run as `DIVERGENT_MODEL_PATH`. The weights get there first, with [`div storage put`](https://docs.divergentlabs.xyz/compute/cli/storage.md) or by a run writing them.

## Usage

```text
div model ls [--project <slug>]
div model publish <model:tag> --volume <name> [--path <path>] [--run <run>]
```

| Flag | What it does |
| --- | --- |
| `--volume <name>` | the volume the weights are on |
| `--path <path>` | where on it: one file, or a directory. Left out, all of it |
| `--run <run>` | the run that produced them, by name or id |
| `--project <slug>` | the project the model belongs to. Default: the name of this directory |
| `--json` | print the version, or the registry, as JSON |

The model is made in the project the first time a version of it is published, the way `div eval run` makes an evaluation.

## What a version weighs

The size is measured on the volume when the version is published: every file at the path, added up by whoever holds the volume. Nothing sent with the version is read as its size. A path with nothing at it is refused, since every eval run of that version would be handed a directory that is not there:

```text
$ div model publish redact:v0.5.0 --volume weights --path redact/v0.5.0
error there is nothing at weights/redact/v0.5.0 to publish
put them there with div storage put weights <dir> <path>, or look with div storage ls weights
```

The volume and the run have to be the org's own.

## The registry

```text
$ div model ls
redact:v0.4.0    23 MB  weights/redact/v0.4.0  2026-09-24
masker:v2       1.3 GB  weights/masker/v2      2026-09-21
masker:v1       1.3 GB  weights/masker/v1      2026-09-18
3 models, 3 versions
```

One line per version, newest first within each model, named the way `--model` takes it. The rows go to stdout, the count to stderr.
