Machine Learning Engineer  ·  Islamabad, Pakistan

Muhammad
Saad Hasan

I build intelligent systems and chase the frontier where science meets technology — currently engineering agentic RAG platforms, multimodal AI and computer-vision systems at Levitate Data.

View my work
Portrait of Muhammad Saad Hasan
Engineer & Researcher
4+
Years building AI
2
Enterprise AI platforms
5
Novel architectures
34+
Open-source repositories

I.  About

Engineering AI with the rigour of research and the discipline of production.

I'm a Machine Learning Engineer based in Islamabad, Pakistan, and a Computer Science graduate of FAST (NUCES). My work lives at the intersection of applied AI engineering and hands-on research — I love taking an idea from a paper or a blank repository all the way to systems that real businesses depend on.

At Levitate Data I work in the core AI engineering team behind Thalamus, an enterprise-grade agentic RAG platform, and I led the end-to-end architecture of Aletheia, a multimodal analysis engine that serves as the AI brain behind Cognition Legal. Alongside this, I dig into deep-learning research in medical imaging — rebuilding novel architectures from scratch, training them, and improving on them until they rival far heavier models.

What really drives me is curiosity. I find it astonishing that, by decoding the fundamental forces of nature, we eventually understood enough to build artificial intelligence itself — drawing inspiration from the architecture of the human brain. Chasing that thread, from first principles to working systems, is what keeps me building every day.

Focus
Agentic RAG · Multimodal AI · Computer Vision · DL Research
Stack
Python · PyTorch · TensorFlow · FastAPI · AWS
Education
BSc Computer Science, FAST NUCES (2021–2025)
Based in
Islamabad, Pakistan — open to remote

II.  What I do

Four disciplines, one engineer.

i.

Agentic RAG & LLM Systems

Hybrid retrieval pipelines, multi-pass reasoning, prompt orchestration and provider-agnostic LLM gateways that deliver citation-backed answers and cut hallucinations.

Qdrant · Cohere · OpenRouter

ii.

Multimodal & Computer Vision

Video, audio and image understanding — object detection, tracking, OCR and face recognition — wired into scalable, event-driven processing pipelines.

YOLO · OpenCV · Gemini

iii.

Deep-Learning Research

Novel, parameter-efficient architectures — KANs, spectral operators, knowledge distillation — benchmarked rigorously on real medical-imaging datasets.

PyTorch · TensorFlow · KAN · FNO

iv.

Full-Stack & Cloud

From React frontends to FastAPI backends and Infrastructure-as-Code on AWS — shipping multi-tenant, fault-tolerant platforms with CI/CD and observability.

React · FastAPI · AWS · Docker

III.  Experience

A record across product, research & engineering.

  1. Sept 2024 — Present

    Machine Learning Engineer

    Levitate Data · Islamabad, PK

    Part of the core AI engineering team behind two flagship enterprise products — Thalamus (agentic RAG) and Aletheia (multimodal analysis) — for heavily regulated industries; I led the end-to-end architecture of Aletheia.

    • Architected a zero-data-loss, multimodal ingestion engine with state-of-the-art parsers (DeepSeek OCR via Vertex AI, Chandra Datalab, Unstructured.io) and dynamic fallback mechanisms.
    • Designed a high-precision hybrid retrieval pipeline on Qdrant with Cohere re-ranking, autonomous prompt rewriting and dynamic system-prompt injection.
    • Built a provider-agnostic LLM gateway (OpenRouter) unifying OpenAI, Anthropic, Gemini & Mistral, plus an event-driven Celery architecture with autoscaling.
    • Hardened compliance with BYOK encryption, API-key rotation, schema versioning, rate limiting and a monetization control plane.

    Python · FastAPI · Qdrant · Celery · AWS · Docker

  2. Aug 2025 — Sept 2025

    Associate AI Engineer

    Amanat · Islamabad, PK

    • Built an AI-powered lost-and-found app using smart image & text matching for secure item recovery.
    • Improved model accuracy and system scalability for faster, more reliable matching.
  3. Jan 2025 — Apr 2025

    Full-Stack Engineer

    MRD Society · Islamabad, PK

    • Led end-to-end development of a platform for managing & publishing academic content.
    • Built secure REST APIs (Python) and a scalable MySQL schema; React frontend; CI/CD on Git.
  4. June 2024 — Nov 2024

    Software Engineering Intern

    Intrace (APIGen Inc) · Boulder, Colorado

    • Contributed to APIGen — generating custom APIs from natural-language prompts (React, Python, FastAPI).
    • Built PostgreSQL-backed REST APIs handling 1k+ RPM; shipped CI/CD with 95% test coverage.
  5. June 2024 — July 2024

    Backend Engineer Intern

    Merik Solutions · Islamabad, PK

    • Developed backend services with the .NET framework and rigorous test validation.
  6. June 2023 — July 2023

    ML & Computer Vision Intern

    DataInsight Research Lab · Islamabad, PK

    • On a fully funded research project, digitised doctors' handwritten prescriptions (Python, TensorFlow, OpenCV).
    • Built a YOLO + image-processing OCR pipeline reaching 92% accuracy; integrated TrOCR & PaddleOCR.

IV.  Featured Work

Products & systems I've shipped.

I Live · Enterprise SaaS

Levitate Data · Core AI Engineering Team

Thalamus

Agentic RAG-as-a-Service — “the end of endless searching.”

