Initialization is two-phase. Phase 1 is the initialize() call and is all local inference
needs. Phase 2 handles authentication, device registration, and telemetry in the background;
completeServicesInitialization() awaits it when you need to be sure it finished.Call it from Application.onCreate().
// What is availableval models = RunAnywhere.models.list()val model = RunAnywhere.models.get("qwen3-0.6b")// Get one onto the deviceRunAnywhere.models.download("qwen3-0.6b").collect { event -> if (event is DownloadEvent.Progress) progress = event.fraction ?: 0f}// Load and unloadval loaded = RunAnywhere.models.load("qwen3-0.6b")RunAnywhere.models.unload("qwen3-0.6b")RunAnywhere.models.unloadAll(ModelCategory.MODEL_CATEGORY_LANGUAGE)// HousekeepingRunAnywhere.models.delete("qwen3-0.6b")val state = RunAnywhere.models.state()RunAnywhere.models.refresh()
You rarely need load directly. Generation auto-loads what it needs and downloads when
options.model names a model that is absent.
val info = RunAnywhere.models.register( ModelRegistration.url( name = "My model", url = "https://example.com/model.gguf", framework = InferenceFramework.INFERENCE_FRAMEWORK_LLAMA_CPP, category = ModelCategory.MODEL_CATEGORY_LANGUAGE ))