@ariacompute/ariaengine-rn
v1.19.0
Published
React Native binding for Aria Engine
Readme
@ariacompute/ariaengine-rn
import { AriaEngine } from '@ariacompute/ariaengine-rn';
const eng = new AriaEngine('/path/to/bundle');
console.log(await eng.complete([{ role: 'user', content: 'hi' }]));npm publish name: @ariacompute/ariaengine-rn. Device-farm CI: .github/workflows/bindings-mobile.yml.
AriaEngine.open installs libariaengine_ffi into ~/.ariacompute/lib/ when it is not already on ARIAENGINE_FFI_LIB or in that cache (same Releases asset as ariaengine upgrade).
Auto-download by model name
AriaEngine.open(modelRef, { token, site }) accepts a local bundle path or
an Aria model name (e.g. gemma-4-e2b-it_q4). A value containing / or already
on disk is loaded directly; otherwise the SDK downloads it from the regional
public hub (same as ariaengine download: .com → Hugging Face, .cn →
ModelScope; site defaults to https://ariacompute.com) into
~/.ariacompute/models/{model} and then loads it. Dashboard is not used. A
Dashboard sk- / bfvk- token is ignored for hub auth. Token is optional for
public models. Gated files: pass hfToken / modelscopeApiToken (same as
ariaengine setup); if omitted, reads ~/.ariacompute/engine.yml. Instance
setup is in-memory only (does not write that file). A valid cached bundle is
reused without re-downloading.
const eng = await AriaEngine.open("gemma-4-e2b-it_q4");
const gated = new AriaEngine();
gated.setup({ hf_token: "hf_..." });
await gated.open("gemma-4-e2b-it_q4");