On-device inference · llama.rn

An AI coach that never phones home.

Many wellness apps use cloud inference. PulseWave's coach does not: the optional model runs inside the app via llama.rn, and prompts are not sent to an external model provider. Mood entries and thought records stay on the device by default. If you enable sync, the underlying records can also be stored in a per-user Firestore record under the controls described in the Privacy Policy; they are not used for analytics, shared-model training or advertising.

llama.rnLocal runtime
No API callsArchitecture
GGUFModel format
CBT-awareReframe style
  1. Home
  2. PulseWave
  3. On-device AI

What the coach actually does

Four jobs, all kept narrow on purpose. The point isn't to be a chat companion; it's to nudge the right intervention at the right time and to make journal entries useful instead of just a record.

1. Practice coaching

When you complete a breathing or meditation session, the coach uses your current mood entry, goals, time of day, and session history to suggest what to do next. Sometimes that means a follow-up protocol. Sometimes it means stopping for the day. The system uses a rule layer for straightforward decisions and the local model when a more conversational response is useful.

2. Journal pattern detection

The journal is where the processing distinction matters most. The coach reads recent mood entries and thought records on the device; those inputs are not sent to an external AI model provider. The current repository can still write the underlying entries to an authenticated per-user Firebase record under an anonymous or linked user ID, as described in the Privacy Policy.

3. CBT-style thought reframing

When you log a difficult thought, the coach can identify common cognitive distortions (catastrophising, mind reading, all-or-nothing thinking) and offer alternative framings. The reframes are presented as options, not pronouncements — the point is to expand the menu of available thoughts, not to overwrite the one you had.

4. Sleep story generation

For wind-down sessions. You give the coach a setting or theme and it generates a narrative for the next ten-to-thirty minutes. Because it's local, you can ask for anything; nothing about your request is logged anywhere off-device.

How it works under the hood

llama.rn provides bindings for running quantised open-weights language models inside React Native, using the same llama.cpp inference engine that has driven the local-LLM movement on macOS, Linux and Windows. PulseWave downloads a small GGUF-format model on demand into the app's documents folder. The model is small enough to run on iOS 16+ devices with the React Native legacy bridge.

There's a heuristic fallback. If you haven't downloaded the model, or if model inference fails for any reason, a rule-based engine provides basic coaching. The fallback is dumber but it's instant, and it never breaks.

Why we built it this way

The straightforward path would have been to wire the journal up to a cloud API. It would have been faster, smarter, and trivial to ship. We didn't because the data is sensitive, the regulatory landscape is shifting, and the trust burden of saying "your mental-health notes are processed by our third-party model provider" felt incompatible with the kind of product we wanted to build.

The trade-off is real. The model is smaller. Responses are slower. Some sophisticated multi-step reasoning isn't possible. We think the trade is worth it for what the app is — a personal tool, not a chat companion — and we've designed the coach's job around what a small local model can do well.

What's stored and where

How PulseWave surfaces the coach

In the home rail, inside the journal, never overbearing.

The coach appears where it's useful and stays out of the way elsewhere. Suggestions live on the home quick-action rail. Pattern callouts appear at the top of the journal when there's something worth saying. Thought reframes appear contextually after you log a difficult entry. No notifications, no nudges, no streak guilt.

  • Adaptive home suggestions — based on time of day, mood, and recent history.
  • Pattern callouts in the journal — surfaced gently, dismissible.
  • CBT reframes after difficult entries — opt in per entry.
  • Sleep story generator — on the sleep screen.
  • Heuristic fallback — works even without a downloaded model.
View release status
PulseWave home screen with adaptive AI suggestions in the quick action rail

FAQ

On your phone. PulseWave uses llama.rn — a local language model runtime for React Native — to run the model loop directly on iOS. There are no API calls to OpenAI, Anthropic, Google or any other model provider. No backend service is involved in generating responses.

A quantised open-weights model in the GGUF format, downloaded on demand into the app's Documents/models/ folder. The model is small enough to run on iOS 16+ devices with the New Architecture disabled. A heuristic rule engine provides fallback coaching if no model is downloaded.

No external model provider receives journal text for inference. The current repository can still store journal and mood records in an authenticated per-user Firestore record under an anonymous or linked user ID, with a local encrypted cache. Journal content is excluded from analytics, advertising and shared model training; the Privacy Policy explains Firebase processing and limited authorised administrator access.

Four things. (1) Reads your mood check-ins and surfaces patterns over time. (2) Suggests breathing or meditation protocols based on your current state and the time of day. (3) Offers CBT-style cognitive distortion identification and thought reframes when you log something difficult. (4) Generates sleep stories on demand for wind-down sessions.

Journal content is sensitive. Wellness data, especially mental-health-adjacent data, sits in a category where cloud processing creates real risk — regulatory, ethical and personal. We chose latency and a smaller model over an architecture that requires us to ask you to trust our infrastructure with your private thoughts.