@react-native-ai/mlc
v0.12.0
Published
MLC LLM provider for Vercel AI SDK
Maintainers
Readme
MLC Provider for Vercel AI SDK
A Vercel AI SDK provider for MLC (Machine Learning Compilation) models, enabling on-device large language model inference in React Native applications.
Requirements:
- iOS 14+
- React Native New Architecture
- Vercel AI SDK v5
import { mlc } from '@react-native-ai/mlc'
import { generateText } from 'ai'
// Create model
const model = mlc.languageModel('Llama-3.2-3B-Instruct')
// Download and prepare
await model.download()
await model.prepare()
// Generate
const { text } = await generateText({
model,
prompt: 'What is the meaning of life?'
})Features
- ✅ On-device text generation with MLC models
- ✅ Multiple model support (Llama, Phi, Qwen, etc.)
- ✅ Model downloading and management
- ✅ Streaming responses
- ✅ Hardware-accelerated inference
Documentation
For complete installation instructions and API documentation, visit our documentation site.
License
MIT
This package includes third-party components licensed under their own terms.
See NOTICE and ATTRIBUTIONS.md.
Made with ❤️ and create-react-native-library
