On-device translanguage demo: Gemma 4 E2B fine-tuned for Luganda + Acholi (Sunbird/sunflower) running offline on Android via Cactus v1.14
# Sunflower
On-device translation, transcription, and speech Q&A for ten Ugandan languages (Luganda, Acholi, Ateso, Lugbara, Runyankole, Lusoga, Lumasaba, Swahili, Kinyarwanda, English). Runs a fine-tuned Gemma 4 E2B (Sunbird AI) — and optionally a Whisper-based ASR cascade — under Cactus's ARM-optimized engine. Android-first; offline.
For the architecture, threading model, and Cactus FFI contract, see design-spec.md.
For card-stack UI behaviour, see card_spec.md.
## Run
Requirements: flagship Android device (Pixel 7+ / S22+), Flutter 3.11+, Android NDK r27.x, USB debugging.
```bash
git clone git@github.com:SunbirdAI/sunflower-app.git
cd sunflower-app
flutter pub get
flutter run
```
The model isn't bundled (~4.7 GB INT4). On first launch the app shows "Get the model" — open the gear icon, tap Download. The tarball streams from HuggingFace into the app's private documents directory.
For dev pushes from Mac (faster than the in-app download):
```bash
hf download ak3ra/sunflower-qa-cactus-int4 model.tar.gz --local-dir /tmp
mkdir -p /tmp/sunflower_model
tar -xzf /tmp/model.tar.gz -C /tmp/sunflower_model
adb shell run-as ai.sunbird.sunflower_app sh -c 'mkdir -p app_flutter/model'
tar -cf - -C /tmp/sunflower_model . | \
adb shell "run-as ai.sunbird.sunflower_app sh -c \
'cd app_flutter/model && tar -xf - && touch .copy_complete'"
```
Substitute any other tarball from the *Available models* table below — the default Speech-Q&A bundle is shown here, but the on-disk layout is identical across all flat bundles.
Native Cactus mmap only works from `getApplicationDocumentsDirectory()` — `/sdcard` (FUSE) silently NULLs.
## Available models
The settings sheet ships nine downloadable variants across three architectural families. Pick by phone RAM, language coverage, latency budget, and what you want the audio path to do:
### Flat-bundle Gemma 4 (audio goes directly through Gemma's audio_tower)
| Family | Quant | Size | Tarball …