Why Own Model
We learned from the whole HF universe (not just pinkelephantlimited):
- PocketPal AI / Maid / MLC Chat (2026) — GGUF Q4_K_M is the community standard; base APK ~20MB, models downloadable, Vulkan/CPU universal. We adopt llama.cpp via NDK + GGUF (already proven in PinkElephantAgent) for max portability, not vendor-locked LiteRT/ML Kit.
- HF RAG Spaces — best pattern is local-first, not local-only: sequential local RAG + web search, concatenated with section headers (
[Local], [Web Search Results]) so LLM knows source. Dark mode retrieval discussions confirm structure-aware chunking + 384d embedders beat naive splitting.
- PromptQuorum / ItsFOSS 2026 tests — Snapdragon 8 Elite ~40 tok/s (NPU), Snapdragon 870 (iQOO Neo5 SE) ~12-18 tok/s CPU/Vulkan on Phi-3-mini/Gemma2B class. Our 1.2B Q4_K_M targets ~15 tok/s on your device — DeepSeek-like streaming, no cloud.
We do not bundle Qwen. Own tokenizer + own 1.2B config (phone_llm_train/model_config.json) ensures brand sovereignty.
Architecture: Local + Web, DeepSeek UI
User → WebSearchService (Jina Reader + DDG lite, 8s timeout, capped 1500 chars)
└→ local prompt (PhoneLLM GGUF via NativeEngine.nativeLlamaChat, 2048 ctx, 4 threads)
→ DeepSeek-like RecyclerView (streaming bubble, markdown, history, web toggle)
- Base APK ~20MB — models not bundled (learned from Pocket LLM v1.4: 200MB base → downloadable). APK lives in
apk/ on HF for storage.
- Storage: app-private
getExternalFilesDir()/models — correct scoped storage (PocketPal pattern).
- Training vehicle: molab RTX PRO 6000 102GB (
sb-bf9f066c447abaab), BF16, PagedAdamW8bit, gradient checkpointing — same QLoRA lineage as 48B but from scratch.
The Phone Model at a Glance
Table with columns: Spec, Value| Spec | Value |
|---|
| Params | 1.2B dense, 24L, 16 heads, 4 KV, hidden 2048, intermediate 5504, vocab 32000, RoPE 10k, 4096 ctx |
| Tokenizer | Own BPE 32k ([PAD][BOS][EOS][WEB][THINK]), trained on FineWeb-Edu + OpenHermes + StarCoder (HF datasets) |
| Quant | Q4_K_M ~0.8GB (phone), Q4_0 ~0.6GB (low-end), F16 ~2.4GB |
| Teacher | Pink Elephant 48B-S (47.7B) — distillation, not copy |
| Dataset | HF permissive mix 60% web / 30% chat / 10% code — curation is the moat |
| Hardware | molab 102GB → iQOO Neo5 SE 8GB offline |
| Inference |
Repo Layout (HF as storage)
pinkelephantlimited/phone-llm/
README.md
config.json # own 1.2B config (sovereign)
tokenizer.json # own BPE (after train)
train_tokenizer.py # from-scratch BPE
train_pretrain.py # 1.2B pretrain on molab
OWN_MODEL_PLAN.md
phone-llm-Q4_K_M.gguf # quantized for APK (after training)
phone-llm-f16.gguf
training/phone-llm/ # logs, loss curves
apk/phone-llm-v1.0.apk # base APK
Quick Start (on-device)
- Install APK from
apk/phone-llm-v1.0.apk via adb install
- First launch → taps Download model (HF) → fetches
phone-llm-Q4_K_M.gguf to models/ with progress
- Toggle Web Search for hybrid mode
adb install apk/phone-llm-v1.0.apk
# or via HF
huggingface-cli download pinkelephantlimited/phone-llm phone-llm-Q4_K_M.gguf --local-dir ./models
Build From Source
cd app/PhoneLLM
./gradlew assembleDebug # ~20MB base APK
adb install app/build/outputs/apk/debug/app-debug.apk
Training (molab GPU)
python phone_llm_train/train_tokenizer.py
python phone_llm_train/train_pretrain.py # 102GB GPU, 5000 steps v0.1
python -m llama_cpp.convert_hf_to_gguf --outfile phone-llm-Q4_K_M.gguf --outtype q4_k_m /home/marimo/phone-llm-out/final
APK
See app/PhoneLLM — DeepSeek-like chat, Hybrid RAG, HF storage. Test on iQOO Neo5 SE via adb/scrcpy.
Pink Elephant Limited — sovereign on-device intelligence, 2026