{{define "admin_mirror"}} {{/* Only while something is downloading. A reload at any other time would take with it whatever the operator was typing into the form below. */}} {{if .RefreshSec}}{{end}} Mirror · llmgw

Model mirror

{{if .Unreachable}}{{.Addr}} did not answer{{else}}{{.Present}} held · {{.Fetching}} downloading · {{.Failed}} failed · {{.Addr}}{{end}}

{{if .Error}}

{{.Error}}

{{end}} {{if .Message}}

{{.Message}}

{{end}} {{if .Unreachable}} {{/* Said outright rather than shown as an empty table. A mirror holding nothing and a mirror that is not there look the same in a list of zero rows, and they call for opposite responses. */}}

Nothing was read from the mirror, so this page is not a list of what it holds — it is not currently reachable at {{.Addr}}. Check that llmgw-mirror is running there and that its management port is reachable from this machine.

{{else}}

What the mirror holds

{{if .Rows}} {{range .Rows}} {{if .Err}}{{end}} {{if not .Err}}{{end}} {{end}}
ModelVersionFileStateSize Checksum
{{.Model}} {{.Version}} {{.File}} {{.State}} {{if eq (printf "%s" .State) "fetching"}} {{if .HasPercent}}{{bytes .BytesDone}} / {{bytes .BytesTotal}} ({{.Percent}}%) {{else}}{{/* No total came from upstream, so no percentage is invented — a bar that guesses its own end and then stops moving is worse than a number that only goes up. */}} {{bytes .BytesDone}} so far{{end}} {{else if eq (printf "%s" .State) "failed"}}— {{else}}{{bytes .BytesDone}}{{end}} {{if .SHA256}}{{slice .SHA256 0 12}}{{else}}—{{end}} {{if eq (printf "%s" .State) "fetching"}} downloading {{else if eq (printf "%s" .State) "failed"}} {{/* Retry, not remove. A fetch that failed left nothing on disk, so the remove would come back "the mirror holds nothing for this" — a button whose only outcome is a confusing error. Starting the same download again is what somebody looking at a failed row wants, and the mirror allows it: only a download still running is refused. */}}
{{else}}
{{end}}
{{.Err}}
{{.URL}}

The address under each row is what a catalog entry should say. It is rendered here rather than assembled by hand because the mirror and the catalog have to spell the same file the same way — two spellings is what makes a file that is in use look unreferenced.

{{else}}

The mirror is reachable and holds nothing yet.

{{end}}

Fetch a model

The mirror answers as soon as the download is under way, not when it finishes — a model is tens of gigabytes and nothing here holds a connection open for that. The row above will show it arriving. A version is never overwritten: fetching into one that exists is refused, so a new build is a new version and the old weights stay where they are.

{{end}}
{{end}}