{"slug": "building-a-local-first-ai-tutor-for-my-daughter-and-10-14-year-olds-in-austrian", "title": "Building a local-first AI tutor for my daughter (and 10–14 year-olds in Austrian schools) with Gemma 4", "summary": "The article describes the creation of \"Lernbuddy,\" a local-first AI study companion for children aged 10–14, built using Gemma 4 E4B. The app runs entirely on-device with no network calls, ensuring student data like homework and personal information never leaves the device. It features AI-generated flashcards, a spaced-repetition scheduler, and bilingual support, all implemented as a .NET MAUI application.", "body_md": "This is a submission for the Gemma 4 Challenge: Build with Gemma 4\nMy daughter is 13. Like most students her age in Austria, she has an iPad.\nLike most parents, I'm uncomfortable about her typing homework into\nChatGPT — not because the answers are wrong, but because everything she\ntypes disappears into a cloud I don't control. Names, schools, half-formed\nthoughts, the topics where she's struggling. Stuff I want to stay on her\ndevice.\nSo I built Lernbuddy. It's a study companion for ages 10–14 that runs\nentirely on-device with Gemma 4 E4B. No network calls. No telemetry.\nThe model lives next to the kid's flashcards and her review history, on\nthe same disk, and that's it.\nThree things, all driven by Gemma 4 E4B:\nirregular verbs\n, European capitals\n) → the model pulls from general\nknowledge and creates a deck. Every card lands in a preview where you\ncan edit, delete, or add more before they go in the database.correct / almost / incorrect\n— spelling errors and\nparaphrasing are tolerated. It even writes a short personalized summary\nat the end: \"You handled past participles well. 'choose' and 'speak'\ngot mixed up — they'll come back tomorrow.\"\nBehind the quiz sits a small SM-2 spaced-repetition scheduler. Cards she\ngets wrong come back the next day; cards she gets right keep slipping\nfurther out. A streak counter and a per-topic \"✓ 12 solid · … 4 to\npractise\" badge make progress visible without dashboards.\nThe whole thing is a .NET 9 MAUI app — one codebase, four targets\n(Windows, Android, iOS, macCatalyst), bilingual from day one (German is\nthe primary audience, English the default for international demos).\nInference goes through Microsoft.Extensions.AI\n's IChatClient\ninterface. The concrete implementation wraps LLamaSharp running\nunsloth/gemma-4-E4B-it-GGUF\n(Q4_K_M quant, ~4.6 GB). Gemma 4's chat\ntemplate — <|turn>role\\n...<turn|>\n— gets built by hand; the embedded\njinja in the GGUF carries tool-calling logic the kid will never need.\nA singleton InferenceStatus\nservice publishes \"Loading model… 4.6 GB\",\n\"Generating… 23 tokens (4.1/s)\" to a small banner that's visible on every\npage. When prompt-processing takes 30 seconds before the first token (CPU\nis slow on long prompts), the banner still ticks. No dead spinners —\nthat matters more than raw throughput when you're 11 and waiting.\nLong source texts get split by paragraph and sentence into\n~500-character chunks. Cards appear rolling instead of waiting two\nminutes for one mega-prompt. Total throughput is slightly worse;\nperceived time is much better.\nThe project's privacy contract starts with \"local first\": no PII in\nprompts, parent-PIN gate on any future cloud mode, model download only\nover WiFi with explicit consent. The current app makes zero outbound\nnetwork calls after install. The only thing that ever leaves the device\nis what you type into a Gemini API form — and we don't have that form.\nBy design.\nThat's the differentiator. There are dozens of \"ChatGPT for kids\" apps;\nalmost none of them can credibly say \"your child's homework never leaves\ntheir device.\"\nI went down three runtime rabbit-holes before things stuck. ONNX Runtime\nGenAI doesn't support the Gemma 4 multi-file ONNX split yet.\ntransformers.js\n+ WebGPU inside a MAUI HybridWebView is theoretically\nbeautiful and practically a stack of four bleeding-edge components\nsilently failing in ways nothing surfaces. LLamaSharp + GGUF works —\nexcept LLamaSharp doesn't ship iOS-arm64 natives. So I built llama.cpp\nmyself for iOS on a Mac, statically linked against the resulting .a\nfiles via MAUI's NativeReference\nmechanism, and pointed\n[DllImport(\"llama\")]\nat __Internal\nvia a runtime resolver.\nThe lesson: for a multi-platform local-LLM .NET project in 2026, pick the\nruntime that has the deepest community, not the one with the prettiest\nabstraction. llama.cpp has a community measured in thousands; the .NET\nwrappers around it inherit that depth almost for free.\nCode: https://github.com/gpiwonka/Lernbuddy\nmore: https://piwonka.cc/Lernbuddy\nLicense: MIT. Built solo, on the side, between a day job and a tired\nfather's evenings. PRs welcome — especially from teachers who can point\nout what's missing from a learning-science perspective.\nThe submission is for the Gemma 4 Challenge. The motivation is more\npersonal.", "url": "https://wpnews.pro/news/building-a-local-first-ai-tutor-for-my-daughter-and-10-14-year-olds-in-austrian", "canonical_source": "https://dev.to/georgpiwonka/building-a-local-first-ai-tutor-for-my-daughter-and-10-14-year-olds-in-austrian-schools-with-j17", "published_at": "2026-05-23 16:14:50+00:00", "updated_at": "2026-05-23 16:31:46.778883+00:00", "lang": "en", "topics": ["artificial-intelligence", "machine-learning", "large-language-models", "products", "open-source"], "entities": ["Lernbuddy", "Gemma 4", "Gemma 4 E4B", "Austria", "ChatGPT", "SM-2", ".NET 9 MAUI", "Apple iPad"], "alternates": {"html": "https://wpnews.pro/news/building-a-local-first-ai-tutor-for-my-daughter-and-10-14-year-olds-in-austrian", "markdown": "https://wpnews.pro/news/building-a-local-first-ai-tutor-for-my-daughter-and-10-14-year-olds-in-austrian.md", "text": "https://wpnews.pro/news/building-a-local-first-ai-tutor-for-my-daughter-and-10-14-year-olds-in-austrian.txt", "jsonld": "https://wpnews.pro/news/building-a-local-first-ai-tutor-for-my-daughter-and-10-14-year-olds-in-austrian.jsonld"}}