M
MITHLOND
Product Overview & Capabilities
Native Apple Silicon Application

Mithlond

An elegant, on-device companion for J.R.R. Tolkien’s Elvish languages, combining offline dictionary indexing with local GPU-accelerated LLM intelligence.

Framework: SwiftUI & MLX
Engine: Eithron (Gemma-4)
Lexicon: Paul Strack (Eldamo)
01 / Concept

Didactic Learning & Native Performance

Mithlond serves as an accessible sandbox to explore Tolkien’s languages while showcasing high-performance machine learning running directly on consumer hardware.

Complete Eldamo Lexicon

Features instant, zero-latency parsing and search across Paul Strack’s master database (~30MB xml).

Eithron: Fine-Tuned Local LLM

Features standard ChatML integration optimized for grammar, roots, etymology, and declensions.

Private & Offline First

Zero tracking, zero server queries, zero subscriptions, and complete offline autonomy.

Mithlond Lexicon View
Main Interface: Custom calligraphic script & Lexicon details
02 / UX Design

Frictionless Setup Assistant

To keep initial distribution under 15MB, Mithlond employs an on-demand asset setup wizard. The user gets a premium experience right from the first launching frames.

On-Demand XML Lexicon Download

Direct live download from pfstrack's repository to guarantee up-to-date data.

Automated Calligraphy Font Registration

Registers custom Amanyë Tenceli fonts (Eldamar, Tengwar Parmaite) programmatically on first load.

Sandboxed & Safe

Installs directly into standard macOS Application Support directories without modifying system files.

Mithlond Setup Assistant Welcome
Setup Assistant: Step-by-step onboarding pipeline
03 / LLM Engines

Multi-Engine LLM Architecture

Mithlond provides diverse execution modes to support different hardware footprints, making high-performance local tuning modular and adaptive.

Apple MLX Swift (Default)

Natively optimized for Apple Silicon GPU unified memory using the Metal Performance Shaders.

Google LiteRT-LM & GGUF

Cross-platform flatbuffer compilation or GGUF single-file deployment for quick local tests.

External Local Host Port

Enables running with standard llama-server on port 8080 to conserve SSD space during active development.

Mithlond LLM Engine Selection
Engine Selector: Empowering users with model choices
04 / Performance

Multi-Threaded Weights Streaming

Once the engine is selected, Mithlond securely streams, parses, and validates the model shards without stalling the main UI thread.

Highly Responsive Streams

Utilizes background async-await network tasks paired with SwiftUI bindings for smooth animations.

Unified Memory Pre-allocation

Pre-calculates metal pipelines and pre-allocates unified memory blocks for instantaneous initial response.

Mithlond Downloading Shards
Progress Bar: Modern, fluid gradient showing active shard streaming
05 / Lexicon Explorer

Offline Semantic Search & Interactivity

The search core index parses the entire Paul Strack database instantly and provides deep language filtering, etymology analysis, and historical cross-references.

Vibrant Tagging UI

Categorizes languages (Neo-Quenya / Neo-Sindarin) using discrete color bubbles (`NQ` and `NS`).

Dynamic Cross-Reference Routing

Turns flat text references (like correlatives, words, and roots) into clickable links for instant browsing.

Source XML Transparency

Displays raw database XML records with beautiful syntax highlighting for advanced lexicographers.

Mithlond Search Interface
Lexicon Screen: Split column with semantic search and dark cards
06 / Typography

Amanyë Tenceli & Elvish Typography

Mithlond provides premium typographic previews of Elvish words rendered natively in Tengwar script without requiring manual system-wide font installations.

Programmatic Font Registration

Registers custom typefaces (Eldamar, Tengwar Parmaite, Parmaite Alt) programmatically at application startup.

Traditional Script Cards

Renders words inside a floating glass card utilizing traditional calligraphic rules.

Tengwar Calligraphy
Detail: preferred Tengwar Script card rendering "aiallo"
07 / Local AI Assistant

Meet Eithron: The Local Linguistic Expert

The built-in assistant Eithron runs a fine-tuned Gemma-4 language model inside Apple's unified memory, operating entirely offline via the MLX framework.

GPU Accelerated Metal Inference

Streams tokens word-by-word instantly in real-time, matching or exceeding cloud-hosted speeds.

Dedicated ChatML Protocol

Tuned strictly for Elvish etymology, English translations, and noun declension patterns.

Zero Dependencies / API Keys

Zero internet connection required. Operates perfectly even inside isolated environments.

Ask Eithron Sidebar Chat
Ask Eithron: Sliding drawer showing offline conversational AI
08 / Technical Architecture

Architecture & Engine Backends

Mithlond supports native Metal shader pipelines and third-party local wrappers to maintain extreme runtime flexibility.

Capability 🍏 Native MLX Engine (Default) 🦙 Local GGUF Engine
Primary Backend Apple Silicon Metal API via mlx-swift llama-server (C++ compiler port)
Quantization Focus Highly optimized 4-bit / 8-bit MLX weights Flexible GGUF formats (q4_k_m, etc.)
Memory Allocation Dedicated unified memory (Direct GPU access) CPU / Discrete GPU RAM split
Streaming Architecture Native Swift Async Streams Server-Sent Events (SSE) via localhost
Setup Overhead Zero terminal. Loads files directly into app. Requires terminal launcher background process
Build Verified & Active

Getting Started

Mithlond compiles natively into a unified, lightweight macOS/iOS target. Ready to deploy offline on your local Apple Silicon machine.

1

Open Package.swift

Double-click the manifest in Xcode 15+ to load the package structure automatically.

2

Build & Run

Press Cmd + R with target **Mithlond** and **My Mac** destination selected.

3

Setup Assets

Run the Setup Assistant to stream Elvish model weights and Paul Strack's lexicon.