Software engineer at Cledara, Barcelona. I build language models in Swift/MLX and wrote a from-scratch book on how LLMs work. One thesis runs through all of it: AI doesn't have to speak Python.
The five-second proof: swiftos.tech is served by an operating system I wrote from scratch in Swift. nginx, statically linked against SwiftOS's own newlib port, running on its own kernel, its own syscall ABI and its own in-kernel TCP/IP stack, on a bare Hetzner Cloud ARM VM. Not QEMU, not a container.
The argument has a written form — Why the AI Industry Still Pays a "Python Tax" — and the projects below are the evidence.
swift-os — an operating system from scratch in Embedded Swift for 64-bit ARM: capability-isolated, no Linux ABI, no dynamic loader.
Real MMU isolation with one address space per process; SMP across multiple cores; a pure-Swift in-kernel TCP/IP stack (DHCP/TCP/UDP/DNS/HTTP/TLS); a native Swift userland with coreutils, a shell, ps/top and sshd; a three-tier filesystem durable enough to back SQLite.
It runs real software — nginx over HTTPS, and Node.js 24.16 with npm in jitless mode (node -e "console.log(6 * 7)" prints 42) — and boots on real hardware via ACPI + GICv3 + PCIe, not just QEMU. It's a learning project, intentionally minimal and rough in places, not production. It does serve its own website, though.
swift-extract — Instructor for Swift, document-first: declare a Swift type, point it at a document, get back a typed, validated instance.
Works on PDFs, receipt photos, ID documents, screenshots and plain text with no templates and no document classifier — the type is the configuration, and macros build the schema at compile time. Runs on any LLM: Apple Intelligence on-device, MLX / Core ML / llama.cpp locally, or OpenAI / Anthropic / Gemini in the cloud. Five releases (latest 0.5.0), listed on the Swift Package Index; the demo runs a café receipt through Vision OCR and a local 4-bit Qwen2.5 1.5B, fully on-device.
swift-language-models — a textbook you can run: four parts of commented Swift, from counting letters to retrieval-augmented generation.
Part 1 is a counting n-gram model in one file; part 2 hand-builds a scalar autograd engine, then a neural bigram and an MLP; part 3 is a real char-level GPT Transformer on MLX; part 4 is a full RAG pipeline with BM25 over a local corpus. Parts 1, 2 and 4 are zero-dependency pure Swift. Companion code to the book below.
swift-adapt — on-device LoRA personalization for iOS and macOS: no server, no Python, no data leaving the machine.
The app collects training signal, Adapt trains an adapter locally, evaluates it on-device, and promotes it only if it beats the one in use — the gate is a one-sided Wilcoxon signed-rank test at α = 0.05, and "not enough evidence" is a separate outcome from "worse". Training is interruption-safe (a resumed run reproduces the uninterrupted loss curve to within 1e-5); rollback is a pointer flip. Measured on an M5 Pro: Qwen3-4B-4bit, rank 8, 100 steps → 15 s, 2.4 GB peak, a 10 MB adapter, 8 ms hot-swap. 212 tests in 44 suites, all offline. Openly unfinished: generation quality is usable but not done, and training on a physical iPhone is unmeasured.
NeuralBASIC — learn neural networks by poking them: live in the browser, no install, nothing leaves your machine.
Change the architecture, the learning rate or the data and watch the decision boundary move as it trains, epoch by epoch; then tap anywhere on the plot to test a point that was never in the data. Five written chapters, a strictly Socratic AI tutor that never pastes solutions, progress gated by demonstrated understanding — and every number in the lessons is verified by tests. Spiritual successor to QuickBASIC, and to my own TabletBasic below.
swift-watermark-remover — a Swift 6 package and CLI for studying text watermarks on-device (Apple Silicon, MLX); published for research and education.
How LLMs Work: From Zero to Your Own Transformer — two books in one: the main text builds intuition about tokens, embeddings, attention and training, while engineering asides carry the real formulas and code. Every example is real, runnable Swift tested on a Mac — not pseudocode.
- English: Kindle · paperback · Google Play Books
- Español: Cómo funciona un LLM: De cero a tu propio Transformer — also on amazon.es
- Companion code: EN · ES · RU
Two long-form pieces, both HackerNoon top stories.
- Why the AI Industry Still Pays a "Python Tax" — Python is roughly 70× slower than C, yet it runs all of AI; the tax is paid in dispatch microseconds, gigawatts, and doubled engineering labour.
- How Modern Voice-to-Voice AI Models Work — cascade vs speech-native architectures, neural audio codecs and RVQ, streaming and the real cost of the KV-cache, full-duplex conversation and barge-in. Companion code: EN · RU (nine dependency-free Swift scripts).
- In Russian: «Переоценённый король» — the Python Tax piece on Habr.
- TabletBasic (source) — a retro QuickBASIC 4.5-style IDE for iPhone, iPad and Mac, with a BASIC interpreter written from scratch in Swift: blue-screen DOS-style menus, immediate mode, 16 learning chapters, 80 sample programs, SCREEN 13-style graphics.
- Voice Agent Builder — the product side of the voice-to-voice article.
- The rest are on the App Store developer page.
By day: software engineer at Cledara, Barcelona.
HackerNoon · LinkedIn · GitHub — you're already here: @asaptf



