The path is the first index
Search tools fail, databases corrupt, memories fade — but the directory tree is still there, being read by whatever future tooling exists. A good layout makes the tree itself informative; a bad one makes the tree a puzzle that only its author can solve, and only for a few years. The archive layout that scales is the one a stranger (or future-you, context-free) can interpret without documentation.
The shape that works mirrors the acquisition coordinate:
- Top level: the maker.
black-forest-labs/,mistralai/— the chain-of-custody root. Mirrors the upstream namespace, so provenance is the first thing the path says. - Second level: the model.
FLUX.1-dev/— the upstream repository name, verbatim, however ugly. Renaming models on the way in is how archives lose the link back to their sources. - Third level: the variant/revision.
bf16-240901/,gguf-q4/— precision or format, plus the acquisition stamp. Two variants of one model are siblings, never roommates: derivative formats get their own directories, labeled as what they are. - Inside: the files, plus the records. The tensors, the tokenizer, the model card (copied!),
SHA256SUMS, and aNOTESfile with revision sha, source, license line, chain scores, dates. The directory is self-contained: deleting the archive's database would still leave every directory able to explain itself.
Naming rules that pay rent
Constraints that matter more than aesthetics: lowercase-with-hyphens for every path segment you create (case-sensitivity differs across filesystems, and case collisions migrate badly); ASCII only (a model named with a character that some filesystem renders differently is a future phantom file); no spaces (they quote differently in every shell and script); dates as YYMMDD or YYYY-MM-DD so lexical sort equals chronological sort. Keep upstream names verbatim even when they violate these — your segments follow the rules; their names are data.
The payoff compounds: scripts can walk the tree and reconstruct acquisition metadata from paths alone; a restored backup re-indexes itself; and "where is the BF16 original of that model" is a two-directory lookup instead of a search query.
Migrating an existing mess (safely)
Renames are metadata operations but they are still writes — verify after. The safe migration loop for an existing pile: choose the canonical layout, move one model at a time (move, don't copy-then-forget), re-run the digest check in the new location, then update your index. Never batch-rename mid-acquisition; a layout change during active transfers is how .part files get orphaned from their expected destinations.