Scripts2026年7月24日·1 分钟阅读

RunAnywhere SDKs — Run AI Models Locally on Any Device

A production-ready toolkit for running LLMs and diffusion models on-device across iOS, Android, web, React Native, Flutter, and native platforms with a unified API and optimized inference engines.

Agent 就绪

Agent 可直接安装

这个资产可安装;Agent 先选择当前运行时、检查安装计划,再运行匹配命令。

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
RunAnywhere SDKs
直接安装命令
npx -y tokrepo@latest install 7f2a71f2-8737-11f1-9bc6-00163e2b0d79 --target codex

先 dry-run 确认安装计划,再运行此命令。

Introduction

RunAnywhere SDKs let developers embed local AI inference into mobile, desktop, and web applications without sending data to the cloud. The toolkit wraps optimized C++ inference engines behind platform-native bindings, so the same model runs on an iPhone, an Android phone, or a browser tab.

What RunAnywhere Does

  • Provides unified SDKs for iOS (Swift), Android (Kotlin), React Native, Flutter, and web
  • Runs LLMs like Llama, Qwen, and Gemma with quantized weights for on-device speed
  • Supports diffusion models for local image generation on mobile GPUs
  • Offers a chat completion API that mirrors the OpenAI interface for easy migration
  • Handles model downloading, caching, and lifecycle management automatically

Architecture Overview

The core is a C++ inference engine built on llama.cpp and custom GGUF model loaders. Platform SDKs bind to this core via JNI on Android, Swift C interop on iOS, and WebAssembly plus WebGPU on the web. Models are fetched on first use, cached locally, and loaded into memory on demand. The engine selects the best available backend (Metal, Vulkan, CPU NEON) at runtime.

Self-Hosting & Configuration

  • Install the platform-specific SDK package via npm, CocoaPods, or Gradle
  • Call the init method with a model identifier to download and cache the model
  • Configure quantization level (Q4, Q5, Q8) to trade quality for speed and memory
  • Set context window size and max tokens per response via the options object
  • Use the streaming API for token-by-token output in chat interfaces

Key Features

  • One API across six platforms including React Native and Flutter
  • Automatic backend selection for Metal, Vulkan, WebGPU, or CPU
  • Built-in model management with download progress callbacks
  • Streaming and non-streaming chat completion interfaces
  • Multimodal support for vision-language models on supported hardware

Comparison with Similar Tools

  • Ollama — desktop-focused server; RunAnywhere targets mobile and web natively
  • llama.cpp — the underlying C++ engine; RunAnywhere adds platform SDKs and model management
  • MLX — Apple Silicon only; RunAnywhere runs on Android and web too
  • MediaPipe LLM — Google's on-device inference; RunAnywhere supports more model formats
  • ExecuTorch — PyTorch's mobile runtime; RunAnywhere offers higher-level chat APIs

FAQ

Q: What models are supported? A: Any GGUF-format model works. The SDK ships with optimized configs for Llama 3, Qwen 2.5, Gemma 2, and Phi-3.

Q: How much RAM do models need on mobile? A: A Q4 quantized 3B model needs roughly 2 GB of RAM. Smaller 1B models run under 1 GB, suitable for most modern phones.

Q: Does it work offline after the initial model download? A: Yes. Once cached, inference runs entirely on-device with no network required.

Q: Can I fine-tune models through the SDK? A: No. The SDK is inference-only. Fine-tune models externally, convert to GGUF, and load them with the custom model path option.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产