Technical specifications and troubleshooting – Rocal
← Back to Rocal

Technical specifications and troubleshooting

This page explains Rocal's architecture, how its behavior is controlled, and how to adjust settings when something goes wrong.

1. Technical specifications and architecture

Rocal is an advanced, 100% local retrieval-augmented conversation (RAG) system that runs only on your smartphone's limited CPU and RAM.

AI inference & model specifications

  • Inference core: llama.rn engine (C++ native, connected through a JSI bridge) for very lightweight operation.
  • Quantization format: GGUF (models optimally quantized to 4-bit/5-bit).
  • Memory management: use_mlock is enabled to prevent the Android kernel from suddenly killing the process.
  • CPU threads: Parallel processing optimized for 4 to 6 cores, matched to the device's physical CPU cores.

RAG / local search

  • Document parsing: PDF ( expo-pdf-text-extract ), RTF, TXT and Markdown.
  • Text structuring: Logical splitting by heading markup (#) plus our own dynamic context layering.
  • Context protection: Seamless overlaps at chunk boundaries keep the context and automatically prevent breaks in meaning.
  • Search algorithm: BM25 scoring that combines Japanese bigrams and unigrams.

Local OCR specifications

  • Recognition engine: Google ML Kit On-Device Text Recognition.
  • Supported scripts (6): Japanese, English and Latin script, Chinese, Korean, Thai and Hindi (Devanagari).
  • Compatibility: Text is extracted from images 100% on the device and automatically added within the LLM's prompt budget, so you can talk about image documents even with models that don't support vision.

Data processing boundaries (three security layers)

To show the risk of data leaving the device accurately, Rocal clearly defines where data is stored and processed.

Layer 1. Communication outside the device (limited)

Processing that accesses outside servers (the cloud).*By design, the app has no processing at all that communicates or sends your chat history or imported confidential data outside.

  • No ad communication: Neither the free nor the paid version contains ads, tracking tags or ad SDKs, so there is no outside communication for ads.
  • Downloading AI models: Only when downloading an AI model file (such as Gemma 4) for the first time and checking for updates, the app communicates with model servers such as Hugging Face.

Layer 2. Access within the device, outside the app

Processing that involves no network communication but uses file areas and shared storage managed by the OS (Android), or calls native APIs.

  • Model sharing between series apps (Shared Model): Large LLM model files (.gguf) are shared and reused on the device with other series apps (such as Tracal/Lingcal) through a shared storage area (com.localai.sharedmodels), without any outside communication.
  • Importing documents: PDF/TXT/MD/RTF files are safely copied into the app from folders on your device.
  • Camera and image selection: The camera or photo album is opened so you can photograph paper documents for text recognition.
  • Copying text: You copy chat answers to the clipboard yourself.

Layer 3. In-app sandbox (fully private)

Highly secure processing that is completed only within Rocal's own encrypted local storage and app memory, without even involving OS features.

  • Running AI inference: From parsing your question to generating the answer, all computation happens only within the device's CPU and RAM.
  • Multilingual local OCR: Text in photos taken with the camera and imported screenshots is recognized using only offline libraries on the device.
  • RAG data search: Imported documents and chat history are kept in the app's own SQLite database, and the OS's standard sandbox blocks direct access from other apps.

How the 24 models were chosen, and the catalog

The AI models in Rocal are strictly grouped and optimized by device RAM and purpose, with an "accuracy-first" and a "speed-first" model in each tier.

RAM 6GB or more (available in Lite)

Lightweight, most stable models (6 models)

  • Gemma 3 1B 1.1GB
  • Qwen 3 1.5B 1.2GB
  • Phi-4-mini 3.8B 2.2GB
  • Llama 3.2 1B 0.9GB
  • TinyLlama 1.1B 0.7GB
  • SmolLM 1.7B 1.0GB
RAM 8GB or more (available in Lite)

Standard, purpose-built models (6 models)

  • Gemma 4 E4B 2.8GB
  • Qwen 3 4B 2.6GB
  • TranslateGemma 2B 1.8GB
  • Llama 3.2 3B 2.1GB
  • Mistral 7B Instruct 4.1GB
  • Gemma 2 2B 1.6GB
RAM 12GB or more (Premium only)

High-precision, multilingual, reasoning models (6 models)

  • Gemma 4 9B 5.4GB
  • DeepSeek R1 Distill 8B 4.9GB
  • Qwen 3 8B 4.8GB
  • Llama 3.1 8B Instruct 4.7GB
  • Phi-4 14B 8.2GB
  • Gemma 2 9B 5.4GB
RAM 16GB or more (Premium only)

Flagship, very long context models (6 models)

  • Command R 35B Light 11.2GB
  • DeepSeek R1 Distill 14B 8.8GB
  • Qwen 2.5 14B Instruct 8.6GB
  • Gemma 4 27B Quant 14.1GB
  • Llama 3.3 70B Instruct (Quant) 15.2GB
  • Mistral Small 22B 13.5GB

2. Troubleshooting

How to adjust things when the app is unstable or answers get cut off.

MemoryThe app is slow or restarts

Cause

Your smartphone is short of physical memory (RAM), so the OS (Android) is killing the process (Out of Memory).

What to do

Choose a model that suits your device's RAM (6GB / 8GB / 12GB / 16GB), one with the "Recommended" tag.

Max TokensAnswers are cut off partway

Cause

The app's max_tokens (maximum output tokens) limit was reached. Long answers and tables use many tokens.

What to do

Increase max_tokens in the model's detailed settings in the app, or type "Please continue".

3. Frequently asked questions (FAQ)

Q. What is the difference between the free (Lite) and paid (Premium) versions?

A. The main differences are the number of AI models you can store locally (limited to 1), the number and size of files you can add (with limits), and whether Obsidian Vault import is unlocked. Neither the free nor the paid version has any ads or outside communication. The app has no feature that outputs or sends data outside.

  • Rocal Lite (free): No ads at all, and it runs fully locally. You can store one model locally (swappable), and documents are limited to 1 folder with up to 5 files (1MB per file) by default.
  • Rocal Premium (paid): Store all 24 models and switch between them instantly, and add multiple folders and more files (with limits). You can also import Obsidian Vaults (*stays on your device, nothing sent).
Q. Which file formats can be imported (analyzed)?

A. Rocal can analyze the structure of PDF (.pdf), RTF (.rtf), TXT (.txt) and Markdown (.md) files offline.

All analysis is completed only in your smartphone's internal storage and memory. Nothing is ever sent outside.

Q. How is text read from images (photos and screenshots)?

A. The built-in multilingual local OCR (ML Kit) transcribes the text on your device.

It recognizes Japanese, English, Chinese, Korean, Thai and Hindi, switching recognizers on the device, so multilingual documents can be turned into text and added to the RAG search engine without a network connection.