On this page
When a local AI app closes the moment a model loads, Android has almost always run out of memory for it. Android gives one app well under the phone’s total RAM, and a model needs more than its file size once it’s running. Pick a smaller file, lower the context length, set GPU layers lower or switch to CPU, and unload any other model. If the model you want needs more than your phone has, run it on your own computer and chat from the phone.
The steps use Off Grid AI Mobile (OGAM), the free app, version 0.0.119 or later. The same causes apply to any llama.cpp app on Android.
Why the app closes instead of showing an error
Android’s low-memory killer ends apps that take too much memory, and it doesn’t wait for a polite error. So an oversized model looks like a crash.
On Android, OGAM copies the whole model file into its memory, and the conversation needs room on top. So OGAM sizes models against your phone’s RAM:
| Phone RAM | Runs well | Tight | Too big |
|---|---|---|---|
| 8 GB | under 4.2 GB | 4.2 to 5 GB | over 5 GB |
| 12 GB | under 6.2 GB | 6.2 to 7.4 GB | over 7.4 GB |
| 16 GB | under 5.8 GB | 5.8 to 8 GB | over 8 GB |
A 4-bit file is about 0.6 GB per billion parameters. So a 13B model is about 7.8 GB, too big for an 8 GB phone, and a 7B model at about 4.2 GB is right at the line between Runs well and Tight.
Fix it in order
1. Use a smaller file. In OGAM, open Models and search. Search only lists models your phone can load, and marks files that only just fit as Tight. On a model’s page, Sizes offers Recommended, Smaller and Best. If the app keeps closing, pick Smaller, or a model from the next size down. If you’re setting up from scratch, Settings → Storage → Auto Setup has a Lean plan with smaller downloads.
2. Unload the other model. Open the model selector in a chat. Currently Loaded shows what’s in memory. Tap Unload on anything you’re done with. Unloading doesn’t delete the file. Finish an image job before you load a different chat model.
3. Lower the context length. Go to Settings → Model Settings → Text Generation. Context Length controls how much conversation the model holds, and a bigger context needs more memory. Lower it, reload the model, and start a fresh chat for a new topic instead of carrying a long one.
4. Lower GPU layers or switch to CPU. Crashes right after loading often come from GPU offload. In the same Text Generation section, tap Advanced. Under Inference Backend, try CPU, or keep the GPU and lower GPU Layers (OpenCL). Reload the model after each change. On phones under 6 GB of RAM, OGAM stays on the CPU, because the GPU and NPU buffers don’t fit.
5. Let the app pick safe speed settings. Also under Advanced, Use fastest settings loads your model on each backend your phone can run and keeps the fastest one that worked. A backend that fails to load can’t win, so it’s a quick way back to a working setup.
6. Close other apps. Games, the camera and big browser sessions hold memory. Close them, then load the model again.
Symptom, check, fix
| Symptom | Check | Fix |
|---|---|---|
| App closes as the model loads | File size vs your RAM row above | Smaller file or model |
| Loads, then closes on a long chat | Context Length | Lower it, start a new chat |
| Closes only on GPU | Inference Backend | CPU, or fewer GPU Layers (OpenCL) |
| Worked before, fails now | Currently Loaded | Unload the other model |
| Model loads but answers badly | Model size | Try another small model, or a narrower question |
Run the bigger model from your own computer
If the model you want is too big for any phone, run it on your computer and use it from the phone. Install Off Grid AI Desktop on your computer, load the model there, and in OGAM go to Settings → Remote servers. Add the computer’s address on port 7878 (for example http://192.168.1.50:7878), tap Test connection, and pick the model. The computer holds the model in memory. Your phone sends the question and shows the answer. Keep this on your own home network, and don’t forward port 7878 to the internet.
Need the full-size model?
Some models are too big for your phone and your computer. Off Grid AI Boost is an API for open models on our GPUs, at one flat price from $4.99 a month for the first cohort (regular price $9.99, plans up to $199.99). It names Qwen 3.8 and DeepSeek V4.1 Flash, uses one API key for every model, and we don’t store your prompts or train on them. The full privacy policy comes with launch.
It’s a pre-order. Boost starts in January; pre-order to lock in half price. Usage limits for each plan aren’t published yet. Keep a small model on your phone for offline, private use, and reach for Boost when you need the big one.
FAQ
Why does my local AI app crash on Android with no error? Android closed it for using too much memory. The model file plus its context needs more RAM than the phone gave the app.
How big a model can an 8 GB Android phone run? In OGAM, files under about 4.2 GB run well and files up to 5 GB are marked Tight. At 4-bit that’s roughly up to 7B to 8B parameters.
Does turning off the GPU stop crashes? It often helps right after loading, because GPU offload needs extra buffers. Switch Inference Backend to CPU and reload.
Will a smaller context make answers worse? The model can see less of the conversation at once. For short tasks you won’t notice. Start a new chat for each new topic.
Can I run a 13B or 30B model on my phone? Not on the phone itself with typical RAM. Run it on your computer with Off Grid AI Desktop and connect from the phone, or use Boost when it starts.
Open Models, pick the Smaller size of the model that crashed, and load it again. That fixes most of these.