[app] Full Gemma4Pad iPadOS implementation #4

Merged
sleepy merged 2 commits from feature/1-full-implementation into main 2026-05-22 12:59:12 +02:00
Owner

Complete iPadOS app for on-device Gemma 4 inference.

What

  • SwiftUI app with NavigationSplitView (sidebar + detail)
  • MLX Swift inference via gemma-4-swift-mlx (Gemma4Pipeline)
  • Text, image (PhotosPicker), and audio (AVAudioEngine) input
  • Multi-session conversation management with JSON persistence
  • Model selection: Gemma 4 E2B/E4B with Q4/Q8 quantization
  • HuggingFace model download via Gemma4Pipeline
  • Web search integration via configurable SearXNG endpoint
  • Editable system prompt with search tool schema toggle
  • Light/dark mode
  • XcodeGen project.yml + setup script

Architecture

  • Framework: MLX Swift (Apple's preferred LLM framework per WWDC 2025)
  • Inference: gemma-4-swift-mlx library (text + vision + audio)
  • Models: Pre-quantized MLX models from mlx-community on HuggingFace
  • Storage: Conversations in JSON files, attachments in Documents dir

Files (20 changed, ~1988 lines)

Closes

  • #1 (project scaffold)
  • #2 (services layer)
  • #3 (UI layer)
Complete iPadOS app for on-device Gemma 4 inference. ## What - SwiftUI app with NavigationSplitView (sidebar + detail) - MLX Swift inference via gemma-4-swift-mlx (Gemma4Pipeline) - Text, image (PhotosPicker), and audio (AVAudioEngine) input - Multi-session conversation management with JSON persistence - Model selection: Gemma 4 E2B/E4B with Q4/Q8 quantization - HuggingFace model download via Gemma4Pipeline - Web search integration via configurable SearXNG endpoint - Editable system prompt with search tool schema toggle - Light/dark mode - XcodeGen project.yml + setup script ## Architecture - **Framework**: MLX Swift (Apple's preferred LLM framework per WWDC 2025) - **Inference**: gemma-4-swift-mlx library (text + vision + audio) - **Models**: Pre-quantized MLX models from mlx-community on HuggingFace - **Storage**: Conversations in JSON files, attachments in Documents dir ## Files (20 changed, ~1988 lines) ## Closes - #1 (project scaffold) - #2 (services layer) - #3 (UI layer)
- SwiftUI app with NavigationSplitView (sidebar + detail)
- MLX Swift inference via gemma-4-swift-mlx (Gemma4Pipeline)
- Text, image (PhotosPicker), and audio (AVAudioEngine) input
- Multi-session conversation management with JSON persistence
- Model selection: Gemma 4 E2B/E4B with Q4/Q8 quantization
- HuggingFace model download via Gemma4Pipeline
- Web search integration via configurable SearXNG endpoint
- Editable system prompt with search tool schema toggle
- Light/dark mode support
- XcodeGen project.yml + setup script

Closes #1, #2, #3
- Fix prompt double-formatting: use pipeline multi-turn API properly
- Add NSMicrophoneUsageDescription to Info.plist
- Fix Swift 6 @Sendable violation in progress callback
- Remove dead code from ModelManager, use cache directory only
- Async image loading in MessageBubble (no sync I/O on main thread)
- Single source of truth for recording state (AudioRecorder)
- Throw on unknown model instead of silent fallback
- Remove print() in production SessionManager
- Strip HTML tags in WebSearchService content fetch
sleepy merged commit 6698b5a35e into main 2026-05-22 12:59:12 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sleepy/Gemma4Pad!4
No description provided.