AiModel

data class AiModel(val id: String, val label: String, val repo: String, val commit: String, val files: List<ModelFile>, val spec: OnnxSpec)(source)

A downloadable model, pinned to one commit of its Hugging Face repo so the files can't change under us; each file's SHA-256 is checked before it's used.

Constructors

Link copied to clipboard
constructor(id: String, label: String, repo: String, commit: String, files: List<ModelFile>, spec: OnnxSpec)

Properties

Link copied to clipboard
val bytes: Long
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val id: String
Link copied to clipboard

What users see: the tier, never the model's name.

Link copied to clipboard
Link copied to clipboard

How to run it once downloaded.

Functions

Link copied to clipboard
fun complete(context: Context): Boolean

Every file of this version is in place; otherwise Settings offers the rest as an update.

Link copied to clipboard
fun dir(context: Context): File

App-private, never backed up: the files are large and re-downloadable.

Link copied to clipboard
fun installed(context: Context): Boolean

It works: every required file is in place.

Link copied to clipboard
fun url(file: ModelFile): String