Skip to main content

FRANK DUAH2026

--:--

IbreakAIagentsbeforeproductiondoes.

  • First Class Honours BSc, Computer Engineering
  • Dean's Award four years running
  • Chanrai Graduate Scholarship sole awardee
  • #2 contributor llm-exe

I hand-build the LLM stack with no frameworks, from the transformer up to an agent stress-tester. I also do the ordinary engineering that ships it.

Try the live search

01About

  • First Class HonoursBSc, Computer Engineering
  • Dean's Awardfour years running
  • Chanrai Graduate Scholarshipsole awardee
  • #2 contributorllm-exe

I build the LLM stack from scratch to learn how it actually behaves, then ship production systems on top of it. A transformer with every gradient derived by hand, a byte-level tokenizer, LoRA and its modern successors, an MCP server, and an adversarial stress-tester that fails CI when an agent gets less safe. No frameworks in any of them. Two are public, Glassbox and Forge; the rest are private while I finish cleaning them up, so their case studies map the real module layout instead.

That depth sits next to ordinary software engineering: full-stack work, applied machine learning, and open source. I am the second-highest contributor to llm-exe, a production LLM framework other developers build on. I iterate hard, and each pass has to clear the same bar as the last one.

Pursuing my MS in Artificial Intelligence at Northeastern University on a fully-funded merit scholarship, the sole graduate of the University of Ghana selected for it. Before that, a First-Class Bachelor's in Computer Engineering and the Dean's Award four years running (2019 to 2022). Much of the work is collaborative: research partners on transformer modeling, the multi-disciplinary team behind Ghana's National Science and Maths Quiz AI, and a thesis team that engineered a social platform from the ground up.

Skills

LLM & GenAI

  • RAG
  • Agentic AI
  • Model Context Protocol (MCP)
  • LLM application development
  • Prompt engineering
  • Evaluation & red-teaming (OWASP LLM Top 10)
  • Prompt-injection defense
  • Fine-tuning (LoRA / DoRA / QLoRA)
  • On-device & offline inference (GGUF, llama-cpp-python)
  • Transformer internals (attention, RoPE, KV-cache)
  • Byte-level BPE tokenization

LLM Providers & APIs

  • OpenAI
  • Anthropic (Claude)
  • Google Gemini
  • AWS Bedrock
  • Claude Code

ML Frameworks

  • PyTorch
  • TensorFlow
  • Keras
  • scikit-learn
  • Hugging Face Transformers
  • LangChain
  • llm-exe
  • NumPy
  • Pandas

Languages

  • Python
  • TypeScript
  • JavaScript
  • C
  • C++
  • Java
  • SQL
  • Bash

Data & Vector Stores

  • Vector databases
  • PostgreSQL
  • MySQL
  • MongoDB
  • DynamoDB
  • Supabase

MLOps & Cloud

  • AWS (Bedrock, Lambda, EC2, S3, CloudFormation)
  • Docker
  • GitHub Actions
  • CI/CD

Web

  • React
  • Vue
  • Next.js
  • Node
  • Express
  • Flutter
  • 7+

    years writing code

  • location

02Process

How I work.

  1. 01FrameDefine what working means as a number before writing code.
  2. 02PrototypeThe smallest thing that proves the idea.
  3. 03MeasureRun it enough times to get a rate, not an anecdote.
  4. 04GateThe rate becomes a threshold. A regression fails the build.
  5. 05DiagnoseFind the first thing that broke, then fix that.

03Index

04Selected work

The LLM Stack, Built From Scratch

The full LLM lifecycle, implemented by hand with no frameworks: a transformer, efficient fine-tuning, a tokenizer, and a Model Context Protocol server.

01

2026Author

Glassbox

A transformer from scratch, every gradient derived by hand

Every gradient was derived by hand and checked to eight decimals. No PyTorch anywhere, and it still trains on a laptop CPU.

A working transformer implemented in NumPy with no autograd anywhere. It supports both GPT-2 and Llama-style architectures (RMSNorm, RoPE, SwiGLU, and a KV-cache), and every forward and backward pass is hand-derived and gradient-checked to 1e-8. It trains and generates text on a plain CPU.

Gradient check
1e-8
the hand-derived calculus, verified to eight decimals
Frameworks
None (NumPy)
Architectures
GPT-2 · Llama
Runs on
CPU
  • Python
  • NumPy
Read the case study

02

2026Author

Forge

Modern fine-tuning methods rebuilt from the math up

The original weights are never modified, so one base model can carry many separate skills and switch between them while it runs.

LoRA, DoRA (the 2024 method), and QLoRA-style int8 quantization, all implemented by hand. The forward and backward passes are hand-written and gradient-checked, adapters hot-swap at runtime, perplexity evaluation is built in, and the frozen base model is provably left untouched.

Methods
LoRA · DoRA · QLoRA
Base model
Provably frozen
the original weights are never altered
Adapters
Hot-swap
Frameworks
None (NumPy)
  • Python
  • NumPy
Read the case study

03

2026Author

Cleave

A byte-level BPE tokenizer you can watch work in the browser

Text goes in, numbers come out, and the same text comes back. Python standard library only.

A byte-level Byte-Pair Encoding tokenizer built from the standard library, with a provably lossless round-trip on arbitrary Unicode. It exports a dependency-free in-browser tokenizer that matches the Python encoder token for token.

Round-trip
Provably lossless
text comes back out exactly as it went in
Alphabet
Byte-level
Browser export
Token-for-token
Dependencies
Stdlib only
  • Python
  • JavaScript
Read the case study

04

2026Author

Winnow

A Model Context Protocol server with no SDK, plus an injection scanner

Documents reach a model a quarter to three quarters smaller, and anything carrying hidden instructions is flagged before it gets there.

