//clika-runtime/io.clika.modelverse/GenerativeModel/Companion/open
open
[common]
fun open(path: String, options: LoadOptions = LoadOptions()): GenerativeModel
Load a text model from path, a snapshot directory or a GGUF file, on the CPU, under options. Blocks for the load (seconds for a small model); call it off the main thread. Set LoadOptions.contextLength on a phone: the key-value cache is sized for the window, and a checkpoint's own window is often tens of thousands of tokens.
Throws
| ModelverseException | when no family of the library claims the files, a weight format the runtime does not decode, a context cap the checkpoint cannot serve, or a load failure, each named in the message. |