// 在本地跑模型
PocketPal AI(在手机本地运行语言模型的开源私人助手)
PocketPal AI 是开发者 Asghar Ghorbani 以 MIT 许可证开源的手机端私人 AI 助手,可在设备本地运行语言模型,默认无需账号或云端,也无需网络。官方 README 说明:对话与文档默认留在本机;仅在用户主动开启联网功能(如网页搜索、远程服务器或系统在线语音)时才会离开设备。功能包括使用 GGUF 格式模型(如 Gemma、Qwen、Phi、Llama 等)离线对话,本地神经网络语音合成与基于 whisper.cpp 的语音输入,可配置人设的 Pals,以及计算器、日期时间和可选网页搜索等工具。推理路径覆盖 CPU、GPU(iOS 上为 Metal,Android 上为 OpenCL/Adreno)和 NPU(高通 Hexagon),并在不支持时回退。安装方法:从 Apple App Store(id 6502579498)或 Google Play(包名 com.pocketpalai)安装,在应用内下载适合本机的模型后即可开始对话;也可从官方仓库构建。GitHub 最新正式版为 v1.24.0(发布于 2026-11-17 18:55 CST)。适合希望在手机上离线、本地使用语言模型的个人用户。
开源 维护中 开发者
官方下载官方直链
v1.24.0 · 2026-11-17
按钮直接指向官方文件(github.com),本站不转存、不改动安装包。核实于 2026-11-30。 全部文件、校验值和安装步骤 →
一段话结论
PocketPal AI(在手机本地运行语言模型的开源私人助手) 是PocketPal AI 是开发者 Asghar Ghorbani 以 MIT 许可证开源的手机端私人 AI 助手,可在设备本地运行语言模型,默认无需账号或云端,也无需网络。官方 README 说明:对话与文档默认留在本机;仅在用户主动开启联网功能(如网页搜索、远程服务器或系统在线语音)时才会离开设备。功能包括使用 GGUF 格式模型(如 Gemma、Qwen、Phi、Llama 等)离线对话,本地神经网络语音合成与基于 whisper.cpp 的语音输入,可配置人设的 Pals,以及计算器、日期时间和可选网页搜索等工具。推理路径覆盖 CPU、GPU(iOS 上为 Metal,Android 上为 OpenCL/Adreno)和 NPU(高通 Hexagon),并在不支持时回退。安装方法:从 Apple App Store(id 6502579498)或 Google Play(包名 com.pocketpalai)安装,在应用内下载适合本机的模型后即可开始对话;也可从官方仓库构建。GitHub 最新正式版为 v1.24.0(发布于 2026-11-17 18:55 CST)。适合希望在手机上离线、本地使用语言模型的个人用户。
适合:想在本地跑模型的开发者和团队。
01怎么开始
- 1先看官方快速上手(上方按钮)。
- 2按官方说明安装或注册。
- 3先拿一个小例子跑通,再接进项目。
02README(项目原文)
以下内容来自 a-ghorbani/pocketpal-ai 的 README,许可证 MIT,版权归原作者。 查看原文 ↗
PocketPal AI
A private AI assistant that runs entirely on your phone.
Chat with language models, give them a voice, and let them use tools — all on-device. No account, no cloud, no internet required.
pocketpal.dev · Get the app · Leaderboard · PalsHub · Discussions
Why PocketPal AI?
Most AI apps are a thin window onto someone else's server — every message you type gets shipped off, logged, and analyzed somewhere you can't see. PocketPal flips that around: the AI lives on your phone, and your conversations stay on it unless you choose an online feature.
- 🔒 Private by default — every prompt, response, and document stays on your device unless you turn on an online feature such as web search or a remote server.
- ✈️ Works offline — download a model once and it just works, with no connection and no account. On a plane, on a trail, anywhere.
- 📱 Runs on hardware you already own — real language models, voices, and tools, tuned to make the most of your phone's CPU, GPU, and NPU.
- 🆓 Free and open source — chat, models, voices and tools are free, with no account. The App Store and Google Play builds offer an optional one-time PocketPal Plus purchase for hands-free voice and the local API server; builds from source include it, and so does the APK on GitHub Releases from the release after v1.23.0. MIT-licensed.
Privacy note: Your chats and documents leave your device only through features you turn on: web search and page reading, a remote server, or a system voice your phone runs online. The app's other network use (model and voice downloads, PalsHub and purchases, device-compatibility rules from the jsDelivr CDN at launch, the opt-in benchmark leaderboard, and feedback or reports you submit) never attaches your chats.
Contents
- Features
- Get the app
- How it works
- Using the app
- For developers
- Contributing
- Roadmap
- Community & support
- License
Features
- 🧠 On-device chat — run GGUF language models (Gemma, Qwen, Phi, Llama, and more) fully offline.
- 🗣️ Text-to-speech — give your assistant a voice with on-device neural voices (Kokoro, Kitten, Supertonic, and Phonon on supported devices) that synthesize speech on your phone, or your phone's system voices.
- 🎙️ Voice input — dictate messages with on-device Whisper speech recognition (whisper.cpp).
- 🎭 Pals — create personalized assistants with their own model, system prompt, and personality (Assistant and Roleplay types).
- 🛍️ PalsHub — discover and install community Pals, including premium ones via in-app purchase.
- ✨ PocketPal Plus — an optional one-time purchase in the App Store and Google Play builds that adds hands-free voice conversation and a local API server. Builds from source, and the APK on GitHub Releases from the release after v1.23.0, include every Plus feature with no purchase.
- 🛠️ Talents & tools — let capable Pals call built-in tools (calculator, date/time, rich HTML rendering, opt-in web search and page reading) inside a tool-use loop.
- 📥 Hugging Face integration — search and download GGUF models, including gated ones, directly from the HF Hub with your access token.
- 📊 Benchmarking — measure tokens/sec and memory, and optionally compare on the AI Phone Leaderboard.
- ⚡ Hardware acceleration — CPU, GPU (Metal on iOS, OpenCL/Adreno on Android), and NPU (Qualcomm Hexagon) inference paths, with graceful fallback.
- 🌍 Localized — available in 16 languages, on phones and tablets, including full iPad support.
Get the app
| Platform | |
|---|---|
| iOS / iPadOS | |
| Android |
Three steps to your first chat:
- Install PocketPal from the App Store or Google Play.
- Download a model — tap the menu (☰) → Models, pick one that fits your phone, and download (or add one from Hugging Face).
- Load it and start chatting — that's it, you're running AI fully offline.
How it works
You don't need to know any of this to use PocketPal — but if you're curious how a phone runs real AI offline, here's the short version.
PocketPal is a four-layer stack, from the silicon up to the chat UI. Each layer has one job, and the dependency direction is strictly top-down — the JS app talks to native bridges, bridges talk to inference engines, engines target hardware backends.
| Layer | What runs here |
|---|---|
| UI & Tool Use | The React Native app (UI via React Native Paper, state via MobX, chat history in WatermelonDB). The AgentRunner drives each chat turn — streaming tokens, dispatching Talents (tools) when the model calls them, and feeding results back for follow-up reasoning. Pals are configurable personas; PalsHub is the in-app marketplace for sharing and buying them. In voice mode, your speech is transcribed, answered as a normal chat turn, and the reply is spoken back. |
| Bridging | Native modules that connect JavaScript to the engines. llama.rn bridges LLM inference over JSI; whisper.rn bridges speech recognition; @pocketpalai/react-native-speech and onnxruntime-react-native bridge text-to-speech, with the @pocketpalai/react-native-speech-phonon add-on for Phonon. |
| Engine | The inference engines. llama.cpp runs language models in the quantized GGUF format. whisper.cpp runs Whisper speech recognition models in the GGML format. ONNX Runtime runs the Kokoro, Kitten and Supertonic voice models in the ONNX format. Phonon runs natively in its own Rust runtime: a GGUF model on the CPU on Android, a Core ML model on iOS. |
| Hardware | Where the math actually happens. PocketPal targets CPU (universal fallback), GPU (Metal on iOS, OpenCL on Qualcomm Adreno for Android), and NPU (Qualcomm Hexagon, and the Apple Neural Engine for Phonon on iOS) — falling back gracefully and offloading partial layers when a full backend isn't available. |
Using the app
📥 Download & load a model
- Open the app and tap the Menu (☰), then go to Models.
- Pick a model from the list and tap Download, or tap + to add one from Hugging Face or local storage.
- From Hugging Face, search GGUF models and choose a quantization that fits your device's memory and storage — download now or bookmark for later.
- After downloading, tap Load (or use the chevron icon left of the chat input to load right from the chat screen).
💬 Chat
- Make sure a model is loaded.
- Open the Chat page and start talking.
- The screen stays awake during inference and deactivates when idle.
- Copy a full response with the copy icon, or long-press a paragraph to copy just that.
- Edit any of your messages with a long-press — the AI regenerates from your change. Hit retry for a fresh answer, optionally with a different model.
🎭 Pals & PalsHub
Create personalized assistants:
- Assistant Pal — pick a default model, set a system prompt (write it yourself or have the app generate one), and customize the chat input color.
- Roleplay Pal — everything above, plus location, the AI's role, and other contextual parameters.
Switch personas with the Pal picker on the chat page. Browse PalsHub in-app to discover community Pals, including premium ones via in-app purchase.
Creating a cocktail-recipe assistant
📊 Benchmark your device
- Open the Benchmark page.
- Run performance tests to compare speed and efficiency across models.
- Review tokens/sec and memory usage.
- Optionally share your results to the AI Phone Leaderboard.
🔑 Set up a Hugging Face token (for gated models)
- Create an access token in your Hugging Face account (docs).
- In PocketPal, go to Settings → Set Token, paste it, and save.
💌 Send feedback
Go to App Info → "Sharing your thoughts", type your feedback — feature requests, suggestions, anything — and submit.
For developers
PocketPal is a standard React Native app. If you can build a React Native project, you can build PocketPal.
Prerequisites
- Node.js — version is pinned in
.nvmrc(currently22.21.0); runnvm useto match it. Older Node will fail theenginescheck. - Yarn 1 (Classic) —
packageManageris pinned to[email protected]. - Xcode + CocoaPods, and Ruby + Bundler (for iOS / Fastlane tooling).
- Xcode 26.6 or later, with the Metal Toolchain:
xcodebuild -downloadComponent MetalToolchain. - The iOS simulator build needs an Apple silicon Mac.
- After a change to
patches/llama.rn+*.patch, removenode_modules/llama.rnand runyarn --check-filesso the patch applies to fresh sources.
- Xcode 26.6 or later, with the Metal Toolchain:
- Android Studio + Android SDK/NDK.
See the React Native environment setup for platform details.
Clone, install & run
git clone https://github.com/a-ghorbani/pocketpal-ai
cd pocketpal-ai
nvm use # match the pinned Node version
yarn install # install JS dependencies
(cd ios && pod install) # iOS only
yarn start # Metro bundler
yarn ios # build + run on iOS simulator
yarn android # build + run on Android emulator
Core on-device chat works without any backend keys; only PalsHub/auth features need additional configuration.
Native-change rule: if you change
package.json, a native module,ios/,android/, the Podfile, orbuild.gradle, re-runpod installand rebuild both platforms — a JS reload won't pick up native changes.
Quality gates
yarn lint # ESLint
yarn typecheck # tsc --noEmit
yarn test # Jest
yarn l10n:validate # validate locale JSON (placeholders, integrity)
yarn test:perf # render-performance tests (Reassure)
yarn test:perf:compare [base] # render counts of HEAD vs. base (default: merge-base with origin/main)
Run yarn lint && yarn typecheck && yarn test before opening a PR. Pull requests also run the render-count comparison; see render-performance tests. Commits are validated by Commitlint (Conventional Commits) via a Husky hook.
Repository layout
src/
├── screens/ # Chat, Models, Pals, Benchmark, Settings, Plus, About, …
├── components/ # Reusable UI
├── store/ # MobX stores (Model, ChatSession, Pal, TTS, ASR, VoiceMode, HF, Benchmark, …)
├── services/
│ ├── agent/ # AgentRunner — the chat / tool loop
│ ├── talents/ # Tool engines + registries
│ ├── search/ # Web search providers for the search talents
│ ├── tts/ # TTS engines (kokoro, kitten, supertonic, phonon, system)
│ ├── asr/ # Whisper speech recognition (dictation and voice mode)
│ ├── voice/ # Hands-free voice mode
│ ├── plus/ # Plus feature catalog and gate
│ ├── iap/ # In-app purchases (store bridge)
│ ├── palshub/ # PalsHub marketplace integration
│ ├── deviceRules/ # Device-compatibility rules: parse, classify, launch-time fetch
│ └── downloads/ # Model download manager
├── database/ # WatermelonDB schema, models, migrations
├── repositories/ # Data-access layer over the DB
├── locales/ # i18n JSON + lazy loader (index.ts is the registry)
└── hooks/ api/ theme/ utils/ config/ specs/
Tech stack
Versions are pinned in package.json; the highlights:
| Area | Choice |
|---|---|
| Framework | React Native 0.87.1, React 19.2.3 (New Architecture) |
| Language | TypeScript 5.9.3 |
| UI | React Native Paper 5.15.3, React Navigation |
| State | MobX 6 (mobx, mobx-react, mobx-persist-store) |
| Persistence | WatermelonDB (chat history), AsyncStorage (settings), Keychain (secrets) |
| LLM | llama.rn 0.13.0-rc.11 → llama.cpp b12292 · GGUF |
| ASR | whisper.rn 0.7.4 → whisper.cpp · GGML; mic via @fugood/react-native-audio-pcm-stream 1.1.4 |
| TTS | @pocketpalai/react-native-speech 2.8.2 + onnxruntime-react-native ^1.23.2 · ONNX; @pocketpalai/react-native-speech-phonon 0.1.3 |
| Tooling | Yarn 1 (Classic), ESLint, Prettier, Jest, Husky + Commitlint |
Extending PocketPal
A Talent is a tool the model can call mid-conversation. Engines are registered in a TalentRegistry, exposed to the model as tool schemas; the AgentRunner detects a call, runs the engine, and returns the result for the next turn.
| Talent | Engine | Does |
|---|---|---|
calculate |
CalculateEngine |
Arithmetic / expression evaluation |
datetime |
DatetimeEngine |
Current date / time |
render_html |
RenderHtmlEngine |
Renders model-produced HTML in chat |
web_search |
WebSearchEngine |
Searches the web (opt-in; needs a configured provider) |
read_url |
ReadUrlEngine |
Reads a web page from search results, a site you named, or a link on a page it read (opt-in; needs a configured provider) |
Good first contributions:
- A new Talent — implement a
TalentEngineand register it insrc/services/talents/. - A new TTS engine — model it on an existing engine in
src/services/tts/engines/, register it inengineRegistry.ts, wire it intoTTSStore, then searchsrc/for that engine's name, ignoring case, to find every other entry it needs, such as its type, constants, setup-sheet entries and strings. - A new locale — translate on Weblate; registering a new language in the app follows the steps in
src/locales/index.ts.
Contributing
Contributions are welcome — bug reports, fixes, features, translations, and docs all help.
- Fork and branch:
git checkout -b feature/your-feature-name - Make your changes; run on a device/emulator (
yarn ios/yarn android). Re-runpod install+ rebuild if you touched native code. - Gate locally:
yarn lint && yarn typecheck && yarn test - Commit with Conventional Commits:
git commit -m "feat: add new talent" - Push and open a pull request.
Please read the Contributing Guidelines and Code of Conduct first. Want to translate PocketPal into your language? Join us on Weblate.
Roadmap
- Tool use expansion — grow the Talents catalog and deepen the agentic loop so Pals can do more, fully on-device.
Have an idea or found a bug? Open an issue or start a discussion.
Community & support
- 💬 Questions & ideas — GitHub Discussions
- 🐛 Bugs & requests — GitHub Issues
- 🌐 Website — pocketpal.dev
- ❤️ Support development — PocketPal is free and ad-free; sponsoring helps keep it that way.
License
Licensed under the MIT License.
Acknowledgements
PocketPal AI stands on the shoulders of the open-source community, including:
- llama.cpp — efficient on-device LLM inference.
- llama.rn — llama.cpp bindings for React Native.
- whisper.cpp — on-device speech recognition.
- whisper.rn — whisper.cpp bindings for React Native.
- @pocketpalai/react-native-speech — React Native TTS bridge powering on-device voices.
- Phonon by Gradium — on-device TTS model, built on Kyutai's Pocket TTS and Mimi.
- ONNX Runtime — cross-platform inference engine powering on-device TTS.
- React Native, MobX, React Native Paper, React Navigation, WatermelonDB, and many other open-source libraries that make this project possible.
Made with ❤️ for people who want AI that stays on their phone.
If PocketPal is useful to you, consider giving it a ⭐ — it helps others find the project.
03替代品与对比
并排对比 →04相关
版本历史 · 收录依据 · 给 AI 读
给 AI 读
- 调用方式:自身应用或网页
- 机器可读档案:/api/v1/software/pocketpal-ai.json · llms.txt
- 收录于 2026-11-18 · 更新于 2026-11-18