Android: Tesseract mobile app on the fork (CPU arm64, HF model selector) - priority 1 #10

Open
opened 2026-11-18 18:49:57 +00:00 by dsh · 0 comments
Member

Priority change (2026-11-18): Tesseract gets its own small Android inference app on this fork; WhaleDroid moves to second place. Plan is in AGENTS.d/mobile-tesseract.md (private notes).

Goal. A focused phone app: pick one of several Tesseract models from HuggingFace, prompt/chat, stream tokens. No agent toolset. Runs CPU-only arm64 first, using this fork's llama.cpp + the tesseract arch.

Why. A real application is the strongest argument for upstreaming the arch (users, phones, model cards), and it forces us to keep the CPU path fast and the GGUF/quant contract honest. It is not a review shortcut.

Engine. NDK arm64-v8a CPU-only first (custom tardits scan ops are CPU kernels; GPU backends later per device, with CPU fallback). Thin JNI wrapper around the llama API; app repo separate from the fork, syncing upstream/master + our arch commits.

Model selector (no bundled weights). Fetch a JSON manifest (pinned HF raw URL) with entries like {id, display_name, size, quant, arch, sha256, url, context, notes}; download on first run, verify general.architecture == tesseract + hash, cache. New models ship by updating the manifest, not the app. Default Q8_0 (~109 MB), Q4_0 (~73 MB) for low-end, F16 (~203 MB) high-end; attn_gamma stays F32.

Milestones

  • M1 llama-cli/llama-completion cross-compiled for arm64, Q8_0 runs on a real phone (parity/mem check)
  • M2 minimal app: JNI + prompt + streaming output behind one downloaded model
  • M3 selector: manifest + download manager + Q4_0/Q8_0/F16 pick, size/speed display
  • M4 ship: perf pass, Play Store listing (weights downloaded, not bundled), crash reporting opt-in

Open questions for operator

  • app repo name/org (e.g. ml-lab/tesseract-android), Play Store identity
  • HF repo layout for the model matrix (one repo with quants vs one per quant, manifest location)
  • UI scope (plain prompt vs chat history) and minimum Android API / target devices
Priority change (2026-11-18): Tesseract gets its own small Android inference app on this fork; WhaleDroid moves to second place. Plan is in `AGENTS.d/mobile-tesseract.md` (private notes). **Goal.** A focused phone app: pick one of several Tesseract models from HuggingFace, prompt/chat, stream tokens. No agent toolset. Runs CPU-only arm64 first, using this fork's llama.cpp + the `tesseract` arch. **Why.** A real application is the strongest argument for upstreaming the arch (users, phones, model cards), and it forces us to keep the CPU path fast and the GGUF/quant contract honest. It is not a review shortcut. **Engine.** NDK `arm64-v8a` CPU-only first (custom `tardits` scan ops are CPU kernels; GPU backends later per device, with CPU fallback). Thin JNI wrapper around the llama API; app repo separate from the fork, syncing `upstream/master` + our arch commits. **Model selector (no bundled weights).** Fetch a JSON manifest (pinned HF raw URL) with entries like `{id, display_name, size, quant, arch, sha256, url, context, notes}`; download on first run, verify `general.architecture == tesseract` + hash, cache. New models ship by updating the manifest, not the app. Default **Q8_0** (~109 MB), **Q4_0** (~73 MB) for low-end, **F16** (~203 MB) high-end; `attn_gamma` stays F32. **Milestones** - [ ] M1 `llama-cli`/`llama-completion` cross-compiled for arm64, Q8_0 runs on a real phone (parity/mem check) - [ ] M2 minimal app: JNI + prompt + streaming output behind one downloaded model - [ ] M3 selector: manifest + download manager + Q4_0/Q8_0/F16 pick, size/speed display - [ ] M4 ship: perf pass, Play Store listing (weights downloaded, not bundled), crash reporting opt-in **Open questions for operator** - app repo name/org (e.g. `ml-lab/tesseract-android`), Play Store identity - HF repo layout for the model matrix (one repo with quants vs one per quant, manifest location) - UI scope (plain prompt vs chat history) and minimum Android API / target devices
Sign in to join this conversation.
No description provided.