Download a model onto the machine that will serve it
The Models tab was about this backend's own disk, which is the wrong disk for every session that runs anywhere else: llama.cpp reads the file where it runs. So the models of a machine live under that machine's llama.cpp provider now, beside the settings deciding how each is loaded, and the download that produces one happens there. A download is a detached `curl` on that machine, started by a script this server writes and never spoken to again. Its state is a file beside the partial, so nothing about it is held here: it survives the app closing, this backend restarting and a second device watching, and the progress is `wc -c` of the partial against the size HuggingFace published rather than anything remembered. A run whose process is gone is reported failed, since `kill -0` is asked at each listing, and there is no "finished" state -- a download that finished is a model, in the list beside the ones still going. Resuming is guarded by the published sha256, which is also checked before the file takes its real name. Two other things the same screens wanted: A provider is drawn as a card rather than as a line of text, bordered against the machine card it sits in -- the tint it had was one step along the surface ladder and rendered as one flat block -- with room to tap and no chevron. Nothing in a raw block wraps any more; the block scrolls sideways instead, one offset for all its lines, so a diff or a column-aligned test run still reads as one. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8c323fc7a9
commit
81c30dcda1
14 files changed
+1224
-1073
No files matched your search
@@ -26,18 +26,22 @@ import androidx.lifecycle.compose.LocalLifecycleOwner
|
||||
import androidx.lifecycle.repeatOnLifecycle
|
||||
|
||||
/**
|
||||
* The app's root: one title, and four views of the backend behind it.
|
||||
* The app's root: one title, and three views of the backend behind it.
|
||||
*
|
||||
* These were four screens reached by four words in a row under the title, and the row was already
|
||||
* full. Tabs say the same thing in less space and say one more thing besides: that these are places
|
||||
* to be rather than errands to run. Sessions, the machine's importable history, the models on it
|
||||
* and the machines themselves are all *the same backend*, looked at four ways, and none is a step
|
||||
* down from another. Settings still is, which is why it stays a pushed screen with its own Back.
|
||||
* These were screens reached by words in a row under the title, and the row was already full. Tabs
|
||||
* say the same thing in less space and say one more thing besides: that these are places to be
|
||||
* rather than errands to run. Sessions, the machine's importable history and the machines
|
||||
* themselves are all *the same backend*, looked at three ways, and none is a step down from
|
||||
* another. Settings still is, which is why it stays a pushed screen with its own Back.
|
||||
*
|
||||
* Models were a fourth tab until 2026-09-19. They are a machine's models now -- downloaded onto the
|
||||
* machine that has to serve them -- so they live under that machine's llama.cpp provider, beside
|
||||
* the settings deciding how each one is loaded. A tab about "the models" was a claim that there is
|
||||
* one such set, and there is one per machine.
|
||||
*/
|
||||
private enum class MainTab(val label: String) {
|
||||
Sessions("Sessions"),
|
||||
Import("Import"),
|
||||
Models("Models"),
|
||||
Machines("Machines"),
|
||||
}
|
||||
|
||||
@@ -145,7 +149,6 @@ fun MainScreen(
|
||||
)
|
||||
MainTab.Import ->
|
||||
ImportScreen(settings = settings, reloadToken = token, onImported = onImported)
|
||||
MainTab.Models -> ModelsScreen(settings = settings, reloadToken = token)
|
||||
MainTab.Machines ->
|
||||
MachinesScreen(settings = settings, reloadToken = token, onProvider = onProvider)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user