The systems I would defend.
An instrument is an argument about reality, and it can be wrong.
Built from scratch. Each one says what is measured and what is not.
The day-to-day is production infrastructure. What you can inspect on this page is the public work.
FlashSpec
Speculative decoding · PyPI · alpha
1.26–1.67× faster than compiled Hugging Face generate, across chat and code prompts, greedy and sampled.
Lossless speculative decoding for Hugging Face models: prompt lookup when the context already holds the answer, a small drafter model otherwise, on a CUDA-graph fast path.
One T4, Qwen2.5-1.5B checked by Qwen2.5-0.5B, one request at a time, ten prompts per set. On CPU it was slower than plain decoding; larger batches are not measured.
Greedy output matched compiled Hugging Face token for token on 17 of 20 prompts; the rest differ at exact fp16 ties.
Code edits copy from the prompt, so they run faster still: 3.88× on the edit prompt replayed here.
An optional extra adds FlashSpec-ASM, a hand-written AVX2 residual kernel. It is not on the generation path and does not change end-to-end speed.
My bandit lost to an if-statement. The if-statement is now the default; the bandit ships labelled experimental.
GitHub · PyPI
simd-ml-kernels
x86 SIMD kernels · C++17 · PyPI · pre-1.0
1.02–1.69× llama.cpp's decode speed on Llama-3.2-1B, in all nine measured configurations, on the same cores and weight files.
Hand-written AVX2, AVX-512 and VNNI kernels for the arithmetic under inference, each tested against a float64 reference and benchmarked against OpenBLAS, PyTorch or llama.cpp in the same run. A Llama-3.2-1B decode loop built from them gives the same 64 greedy tokens as Hugging Face in FP32, on five prompts. pip install simd-ml-kernels.
It loses to OpenBLAS and PyTorch in several measured cases, and the README lists every one. For plain speed on a CPU, use those or llama.cpp.
GitHub · PyPI
KANX
Kolmogorov–Arnold networks · PyPI · beta
5× fewer parameters than the MLP it beats, on a smooth 2-D target, across three seeds.
Kolmogorov–Arnold Networks for TensorFlow and PyTorch, with ONNX export checked in ONNX Runtime, a FastAPI service, a CLI, and Docker and Kubernetes configs. pip install kanx.
It is 8.3× slower at inference than that MLP. On a real table, UCI diabetes in one five-fold run, it scores a mean R² of 0.456 against ridge regression's 0.490.
GitHub · PyPI · Article: The Activation Moved to the Edge
guardrail-rs
LLM security proxy · Rust · crates.io · experimental
47 µs to screen an 8 KB request with the default regex and PII pipeline.
A small Rust proxy that checks LLM requests before they leave your network: prompt-injection patterns, personal-data redaction, your own rules, and two optional local ONNX models. No Python. Five crates on crates.io: cargo install guardrail-cli.
Measured on 263 labelled injections from a public set (deepset), the pattern rules catch 1.5% and the optional injection model 40%, flagging 3 of 399 harmless prompts. It is one layer, not a security control on its own. By default a check that errors is skipped and the request goes through; each skip is counted and logged.
GitHub · Detection results · Article: Building guardrail-rs
filing-qa
Question answering over financial filings · research prototype
6 / 119 answers stated a number not in their retrieved text. Read by hand, all six were correct derivations: shares, differences, a ratio.
Question answering over financial filings: hybrid dense + BM25 retrieval, a vision model that describes each chart at ingest, and a check that flags any stated number its sources do not contain. Answers cite their documents.
About 3 in 10 questions miss at retrieval. The number check cannot catch a real figure used for the wrong thing, and chart extraction and the full ingest path are not measured yet. An earlier README claimed 89% recall; I could not reproduce it, so I withdrew it and published the number I could.
GitHub
Composed-MoE-Engine
Fault-tolerant MoE runtime · pre-release
10 / 10 storage-stall chaos runs pass. Node-kill recovery passes about 17 times in 20. Both are recorded manual runs.
The systems layer under a Mixture-of-Experts model: fused Triton router, 4D parallelism, elastic recovery with expert resharding, two-tier async checkpointing.
An October audit against a dense single-device reference found the backward pass wrong whenever any parallelism dimension was above one, while 409 tests passed. Expert, tensor, sequence and FSDP2 data parallel now match that reference on CPU and Gloo at 2 and 4 processes, in push CI. Pipeline parallel matches it at 2 and 3 processes in tests run by hand; no CI job runs them yet. The router kernel is validated on single GPUs (T4, A100); multi-GPU, NCCL and multi-node runs are open.
GitHub · The audit record
Supporting work
paged-kv: Paged KV cache · Rust · crates.io. Paged KV-cache blocks and a first-come scheduler. On the Azure conversation trace, paged blocks fit 75 sequences in a 4.5 GiB budget of GPT-2 KV, where a doubling buffer fits 50. A measured reference, not a serving stack.
rlpost: LLM post-training · CPU-tested. SFT, a reward model, PPO and DPO, written out. The DPO loss matches TRL's within 10⁻⁶ on CPU; 233 tests, no GPU benchmark yet.
mcp-reliable: MCP observability · npm · v1. Watches MCP servers while they run: health, per-tool latency and output-shape drift, with alerts. On npm with six @mattral libraries; feature-complete for v1 and maintained.
PromptCanary: Silent LLM drift · PyPI. Detecting providers changing behaviour under a model string that never changed.
Worldgap: Early research · pre-registered. Scoring the sim-to-real gap with a world model before touching hardware. Two pre-registered runs so far: one null, one that tracked degradation but added nothing over a simpler baseline.
Earlier work, kept on purpose: Gesture_Arm, a gesture- and voice-controlled arm measured on real hardware, and an Induction Circuit study on whether fine-tuning quietly breaks a small transformer's copy mechanism. It does not: across three seeds the circuit strengthened, more under code than under prose.
An apprenticeship in scale.
The part of the path that shaped this work began offshore. I joined PTTEP to work on instrumentation and operational data, and was promoted on what I delivered. Real industrial systems set the constraints long before I had opinions about them.
At TotalEnergies the work became production ML for offshore energy operations. A model that fails silently there has physical safety consequences, so the job was pipeline reliability and monitoring against live operational streams.
Then the scale changed. I moved to a hyperscaler, first in cloud operations, watching the infrastructure that ML workloads run on, and now as an ML systems engineer working on reliability and fault tolerance for distributed training.
I read these years as an apprenticeship in scale: what it actually costs for an intelligent system to survive messy reality — fault tolerance, observability, drift detection, behaving sensibly under uncertainty. I learned it first somewhere the stakes were physical and immediate.
AWS AI & ML Mentor Scholarship, earned along the way.
An MSc in machine learning and data science, studied online after work.
Machines first. Then the idea that intelligence had structure.
The machines came first: self-balancing robots, quadcopters, machines that moved because of what a camera saw. Each one taught the same lesson from a different angle.
Computer vision found me in the AlexNet years. I worked through MIT OpenCourseWare and Andrew Ng's course back when the assignments were still written in Matlab. What caught me was that intelligence appeared to have structure you could write down, learn, and examine.
Self-balancing robot: Falling is the default state. Staying upright is active work, every millisecond.
Quadcopter: Four motors, one intention. Distributed control that still has to agree.
Vision: The moment a machine acted on what it saw, robotics became perception.
There is a difference between implementing something and understanding it. Implementing is a weekend. Understanding is the part that takes fifteen years.