A native macOS study companion powered by on-device AI.
Drop your files, pick a model, and study — everything stays on your Mac.
Most AI study tools send your notes to someone else's server. LocalTutor doesn't — every model runs on your Mac through Apple's MLX framework, so your lecture slides, textbook PDFs, and class notes never leave your device. No API keys, no subscriptions, no cloud.
It's designed to feel like sitting down with a real tutor: you bring your materials, ask questions, and get answers grounded in what you're actually studying.
Drop or attach files and LocalTutor builds a searchable index of your content in seconds. Supported formats include:
| Category | Formats |
|---|---|
| Documents | PDF, Word (.docx), Pages, RTF, ePub |
| Spreadsheets | Excel (.xlsx), Numbers |
| Presentations | PowerPoint (.pptx), Keynote |
| Images | JPEG, PNG, TIFF, HEIC, WebP |
| Text | Markdown, plain text, CSV, JSON, XML, HTML |
| Web | Web archives (.webarchive) |
Vision-capable models can read diagrams, charts, and handwritten notes directly from images and PDF pages.
Ask questions in natural language and get streaming, markdown-rendered answers grounded in your sources. The tutor cites specific sections, pages, and headings so you can verify everything it says.
Three study modes adapt the tutor's behavior:
- Focused Study — deep-dive into a specific topic within your sources
- Broad Overview — survey across all attached materials for high-level understanding
- Open Ended — free conversation without source material
Quick-action chips let you refine any answer instantly: Expand · Simplify · Example · Why? · Deeper · Summarize · Compare · Related Topics.
Generate flashcard decks from your sources with a single click. Each card includes a difficulty rating (easy, medium, hard) and the built-in player lets you flip, navigate, and shuffle through your deck — no export needed.
Generate multiple-choice quizzes grounded in your materials. The quiz player scores your answers in real time, shows explanations for each question, and gives you a final breakdown when you're done.
LocalTutor doesn't just dump your files into a prompt. A multi-stage retrieval pipeline finds the most relevant content for each question:
- Heading matching — recognizes section numbers, chapter titles, and heading hierarchies
- Lexical search — BM25 ranking via a persistent SQLite FTS5 index
- Semantic search — on-device vector embeddings (Gemma Embedder 300M) for meaning-based retrieval
- Hybrid fusion — combines lexical and semantic results with Reciprocal Rank Fusion
- Context packing — fits the best content into the model's token budget with proportional allocation
All of this happens locally and automatically — you just ask your question.
Choose from models tiered to your Mac's memory:
| Tier | Models | Capabilities |
|---|---|---|
| 8 GB | Gemma 3 1B, Qwen 3 1.7B | Text tutoring, fast responses |
| 16 GB | Gemma 3 4B, Qwen 3 4B, Phi-4 Mini | Multimodal vision, stronger reasoning |
Models are downloaded once from Hugging Face and cached locally. A memory preflight check prevents loading a model that won't fit, and runtime policies cap generation length and source budgets per model.
- Token-by-token streaming at ~25 fps for responsive answers
- Built-in benchmark suite measuring prefill speed, generation throughput, and time-to-first-token
- Automatic embedding model lifecycle — loads for indexing/queries, unloads after 20 seconds of idle to free memory
- Debounced session persistence so your study history is always saved
- Fully offline — inference, indexing, and retrieval all happen on-device
- App Sandbox enabled — file access uses security-scoped bookmarks
- No telemetry, no accounts, no cloud
| Minimum | Recommended | |
|---|---|---|
| macOS | 26.5 | Latest |
| Chip | Apple Silicon | Apple Silicon |
| Memory | 8 GB unified | 16 GB unified |
| Xcode | 16+ | Latest |
-
Clone and open:
git clone https://github.com/alan13367/LocalTutor.git cd LocalTutor -
Open
LocalTutor.xcodeprojin Xcode. -
Select the LocalTutor scheme and press ⌘R.
-
Open Settings (⌘,) → download a tutor model. Smaller models (1B–1.7B) download in minutes and run on any Apple Silicon Mac.
-
Drag your study files into the workspace, type a question, and start studying. Try generating flashcards or a quiz from the toolbar.
LocalTutor/
├── Views/ SwiftUI — Study Workspace, Settings, artifact players
│ └── Components/ Flashcard player, quiz player, composer, refinement chips
├── Services/ Model runner, source extraction, indexing, retrieval, embedding
├── Models/ Model profiles, study sessions, artifacts, runtime policies
└── Support/ Constants, helpers, file paths
LocalTutorTests/ Unit tests (Swift Testing)
- SwiftUI — native macOS interface with
NavigationSplitView - MLX Swift + mlx-swift-lm — on-device LLM and embedding inference
- swift-huggingface — model downloads from Hugging Face Hub
- SQLite / FTS5 — persistent source indexing and full-text search
- CryptoKit — content fingerprinting for cache invalidation
- Accelerate / vDSP — fast vector similarity for semantic search
MIT — Copyright (c) 2026 Alan Beltran Pozo
