---
title: "Companion"
sidebar_label: "Companion"
description: "Kotlin binding reference: Companion."
---

<!-- Generated by tools/api_reference/generate_api_docs.py. Do not edit. -->

//[clika-runtime](../../../../index.md)/[io.clika.modelverse](../../index.md)/[GenerativeModel](../index.md)/[Companion](index.md)

# Companion

[common]\
object [Companion](index.md)

## Functions

| Name | Summary |
|---|---|
| [open](open.md) | [common]<br>fun [open](open.md)(path: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), options: [LoadOptions](../../LoadOptions/index.md) = LoadOptions()): [GenerativeModel](../index.md)<br>Load a text model from [path](open.md), a snapshot directory or a GGUF file, on the CPU, under [options](open.md). Blocks for the load (seconds for a small model); call it off the main thread. Set [LoadOptions.contextLength](../../LoadOptions/contextLength.md) 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. |