An enterprise-grade, multi-tenant platform that turns complex, unstructured data into reliable, auditable answers for regulated industries. I architected the multimodal ingestion engine, the hybrid retrieval pipeline and the provider-agnostic LLM gateway powering it.

66%
lower TCO vs in-house
6 mo
faster to production
Day 1
production reliability

Qdrant · Cohere · OpenRouter · Celery · BYOK

Visit Thalamus
II AI brain behind Cognition Legal

Levitate Data · Architect & Lead

Aletheia

Multimodal AI & behavioural-intelligence engine.

A multi-tenant platform for deep, automated processing of video, audio and text — decoding facial expression, tone and language. It powers context-aware chat and deposition analysis for Cognition Legal, coupling Google Gemini's multimodal models with the Thalamus RAG engine.

3
modalities: video · audio · text
IaC
AWS CloudFormation · ECS
Multi-tenant
strict isolation

FastAPI · Celery · Gemini · ECS · Docker

See it in Cognition Legal
III Computer Vision · Full-Stack

Flagship Project

TrashCam

Real-time littering detection & offender identification.

An end-to-end system that detects littering in real time, tracks offenders across frames and identifies them — built on a 220K-image dataset, with automatic LLM-generated incident reports and a full React + FastAPI + PostgreSQL stack.

0.89
mAP@0.5 (YOLOv12x + SAHI)
98%
offender ID accuracy
220K
images collected

YOLOv12x · SAHI · DeepSORT · TrOCR · FaceNet · Qwen · Ollama

View the repository

V.  Research & Development

Original deep-learning research, benchmarked hard.

A body of work on parameter-efficient architectures for multi-modal medical imaging — implementing, improving and inventing methods that match heavy baselines at a fraction of the cost.

No. 01 Novel architecture

Spectral-KAN

Kolmogorov–Arnold Networks × Fourier Neural Operators

A novel architecture using custom ChebyshevConv2D layers (learnable degree-3 polynomials instead of linear weights) and a Global Spectral Gating mechanism built on 2D FFTs with learnable complex frequency filters — for global spatial routing across X-ray, MRI and endoscopy.

~413K
parameters
93.43%
test accuracy
0.94
weighted F1

No. 02

Dynamic Ensemble Knowledge Distillation

Multi-modal medical classification

A 1.9M-parameter MobileNetV2 student with Coordinate Attention, distilled from an EfficientNetV2B0 + ResNet50V2 ensemble using entropy-based dynamic weighting and MixUp.

1.9M
params
97.56%
accuracy
>0.99
ROC-AUC

No. 03

KDLight

Lightweight knowledge distillation · 14 conditions

A compressed CNN distilled from a MobileNetV1 teacher via composite hard + temperature-scaled KL-divergence loss, profiled rigorously for real-world deployment.

~90%
less memory
4×
faster inference
86.7%
accuracy

No. 04

U-Net + Few-Shot TB Classification

Two-stage segmentation & meta-learning

A 7.7M-parameter U-Net for lung-field segmentation feeding a Prototypical Network (MobileNetV2) for 2-way, 5-shot tuberculosis classification from scarce data.

0.96
Dice score
98%
val accuracy
5-shot
meta-learning

No. 05

Evolutionary MobileNet-ConvLSTM2D

Hybrid net · evolutionary kernel search

A hybrid MobileNet + Inception + ConvLSTM2D classifier across 9 medical conditions, with a novel “Chain Foraging Cyclone Aging” evolutionary algorithm for dynamic kernel-size optimization.

94%
test accuracy
9
conditions
7K+
images

VI.  Projects

Selected builds across the stack.

A catalogue of my open-source AI work — generative models, computer vision, NLP, classical ML and classic-AI search — from my GitHub.

VII.  Toolkit

Technologies I work with.

Languages
Python · C / C++ · JavaScript · TypeScript · Java · SQL · C#
AI / ML
PyTorch · TensorFlow · OpenCV · YOLO · BERT · TrOCR · Scikit-learn · Pandas · Qwen · Ollama
Backend
FastAPI · .NET / ASP.NET · REST APIs · PostgreSQL · MySQL · Celery · Redis
Frontend
React.js · HTML / CSS · JavaFX
Cloud & Tools
AWS (S3 · ECS) · CloudFormation · Docker · Qdrant · Cohere · OpenRouter · Git · CI/CD
Concepts
Agentic RAG · Generative AI · Computer Vision · NLP · Knowledge Distillation · Neural Networks

VIII.  Beyond the Code

Off the clock — debater, sportsman & musician.

14
Gold medals
7
Silver medals
Pakistan
Selected to represent

Competitive Debate

A Champion Debater at the World Scholar's Cup — 1st place in both Debates & Team — alongside Champion Scholar and multiple wins for Excellence in Writing & Debate. Across the rounds I earned 14 gold and 7 silver medals, and was elected to represent Pakistan at the Global Rounds.

Sport & Fitness

I train at the gym every day and play football whenever I can. Off the pitch I'm an avid spectator — the NFL, golf, polo, basketball and plenty more.

Music

Away from the screen I'm a musician — I play the bass and guitar, a different (and very welcome) kind of pattern recognition.

IX.  Correspondence

Let's build something intelligent.

Have a problem worth solving with AI — or just want to talk shop about RAG, vision or research? My inbox is open.

LinkedIn
/in/msaadx
GitHub
/msaadx