Announcing React Native ExecuTorch v0.5.0 βοΈ
Whatβs new?
ποΈ A full native code rewrite based on C++ JSI bindings enabling zero-copy data transfer between native code and JS
π₯ Up to 2x faster Whisper transcription on iOS
π· CLIP - extract semantic meaning of images
π΄ Significant improvements to the performance of text embeddings
π§ Rewrite of the STT streaming API delivering better qualitative results & DX
π Specify LLM structured output schemas using zod
π LLMs now correctly handle Unicode/emoji in outputs
β οΈ Breaking changes
- Multiple model instances: JSI bindings remove the static singleton limitation. You can now create and run multiple instances of the same model simultaneously.
- We've replaced separate URL imports with bundled model objects. Instead of manually specifying modelSource, tokenizerSource, and tokenizerConfigSource, just pass a single object like LLAMA_3_2_1B. The individual URLs are still accessible as properties if you need them.
import {
useLLM,
LLAMA3_2_1B,
} from 'react-native-executorch';
// Current API:
const llm = useLLM({ model: LLAMA3_2_1B });
// Previous API:
const llama = useLLM({
modelSource: LLAMA3_2_1B,
tokenizerSource: LLAMA3_2_TOKENIZER,
tokenizerConfigSource: LLAMA3_2_TOKENIZER_CONFIG,
});