An MCP server implementing JSON-RPC 2.0 over stdio with no SDK. It compacts documents to Markdown (25 to 75% fewer tokens) and scans them for prompt injection before they reach a model, and it connects to Claude as a tool.

Protocol
JSON-RPC 2.0
SDK
None
Token reduction
25 to 75%
less text for the model to read, so a cheaper call
Guardrail
Injection scan
  • Python
  • MCP
  • JSON-RPC
Read the case study

05

2026Author

agentbounds

An adversarial stress-tester that fails CI when an agent gets less safe

Throws thousands of hostile inputs at an agent and reports how often it breaks across many runs, because one clean pass proves nothing. The build fails when that rate gets worse.

An adversarial stress-tester for LLM agents, built from scratch with zero runtime dependencies and 170 passing unit tests. Point it at any agent, throw a suite of hostile and edge-case inputs at it, and get an honest report of where and how often it breaks: per-category hold rates over N trials, a severity-weighted risk score, and a CI regression gate that fails a build when an agent gets measurably less safe. Inconclusive judge calls are excluded from the denominator rather than counted as passes, and heuristic detectors are labeled as heuristic. The effect-assertion layer is still being built.

Framing
OWASP LLM Top 10
the industry's standard list of LLM risks
Unit tests
170 passing
Scoring
Severity-weighted
CI
Regression gate
the build fails when an agent gets less safe
  • Python
Read the case study

06

2026Author

Device-Aware RAG Assistant

Offline-first retrieval that picks its own model backend

Runs the whole question and answer loop on the reader's own device. Nothing is uploaded and nothing is charged per question.

A retrieval-augmented assistant where the SAME code reads its runtime environment (network plus CPU and RAM) and picks a backend: a cloud model when resources are free, a quantized on-device model when they are not, with no user-facing toggle. Hybrid retrieval narrows by date before semantic search, and a pinned, model-aware embedding cache keeps vectors from different models from ever mixing. The live demo on this site is a browser-only slice of the same idea: it embeds every post on your device with a quantized MiniLM model and ranks by cosine locally, so ranking costs nothing per query and needs no search backend.

Backends
Cloud / on-device
Demo runtime
100% in-browser
Per-query cost
$0
Retrieval
Date + semantic
  • Python
  • RAG
  • llama.cpp
  • transformers.js
  • Next.js
Read the case study

07

2026Co-Author

Latency-Aware Execution Engine

Reinforcement learning trade execution

Beat the standard industry method by 10.2 basis points across 98 million real trades, by learning how to break a large order into smaller ones.

End-to-end ML system combining classical methods (Linear Regression, Random Forest, XGBoost) with a Double DQN reinforcement-learning agent (dueling architecture, prioritized experience replay) for optimal cryptocurrency trade execution. Beats TWAP by 10.2 basis points on Bitcoin walk-forward and cuts cost 96.7% versus immediate execution (the naive baseline), validated against 98 million real market trades across three assets. Implements the Almgren-Chriss market impact model, with 17 ablation studies and 176 unit tests. Dual final project for CS5130 (Applied Programming) and CS6140 (Machine Learning) at Northeastern.

vs TWAP (BTC)
+10.2 bps
beats the standard industry execution method
Cost reduction
96.7%
against trading the whole order at once
Validation
98M trades
Tests / Ablations
176 / 17
  • Python
  • PyTorch
  • Double DQN
  • XGBoost
Read the case study

08

2026Collaborator

llm-exe

Multimodal embedding input, merged upstream

56 merged changes, and the second-highest contributor count on a framework other developers build on.

Second-highest contributor and a Collaborator on llm-exe, an open-source TypeScript framework for building LLM applications. Authored its multimodal embedding input feature: one provider-neutral input type routing to AWS Bedrock Cohere Embed v4, while text-only providers reject image content at the boundary with a typed error. Merged upstream and published in v3.0.3, additive and non-breaking.

Release
Shipped in v3.0.3
Commits
17
CI
Node 18 to 24
Merged PRs
56
  • TypeScript
  • Node
  • GitHub Actions
Read the case study

More work

  • Music Emotion Recognition

    Transfer learning with RoBERTa for valence and arousal

    0.781 valence and 0.649 arousal correlation on the MERGE dataset's 2,568-lyric split.

  • Spark

    Safer social platform for kids, with ML age verification

    A child-safe social platform with a multi-stage ML age-verification pipeline (MTCNN, FaceNet, VGG16), built as a 3-person BSc thesis.

  • Brilla AI

    Open source AI that competes live in Ghana's National Science and Maths Quiz

    A live AI that competes in Ghana's National Science and Maths Quiz; I contributed the frontend and AI integration.

  • AI-PR-Assistant

    GitHub-integrated review bot

    Summarizes pull requests and flags risky changes inline, wired into the GitHub review flow.

05Education

01

2025 to present

Northeastern University

Master of Science in Artificial Intelligence

Sole graduate of the University of Ghana selected for a fully-funded merit scholarship covering tuition and living expenses.

02

2022

University of Ghana

Bachelor of Science in Computer Engineering

First-Class. Dean's Award for Best Performing Students four consecutive years (2019, 2020, 2021, 2022).

06Writing

May 2, 2025 · 9 min · LLM · TypeScript · Open Source

Supercharging LLM Applications with llm-exe

A walk through the llm-exe SDK with three concrete patterns: validating statements against conversation context, extracting structured data from unstructured text, and detecting user intent. One toolkit, four providers, modular components.

Read on Medium

Most days I post what I am learning about AI and agents. Follow along on LinkedIn, or read the archive here.

09Contact

Ask me about any number on this page.

Hiring, collaboration, or a question about the work above. I read everything.

© 2026 Frank Duah