Skip to content

Repository files navigation

Mia

Local-first AI fitness coaching app with on-device LLM inference.

Built for competitive bodybuilders and strength athletes who want data sovereignty — and as a methodology amplifier for the coaches who train them.

Mia is designed to capture the specific decision-making frameworks, risk assessment, and coaching philosophy of excellent strength coaches so they can scale their impact, deliver better results to more clients, and grow their businesses without proportionally increasing their hours.

Roadmap (2026): docs/roadmap-2026.md — critical path: DPO on coach preference data → GGUF + GBNF on iPhone → in-session adaptive progression. Doc index: docs/DOC_INDEX.md.

Modularity is a core design goal. The core/ package (mia-core) is a reusable Python library for SQLite, RAG, and LLM inference that can be embedded in any app — React Native, CLI, web backend, or Jupyter notebook. See docs/core-installer.md for details.


Structure

This is a monorepo with clear separation between the mobile app, shared core logic, and RL training pipeline.

.
├── app/                  # React Native mobile app (iOS primary)
│   ├── ios/
│   ├── android/
│   └── src/
├── core/                 # Reusable Python library (mia-core)
│   ├── mia_core/         # Schema, RAG, prompts, LLM backends, ingest
│   ├── tests/
│   └── pyproject.toml    # pip installable
├── pipeline/             # RL training pipeline
│   ├── scripts/          # Data ingestion, preprocessing, RL pair generation
│   ├── configs/          # Training hyperparameters
│   └── requirements.txt  # Python dependencies for training
├── data/                 # Datasets (raw + RL-ready)
│   ├── raw/              # Source datasets (committed)
│   ├── rl_ready/         # Final training files (committed)
│   └── coach-gold/       # Coach questionnaire CSVs and templates
├── devicefarm/           # AWS Device Farm test harnesses
│   ├── ios-test-harness/ # iOS smoke test app (Xcode + llama.cpp)
│   ├── android-test-harness/  # Android smoke test app (planned)
│   └── shared/           # Test prompts shared across platforms
├── ios/                  # iOS test packages
│   └── MiaDeviceTest/    # Swift Package Manager test suite
├── scripts/              # Automation scripts
│   ├── export_for_mobile.py    # Export RL checkpoint to GGUF
│   ├── device_farm_deploy.py   # Deploy to AWS Device Farm
│   ├── eval_device_farm.py     # Cost-aware Device Farm runner
│   └── ...
├── tests/                # Benchmarks and acceptance criteria
│   ├── benchmark/
│   └── acceptance/
├── docs/                 # Architecture, pipeline, user stories, installer
├── models/               # Model artifacts (gitignored)
└── tools/                # Utility scripts

Quick Start

Mobile App

cd app
npm install
cd ios && pod install && cd ..
npx react-native run-ios

Core Library

cd core
pip install -e ".[llama]"  # or [transformers], [dev]
python3 -m pytest tests/

See docs/core-installer.md for full installation options, custom backend authoring, and embedding in other apps.

RL Training Pipeline

cd pipeline
pip install -r requirements.txt
python scripts/run_full_data_pipeline.py

Required Reading

If you are getting up to speed on this project, read these four docs in order:

  1. docs/development-process.md — How we work: issue-driven development, PR requirements, git workflow
  2. docs/model-pipeline-plan.md — End-to-end RL pipeline architecture, data tiers, and training stages
  3. docs/rl-feedback-loop.md — The iteration cycle: train → eval → fix → retrain
  4. docs/rl-fine-tuning-guide.md — Practical guide to preference pairs, hyperparameters, quantization, and evaluation

Documentation

Doc Purpose
docs/model-pipeline-plan.md End-to-end RL pipeline (living reference)
docs/rl-fine-tuning-guide.md Preference pairs, hyperparameters, quantization, evaluation
docs/rl-feedback-loop.md Iteration cycle: train → eval → fix → retrain
docs/development-process.md GitHub issue-driven PR requirements
docs/data-persistence-strategy.md SQLite schema, data flows, RL export
docs/dgx-spark-build-log.md Commands and setup for DGX Spark
docs/on-device-inference-and-ui-stack.md Mobile deployment plan
docs/mobile-deployment-pipeline.md Export, build, deploy, and benchmark on Device Farm
docs/mobile-feasibility.md Model specs, device support tiers, and speed estimates

License

Apache 2.0. See LICENSE.

Releases

Packages

Contributors

Languages