AI engineer · Tehran

Open to interesting ML problems & collaborations

Curious about how intelligence works.
Careful about how it's built.

I'm Mahdi Alikhah, an AI engineer and computer science grad student focused on NLP, retrieval, and sequential decision-making. I like digging into how models behave underneath the abstractions — whether that means writing low-level Persian text processing in Rust or seeing how much capability can fit into a compact model.

PyPI downloads
34k+
HF downloads / mo
585
Models published
7
fig. 01 — the workshop

Selected work

Projects

Open-source tools, trained models, and experiments in NLP and generative modeling. Each project includes benchmarks, source code, and notes on where it falls short.

Flagship · Rust + Python

Rishe ریشه

Fast Persian NLP and morphology, built in Rust. Rishe turns raw Persian text into structured data — normalized text, tokens, lemmas, ezafe markers, stems, verb forms and spell suggestions — with optional POS, NER and dependency-parsing packs. It ships as a Rust crate and as abi3 Python wheels with no Python runtime dependencies. More than 30,000 downloads in its first month on PyPI, and over 34,000 to date.

  • 34k+ PyPI downloads, 30k+ in month one
  • 0.0804 → 0.4918 nDCG@10 on MIRACL fa
  • 0.32 → 0.89 recall@100
  • 3.9 – 3.14 CPython versions, abi3

The interesting part was not the tokenizer — it was admitting that static word vectors retrieve badly, then adding an optional encoder and a cross-encoder reranker without breaking the "base install stays model-free" promise.

  • Rust
  • PyO3
  • ONNX
  • Word2Vec
  • NLP
Pixel-art illustration for Rishe: a Persian word branching into its roots, on a dark field in gold and green.
fig. 02 — Rishe, drawn

Also on GitHub and Hugging Face: multilayer perceptrons from scratch, OpenCV face detection, a DFA recognizer in C++, and a random forest on Titanic.

Live diagram

A small network,
learning in front of you.

This is a real pixel-art neural net: 5 inputs, two hidden layers, 3 outputs. Each frame a few connections fire, the loss ticks down, and one input occasionally gets zeroed out the way a real training batch would. Nothing here is a video or an image — it is drawn, one square at a time, at 320×180.

Reduced motion is respected — the diagram renders one frame and waits for you.

Stack

The toolchain

Languages, libraries, and evaluation tools I use across modeling, retrieval, and systems work.

Languages
RustPythonTypeScriptSQL
NLP & morphology
Persian tokenizationLemmatizationEzafe detectionPOS taggingNERDependency parsing
Modeling
Transformers from scratchALBERT fine-tuningmT5 summarizationAutoregressive generationQuantizationTokenizers
Retrieval
BM25Dense retrievalnDCG / recall evaluationMIRACL
Shipping
PyO3abi3 wheelsmaturincrates.ioPyPIHugging Face Hub
Interface
CanvasCSS architectureAccessibilityStatic-first delivery

Approach Good ML engineering usually comes down to careful data preparation, honest evaluation, and picking the simplest architecture that solves the problem cleanly.

About

Bridging theoretical foundations and practical AI systems.

Alongside working as an AI engineer, I'm completing an M.Sc. in Computer Science with a focus on data science, recommender systems, and reinforcement learning. Having both a research lens and a systems background shapes how I build: I care about why an algorithm works on paper, and just as much about latency, edge cases, and clean packaging when it runs in the real world.

When I publish open-source tools or models, I try to document their limits as clearly as their benchmarks — like noting in Rishe's docs that its encoder isn't a drop-in sentence embedding and showing where retrieval still struggles.

The pixel-art animations on this page are a side hobby — mostly an excuse to hand-draw sprites and wire up a small neural net on an HTML canvas.

Contact

Building an AI system, or want to talk shop?

Whether you're working on a hard NLP or retrieval problem, collaborating on ML research, or just want to discuss one of my open-source projects, feel free to reach out. Email is fastest; LinkedIn works too.

Email me LinkedIn

mahdi1382alikhah@gmail.com