Skip to main content
RunAnywhere.models is the model catalog and its residency.

The short version

Generation loads what it needs and downloads when options.model names a model that is not on disk:
Reach for the models namespace to control when that cost is paid, show progress, or let a person choose.

What is available

There is no models.get(id) on React Native. Every other SDK has it. Use models.loaded(category) to ask what is currently resident, or list() and filter by id.

Downloading, with progress

Progress carries bytesDone, bytesTotal, fraction, percent, bytesPerSecond, etaSeconds, retryAttempt, currentFileIndex, totalFiles, and overallProgress. Downloads run through the SDK’s native download bridge, not a JavaScript filesystem library, so they survive a JS reload. What does not survive is your for await loop: after a fast-refresh the download keeps going but nothing is listening. Re-attach on mount rather than assuming a fresh start. Show the size first. On cellular, a 2GB model is the user’s money.

Loading

contextLength costs memory whether you use it or not.

MLX and QHexRT

@runanywhere/mlx registers only on physical iOS hardware. @runanywhere/qhexrt is Android arm64 only. Pinning framework to either on the wrong device throws rather than falling back, which is what you want when measuring one engine. Note that capabilities() on React Native is a static literal and lists only llama.cpp and ONNX, even when MLX or QHexRT are installed. Do not use it to decide whether a backend is present.

Switching models

On a phone, unload before loading. Holding two language models is how you get insufficientMemory. Or switch per call, without touching residency:

Unloading

Do this when the app backgrounds, not only on unmount:

What is resident right now

Deleting

delete removes the bytes. unregister removes the catalog entry.

Registering your own model

Storage

storage.info() reports device, app, and per-model usage, which is what a “manage storage” screen renders.

A complete picker

Errors worth handling